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: 

Updating SAP standard table ADRC using BDT

Former Member
0 Kudos

Hi All

I have to update REGIOGROUP field in the ADRC SAP standard table.So I created FM for this purpose and did call it before the save event( i.e Collecting data to internal tables event).In this FM I got the REGIOGROUP value and updated this value in the IADRC internal table of function group SZA0.Because this table is used at the time of save.Before updating ADRC table IADRC[] values are moved to *IADRC[].Here my problem is I can't see the REGIOGROUP value in *IADRC[] but I can see this value in IADRC[].Please help me to solve this problem.Thanks in advance.

Please have a look at the code

FM

  • save data back to memory

assign ('(SAPLSZA0)IADRC[]') to <adrc>.

assign ('(SAPLBUA0)IADRC') to <row>.

loop at lt_adrc.

read table <adrc> assigning <row> index sy-tabix.

move-corresponding lt_adrc to <row>.

endloop.

Regards

Giri.

2 REPLIES 2

dmitry_sharshatkin
Active Participant
0 Kudos

Hi Giri,

Maybe i'm too late, but i also want to keep my answer for the community.

I had similar task, but i used BADI ADDRESS_UPDATE instead of BDT.

From the methods:

IF_EX_ADDRESS_UPDATE~ADDRESS1_SAVED

IF_EX_ADDRESS_UPDATE~ADDRESS2_SAVED

IF_EX_ADDRESS_UPDATE~ADDRESS3_SAVED

you can access the table IADRC in a right moment.

assign ('(SAPLSZA0)IADRC[]') to <fs_iadrc_tab>.

...

lt_iadrc[] = <fs_iadrc_tab>.

...

<fs_iadrc_tab> = lt_iadrc[].

all changes, done at this point will be trasported into the database.

You can also use update function module. This should be called from IF_EX_ADDRESS_UPDATE~FINISH.

This option should be more preferrable for massive data changes.

Hope this helps!

Regards, Dima

0 Kudos

Hi,

I am trying to put a check for the Notes field in Communication tab for Contact Person section of XD02. I am using BADI Address_Update (Method address3_saved) for the same. I have put a check like

loop at im_t_xadrt assigning <adrt>.(field symbol)

    if <adrt>-remark = 'xyz' (example).

do something.

endif.

endloop.

But on executing this, the other contact person details like name etc do not show up in XD02 and program control goes to another tab in XD02.

Is there any way to check Notes (Remark) field in user exit zxf04u01 instead of using the above BADI?

Please advise.