Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

how can i get the open sale orders for given material no and plant

Former Member
0 Kudos

Hi,

I have to retrieve the open sale orders depending on the material number and plant.

For only open sale orders at header level and item level.

I want to use VBUK-GBSTK to find open sale order at header level and

VBUP-GBSTA at item level.

Can any one suggest me the best logic as performance is concerned?

Thanks,

Kumar.

1 ACCEPTED SOLUTION

former_member386202
Active Contributor
0 Kudos

Hi,

First select data feom VBAP based on material and plant then select data from VBUK and VBUP using for all entries on VBAP .

Regards,

Prashant

2 REPLIES 2

former_member386202
Active Contributor
0 Kudos

Hi,

First select data feom VBAP based on material and plant then select data from VBUK and VBUP using for all entries on VBAP .

Regards,

Prashant

0 Kudos

hi Prasanth,

select werks matnr from ZVSCHDRUN into table it_plant.

sort it_plant by matnr werks.

select

vbeln

posnr

matnr

werks

erdat

kbmeng

vrkme

from vbap

into table it_vbap

for all entries in it_plant

where matnr = it_plant-matnr and

werks = it_plant-werks.

and again i have to write one more select query for vbup.

am i right?