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: 

invoice no + posnr + accounting doc

Madhurivs23
Participant
0 Kudos
328

Hi All,

I have a invoice number and accounting document number . From which table I can get this connection along with the POSNR field. Means this accounting has been done for this material Item,

I checked in BSIS,BSEG and BKPF tables . But could not get the connnectivity between these 3 fields.

Please help.

Thanks in advance.

Madhuri

9 REPLIES 9

GauthamV
Active Contributor
0 Kudos
244

hi,

you have invoice number in RSEG and posn2 and belnr in BSEG.

so try to use these tables.

0 Kudos
244

Hi Gautam,

I did not find invoice number nor the accouting doc number in RSEG

The POSN2 is not getting populated. It has 0 value for all the rows.

rgds,

Madhuri

Edited by: madhuri sonawane on Nov 12, 2008 9:39 AM

Former Member
0 Kudos
244

Check fields AWTYP and AWKEY of table: BKPF.

AWTYP holds value VBRK and AWKEY the invoice document number.

Alternatively for a billing document item if you need to get the accounting document number, you can consider FM: RV_ORDER_FLOW_INFORMATION.

Parameters to pass:

BELEGTYP = 'M' - for Invoice & Invoice number and item number to structure COMWA.

From the return entries in VBFA_TAB, co-relate entry with VBELV = Invoice Document Number, POSNV = Invoice Document Item, VBTYP_V = 'M' and VBTYP_N = '+'.

Maybe that can help you.

~Eswar

0 Kudos
244

Hi Eswar,

Thanks for reply.

I checked with the FM.

Is there any way to find out the accounting doc item also by passing invoice number and item number?

rgds,

Madhuri

0 Kudos
244

Nope, i guess your understanding is wrong. A single invoice item can co-relate with multiple line items of accounting document. It depends on the different postings that are defined. So you can not extract details to co-relate invoice item to single accounting document item.

Re-Check the requirement with your consultant and confirm. All you can do is show accounting document number for each invoice item.

~Eswar

0 Kudos
244

Hi Madhrui ,

i totally agree with Eswar ,due to consolidation/summarization ( watever Functional word it is).

say Ex. Invoice -10- MAT 1

- 20-MAT1 .

then if ur a/c document , u will get only one MAT G/l for this Invoice and tax line items as well.

so u need to get some more info frm ur consultants to understand this requiments.

regards

Prabhu

kesavadas_thekkillath
Active Contributor
0 Kudos
244

Im not sure abt this...check it

BELNR - ac doc no is ther in MSEG.

POSNR is there in MSEG.

Former Member
0 Kudos
244

Hi Maduri

VBRK-VBELN = BKPF-AWKEY & BKPF-AWTYP = 'VBRK.

Relationship between Billing and accounting document

Edited by: Ashish Bhide on Nov 12, 2008 4:02 PM

Former Member
0 Kudos
244

Hi,

The accounting is usually done for an entire Invoice document and thus the Invoice key is stored in the BKPF table (AWKEY and AWTYP has the value 'VBRK'). The reason is that there is a limitation of 999 lines in BSEG and thus at times the accounting is done with the data summarized for all the items of the Invoice. Hence it is not possbile to figure out which Accounting doucment line corresponds to which Invoice line.

regards,

Advait