2015 Dec 08 10:29 AM
Hi Folks,
I have a structure - ZSDT_SO_BACKLOG_DCRESTR having some fields.
My data declaration -
DATA lt_data_out TYPE zsdt_so_backlog_dcrestr.
DATA ls_data_out TYPE LINE OF zsdt_so_backlog_dcrestr.I need to add one more field into internal table LT_DATA_OUT without inserting that inside structure - ZSDT_SO_BACKLOG_DCRESTR.
In the below code LV_COMBU is the field. My output is ALV and my final internal table is LT_DATA_OUT.
LOOP AT lt_data_out INTO ls_data_out.
READ TABLE lt_hier INTO ls_hier WITH KEY prctr = wa_marc-prctr.
IF sy-subrc = 0.
MOVE ls_hier-level3 TO lv_combu.
ENDIF.
ENDLOOP.How to put LV_COMBU inside LT_DATA_OUT.
Thanks for your help.
Babu
2015 Dec 08 10:36 AM
Types: begin of ty_data_out.
include type zsdt_so_backlog_dcrestr.
types: lv_combu type combu,
end of ty_data_out.
data: ls_data_out type ty_data_out.
Hi Folks,
I have a structure - ZSDT_SO_BACKLOG_DCRESTR having some fields.
My data declaration -
DATA lt_data_out TYPE zsdt_so_backlog_dcrestr.
DATA ls_data_out TYPE LINE OF zsdt_so_backlog_dcrestr.I need to add one more field into internal table LT_DATA_OUT without inserting that inside structure - ZSDT_SO_BACKLOG_DCRESTR.
In the below code LV_COMBU is the field. My output is ALV and my final internal table is LT_DATA_OUT.
LOOP AT lt_data_out INTO ls_data_out.
READ TABLE lt_hier INTO ls_hier WITH KEY prctr = wa_marc-prctr.
IF sy-subrc = 0.
MOVE ls_hier-level3 TO lv_combu.
ENDIF.
ENDLOOP.How to put LV_COMBU inside LT_DATA_OUT.
Thanks for your help.
Babu
2015 Dec 08 10:36 AM
Types: begin of ty_data_out.
include type zsdt_so_backlog_dcrestr.
types: lv_combu type combu,
end of ty_data_out.
data: ls_data_out type ty_data_out.
2015 Dec 08 10:55 AM
Hi Peter ,
Thanks for your reply.
My issue now is -
TYPES : BEGIN OF ty_final.
INCLUDE TYPE zsd_so_backlog_dcrestr.
TYPES: lv_combu TYPE setnamenew,
END OF ty_final.
DATA: lt_data_out TYPE STANDARD TABLE OF ty_final,
ls_data_out TYPE ty_final.
CALL FUNCTION 'ZSD_BACKLOG_DCRESTR'
EXPORTING
im_kunag = rt_kunag
im_kunwe = rt_kunwe
im_vbeln = rt_vbeln
im_ppgi = rt_wadat
im_matnr = rt_matnr
im_auart = rt_auart
IMPORTING
dcrestr = lt_data_out
batch_detr_log = lt_batch_log.
LOOP AT lt_data_out INTO ls_data_out.
READ TABLE lt_hier INTO ls_hier WITH KEY prctr = wa_marc-prctr.
IF sy-subrc = 0.
MOVE ls_hier-level3 TO lv_combu.
ENDIF.
APPEND ls_data_out TO lt_data_out.
ENDLOOP.
Type conflict error.
2015 Dec 08 11:06 AM
You need to declare two table
Data: lt_data_out type zsdt_so_backlog_dcrestr, " for the function module
ls_data_out type zsd_so_backlog_dcrestr,
lt_final type standard table of ty_final, "final table for alv output
ls_final type ty_final.
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |