on 10-15-2013 2:50 PM
We have an IDOC coming to PI which is failing sometimes in our partner system because of the number format (comma or decimal notation)
We found that it is dependent on the ERP user setting who generates the IDOC. For example, if end user number format includes commas, then the IDOC and file output do also. If ERP user is set to decimal, the output is decimal (which is what our partner system expects)
Problem: We want to override number formatting in PI so that the output is always decimal notation. We can't force them to use decimal because they need comma notation for other work. I would prefer if we can achieve this at the IDOC level or File Adapter and not get into specific field mappings to convert the number formats.
Any ideas for us?
Many thanks,
Aaron
You need to take away all decimal notations when the Idoc is created (so it will be amount x 100). When this is a standard SAP IDoc (I don't think so), you will need to find a user exit and adjust the segment/field values. If it is a custom IDoc you will need to adapt the source code accordingly.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Aaron,
you can handle this in Message mapping and use Date Trans (Date transformation function).
Thanks
Hari.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
you can solve it in the Mapping Program, Use the standar function FormatNum.
you can validate if the input value has a comma in it. if so, call the fuction FormatNum if not map the value directly.
Regards
Rodrigo
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The simplest way is to do this in mapping. You can use same source and target message and put your User-Defined Java function for formatting
Best regards
Vedran
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
As mentioned I want to stay out of field level mappings. It could be easy to start, but not the best approach because it will be error prone (missing a field here or there, maybe the zIDOC changes later, etc).
No matter where you handle the conversion (PI or ABAP) you will need to do this field by field.
if the IDOC change you will need to consider the changes also in ABAP or PI.
related to error prone as you mentioned i desagree with you because you can validate missing fields or changes in the IDOC. With PI 7.1 and above you have the functionality to solve "mapping inconsistences" when an structure of mapping changes to avoid the mapping from the scratch.
IS JUST up to you where you want to handle the conversion.
Regards.
Rodrigo
Yes, I agree with you Rodrigo, we could do it in mapping, and it must be done one place or the other. But in this case we have something that is working/not working based on the user setting in ERP. I think fixing the problem closest to the source is best (zIdoc) because for this scenario we aren't using any other mapping logic. I was hoping there might be some setting I could put on the IDOC/RFC connection or somewhere else in receiver Adapter which might override the decimal notation for all fields generically.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.