cancel
Showing results for 
Search instead for 
Did you mean: 

Fetch Accounting Doc No from Billing Doc No

Former Member
0 Kudos

Hi,

Could someone tell me how to get the Accounting Doc no if we have the Billing Doc No. I tried using table VBFA but it did not solve the purpose.

Regards,

Shobhit

Accepted Solutions (1)

Accepted Solutions (1)

Vinod_Chandran
Active Contributor
0 Kudos

Check BSEG table for field VBELN.

Instead of BKPF and BSEG you can use BSIK, BSAK, BSID, BSAD etc for better performance.

Former Member
0 Kudos

Hi Vinod,

Thanks fr answering so promptly.

Reg

Shobhit

Answers (3)

Answers (3)

former_member15255
Active Participant
0 Kudos

Check out the VBRK Table

regards

suresh krishnan

FredericGirod
Active Contributor
0 Kudos

Table BKPF fields : AWTYP = 'VBRK' and AWKEY = billing doc

Try the transaction ST05 on your biling doc transaction.

Regards

Frédéric

Former Member
0 Kudos

Thanks Frederic!!!

Reg

Shobhit

Former Member
0 Kudos

Try:

CALL FUNCTION 'AC_DOCUMENT_RECORD'

EXPORTING

I_AWTYP = 'VBRK'

I_AWREF = VBRK-VBELN

I_AWSYS = VBRK-LOGSYS

I_BUKRS = VBRK-BUKRS

TABLES

T_DOCUMENTS = DOC_NUM

EXCEPTIONS

NO_DOCUMENT = 1.

This should return all kinds of FI docs.

Cheers

Dom

Former Member
0 Kudos

Hi Dom,

Thanks fr the help. It would be helpful in many other ways.

Reg

Shobhit