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: 

HRMD_A - How to filter at field level

Former Member
0 Kudos

Hi All,

We have a requirement to send HR masterdata to Non-SAP system. Actually our company uses few application which required some basis HR data. I have configured the Distribution model / change pointer / infotype setup and everything is working fine.

The issue is for some of the infotypes we only want to send few fields. Let's say for example for IT0002, we do not want to send SSN and Date of birth. Can we setup a filter so this fields are send with blank value.

Or is there any useexit available which i can code to clear fields which we do not want to send. We are working on 4.6C. Please help me out.

Thanks,

1 ACCEPTED SOLUTION

Former Member
0 Kudos

The filter is used to remove unwanted segments or to prevent IDocs from being sent. It cannot not clear out unwanted fields. I was unable to find any user-exits where you could do this yourself. Another option would be to create a custom message type and reduce it using BD53. By reducing a message type, you can determine which segments and fields you want populated.

A second option woul dbe to create your own IDoc creation function. The standard function for all HRMD_* messages is MASTERIDOC_CREATE_SMD_HRMD. This is assigned to the message in BD60. You could create your own message and copy the standard function and modify as needed.

8 REPLIES 8

Former Member
0 Kudos

The filter is used to remove unwanted segments or to prevent IDocs from being sent. It cannot not clear out unwanted fields. I was unable to find any user-exits where you could do this yourself. Another option would be to create a custom message type and reduce it using BD53. By reducing a message type, you can determine which segments and fields you want populated.

A second option woul dbe to create your own IDoc creation function. The standard function for all HRMD_* messages is MASTERIDOC_CREATE_SMD_HRMD. This is assigned to the message in BD60. You could create your own message and copy the standard function and modify as needed.

0 Kudos

Thanks for your reply.

I create a custom message type ZHRMD_A and assign it to idoc HRMD_A05. When i went to BD53 and treid to change ZHRMD_A , it is giving the error message <b>"There is no data maintained in the reduction pool for message type ZHRMD_A"</b>. I do not know what does this mean.

I know how to create custom message type but not sure what do you mean by reduce it using BD53. Can you give me step-by-step how to configure it.

Thank you,

RS

0 Kudos

Enter you custom message type and hit create, not change. It will prompt you for a reference message type (use HRMD_A) and then a description. It will then bring you to an IDoc display screen similar to WE30. You can "Select" or "Deselect" segments. Green segments are "selected" and will be created during IDoc creation. Likewise, you can double-click on a segment to "select" or "deselect" individual fields.

0 Kudos

Thanks for you reply.

I followed the steps you have mentioned but i am facing one problem. Eventhough i deselect the fields from idoc segments, they are populated and sent in IDOC. let's say for example i deselect "SSN" and "Date of birth" field from Infotype 0002, idoc still sends these data out. Please let me know what could be the problem.

Thank you,

RS.

0 Kudos

I'm not seeing the reduction function calls in HR processing. Reduction may not work after all.

After digging a little further into the code, I found a user-exit at the bottom of FM RH_CONVERT_PNNNN_TO_SDATA. It's called EXIT_SAPLRHAL_001 and is under enhancement RHALE001. There are a number of other exits in this enhancement as well.

0 Kudos

Thanks you very much. My problem is solved using the user-exit you mentioned. You were right that Reduction does not work in this case.

Just out of curiousity, in what kind of scenario Reduction can be used. Have you ever done this before for any other purpose. I just want to know so in future if i have a need i can use it.

Thanks you once again.

RS

0 Kudos

MATMAS, DEBMAS and CREMAS are examples of reducible messages. The processing functions for each of these calls function IDOC_REDUCTION_FIELD_REDUCE. That would be a good place to start in the future if you wanted to see if a message can be reduced. It would also show you how to implement reduction in a custom IDoc creation function.

0 Kudos

Hi RS,

I'm running into the same situation that you did, wondering how you change that user exit?

So you were cleaning up the fields you don't want to send in the table T_IDOC_DATA? under that user exit?

Thanks,