on ‎2022 May 12 8:57 AM
Hello experts,
I'm writing a report which I select the field DATA from table /SCWM/DATA_CONT, after I use it to run a CALL TRANSFORMATION SOURCE XML and put the result in an internal table.
In the corresponding row of the extracted DATA in /SCWM/DATA_CONT, I have a field ALV_LAYOUT that define what was the layout used for this output.
How can i specify this layout (then adapt the fields of the internal table) in the CALL TRANSFORMATION?
My code is the following.
DATA: rs_demo_data_id TYPE /scwm/de_data_cont_id.
DATA: gt_month_end_stock TYPE /scwm/tt_lime_quan_mon.
rs_demo_data_id = 'PDC ZN00000033'.
CONCATENATE '%' rs_demo_data_id '%' into data(lv_src).
select * into CORRESPONDING FIELDS OF TABLE lt_data_cont from /SCWM/DATA_CONT where id LIKE lv_src.
sort lt_data_cont by createutc DESCENDING.
LOOP AT lt_data_cont INTO ls_data_cont.
MOVE-CORRESPONDING ls_data_cont TO ls_data_cont_tmp.
exit.
ENDLOOP.
TRY.
CALL TRANSFORMATION id SOURCE XML ls_data_cont_tmp-data
RESULT data_node = gt_month_end_stock
.
CATCH cx_transformation_error.
MESSAGE ID sy-msgid TYPE 'S' NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4
DISPLAY LIKE 'E'.
RETURN.
ENDTRY.
Request clarification before answering.
| User | Count |
|---|---|
| 17 | |
| 14 | |
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.