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 Customer Master Data by LSMW + BAPI Method

Former Member
0 Kudos

Hi Experts,

      I am going to update customer master data addresses by using function as belows;

LSMW

Business Object Method : BAPI

Business Object : BUS4001

Method : SAVEREPLICA

Message Type : ADRMAS

Basic Type : ADRMAS03

File port                 LSMW

Partn.Type             LS

          

I'm passing the values only for the updated fields. But during run IDoc Processing (Step 14),

the system is updating the existing values as blank values.

Anyone please tell me what should I do?

Thanks in Advance,

Jiranan

8 REPLIES 8

Former Member
0 Kudos

Hi Jiranan,

Updating customer master data means ,you have created customer already now you want to update the customer address right?. Have you passed transaction 'XD02' in T-CODE field of LSMW BAPI method first structure or have you passed 'XD01' transaction?.If we pass the XD01 transaction  it will take the existing field blank because you are passing only address fields not already updated fields.So make sure that  you need to pass XD02 transaction there.For example as shown below in screenshot.


Regards
Ashok P

0 Kudos

Hi Ashok P,

         Thank you for your answer.When I'm changing obj_type from 'KNA1' to 'XD02' and posting the

IDoc, it's not posting. The error status is "No appropriate entry found in table TSADOBJ". I'm not sure

can I use 'XD02' in this Bapi Method?

JL23
Active Contributor
0 Kudos

you could have seen that the screen shot is from batch input and not from BAPI.

And obj_type has a quite different meaning than transaction code.

JL23
Active Contributor
0 Kudos

/ is usually the field value that instructs an IDOC to not overwrite existing data.

if you never want to update that field then you can as well set the field in field mapping as initial .

Former Member
0 Kudos

Hi Jurgen L,

          I'm mapping the fields that I never want to update as initial,

but it's updating the exist data as blanks values.  

Former Member
0 Kudos

Hi Jiranan,

please look into the documentation of function module BAPI_ADDRESSORG_SAVEREPLICA which is called in this case.

Fill the corresponding Idoc fields in this way if you want to change the adress data of a customer (4712 is the customer number)

          obj_type           = 'KNA1'

          obj_id             = '4712'

          OBJ_ID_EXT         = ' '

          CONTEXT            = '0001'

Keep in mind  that you can only change adress data by means of this Idoc/Bapi.

/Michael

0 Kudos

Hi Michael,

             I'm already done but it's still updating the existing data as blank values.        

                       

0 Kudos

This message was moderated.