‎2007 Jun 11 7:38 PM
Data in the internal table ITAB.
001###### | 15,444.17 | 143,334.61 |
*002###### | 37,231.88 | 2,267,526.04- |
003######### | ||
**004###### | 52,676.05 | 2,124,191.43- |
***005###### | 52.05 | 2,191.43- |
LOOP AT ITAB.
CONDENSE ITAB-LINE NO-GAPS.
SPLIT ITAB-LINE AT '|' INTO ZITAB-F1 ZITAB-F2
ZITAB-F3 ZITAB-F4 ZITAB-F5.
ZITAB-F1 = ZITAB-F2(3).
APPEND ZITAB.
ENDLOOP.The final output in ZITAB-F1 is,
001, *00, 003, **0, ***.
I dont want this as my output. I want to ignore the leading * and want output as in ZITAB-F1
001, 002, 003, 004, 005
Any suggestions.
Ster.
‎2007 Jun 11 7:44 PM
You can use replace statement.
REPLACE ALL OCCURRENCES OF '*' IN ZITAB-F2 WITH space.
ZITAB-F1 = ZITAB-F2(3).
Message was edited by:
Darshil Shah
‎2007 Jun 11 7:44 PM
You can use replace statement.
REPLACE ALL OCCURRENCES OF '*' IN ZITAB-F2 WITH space.
ZITAB-F1 = ZITAB-F2(3).
Message was edited by:
Darshil Shah
‎2007 Jun 11 7:45 PM
make the following change..
LOOP AT ITAB.
CONDENSE ITAB-LINE NO-GAPS.
SPLIT ITAB-LINE AT '|' INTO ZITAB-F1 ZITAB-F2
ZITAB-F3 ZITAB-F4 ZITAB-F5.
replace all occurrences of '*' in ZITAB-F2 with '0'.
ZITAB-F1 = ZITAB-F2(3).
APPEND ZITAB.
ENDLOOP.
~Suresh
‎2007 Jun 11 7:46 PM
LOOP AT ITAB.
TRANSLATE ITAB-LINE USING '* '. <b><-- Add this line</b>
CONDENSE ITAB-LINE NO-GAPS.
SPLIT ITAB-LINE AT '|' INTO ZITAB-F1 ZITAB-F2
ZITAB-F3 ZITAB-F4 ZITAB-F5.
ZITAB-F1 = ZITAB-F2(3).
APPEND ZITAB.
ENDLOOP.
‎2007 Jun 11 7:57 PM