cancel
Showing results for 
Search instead for 
Did you mean: 

HCI Mapping leading Zeros

Former Member
0 Kudos

Hi, 

I am mapping product_ID field from CRM IDoc to ReceiverID field in Cloud for customer web service field. ReceiverID is 40 character long field.

Product_ID field is 7 to 10 characters long. I would like to append leading zeros using HCI function.

HCI function Concat accept two static parameters index and count. I cannot append zeroes depending upon product_ID length dynamically. Is there any way I could do this mapping using HCI functions ?

Thanks & Regards,

Shrikant Kamble

Accepted Solutions (0)

Answers (3)

Answers (3)

chandansb
Active Contributor
0 Kudos

Hello Shrikant,

Why don't you add number of zeros to the start of Product ID first and then use only the 10 characters from right end?

Example: Product ID: 101, lets say we are adding 10 zeros, so the Concat 10 zeros, this will make the Product ID as 0000000000101. Then use Substring to pick on the required length string. (Note that I am just considering reqd length as 10, you can use as per your requirement).

Hope this helps.

Regards,

Chandan

DG
Active Contributor
0 Kudos

Hi

In PI mappings you have the option to use format number to append 0 to a number. so all number get ie 10 digits. Then you can have you concat that filles in the rest where you have 30*0 and then your formatted number

I dont know how this works in HCI.

Daniel

0 Kudos

  - Sujit and Meghna - have you got a simple example on how to do this?

-ginger