cancel
Showing results for 
Search instead for 
Did you mean: 

DEBMAS and ADRMAS issues

Former Member
0 Kudos

I am sending Customer info from MDM to XI to ECC using DEBMDM which splits and sends an ADRMAS IDoc and a DEBMAS IDoc. If it is the first time this customer has been entered it will create a dup ADDR number. A consultant thought that if i used a BPM process to send DEBMAS before ADRMAS on a time delay that it might fix the issue. Turns out it did not. So where I stand now is that I have to send DEBMAS first then some how pull that ADDR number that gets created out of ECC and populate the ADRN field in the ADRMAS IDoc before it is sent to ECC. Any ideas on how I might be able to do this through a BPM or some other method.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Ok, an update on this issue now that I am a little more educated. When using DEBMDM, ADRMAS goes first and populates the ADDRNUMBER along with other data but the ADDRNUMBER is the one we are concerned with here. My understanding is that when ECC processes all this data it should populate the ADRNR field under KNA1 with the ADDRNUMBER value. DEBMAS then gets processed. Now DEBMAS does not contain the ADRNR field in the IDoc. This value is supposed to be populated by ECC when ADRMAS is processed. The issue is that ECC is not doing this. When we first create a new customer in just puts a null value in for ADRNR. Now if we send an update then ECC will populate ADRNR with the correct data but now we have a duplicate issue. Question is Why is ECC not just putting the value in ADRNR the first time? It has to be something in the ABAP code that process the IDoc but i don't know where to look or how for that matter. Earlier we talked about RFC Lookup but that really doesn't help because ADRNR is not in the IDoc therefor i can not map to it. So everyone knows I am on XI 7.0 SP12 so lets just keep this in mind as well.

Former Member
0 Kudos

I think when you post the idoc to ECC it will take some time for processing and updating to table for fields ADDR but before that you are trying to access that data for your another idoc

First check is ECC processing the data correctly if yes

just check the time taken for processing in ECC side for updating ADDR data into table

once you found this then you can introduce some delay in BPM and do the remaining

You are using BPM only right then you can put the Exception block for errors

Hope this makes sense

Rajesh

Former Member
0 Kudos

Hi Derrick,

Just to Clarify you: It is the Customer Number that relates both the DEBMAS and ADRMAS IDocs created from DEBMDM but not Address Number as you said. As you said SAP MDM is the source system, I guess this should already have the Customer Number so this should link both the DEBMAS and ADRMAS IDocs created in ECC. In this case, ADRMAS should be the first IDoc and DEBMAS as Second in the Sequence being sent by XI to ECC.

Also Please check SAP Note:1052964. I am sure this Note will help you a lot.

Regards,

Dinakar

former_member206760
Active Contributor
0 Kudos

Dear Derrick,

1.In the partner profile on the ECC " click process by back ground program "

now schedule a background program with 2 steps

1. program RDBAPP01 with variant ADRMAS

2. program RBDAPP01 with variant DEBMAS

what this will do is all the ADRMAS idocs will be processed first and then only the DEBMAS idoc

2. also you can try ticking the "queue processing " option in the receiver idoc adapter

Former Member
0 Kudos

I agree with what you are saying however I am not trying to relate the two IDoc's. The issue is that the ADDRNUMBER from the ADRC table is supposed to be entered into the ADRNR field in KNA1 by the background job that processes ADRMAS. Right now, the first time it runs it for some reason is just putting a null value in there. The only way we can get the correct value is to run an update. This may not be the right forum for this question as it is more ABAP code related on the ECC side. I can't put this value in the IDoc for DEBMAS unless I entend the IDoc. The current process of updateing the record is causing dups that we do not want. The current backgound job that is ran is SAPMF02D. I need to figure out where this code is supposed to update the ADRNR field but don't know how to find things through ABAP.

Former Member
0 Kudos

Hi Derrick,

I don't know really well MDM.

I just know that DEBMDM is mostly a mix of ADRMAS & DEBMAS.

During the inbound process in ECC, at the deep end, it is the standard ADR*MAS and DEBMAS that gets processed.

The result is the following : You should not have any trouble with the address number.

AND if it fully correct to NOT have any address number within the idocs

As an example, if ADRMAS is processed first, the following occurs

  • A new address will be created and generates a new address number.

  • As no customer do yet exist, the reference records is added to table ADOWNERREF

  • When DEBMAS gets processed, before the creation of the address, it check the ADOWNERREF if the corresponding address already exist.

  • If the corresponding address exists, DEBMAS only updates customer master records and use the existing address to update KNA1-ADRNR.

  • Otherwise, DEBMAS creates the address from the DEBMAS data and stores the id in KNA1-ADRNR.

When the story starts with DEBMAS, everything is more simple.

DEBMAS creates the customers master AND the corresponding address.

From the table perspective:

IF the customer exist you have

KNA1-ADRNR = ADRC-ADDRNUMBER

+ the reference for the address.

ADRV-ADDRNUMBER = ADRC-ADDRNUMBER

ADRV-APPL_TABLE = 'KNA1'

ADRV-APPL_KEY = mandant+KNA1-ADRNR

If the customer does not exists

ADRC-ADDRNUMBER exists

ADOWNERREF-ADDRNUMBER = ADRC-ADDRNUMBER

ADOWNERREF-GEN_KEY= customer number (KNA1-ADRNR)

In more short, if you are using the standard inbound processing, in no case you should worry about KNA1-ADRNR as the standard functionality is taking care of the data.

the inbound process code for DEBMAS is DEBM. The function module is IDOC_INPUT_DEBITOR

the inbound process code for ADRMAS is BAPI. The function module is BAPI_IDOC_INPUT1.

In the MDM case, it is a bit different but will trigger the same function module at the end.

Hope this clarify and help

BR

Alain

Former Member
0 Kudos

Hi Derrick

Do an RFC to ECC for ADDR number. Use lookup in mapping or use RFC adapter to do this. Adding one step for this you should be able to get ADDR number to populate ADRMAS IDoc.

Thanks

Gaurav

Former Member
0 Kudos

Could you please elaborate? I am not following.

Former Member
0 Kudos

Hi Derrick

In BPM do one Sync Send step to get the ADDR number from ECC. you need to do a request to Z program or BAPI in ERP which in response provide you with the ADDR number and this response you need to map to IDOC to populate the number

Thanks

Gaurav

Former Member
0 Kudos

Hi Derrick,

In your case you can use the RFC lookup from your mapping to fetch the ADDR number and cab populate in the ADRMAS IDoc.

Here is some docs for RFC lookup from UDF : https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/70d90a91-3cf4-2a10-d189-bfd37d9c...

https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/a03e7b02-eea4-2910-089f-8214c6d1...

/people/alessandro.guarneri/blog/2006/03/27/sap-xi-lookup-api-the-killer

Thanks,

Pooja