Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Doubt in Internal table

Hi All.

It_deli_data and it_ship_data both have values ,i need to update it_sd_data.but iam getting dumb .pls explain me.

DATA:BEGIN OF waa_deli_data,

vbeln TYPE likp-vbeln,

kunnr TYPE likp-kunnr,

tknum TYPE vttp-tknum,

END OF waa_deli_data.

DATA:BEGIN OF waa_ship_data,

tknum TYPE vttk-tknum,

daten TYPE vttk-daten,

exti2 TYPE vttk-exti2,

exti1 TYPE vttk-exti1,

text2 TYPE vttk-text2,

tndr_trkid TYPE vttk-tndr_trkid,

text1 TYPE vttk-text1,

text4 TYPE vttk-text4,

END OF waa_ship_data.

DATA:BEGIN OF waa_sd_data,

vbeln TYPE likp-vbeln,

kunnr TYPE likp-kunnr,

tknum TYPE vttk-tknum,

daten TYPE vttk-daten,

exti2 TYPE vttk-exti2,

exti1 TYPE vttk-exti1,

text2 TYPE vttk-text2,

tndr_trkid TYPE vttk-tndr_trkid,

text1 TYPE vttk-text1,

text4 TYPE vttk-text4,

END OF waa_sd_data.

LOOP AT it_deli_data INTO wa_deli_data.

MOVE-CORRESPONDING wa_deli_data TO wa_sd_data.

APPEND wa_sd_data TO it_sd_data.

break-point.

ENDLOOP.

LOOP AT it_deli_data INTO wa_deli_data.

READ TABLE it_ship_data INTO wa_ship_data WITH KEY tknum = wa_deli_data-tknum.

IF sy-subrc = 0.

wa_sd_data-tknum = wa_ship_data-tknum.

wa_sd_data-daten = wa_ship_data-daten.

wa_sd_data-exti2 = wa_ship_data-exti2.

wa_sd_data-exti1 = wa_ship_data-exti1.

wa_sd_data-text2 = wa_ship_data-text2.

wa_sd_data-tndr_trkid = wa_ship_data-tndr_trkid.

wa_sd_data-text1 = wa_ship_data-text1.

wa_sd_data-text4 = wa_ship_data-text4.

  • MOVE-CORRESPONDING wa_ship_data TO wa_sd_data.

modify it_sd_data from wa_sd_data.

break-point.

ENDIF.

ENDLOOP.

To be reward all helpful answers.

Regards.

JNJ

Tags:
Not what you were looking for? View more on this topic or Ask a question