Application Development and Automation 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: 
Read only

Fn Module Required

Former Member
0 Likes
1,291

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

10 REPLIES 10
Read only

Former Member
0 Likes
1,156

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

Read only

Former Member
0 Likes
1,156

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

Read only

Former Member
0 Likes
1,156

hi tharani,

jsut check this function module .

BBP_INVOICE_CREATE_3X

giv po and check the o/p for invoice numbers.

vijay

Read only

0 Likes
1,156

Hi Vijay,

there are 2 parameters like I_hd and be_data, among these which is the parameter for PO ?

Thanks

Tharani

Read only

0 Likes
1,156

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

Read only

Former Member
0 Likes
1,156

The Data of invoice documents is stored in RSEG, u have to pass the document number generated to RSEG to get the invoice number.

Read only

Former Member
0 Likes
1,156

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.

Read only

0 Likes
1,156

hi

I m not getting invoice number in both EKBE and RSEG table.

Read only

Former Member
0 Likes
1,156

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

Read only

Former Member
0 Likes
1,156

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.