cancel
Showing results for 
Search instead for 
Did you mean: 

Decimal conversion in RFC XML->PI

markbernabe
Active Participant
0 Kudos

Hi Experts,

I have a field in a function module with type decimal. When tested locally in SE37, the value being returned is <field>0.99</field>.

Now this field is mapped in PI without any conversion or transformation. Instead of getting <field>0.99</field>, I get <field>.99</field>, without the left 0.

Checking the inbound message in SXI_MONITOR, the value is already .99 and not 0.99

Has anyone encountered this weird conversion before? Why does it show 0.99 in SE37 but when sent to PI, it becomes .99?

Is it a known issue in PI?

Appreciate your inputs. Thanks!

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Mark

I think this is a known behavior with RFC xml or IDOC xml. You can easily change it to 0.99 with a simple format number function in sap PI.

markbernabe
Active Participant
0 Kudos

Thank you Indrajit. Yes, I've done the same workaround.

Answers (2)

Answers (2)

Former Member
0 Kudos

HI Mark

Can you check if the

XSD attributes are correct on abap proxy structure view,  i think if you define the field as decimal in datatype and mention total digits , fraction digits and min and max  length  it will display correctly.

I think you can define it as string also with min and max length if there is no specific constraints to check  and test once.

Regards

Srinivas

former_member184681
Active Contributor
0 Kudos

Hi Mark,

If possible, simply change the data type to char of specific length. Then PI will skip any conversion .

Regards,

Greg

markbernabe
Active Participant
0 Kudos

Hi Greg,

Thanks for the suggestion. Though I feel like, decimal is the appropriate data type as the field contains monetary value. By any chance, do you know why the decimal value was converted when the RFC data was transformed to RFC XML?