Skip to Content
0
May 19, 2016 at 12:48 AM

Correct padding for ISA13 and IEA02 in X12

180 Views

Hi Folks,

I am using the NRO module in my comm channel and passing the constant ($B2B_UEBNR_BEFOREXXXXXXXXXX$B2B_END_UEBNR) from mapping to the field ISA13 and IEA02 to get the number range value from the B2Bic NRO module. The fields are populating with the correct number range values but I have no control from mapping to padd additional whitespaces to make the length as 9 characters as that what its fixed length is. Can someone please suggest how can we dynamically add those spaces or pad preceeding zeroes.

So in the following example I have to pad whitespaces or zeroes in from of 20, to make it as either " 20" or "000000000000020"

ISA|00| |00| |ZZ|XXXXXXXXXX |ZZ|XXXXXXXXXXX |160518|0304|U|00401|20|0|T|>~

IEA|1|20~

Regards

Kalyan.