cancel
Showing results for 
Search instead for 
Did you mean: 

get billing number from material document

0 Kudos

Hi All:

         We are facing a probelm in a developed report.

         In our new report, we are going to get the billing number using material document of PGI (movement 601), but it seems there is no table can cover this. In VBFA, if we have invoice cancel and reverse PGI, developer don't know which material document mapping to which invoice.

         Please share idea, thanks.

Stephen

Accepted Solutions (1)

Accepted Solutions (1)

Lakshmipathi
Active Contributor
0 Kudos

I could see two requirements from your post

  • to identify invoice references based on material document and
  • to identify material document based on cancelled invoice

For both these requirements, you can very well use VBFA table.  For first one, you have to pass on the preceding document category as "R" and subsequent document category as "M", so that system will populate the required data.

For the second one, first you need to identify for the cancelled invoice, which are the original billing document.  To have this data, you need to validate in VBFA with "N" as your subsequent document category and "M" as  preceding document category. 

Now if you club this data with the first one, you will have material document reference.

G. Lakshmipathi

0 Kudos

Dear Lakshmipathi.

                      I mean if the invoice was cancelled and PGI was reversed, the billing document can't be identified by material document exactly using document category in table VBFA.

                       for example:

former_member186385
Active Contributor
0 Kudos

Hi ,

What is the to fetch Invoice number from Material document number?

once you cancel the invoice and Reverse PGI, still you need Billing document number ?

instead of material document number, you could have used Delivery number to fetch.  That is more accurate in your case

regards,

santosh

0 Kudos

Hi

    once you cancel the invoice and Reverse PGI, still you need Billing document number ?

   -----> YES

Answers (1)

Answers (1)

phanikumar_v3
Active Contributor
0 Kudos

In our new report, we are going to get the billing number using material document of PGI (movement 601).

So you are already using some logic to retrieve billing number---what was the exact logic you followed???(for this, are you using any billing doc category as a condition in your logic??)

Have you tried as suggested by Lakshmipathi sir--what was the problem you faced after changing this logic???

Phanikumar