Skip to Content
0
Former Member
Dec 05, 2005 at 05:53 AM

Help me

34 Views

Hi all,

Plz review my query and reply me correctiones

TABLES : VBAK,VBAP,VBEP,VEDA.

DATA: BEGIN OF T_VBMTV OCCURS 200,

BSTNK LIKE VBAK-BSTNK,

AUART LIKE VBAK-AUART,

KUNNR LIKE VBAK-KUNNR,

VBELN LIKE VBAK-KUNNR,

FAKSK LIKE VBAK-FAKSK,

POSNR LIKE VBAP-POSNR,

KWMENG LIKE VBAP-KWMENG,

VRKME LIKE VBAP-VRKME,

NETWR LIKE VBAP-NETWR,

WAERK LIKE VBAP-WAERK,

ETENR LIKE VBEP-ETENR,

EDATU LIKE VBEP-EDATU,

END OF T_VBMTV.

SELECT-OPTIONS S_VBELN FOR VBAK-VBELN.

SELECT-OPTIONS S_AUART FOR VBAK-AUART.

SELECT-OPTIONS S_KUNNR FOR VBAK-KUNNR.

SELECT-OPTIONS S_VABN FOR VEDA-VABNDAT.

SELECT KBSTNK KAUART KKUNNR KVBELN K~FAKSK

AVASDA AVINSDAT AVUNTDAT AVABNDAT

PPOSNR PKWMENG PVRKME PNETWR P~WAERK

EETENR EEDATU INTO CORRESPONDING FIELDS OF TABLE T_VBMTV

FROM ( ( ( VBAK AS K INNER JOIN VEDA AS A ON KVBELN = AVBELN )

INNER JOIN VBAP AS P ON KVBELN = PVBELN )

INNER JOIN VBEP AS E ON KVBELN = EVBELN )

WHERE K~VBELN IN S_VBELN

AND K~AUART IN S_AUART

AND K~KUNNR IN S_KUNNR

AND A~VABNDAT IN S_VABN.

IF SY-SUBRC EQ 0.

WRITE :/ T_VBMTV-VBELN.

ELSE.

WRITE :/ 'NO DATA FOUND'.

ENDIF.

Advanced thanks for your reply

i look forward to your reply

Regards

sek