12-09-2011 3:14 AM
Hi,
I'm new to ALE IDoc. I have a requirement to hide some sensitive data field for the HR information when outbound the Idoc.
Example, I need to outbound the IT8 Basic Pay with payscale area etc but not with the basic pay amount. I can convert the basic pay amount to zero when the idoc is being created.
I've searched through some information and found out that there are several ways to achieve it. However, I'm not sure which one is a better way.
Is it using the Conversion Rule (BD62) or using Badi or Idoc Reduction method is better?
Kindly give me some hints as I'm very confuse of which one is the better solution.
Many thanks in advance.
12-09-2011 3:33 AM
IDoc reduction is to be used when you want to drop off groups of optional segments. The conversion rules are best suited to manipulate values (like code conversion etc)
Since you decided to make the value zero for basic pay, the conversion rule is better suited from also future maintenance perspective. I wouldn't suggest going to a BADI unless you have something more complex to achieve
12-09-2011 3:33 AM
IDoc reduction is to be used when you want to drop off groups of optional segments. The conversion rules are best suited to manipulate values (like code conversion etc)
Since you decided to make the value zero for basic pay, the conversion rule is better suited from also future maintenance perspective. I wouldn't suggest going to a BADI unless you have something more complex to achieve
12-09-2011 5:47 AM
Hi Vishnu,
thanks for the reply. If I use conversion rule, should I need to use the user exit as well? Do you have the steps for the conversion rule?
Thanks.
12-09-2011 6:16 AM
No user exit is needed for conversion rule.
However, you should remember that conversion rules are applied segment fields for a particular message type. So wherever the IDoc message type is used the rule will be applied. If you want to associate the rule for any other condition in addition to message type better to go with a BADI
These are steps to create and apply a conversion rule to a message type:
1. Transaction BD62 - Create conversion rule and assign it to a IDoc segment
2. Transaction BD79 - Define the conversion rule by selecting your field and clicking display button. Once inside you can use various options like set constant to map 0 to the basic pay
3. Finally assign the conversion rule to your message type using BD55
As for BADIs, IDOC_DATA_MAPPER is also suited for your requirement, the method PROCESS, allows you to manipulate your IDoc fields whichever way you want. You get the control record, data records, using which you can restrict your manipulation to specific message type or other conditions
To above post, BADI IDOC_CREATION_CHECK should not be used for mappings/conversions as its specific purpose is to stop creation of an IDoc under required conditions
12-09-2011 6:26 AM
Vishnu, thanks for the informations. As I'm using the standard message types HRMD_A, it should be easier for me to use the conversion rule approach.
12-09-2011 6:12 AM
Hi ,
IDOC_CREATION_CHECK is a BADI defination which may help you.
In this method IDOC_DATA_CHECK is there here you can read the perticular segment of IDOC and clear that field.
I think this may help, as this BADI is basically for checking the IDOC creation and data validation before outbound Idoc is created.
Regards,
Ganesh.