ABAP/4
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:
- thitima's blog
- Add new comment
- 1106 reads
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-OPTIONSFOR .
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
- thitima's blog
- Add new comment
- Read more
- 4363 reads
Commenting in ABAP/4
In ABAP/4, we have 2 formatting for comment:
- 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. - 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
- thitima's blog
- Add new comment
- 1191 reads
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.
- thitima's blog
- Add new comment
- Read more
- 1628 reads
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
.
- thitima's blog
- Add new comment
- Read more
- 1590 reads
Get Last Date of Month in ABAP/4
*&---------------------------------------------------------------------*
*& Form get_last_date_of_month
*&---------------------------------------------------------------------*
* get last date of month
*----------------------------------------------------------------------*
* -->P_BEGDA is the date in month that you want to know last date
* <--P_ENDDA last date of month that system will return to you
*----------------------------------------------------------------------*
form get_last_date_of_month using p_begda
changing p_endda.
CALL FUNCTION ’LAST_DAY_OF_MONTHS’
- thitima's blog
- Add new comment
- Read more
- 1479 reads
Recent comments
2 years 30 weeks ago
2 years 35 weeks ago
2 years 36 weeks ago
2 years 36 weeks ago
2 years 36 weeks ago
2 years 39 weeks ago
2 years 39 weeks ago
2 years 39 weeks ago
2 years 39 weeks ago
2 years 39 weeks ago