cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

EWM - Call transformation with output of the same type of field /SCWM/DATA_CONT-ALV_LAYOUT

0 Likes
612

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.

Accepted Solutions (0)

Answers (0)