cancel
Showing results for 
Search instead for 
Did you mean: 

new filter for HRMD_A

Former Member
0 Kudos

Hello SAP Experts,

I want to be able to add a filter to the distribution model for message type HRMD_A.

Existing filters are : PERSONAL AREA, INFOTYPE, SUBTYPE, TYPE OF RELATED OBJECT & OBJECT TYPE.

I want to add a new filter - COMPANY CODE.

So when master data changes, it should change only for a set of COMPANY CODES.

I have completed the following steps :

BD95- Create a new ALE Object type Z_BUKRS - table T001T, field BUKRS

BD59 - enter a new ALE Object Type Z_BUKRS, Segment type E1PLOGI, Field FILTER1

Set change pointers for HRMD_A

Create disctribution model in BD64

Now I can see that Company Code is added to the filter,I can add company code in the distribution model, but when I try to generate IDOCs - I get the message "No data has been selected for distribution".

The filter is not working! Do i need to add any code or am I doing something wrong here?

Thanks,

Vaishali

Accepted Solutions (1)

Accepted Solutions (1)

ted_dinh
Active Contributor
0 Kudos

Please check the combination values of Company Codes and Personnel Areas in the filter to see if they are valid.

Former Member
0 Kudos

Hello Ted,

At the moment the list of Personal Areas is blank, but even if I add a specific Personal Area and Company Code for which a change pointer record exists, IDOCs are not generated.

If I remove the company code, and just retain the personal area, then IDOC is generated. So clearly there is something missing with Company Code.

Thanks,

Vaishali

Former Member
0 Kudos

Hello SAP Experts!

I found out the solution to my issue - sharing this on the forum in case it is useful to anyone else.

I had to implement a BADI - IF_EX_HRALE00OUTBOUND_IDOC~FILTER_VALUES_SET in class ZCL_IM_HRALE00OBOUND_IDOC in addition to the following steps:

BD95- Create a new ALE Object type Z_BUKRS - table T001T, field BUKRS

BD59 - enter a new ALE Object Type Z_BUKRS, Segment type E1PLOGI, Field FILTER1

Set change pointers for HRMD_A

Create distribution model in BD64

Implement above BADI - it already contains code for other filters like PERSA, I added one line for BUKRS:

DATA pa0001 TYPE pa0001.

DATA pa0002 TYPE pa0002.

  • filter logic only for employees

CHECK otype = 'P '.

SELECT * FROM pa0001

INTO pa0001 WHERE pernr = objid

AND begda <= sy-datum

AND endda >= sy-datum.

  • record is valid today, no authorization check

EXIT.

ENDSELECT.

IF sy-subrc = 0.

  • Begin of changes 07/03/2012 *

  • filter1 = pa0001-werks. "Personnel Area

filter1 = pa0001-bukrs. "Company Code

filter2 = pa0001-werks. "Personnel Area

  • End of changes 07/03/2012 *

ELSE.

CLEAR: filter1, filter2.

ENDIF.

Thanks,

Vaishali

Answers (1)

Answers (1)

Former Member
0 Kudos

Are there any new transactional data change to generate change pointers ? If not RBDMIDOC will not generate any Idocs.

Regards

Ravikumar

Former Member
0 Kudos

Yes, there are three records that can be processed.

Former Member
0 Kudos

yes, there are three records that can be processed, if I remove the filter for company code IDOCs are generated, so the issue is the filter on Company Code.