cancel
Showing results for 
Search instead for 
Did you mean: 

Message type HRMD_A

Former Member
0 Kudos

Hi,

I am trying to send employee data from one SAP system to another SAP by using message type HRMD_A. But I need to select specific employee who are in

some of Personal area & Personal Sub Area. But in transaction BD64 I can't see any way to set the filter on Personal area & Personal Sub Area. Is any one have experience on this?

Best regards,

Anpan

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Usually to create your own filters, you have to go to BD95 and then assign these filters to IDoc fields of the relevant message types. I havent used this approach so far.

The other approach is to create your own driver program that collects relevant data and passes that on to ALE layer.

Regards

Message was edited by:

Shehryar Khan

Former Member
0 Kudos

Hi,

Thanks for you all to help to solv this issue. I implement the method Shehryar Khan mention. That's works fine.

First in BD95 then go to BD59 and then to BD64. This work sfine to define a new custom filter. Here is more information on how to define custom filter.

http://www.supinfo-projects.com/cn/2005/idocs_en/3/

Best regards,

Anpan

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

one possible solution is to select your person with your own report with PNP selection.After you have your list of persons selection you could call RHALEINI with submit or call function module RSM_DOWNLOAD_MASTERDATA (this call also RHALEINI) with your list of persons.

Hope this helps.

Regards

Bernd

Former Member
0 Kudos

I don't think you can add a filter directly in the distribution model. If you are using change pointers and want to do it programatically, you could try using BADI BDCP_BEFORE_WRITE. This gets called before the change pointers are generated.

If you go into SALE, Go to the following path:

Modelling and Implementing Business Processes->Master Data Distribution->Replication of Modified Data->Reduce Change Pointers for Message Type.

Hope this helps.

Chris H.

Former Member
0 Kudos

Hi Chris,

This approach could help to solve my issue I think. But in the IMG point I am not able to go further to do any filter. In that screen I have create a new "Implementation name" and then add the message type HRMD_A to the filer definition. What next I need to do? I can't see any way to filer on any filed here.

Where can I define that? In my issue I need to select only employees who are in specific personal area and then personal sub area. How can I define that for message type HRMD_A. Thanks.

Best regards,

Anpan

Former Member
0 Kudos

It might take a little bit of investigation to figure it out exactly. I have not done this specifically for HRMD_A yet but we have done it for other message types.

There are three parameters that get passed into the BADI. (Go into the BADI Definition in SE18, Go to the interface tab, and double click on the implementing class. Once you are in the class, select the method call and click the parameters button).

CHANGE_DOCUMENT_HEADER

CHANGE_DOCUMENT_POSITIONS

CHANGE_POINTERS

Since these are generic parameters that can be used with all ALE Change pointers, you need to determine how these are getting populated for HR data.

What we have done in the past is to loop at CHANGE_POINTERS. The field TABKEY should have the key of the record. So for PA Infotypes, this is probably the same as the PA table key. One way you might verify this is to look at the entries in View BDCPV that are currently getting generated.

If TABKEY is the PA Key, then you should be able to parse out this field to get a PERNR. Once you have a PERNR do your select against infotype 1. If the record does not match, delete the CHANGEPOINTER record from the internal table.

The other challenge you might have is on the OM side. I know that HRMD_A sends both PA and OM. So here, you might not be able to filter the OM infotypes, and you also might have to do some additional checks to make sure that the change pointer is for a PA record. You might be able to use the field TABKEY in the CHANGE_POINTERS table to distinguish the two.

Hope this information helps.

Chris

Former Member
0 Kudos

Oops. My last statement is incorrect. You might be able to use TABNAME to distinguish between OM and PA Data.

Chris

Former Member
0 Kudos

OK. One more piece of information. I did some more investigation into our HR system. It looks like all change pointers (table bdcp) are written with TABNAME = "HROBJINFTY" and an OM Key. So for an employee Record you will see something like this in the field TABKEY:

01P 100200270001 2006110199991231000000

So parsing this out:

01 is the PLVAR

P is the object type

and then the next set of numbers 10020027 is the pernr.

You should be able to take this number agains infotype one. Here is some sample code. I didn't include everything but hopefully you get the idea.

data: hrikey type hrikey.
loop at change_pointers.

  move: change_pointers-tabkey to hrikey.
  if hrikey-otype = 'P'
    select * from PA0001 where pernr = hrikey-objid.
  endif.

endloop.

Sorry for the multiple messages.

Chris