cancel
Showing results for 
Search instead for 
Did you mean: 

Need to update XREF1 field of table BSEG through report

Former Member
0 Kudos

Hi There,


First of all, Sorry if I have posted the question in wrong group.
I have one requirement in which first of all I create a sales order and then invoice through the report program after the invoice is created successfully I have to update the field XREF1 of BSEG for those line items for which the sales order and invoices are created. My issue is that I could not find the correct BAPI or FM to update the field.

There are number of FM's , I found on Google but all of them are NOT RELEASED.

Please help me if any of you have worked in such scenario,

Thank you in advance.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

If the FI document is posted , you may try FM FI_DOCUMENT_CHANGE.

BR

Megha Gupta

iklovski
Active Contributor
0 Kudos

This will not update BSEG table

Answers (7)

Answers (7)

former_member388328
Active Contributor

Hi ,

If you know information that you want to update during sales invoicing. Then i would suggest to go for BTE or Subsitution with exit option.

Thanking you

Vengaiah

Former Member
0 Kudos

So your starting point are existing FI documents for which you create Sales orders and Invoices?

If you start your flow from SD you can use copycontrol and one of the following exits (CMOD) to achieve your goal:

SDVFX001 SDVFX002 SDVFX003 SDVFX004 SDVFX005 SDVFX006 SDVFX007 SDVFX008

former_member555112
Active Contributor
0 Kudos

The BADI AC_DOCUMENT is triggered when the FI document is posted when the invoice is created.

In this badi, you can use the method CHANGE_INITIAL to update the value.

You do not need to build a separate program to update this later. This should be done at the time of SD invoice only.

When the SD invoice is created, SAP posts the FI document automatically in background. Hence this exit can be used to update the field.

Regards,

Ankur Parab

Former Member
0 Kudos

We could do this by using BADI. May be put a filter on Sy-repid to be your report in the BADI.

BADI_SD_ACCOUNTING~

ACCOUNTING_INTERFACE

k_gorin
Participant
0 Kudos

Try FI_ITEMS_MASS_CHANGE

Former Member
0 Kudos

Hi Kirill,

Thank you for your answer, but this FM is not Released, hence I can't use.

Could you please suggest other FM or BAPI which is released.

iklovski
Active Contributor
0 Kudos

Hi,

I'm not sure you have a standard module for changing BSEG. You can change AP/AR items, but not FI general ledger lines. You will have to develop your own function module. Since it is a simple update of non-indexed field which is not a part of total tables, it could be direct update of the relevant tables: BSEG/BSIS/BSAS.

Regards,

Eli

former_member426933
Discoverer
0 Kudos

Hi,

Did u tried these Function modules - FDM_AR_DOC_INVOICE_READ, ISH_CHANGE_DOCUMENT_NUMBER & ISH_DISTRIBUTE_CHANGE_DOCUMENT

I think anyone the above may work on your case. please check

Regards,

mohdsams

iklovski
Active Contributor
0 Kudos

Why would these FMs update XREF1?

Former Member
0 Kudos

Hi Mohammed,

Thank you for your answer, but these all FM's are not released. So I can't use them.