Skip to Content
0
Former Member
Dec 04, 2006 at 01:39 PM

TO GET RIGHT OUTPUT

28 Views

this is a code to get service number and length of the numbers from the table ESLL-SRVPOS but when output comes it shows a number of trailing zeros before real output .the code is as follows :sending example of output format after code

REPORT Z_02FOR_TESTING_ONLY.

TABLES: ESLL.

DATA: BEGIN OF IT OCCURS 0,

SRVPOS LIKE ESLL-SRVPOS,

END OF IT.

DATA:LEN TYPE I.

WRITE:20 'LEN' , 40 'IT'.

ULINE.

IF IT-SRVPOS EQ LEN.

SELECT SRVPOS INTO IT FROM ESLL.

SHIFT IT LEFT DELETING LEADING '0'.

LEN = STRLEN( IT ).

WRITE: / LEN UNDER 'LEN'.

WRITE: / IT UNDER 'IT'.

ENDSELECT.ENDIF.

OUTPUT:

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

6 100001

6 100001

6 100001

6 100001

6 100001

6 100001

6 100001

6 100001

6 100001

6 100001