Pages

Monday, February 20, 2012

Leading zeroes in ABAP

how to remove leading zero in abap?

You can use FM : CONVERSION_EXIT_ALPHA_OUTPUT or

you can use this syntax:

data gv_int(9) value '000012121'.
SHIFT gv_int LEFT DELETING LEADING '0'.
write:/ gv_int.

Output will be : 12121.

Saturday, February 11, 2012

Function to get number of days between a given date, excluding Saturdays and Sundays and public holidays?

maybe can try this 2 Function:

:: DATE_CONVERT_TO_FACTORYDATE
:: HR_HK_DIFF_BT_2_DATES

Friday, February 10, 2012

Selection Screen : Checkbox

Purpose of use : to give an option to user.

declaration :

PARAMETERS : cb_box1 AS CHECKBOX default 'X' ,
cb_box2 AS CHECKBOX.


or

SELECTION-SCREEN: BEGIN OF LINE.
SELECTION-SCREEN: COMMENT 2(20) text001.

PARAMETERS cb_box1 AS CHECKBOX.
SELECTION-SCREEN : END OF LINE.

INITIALIZATION .

text001 = 'Label'.

WSCDSHOW_ALV : SAP Report - Display change documents of delivery

TRANSACTION CODE: VL22N

DESCRIPTION
Report to display change documents in the delivery.

Tuesday, June 15, 2010

READ_TEXT functions - read the SAP Long Text

You can used the READ_TEXT functions to read the SAP long text.

DATA: TNAME LIKE THEAD-TDNAME.

CALL FUNCTION 'READ_TEXT'
EXPORTING
ID = 'PB'
LANGUAGE = 'E'
NAME = TNAME
OBJECT = 'PBPT'
IMPORTING
HEADER = HTEXT
TABLES
LINES = LTEXT
EXCEPTIONS
ID = 1
LANGUAGE = 2
NAME = 3
NOT_FOUND = 4
OBJECT = 5
REFERENCE_CHECK = 6
WRONG_ACCESS_TO_ARCHIVE = 7
OTHERS = 8.

Monday, November 23, 2009

Special Character deletion

Used this Function to remove the special character :

SF_SPECIALCHAR_DELETE

Sunday, November 22, 2009

Function for Spell Amount

CLEAR spell.
CALL FUNCTION 'SPELL_AMOUNT'
EXPORTING
language = sy-langu
amount = w_amt2
filler = space
IMPORTING
in_words = spell
EXCEPTIONS
not_found = 1
too_large = 2.