Skip to Content

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

native sql

hai ,

i have a aelect query how to convert this open sql into Native Sql. This for Selelcting the list of Sales order for The corresponding Customer Purchase Order and this Po Can be entered in Either Any case, so the requirement is for this case.

SELECT AVBELN AERDAT AKUNNR ABSTNK FROM VBAK AS A

INNER JOIN VBAP AS B ON

AVBELN = BVBELN INTO TABLE I_SALES WHERE

A~VKORG IN S_VKORG AND

A~AUART IN S_AUART AND

A~ERNAM IN S_ERNAM AND

A~ERDAT IN S_ERDAT AND

A~VBELN IN S_VBELN AND

A~BSTNK IN S_BSTNK AND

A~KUNNR IN S_KUNNR AND

B~MATNR IN S_MATNR

i have converted as written below but it is dumping when i exeute ?? what might be the problem in the code.

exec SQL..

SELECT AVBELN AERDAT AKUNNR ABSTNK FROM VBAK AS A

INNER JOIN VBAP AS B ON

AVBELN = BVBELN INTO TABLE :I_SALES WHERE

A~VKORG IN :S_VKORG AND

A~AUART IN :S_AUART AND

A~ERNAM IN :S_ERNAM AND

A~ERDAT IN :S_ERDAT AND

A~VBELN IN :S_VBELN AND

A~BSTNK IN :S_BSTNK AND

upper(A~KUNNR) IN :S_KUNNR AND

B~MATNR IN :S_MATNR.

endexec.

cheers

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