‎2006 Mar 02 10:56 AM - last edited on ‎2024 Feb 03 7:16 PM by postmig_api_4
Hello All
Is there any function module or table that takes Document Number or PO number as input and gives the invoice number generated for that PO.
I will be creating PO in ME21n, use that PO in MIRO to create invoice. But I m getting only the document number in miro transaction. I m not getting the invoice number created in MIRO transaction.
I m aware that in MIR4 transaction I can get the invoice number, but I m in need of that table or function module that gives this invoice number. Hope this makes my requirement clear.
Thanks
Tharani
‎2006 Mar 02 11:04 AM
Hi,
Use the FM 'GET_INVOICE_DOCUMENT_NUMBERS'.
*******
Can you check with this FM just pass Paying Doc number, company code, year etc.
You will get related Invoice.
*******
Thanks.
If this helps you reward with points.
Message was edited by: KDeepak
‎2006 Mar 02 12:09 PM
Hi,
Try function module BBP_ASSIGN_ITEMS_INVOICE_4X.
This FM is version dependent and will be available in
4.0> releases.
Hope this helps.
Regards,
Shashank
‎2006 Mar 02 12:23 PM
hi tharani,
jsut check this function module .
BBP_INVOICE_CREATE_3X
giv po and check the o/p for invoice numbers.
vijay
‎2006 Mar 02 12:52 PM
Hi Vijay,
there are 2 parameters like I_hd and be_data, among these which is the parameter for PO ?
Thanks
Tharani
‎2006 Mar 02 2:07 PM
hi ,
The invoice document which you have created thru MIRO transaction will be stored in RBKP(header) and RSEG(Item) tables.
In RSEG we have EBELN filed which is the PO number against which this invoice is cerated.
rajkumar
‎2006 Mar 02 12:28 PM
The Data of invoice documents is stored in RSEG, u have to pass the document number generated to RSEG to get the invoice number.
‎2006 Mar 02 1:17 PM
Hello,
Try using EKBE table. When u enter PO number check for field VGABE which when 2 indicates Invoice has been done. Get the BELNR field in that record which will give u the Invoice number/Year for that PO.
‎2006 Mar 02 1:25 PM
hi
I m not getting invoice number in both EKBE and RSEG table.
‎2006 Mar 02 1:40 PM
for a po to invoice a reference number will be generated
this is to be passed to the it_hd along with other parameters.
within the function module ,
structure is BBP_IV_HD, in iv_hd what u said u need to populate this
and check the structure BBP_IV_IT BBP Invoice Line Item
check the PO number .
for ur o/p.
___________________________________________________
and u 'll get teh invoice number in the rreturn field
BKPF-BELNR,
BKPF-gjahr.
this leads u to ur invoice number bkpf-belnr.
____________________________________________________
parallel check .
check the po number in EKBE table for reference document number and pick the XBLNR and then give it in BKPF table tthis will give ur INVOICE number .
for every po a reference number will be maintained .now u need to catch hold of this number and in bkpf bseg tables u need to get the invoice number . this is teh functional flow.
explore on the tables u'll understand.
vijay
‎2006 Mar 02 4:44 PM
HI,
Pass the MIGO documents generated to fields LFBNR, LFGJA, LFPOS of RSEG table and the corresponding MIRO document is available BELNR, GJAHR, BUZEI.
But keep in mind not to consider the reversed invoice documents. ( check reverse indicator ).
Hope this helps.
Sharath.