Friday, December 10, 2010

Integer Type Variable - Sapscript Using Space

Hi Folks,

It seems in SAPScript it will not condense if printing integer type value ,
if need comma separated value e.g 6,000,000 moving the value to char type variable is not a good choice as it will remove the comma in after moving the value .

The trick is put condense character in the SAPscript for e.g

&v_credit_ringgit(C)&

it will condense any empty space even it is integer type value.

Changing Custom Menu Path

To change custom menu path used this tcode

SE43

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.

5) END