Skip to Content

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

selection query problem

hi all.....

i want to setct some data from table vbrp ,vbrk and vbfa .

on selection screen i have vbrk-vbeln and vbfa-erdat i hav written one code for tht but thts not working can nybdy plz help me in this..

parameter : p_vbeln type vbrk-vbeln ,

p_erdat type vbfa-erdat .

*--start of selection events

start-of-selection.

*--SELECTING THE DATA FROM DATABASE INTO INTERNAL TABLE

SELECT v1~vbeln AS vbeln

v1~kunag AS kunag

v1~vkorg AS vkorg

v1~netwr AS netwr

v2~ntgew AS ntgew

v2~matnr AS matnr

v3~erdat AS erdat

INTO CORRESPONDING fields of table it_data1

FROM vbrk AS v1

INNER JOIN vbrp AS v2

ON v1vbeln = v2vbeln

INNER JOIN vbfa AS v3

ON v1vbeln = v3vbeln

WHERE v1~vbeln eq p_vbeln .

loop at it_data1 into wa_data where erdat ne p_erdat.

delete it_data1 from wa_data.

endloop.

end-of-selection.

thanks in advance.....

Tags:
Former Member

Helpful Answer

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