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 to get the Purchase Order and MIGO detail for creating MIRO

sivaramang1511
Participant
0 Kudos
2,082

Hi,

I'm working on BAPI for creating invoice in MIRO, I need the Purchase Order and its MIGO number which is "not invoiced".

In table MSEG, it is very confusing to take the proper related data.

Please guide me a Function Module to get the appropriate data.

Thank you in advance.

Sivaraman

1 ACCEPTED SOLUTION

Former Member
0 Kudos
210

Hi ,

The BAPIs you could use for this are BAPI_PO_GETDETAIL or BAPI_PO_GETDETAIL1.

Please explore the the table parameters and the table provided there, and check if you get what you need.

Hope this helps.

4 REPLIES 4

Former Member
0 Kudos
211

Hi ,

The BAPIs you could use for this are BAPI_PO_GETDETAIL or BAPI_PO_GETDETAIL1.

Please explore the the table parameters and the table provided there, and check if you get what you need.

Hope this helps.

0 Kudos
210

Thank you Gaurav,

But I'm getting values of EKBE table completely for that purchase item, I want only Invoice eligible MIGO number of that Purchase Order.

My Problem is, I don't know how to separate the MIGO number and its Item for Invoicing in MIRO individually.

Please guide me

0 Kudos
210

And EKBE table give it in indirect way:

Summarize qty for records with SHKZG = 'H' and BEWTP = 'E'

Summarize qty for records with SHKZG = 'S' and BEWTP = 'E'



Summarize qty for records with SHKZG = 'H' and BEWTP = 'Q'

Summarize qty for records with SHKZG = 'S' and BEWTP = 'Q'


Elegible qty for MIRO = ( Sum of SHKZG(S-E) - Sum of SHKZG(H-E) ) -  (Sum of SHKZG(S-Q) - Sum of SHKZG(H-Q) )





sivaramang1511
Participant
0 Kudos
210

Thank you