on 06-24-2010 7:32 AM
Hello all,
I have 2 tables: the first :
TYPES:BEGIN OF ty_qmel,
icon TYPE icon_d,
qmnum TYPE qmel-qmnum,
qmart TYPE qmel-qmart,
ernam TYPE qmel-ernam,
erdat TYPE qmel-erdat,
qmdab TYPE qmel-qmdab,
qmgrp TYPE qmel-qmgrp,
qmcod TYPE qmel-qmcod,
ltrmn TYPE qmel-ltrmn,
ltrur TYPE qmel-ltrur,
iloan TYPE qmih-iloan,
qmnum1 TYPE qmnum,
qmnum2 TYPE qmnum,
qmnum3 TYPE qmnumt,
END OF ty_qmel.
TYPES: tt_qmel TYPE STANDARD TABLE OF ty_qmel .
DATA:gt_qmel TYPE TABLE OF ty_qmel.
the second :
TYPES: BEGIN OF qmnum_struct,
qmnum TYPE qmnum,
END OF qmnum_struct.
DATA: qmnum_lt TYPE STANDARD TABLE OF qmnum_struct,
qmnum_ls TYPE qmnumt_struct,
I want to loop at qmnum_lt 3 times and each time assign qmnum
to field qmnum 1-3 dynamicaly.
Is it poosibel ?
Regards
Yifat
loop at qmnum_lt.
n = 0.
case n.
when 0.
qmnum1 = qmnum.
n = n + 1.
when 1.
qmnum2 = qmnum.
n = n + 1.
when 2.
qmnum3 = qmnum.
clear n.
endcase.
endloop.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
have a look at this:
http://help.sap.com/saphelp_bw32/helpdata/en/fc/eb3923358411d1829f0000e829fbfe/content.htm
ASSIGN COMPONENT <comp> OF STRUCTURE <s> TO <FS>.
comp may be the index of the field or the name of the field. fs is assigned to the field of the work area / field symbol s.
Alex
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
100 | |
12 | |
11 | |
6 | |
6 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.