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: 

Change field content of IDOC automatically

Former Member
0 Kudos

Dear all,

we have a little problem and I think that can be solved by changes incoming IDOCs.

But I'm not that familiar with IDOCs, so my question:

We get HR-Data from another system.

Message Type: HRMD_A

Basic Type: HRMD_A07

We want to change the payment method inside these IDOCs. The changes are not possible in sending system cause of organisational issues.

Is it possible to change one field automatically?

If yes, how can we do it or where can I find documentation about that?

We'd like to find a simple solution.

Thank you for your help.

Kind Regards

Philip

1 ACCEPTED SOLUTION

alex_m
Active Contributor
0 Kudos

In the incoming Idoc funtional module exit you can change the Idoc data before posting it...

9 REPLIES 9

alex_m
Active Contributor
0 Kudos

In the incoming Idoc funtional module exit you can change the Idoc data before posting it...

Former Member
0 Kudos

I think that's exactly what I need.

Do you have more information about that?

Is there a specific function module exit per Message Type? Do you know the name for HRMD_A?

Do you have an example, how this exit should be implemented and programmed?

Kind Regards

Philip

Former Member
0 Kudos

hi,

there are two ways to get this solved.

1.) as Alexander mentioned. Look in the IDOC_INPUT_<IDOCtype> function and use an Exit or use an own function (with own processcode) to get the values changed.

2.) make use of the ALE conversion rules.

a) goto tcode bd62 or bd62old

- create a name for the rule and assign the idoc segment (where the values have to be changed)

b) go to tcode bd79

- enter your rulename and edit the field like your need.

you can set default values or rules or abap lines or map values , etc...

c) go to tcode bd55 or bd55old

- enter your messagetype (not idoctype)

- assign your rule / segment to the specific partnercombination (look at we20, first).

Regards,

Gordon

alex_m
Active Contributor
0 Kudos

The exit name is EXIT_SAPLRHA0_003 and here you can change the Idoc data's.. To activate this exit you need to create an z project in CMOD for the exit object RHALE001 and activate the exit component EXIT_SAPLRHA0_003..

Create the include(ZXHALU07) in the exit EXIT_SAPLRHA0_003 and do the changes.

Former Member
0 Kudos

Thanks to both of you.

I will try to implement it, and keep the question open until it's finished. (Maybe I have an additional question during implementation)

Thanks again

Philip

Former Member
0 Kudos

Thanks.

The conversion rule seems to work.

If possible I try to avoid additional coding.

Kind regards

Philip

Former Member
0 Kudos

Hi Philip

I also need to make similar changes, but after changing IDOC_DATA table entries, it still updates PA20 info with original data?

Would you mind posting some of your code or just give me some guidance? I did not set any of the exporting flags, should I?

Please assist. Thank you, Adrian

Former Member
0 Kudos

Hi Philip

I also need to make similar changes, but after changing IDOC_DATA table entries, it still updates PA20 info with original data?

Would you mind posting some of your code or just give me some guidance? I did not set any of the exporting flags, should I?

Please assist. Thank you, Adrian

Former Member
0 Kudos

Dear Adrian,

I used the second choice from Mr. Breuer. That worked very well.

2.) make use of the ALE conversion rules.

a) goto tcode bd62 or bd62old

- create a name for the rule and assign the idoc segment (where the values have to be changed)

b) go to tcode bd79

- enter your rulename and edit the field like your need.

you can set default values or rules or abap lines or map values , etc...

c) go to tcode bd55 or bd55old

- enter your messagetype (not idoctype)

- assign your rule / segment to the specific partnercombination (look at we20, first).

Hope that helps

Philip