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: 

help with po and invoice

Former Member
0 Kudos

Hi,

can any one help me in this

1)when would be an invoice created for a po

how can we find out whether an invoice is created for a po or not - i mean the check in program

if po is created how can we find the invoice number (i mean tables fields etc.

2) can an invoice number would be found from idoc.

The message type invoic contains all the po's for which invoices are created(i'm not sure) .

does the idoc contains the invoice number too.

Thanks

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

You can use the table EKBE..

Give the PO number in the field EBELN

IF there is a record with VGABE = '2'. Then the po is invoiced..

The invoice number can be found in the field BELNR..

EXAMPLE

-


SELECT SINGLE * FROM EKBE

WHERE EBELN = '4500001111'.

IF SY-SUBRC = 0 AND EKBE-VGABE = '2'.

WRITE: / 'PO INVOICED'.

WRITE: / 'INVOICE NUMBER', EKBE-BELNR.

ENDIF.

Thanks,

Naren

7 REPLIES 7

Former Member
0 Kudos

Hi,

You can use the table EKBE..

Give the PO number in the field EBELN

IF there is a record with VGABE = '2'. Then the po is invoiced..

The invoice number can be found in the field BELNR..

EXAMPLE

-


SELECT SINGLE * FROM EKBE

WHERE EBELN = '4500001111'.

IF SY-SUBRC = 0 AND EKBE-VGABE = '2'.

WRITE: / 'PO INVOICED'.

WRITE: / 'INVOICE NUMBER', EKBE-BELNR.

ENDIF.

Thanks,

Naren

0 Kudos

Hi Narendran,

Thanks for the reply.

could you throw some light on my other question too

2) can an invoice number would be found from idoc.

The message type invoic contains all the po's for which invoices are created(i'm not sure) .

does the idoc contains the invoice number too.

if yes let me know the segment thanks

Thanks

Former Member
0 Kudos

Hi,

I believe the invoice number will not be available , as when the IDOC is posted the invoice number will get generated..

When the vendor sends us the invoice through EDI..The IDOC data will not be having the invoice number that is generated in SAP..

Hope this is clear for you..

Thanks,

Naren

0 Kudos

Hi Narendran,

Thanks again.

I have one more question

what does the idoc message type invoic means,

we have different idoc message type right . what is the diffrernce between them

Thanks

Former Member
0 Kudos

Hi,

INVOIC is the message type used for creating invoices using the IDOC data.

Generally message type is used for control purposes.

Message type is the one which will be configured in the partner profile..WE20..

Message type points to one or more IDOC type..

Please points for helpful answers...

Thanks,

Naren

0 Kudos

Hi,

I awarded full points.

one last thing is material document number and invoice number are same.

Thanks

Former Member
0 Kudos

Hi,

No..Material document number is the number generated after the goods movement..In your case..When the vendor sends the goods to us..You will be using the transaction MIGO..To do goods receipt...The number that generates after the goods receipt is Material document number..

Invoice number is the number generated creating the invoice in MIRO..

Thanks,

Naren