2007 Apr 24 2:20 PM
hi,
i am having one structure. structure having 20 columns. Each columns have 30 entries.. now i want to fill the first column of 30 entries.. after filled the first column dynamilly goes to second column.. column names like col1 col2 col3 like this ..
now my coding like this
do l_days times.
PJCPDETAILS-col11 = L_BOUTIQUES.
append pjcpdetails.
enddo.
once the loop will complete 30 times after that PJCPDETAILS-col11 should be PJCPDETAILS-col12 .. how to do this ?
Regards,
kumar
hi,
i am having one structure. structure having 20 columns. Each columns have 30 entries.. now i want to fill the first column of 30 entries.. after filled the first column dynamilly goes to second column.. column names like col1 col2 col3 like this ..
now my coding like this
do l_days times.
PJCPDETAILS-col11 = L_BOUTIQUES.
append pjcpdetails.
enddo.
once the loop will complete 30 times after that PJCPDETAILS-col11 should be PJCPDETAILS-col12 .. how to do this ?
Regards,
kumar
2007 Apr 24 2:26 PM
hi,
try like this
do l_days times.
if sy-index le 30.
PJCPDETAILS-col11 = L_BOUTIQUES.
append pjcpdetails.
endif.
if sy-index le 60.
w_index = sy-index - 30.
PJCPDETAILS-col12 = L_BOUTIQUES.
modify table itab index w_index traspoting col12.
endif
enddo.
regards,
ananth
2007 Apr 24 2:27 PM
Get the definition of the fields you have in the structure using class CL_ABAP_STRUCTDESCR.
Once you have a internal table with all the field names in it, use the following syntax:
Loop at IT_FIELDS into wa_FIELDS.
Assign component wa_fields-fieldname of PJCPDETAILS to XXXXX
endloop.
Leonardo De Araujo
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |