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: 

Pass default values in Inbound IDOC through ALE

Former Member
0 Kudos

Hi ,

I have set up ALE connection from my HR system to FI system to transfer employee master data.

But I do want to send Default values in some of the IDOC fields I have employee residence address maintained in HR system but when it transferred into FI system through HRMD_A IDOC type, I would like to set the address to my company address which is constant.

So I am thinking to have a custom IDOC processing code in WE20 at FI system which would set the respective IDOC fields into Default values before FI system gets updated with Employee Details.

How do i set up Custom IDOC processing code in WE20?

And also.

Is there any better way to achive this requirement ?

1 ACCEPTED SOLUTION

Abhijit74
Active Contributor
0 Kudos

Hello,

WE20 is for partner profile. Here you can pass the message type. inside message type you have basic type (which is idoc). So, if you want to pass custom idoc you need to configure custom message type as well as custom idoc and then you have to pass it in WE20. But setting up custom IDOC processing code in WE20, you need to give message type first in inbound parameters .

Thanks,

Abhijit

10 REPLIES 10

Abhijit74
Active Contributor
0 Kudos

Hello,

WE20 is for partner profile. Here you can pass the message type. inside message type you have basic type (which is idoc). So, if you want to pass custom idoc you need to configure custom message type as well as custom idoc and then you have to pass it in WE20. But setting up custom IDOC processing code in WE20, you need to give message type first in inbound parameters .

Thanks,

Abhijit

Former Member
0 Kudos

Hi

Thanks. I confused you

I meant Process Code in the partner profile settings.

For message type HRMD_A the Process Code is

HRMD ( HR: HR master data, organizational data) Which is the standard process code for this message type .

  • If i use the above process code, the IDOC will be posted with the values coming from HR system which i don't want. Ideally i want to overwrite some values in the inbound IDOC before it gets posted.
  • So, I guess i need to create a Z process code or FM to modify the IDOC values and refer that process code or FM name in the We20 partner profile ( process code) settings.
  • Probably i can create a copy of this process code and put my logic to overwrite the IDOC values.

Is there any other approach?

0 Kudos

Please do not write the code if the values are same in all case i.e you want that field to have one value...Use the standard SAP T codes which deals withALE  conversion ...

Steps ....

1.Please create a conversion rule in BD62.

2. Assign the Conversion rule to Inbound message type and sender/ receiver system.

3. Fill the value which you want to be populated in the BD79 .

However if you want to default different values in different condition or if you want to have qualifier dependent values for that segment then put the code in the exit of Inbound process code or cusing the complex conversion rule.Please avoid the Custom process code as custom process codes are for Custom inbound processing modules .

Thanks,

Anjan

Former Member
0 Kudos

Hi,

Inside your process code 'HRMD' , there would be a FM.

See if that FM has any exits.

If yes, you can write your requirement there,

If No, you can create your enhancement and write your code accordingly.

Regards...

Sultana

Abhijit74
Active Contributor
0 Kudos

Hello,

Yes, you can copy process code and put your logic.

As per my understanding if you want Z process code to pass then you have to create the z function module as well as Z process code (WE42) and select Processing by Function module or can search for any exit as well

Thanks & Regards,

Abhijit

Former Member
0 Kudos

Thanks Anjaneya for the options.

The values will be default in all cases so i would try to use Conversion Rule and Fill the values in BD 79.

I would like to do this in the receiver system and assign the conversion rule in the receiver system partner profile settings.  Where do i mention these details?

Former Member
0 Kudos

Hi Abhjit,

Thanks again for your reply. I can use Exit in the existing processing code or Custom process code as you said.

But,I would like to use the Conversion rule as proposed by Anjeneya.

Former Member
0 Kudos

Hi Anjaneya,

I hae got it in SALE.

Thanks.

0 Kudos

Hi , If you can open these transaction you will be able to understand it very easily ...Yes you can very well do it in the Receiver system ..BD55 will be used to specify which message type is associated with sender system and reciver system .Search in google on how to use ..It is very easy to use ...Or may be you will find some screenshots as well somewhere ....I have no access to SAP right now to give you the actual steps ....

Thanks,

Anjaneya

Former Member
0 Kudos

All

Solved.

We had to use some exit at the receiving system as the values are not constant always.

Converion rule works well for Default values