DATA : BEGIN OF IT_VBAK OCCURS 0,
VBELN LIKE VBAK-VBELN,
KUNNR LIKE VBAK-KUNNR,
END OF IT_VBAK.
* Sales Order Line Item Data
DATA : BEGIN OF IT_VBAP OCCURS 0,
VBELN LIKE VBAP-VBELN,
MATNR LIKE VBAP-MATNR,
ARKTX LIKE VBAP-ARKTX,
KWMENG LIKE VBAP-KWMENG,
MEINS LIKE VBAP-MEINS,
NETPR LIKE VBAP-NETPR,
waerk like vbap-waerk,
NETWR LIKE VBAK-NETWR,
END OF IT_VBAP.
* Final Internal Table for Display
DATA : BEGIN OF IT_FINAL OCCURS 0,
VBELN LIKE VBAK-VBELN,
KUNNR LIKE VBAK-KUNNR,
MATNR LIKE VBAP-MATNR,
ARKTX LIKE VBAP-ARKTX,
KWMENG LIKE
VBAP-KWMENG,
MEINS LIKE VBAP-MEINS,
NETPR LIKE VBAP-NETPR,
WAERK like vbap-WAERK,
NETWR LIKE VBAK-NETWR,
END OF IT_FINAL.
loop at it_vbak.
LOOP AT IT_VBAP
WHERE VBELN EQ IT_VBAK-VBELN.
MOVE : IT_VBAK-KUNNR TO
IT_FINAL-KUNNR,
IT_VBAK-VBELN TO IT_FINAL-VBELN,
IT_VBAP-MATNR TO IT_FINAL-MATNR,
IT_VBAP-ARKTX TO IT_FINAL-ARKTX,
IT_VBAP-KWMENG TO IT_FINAL-KWMENG,
IT_VBAP-MEINS tO IT_FINAL-MEINS,
IT_VBAP-NETPR TO IT_FINAL-NETPR,
IT_VBAP-NETWR TO IT_FINAL-NETWR,
IT_VBAP-WAERK to it_final-waerk.
APPEND IT_FINAL.
CLEAR IT_FINAL.
ENDLOOP.
endloop.
Serkan AKKAVAK
Computer Engineer
SAP Department Deputy Manager
Contact : serkurumsal@yandex.com
0 Comments