cancel
Showing results for 
Search instead for 
Did you mean: 

accounting document number from billing data

Former Member
0 Kudos

hi

i have billing document with multiple items. I need to find out the accounting document number corresponding to each of the billing document item. which tables i need to refer for this.give me the field names.

thanks

Accepted Solutions (0)

Answers (6)

Answers (6)

eduardo_hinojosa
Active Contributor
0 Kudos

Hi,

You can read the FI document with the function module AC_DOCUMENT_RECORD


  call function 'AC_DOCUMENT_RECORD'
    exporting
      i_awtyp      = 'VBRK'
      i_awref      = awref
      i_aworg      = aworg
      i_awsys      = awsys
      i_awtyp_incl = 'BKPF'
      i_valutyp    = '0'
      x_dialog     = ' '
    tables
      t_documents  = docs_fi
    exceptions
      no_reference = 1
      no_document  = 2
      others       = 3.

where docs_fi is as the table ACC_DOC. Read the records where awtyp = 'BKPF' in itab docs_fi. Search AWREF, AWORG and AWSYS in equivalent fields in table VBRK.

I hope this helps you

Regards,

Eduardo

Edited by: Eduardo Hinojosa on Jun 14, 2010 3:35 PM

Former Member
0 Kudos

Hi,

Get the accounting document number from the Table VBRK by Passing Billing document number

Pass the Accounting document number to the following tables

BSID

BSAD

BSEG

Regards

Senya

Former Member
0 Kudos

This message was moderated.

ivano_raimondi
Active Contributor
0 Kudos

Hello,

your question is not very clear.

One billing document creates only one corresponding accounting document.

So all the items of the billing document are accounted in the same accounting document (visible in the document flow).

What is your question?

Best regards,

Ivano.

Former Member
0 Kudos

Hi,

You can create a query in SQVI by using VBRK and BSIS table .

The link between them is the assignment no field. ( ZUONR).

Hope this will resolve your issue.

Regards,

Krishna O

jpfriends079
Active Contributor
0 Kudos

Check Table

BSEG - Accounting Document Segment

VBKP - Billing Document: Item Data

VBRP - Billing Document: Item Data

Fields to follow

BELNR - Accounting Doc

VBELN - Billing Document

POSNR - Billing Item

A query on the above mention tables will assist you.

Thanks & Regards

JP

Former Member
0 Kudos

Hi,

Accounting document will be generated for the whole Billing document

You can see the Accounting document number in the table VBRK-BELNR with the VBELN as Billing document nujmber

regards,

santosh