on 08-31-2010 8:42 AM
Hi,
I have a doubt regarding the adobe form printing. I want a field which displays the date in a peculiar format. The format is like each digit in the date should come in each cell without any delimiter.
eg:- 12/02/2009, it should be displayed like 1 2 0 2 2 0 0 9. where each digit should be diplayed in a cell.
Regards,
Trishna
REPORT zztest .
DATA: BEGIN OF ls_split,
1 TYPE c LENGTH 1,
2 TYPE c LENGTH 1,
3 TYPE c LENGTH 1,
4 TYPE c LENGTH 1,
5 TYPE c LENGTH 1,
6 TYPE c LENGTH 1,
7 TYPE c LENGTH 1,
8 TYPE c LENGTH 1,
END OF ls_split.
DATA: lv_date TYPE dats VALUE '20090212'.
DATA: lv_date_swap TYPE n LENGTH 8.
DATA: lv_index TYPE syst-tabix.
FIELD-SYMBOLS: <field> TYPE ANY.
lv_date_swap = lv_date.
DO 8 TIMES.
ASSIGN COMPONENT sy-index OF STRUCTURE ls_split TO <field>.
IF <field> IS ASSIGNED.
lv_index = sy-index - 1.
<field> = lv_date_swap+lv_index(1).
ENDIF.
ENDDO.
now you got every single digit of your date in a single variable, so it should be trivial now to print em like you need it.
Edited by: Florian Kemmer on Aug 31, 2010 10:09 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.