cancel
Showing results for 
Search instead for 
Did you mean: 

conversion file - removing leading zeroes

Former Member
0 Kudos

hi,

how to remove leading zeroes for id's  in a conversion file?

external                internal

00001234               1234

Accepted Solutions (1)

Accepted Solutions (1)

former_member186498
Active Contributor
0 Kudos

Hi,

try putting this instruction in Internal

js:parseInt(%external%)

Kind regards

     Roberto

Former Member
0 Kudos

roberto,

i tried  js:parseInt(%external%) in internal, external * and convert_internal option ass blank..it didnt work for me .... transformation file gave an error.

former_member186498
Active Contributor
0 Kudos

Hi,

I'm not sure I've understand what you ask, but this instruction is valid only for integers if you have some blanks in the external values you must use an IF instruction in combination with the js instruction, so this runs only if external has a value inside, please see

http://help.sap.com/saphelp_bpc75_nw/helpdata/en/81/94a8a5febd40268d5c59b4fc31be37/content.htm

Kind regards

     Roberto

Former Member
0 Kudos

roberto,

in

source file id list we have below id's

---------

abc_ga

abb_gb

0000001234

i want to remove  the leading zeroes (000001234->1234). how to create the conversion for this?

former_member186498
Active Contributor
0 Kudos

Hi,

to delete leading zeroes try in internal

*If(%external%=0* then js:parseInt(%external%); *)

Kind regards

     Roberto

Answers (1)

Answers (1)

former_member186498
Active Contributor
0 Kudos

Hi,

sorry I forgot, if you have a fixed number of zeroes than you can simply try using wildcards

external          internal

????*               *

Kind regards

     Roberto