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: 

How to trace back the SO number from existing BSEG Document number,

Former Member
0 Kudos

In BSEG for particular Documentation number (for example 100048119):

- The tax code (mvskz) is I1

- Activity Type (vorgn) is RFBU (what is this mean?)

How do I find out the SO number or PO number for this BSEG?

Thanks,

Helen

1 ACCEPTED SOLUTION

uwe_schieferstein
Active Contributor
0 Kudos

Hello Helen

You will find some information about activity type RFBU at

<a href="http://help.sap.com/saphelp_47x200/helpdata/en/98/14fc80477f4f4d89eb6e6b79dd9fb2/content.htm">Transfer Postings of Down Payment Clearings</a>

A useful function module may be <b>AC_DOCUMENT_GETAPPLLINKS</b>. I have used this function module (in addition with BAPI_BILLINGDOC_GETLIST) to get the links between sales order -> billing document -> FI document.

Regards

Uwe

9 REPLIES 9

Former Member
0 Kudos

SO Will not create any Accouting Documents.

In case of PO u will get A/c Documents from EKBE table.

BSEG will contains all items data.

try to make use of this FM

AC_DOCUMENT_RECORD.

or

call function 'FI_DOCUMENT_RECORD'

exporting

i_awtyp = 'RMRP'

i_awref = w_awref1 --->IR numner of PO

i_aworg = w_gjahr1----.year

  • I_AWSYS = ' '

  • I_AWTYP_INCL = ' '

  • I_AWTYP_EXCL = ' '

  • I_BUKRS = ' '

tables

t_documents = t_doc.

MIRO numner is Nothing but IR numner ? just pass this along with year

Regards

Prabhu

0 Kudos

What is 'IR' number?

Thanks,

Helen

0 Kudos

Invoice Receipt

andreas_mann3
Active Contributor
0 Kudos

Hi,

look bseg-ebeln and bseg-aufnr

for GR-/GI-item

A.

0 Kudos

both bseg-ebeln and bseg-aufnr are spaces.

Thanks,

Helen

Former Member
0 Kudos

Check if you can use the following tables instead of BSEG

VBRK : Header (Billing doc)

VBRP : Item (Billing Doc)

In VBRP you have the Sales Order No (AUBEL)

In VBRK you will get PO No (XBLNR)

Former Member
0 Kudos

Hi Helen

Please check if the below info helps you:

Extracting Sales Document from Accounting Document:

1. Extract the value in VBELN for entry in BSEG with <b>KOART = 'D'</b> <- Customers.

Value in VBELN is the billing document number. Alternatively, we can extract the billing doc no from table BKPF with values AWTYP as <b>VBRK</b>. Now AWKEY holds Billing Doc Number.

With Billing Document Number we can extract the Sales Document number from table: VBRP. Fields to refer: AUBEL and AUPOS.

Extracting PO from Accounting Document:

1. Extract the value in EBELN and EBELP for entry in BSEG where <b>KOART = 'K'</b> <- Vendors.

Hope this info helps you...

Regards

Eswar

0 Kudos

use KOART = 'D', VBELN is space

KOART = 'K', EBELN and EBELP are space also.

Did not get the Billing Doc. number

Thanks,

Helen

uwe_schieferstein
Active Contributor
0 Kudos

Hello Helen

You will find some information about activity type RFBU at

<a href="http://help.sap.com/saphelp_47x200/helpdata/en/98/14fc80477f4f4d89eb6e6b79dd9fb2/content.htm">Transfer Postings of Down Payment Clearings</a>

A useful function module may be <b>AC_DOCUMENT_GETAPPLLINKS</b>. I have used this function module (in addition with BAPI_BILLINGDOC_GETLIST) to get the links between sales order -> billing document -> FI document.

Regards

Uwe