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: 

Select IDOCS by company codes and distribute them by different folders

Former Member
0 Kudos

Hi All,

I wonder if any of you can help me with some ideas about an IDOC configuration/development.

I’m working in SAP HR on PA module. The challenge is to create IDOCS sorted by Company codes and distribute them to different folders corresponding to that company codes.

I think that the right way to do this is create copies (Zs) of RBDMIDOC and RHALEINI introducing a select option field on the selection screen to filter data by company code (CC).

My problem stars in the distribution of the output IDOCS by folders.

How can I create IDOCS and distribute them by different folders (1 folder per CC)? I’m using the message type HRMD_A with the IDOC basic type HRMD_A07.

Thank you all in advance.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Pedro

I think you need not have to copy the programs RBDMIDOC and RHALEINI, instead of that you can write your code in the user exit for RHALEINI. But you have to make sure you are always sending the data from IT0001.

There are possible 2 solutions for this,

1) And more thing that you have to do is extent the IDOC basic HRMD_A07 to a new Z IDOC type. In this extension may be after E1PLOGI segment you can attach a custom IDOC segment which has Company code and may be other fields from E1PLOGI.

And in the user exit you can manually insert the row for this new Z segment with all the values filled with company code. This way IDOC's will be divided into different folders based upon the company code.

2) Simpler one but little bit tricky. In this solution you have to manipulate the E1PLOGI and may be E1PITYP in the user exit.

Reward points if useful !!

~Ranganath

1 REPLY 1

Former Member
0 Kudos

Hi Pedro

I think you need not have to copy the programs RBDMIDOC and RHALEINI, instead of that you can write your code in the user exit for RHALEINI. But you have to make sure you are always sending the data from IT0001.

There are possible 2 solutions for this,

1) And more thing that you have to do is extent the IDOC basic HRMD_A07 to a new Z IDOC type. In this extension may be after E1PLOGI segment you can attach a custom IDOC segment which has Company code and may be other fields from E1PLOGI.

And in the user exit you can manually insert the row for this new Z segment with all the values filled with company code. This way IDOC's will be divided into different folders based upon the company code.

2) Simpler one but little bit tricky. In this solution you have to manipulate the E1PLOGI and may be E1PITYP in the user exit.

Reward points if useful !!

~Ranganath