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: 

Function module for open sales order and open PO

former_member1284402
Participant
0 Kudos
1,966

hi all,

can anyone please tell me that is there any function module to get open sale order and also for open purchase order?

regards saurabh.

1 ACCEPTED SOLUTION

Former Member
0 Kudos
328

hii saurabh,

try using MB_ADD_PURCHASE_ORDER_QUANTITY (Reading and adding open purchase order quantities)

SD_OPEN_DOCUMENTS_CHECK

SD_SELECT_SALES_DOCUMENTS

regards,

Shweta

6 REPLIES 6

Former Member
0 Kudos
329

hii saurabh,

try using MB_ADD_PURCHASE_ORDER_QUANTITY (Reading and adding open purchase order quantities)

SD_OPEN_DOCUMENTS_CHECK

SD_SELECT_SALES_DOCUMENTS

regards,

Shweta

0 Kudos
328

shweta thanx for reply...

actually i want open PO quantity of material so plz tell what shud i pass in that function module?

i m doing like this but getting dump.

loop at itab.

CALL FUNCTION 'MB_ADD_PURCHASE_ORDER_QUANTITY'

EXPORTING

  • x_elikz =

  • x_loekz =

x_matnr = itab-matnr

  • x_meins =

TABLES

xtab = itab

  • xwerks =

.

endloop.

i m confuse with XTAB what field shud i pass here?

also these function modules are not for open sale order quantity, so please tell me exactly.

0 Kudos
328

Hi ,

Follow this Methods:

1)First u find the Purchase order qty in EKPO,

2)Then U find the GR Qty In MSEG.

Compare the Both Material Qtys ,finally u get the Open Po Qty.

Hope its Useful for u .

Regards,

Shankar GJ

0 Kudos
328

hi shankar,

thnx for reply, now please tell me how can we find open sales order quantity with respect to material?

regards saurabh.

0 Kudos
328

Hi ,

In EKPO Table u select this fields Purchase Document no and Item no of Purchsing Document , Material no , and Purchase Order Qty.

In MSEG Table u select this fields Purchase Document no and Item no of Purchsing Document , Material no , and Qty.

Both Tables having Purchase Document no , So Purchase Doucment no throguh u will get the Material and qty , Finally u Subract the both Material Qty's .

u will get the Open Po For particular Material.

If ur not getting ,Inform me .

Regards ,

Shankar GJ

0 Kudos
328

Hi,

An additional comment: you should also check the Delivery completed indicator of the PO item EKPO-ELIKZ. If this indicator = X, then no more good receipt is expected, it is considered as closed.