SE43
There are 8 bits in a byte. There is No Shortcut to be A Great ABAP Programmer and It's Applies to All.
Friday, December 10, 2010
Thursday, December 9, 2010
ICON In Custom Message
Wonder how to put icon in custom pop up.
1) Select your favorite icon by running RTSXINFO
2) Insert status icon element at your module pool layout
3) Declare the parameter ID . Use this paramete name at you PARAMETER ID at status icon element.
DATA: ICN_WARNING TYPE ICONS-TEXT.
4) AT PBO set you status icon image using function ICON_CREATE , below is the e.g
MODULE SET_ICON OUTPUT.
CALL FUNCTION 'ICON_CREATE'
EXPORTING
NAME = 'ICON_MESSAGE_WARNING'
* TEXT = ' '
* INFO = ' '
* ADD_STDINF = 'X'
IMPORTING
RESULT = ICN_WARNING
* EXCEPTIONS
* ICON_NOT_FOUND = 1
* OUTPUTFIELD_TOO_SHORT = 2
* OTHERS = 3
.
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDMODULE.
CALL FUNCTION 'ICON_CREATE'
EXPORTING
NAME = 'ICON_MESSAGE_WARNING'
* TEXT = ' '
* INFO = ' '
* ADD_STDINF = 'X'
IMPORTING
RESULT = ICN_WARNING
* EXCEPTIONS
* ICON_NOT_FOUND = 1
* OUTPUTFIELD_TOO_SHORT = 2
* OTHERS = 3
.
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDMODULE.
5) END
Wednesday, August 11, 2010
Dynamic Open SQL Eh!
What is Dynamic OPEN SQL ?
Its featured as 'SQL changed' that depend on certain condition, resulted minimize line of code.
Please refer below link for better understanding
Its featured as 'SQL changed' that depend on certain condition, resulted minimize line of code.
Please refer below link for better understanding
DATA: str_where TYPE TABLE OF EDPLINE. " declaring the data for holding the where statement.
CONCATENATE 'NAME LIKE ''' NAMELIKE '%''' INTO str_where.
to be continued..
Wednesday, July 28, 2010
SAPScripts and Smartforms Myth
1) There is gutter at left 0.6cm perhaps ? How to change this ?
2) Smartforms what you see is what you not get , manually print and check to know if its correct or not.
3) Smartforms need to create structure to import customize itab at report program level any tricks to skip this ?
4) Counter technique is invented and used to manage the footer in sapscript ?
5) RKD_WORD_WRAP used in SAPScript to make to two lines output.
6) More to come.. the quest never end ;-)
2) Smartforms what you see is what you not get , manually print and check to know if its correct or not.
3) Smartforms need to create structure to import customize itab at report program level any tricks to skip this ?
4) Counter technique is invented and used to manage the footer in sapscript ?
5) RKD_WORD_WRAP used in SAPScript to make to two lines output.
6) More to come.. the quest never end ;-)
Thursday, July 22, 2010
Back to Basic : Internal Tables
Below is how to declare internal table using local structures type
'' Declaring local structures
TYPES: BEGIN OF struc_sflight,
carried like sflight-carrid,
connection LIKE sflight-connid,
END OF struc_sflight.
"Declare internal tables
" New declaration techniques dont have header line.
DATA : itabflight TYPE struc_sflight.
" Using work area to process data
DATA: wa_flight LIKE LINE OF itabflight.
Tuesday, June 15, 2010
Convert String to comma separated number value
There is certain time we need to convert a text of number to comma separated figure and concatenate with bracket, there is a function may could help on this
Below is the code snippet. Final output will be (13,000.00).
DATA: strnew(100) TYPE C.
PARAMETERS : p_betrg LIKE T5G15-AMUNT.
CALL FUNCTION 'HRCM_AMOUNT_TO_STRING_CONVERT'
EXPORTING
BETRG = p_betrg
* WAERS = ' '
NEW_DECIMAL_SEPARATOR = '.'
NEW_THOUSANDS_SEPARATOR = ','
IMPORTING
STRING = strnew
.
CONDENSE strnew.
CONCATENATE '(' strnew ')' INTO strnew.
WRITE:/ p_betrg, 'After conversion' , strnew.
Below is the code snippet. Final output will be (13,000.00).
DATA: strnew(100) TYPE C.
PARAMETERS : p_betrg LIKE T5G15-AMUNT.
CALL FUNCTION 'HRCM_AMOUNT_TO_STRING_CONVERT'
EXPORTING
BETRG = p_betrg
* WAERS = ' '
NEW_DECIMAL_SEPARATOR = '.'
NEW_THOUSANDS_SEPARATOR = ','
IMPORTING
STRING = strnew
.
CONDENSE strnew.
CONCATENATE '(' strnew ')' INTO strnew.
WRITE:/ p_betrg, 'After conversion' , strnew.
Subscribe to:
Posts (Atom)