Programming

Program Selections in ABAP/4

When you want to create report in SAP, the selection screen will be displayed when we want to execute program. The syntax for create selections are compose of:

SELECT-OPTIONS in ABAP/4

SELECT-OPTIONS is a complex selection. If user want to input value of field more than one value, it is possible by using SELECT-OPTIONS.

Syntax

SELECT-OPTIONS  FOR .

Example

SELECT-OPTIONS s_belnr FOR bkpf-belnr.

Structure of Selection

SELECT-OPTIONS have structures:

  • SIGN Possoble value are I(Include) and E(Exclude).
  • OPTION Possilble value are EQ(Equal), NE(Not Equal), GT(Greater Than),GE(Greater Tahn or Equal), LT(Less Than), LE(Less Than or Equal), CP(Contains Pattern), NP(Not Contains Pattern), BT(Between), NB(Not Between)
  • LOW keep low value
  • HIGH keep high value

Options

ThinkCAP goes open source

ThinkCAP is an internet application framework with AJAX for J2EE platform. It utilizes prototype.js and script.aculo.us like Ruby on Rails do.

Asynchronous JavaScript and XML, or AJAX, a technique for creating interactive Web applications, has exploded onto the Web development scene, gaining popularity so quickly that some developers are lagging behind in their skills. To address the need for faster AJAX development, lots of companies and developer communities are coming up with Rapid Application Development (RAD) platforms for AJAX. One of those platforms, ThinkCAP JX Framework, combines more than two dozen open source libraries, and the "framework" portion of the application has just been released under the terms of the GNU General Public License (GPL).
NewsForge | ThinkCAP goes open source

Commenting in ABAP/4

In ABAP/4, we have 2 formatting for comment:

  1. Line Comment: If you want to comment whole line, you can put * sign in front of the line.
    Example:
    * Comment Line
    WRITE: This is the example for commenting.
  2. Partial Line Comment: If you want to comment partail of line, you can put " sign in front of the comment text
    Example:
    WRITE: This is the example for commenting.    "Comment Line

PARAMETERS in ABAP/4

Syntax


              

PARAMETERS (length) [TYPE type or LIKE obj] DECIMALS d.


              

Examples

PARAMETERS: char1(20) TYPE C,
date1 LIKE SY-DATUM,
number1 TYPE P DECIMALS 2. 

Options

  • DEFAULT
    Example: 
    PARAMETERS p1(5) TYPE C DEFAULT ’we’.
  • MEMORY ID
    Example: 
    PARAMETERS p2(5) TYPE C MEMORY ID pid.

How to get Text of Domain Value in ABAP/4


CALL FUNCTION ’DOMAIN_VALUE_GET’
   EXPORTING
     I_DOMNAME       = lv_name "Domain Name
     I_DOMVALUE      = lv_value "Domain Value
   IMPORTING
     E_DDTEXT        = lv_text "Text of Domain Value
   EXCEPTIONS
     NOT_EXIST       = 1
     OTHERS          = 2
           .