2008 Jun 10 11:58 AM
Hi all,
I stored 'A' in a character field which is of lenght 1. How can it be incremented to B, C, D and so on. (Suppose in loop or so).
Regards,
Balakrishna.N
2008 Jun 10 12:04 PM
Hi,
u have to build up the logic...
use SY-ABCDE.
get the fpos value of the character in sy-abcde . and increment the position by 1. u will get the next character.
regards,
lavanya
Hi all,
I stored 'A' in a character field which is of lenght 1. How can it be incremented to B, C, D and so on. (Suppose in loop or so).
Regards,
Balakrishna.N
2008 Jun 10 12:02 PM
Hi,
DATA: WA_VALUE(3),
WA_CTR TYPE I,
WA_CHAR(1).
DO 26 TIMES.
WA_CTR = SY-INDEX - 1.
WA_CHAR = SY-ABCDE+WA_CTR(1).
WRITE: / WA_VALUE.
ENDDO.
Thanks
Nayan
2008 Jun 10 12:04 PM
Hi,
u have to build up the logic...
use SY-ABCDE.
get the fpos value of the character in sy-abcde . and increment the position by 1. u will get the next character.
regards,
lavanya
2008 Jun 10 12:05 PM
Use Translate
CONSTANTS:
trn(52) VALUE 'ABBCCDDEEFFGGHHIIJJKKLLMMNNOOPPQQRRSSTTUUVVWWXXYYZZA'.
DATA:
chrfld VALUE 'A'.
DO 26 TIMES.
WRITE:/ chrfld.
TRANSLATE chrfld USING trn.
WRITE AT 10 chrfld.
ENDDO.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |