Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

SapScript problem with leading zeros

Former Member
0 Kudos

Hi,

I print field LTAP-NLENR.

But when i use &LTAP-NLENR& leading zeros are cut.

I need to display it with leading zeros. (ex. 0000000000010000000001)

Please help.

Regards,

Greg.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Ok,

but as I wrote a need to keep leading zeros

but &LTAP-NLENR(Z)& supress leading zeros.

so instead of 0000000100000001 I have 10000000001.

Regards,

Greg

9 REPLIES 9

pavel_parshenkov2
Participant
0 Kudos

use like this:

&LTAP-NLENR(K)&

Message was edited by:

Pavel Parshenkov

former_member188829
Active Contributor
0 Kudos

Hi,

&LTAP-NLENR(Z)&

naimesh_patel
Active Contributor
0 Kudos

Try with

&LTAP-NLENR<b>(Z)</b>&

Here Z should be in capital letter

Regards,

Naimesh Patel

Former Member
0 Kudos

Ok,

but as I wrote a need to keep leading zeros

but &LTAP-NLENR(Z)& supress leading zeros.

so instead of 0000000100000001 I have 10000000001.

Regards,

Greg

0 Kudos

i have written:

&LTAP-NLENR(K)&

try this ))

0 Kudos

😕 no it doesn't work

Other ideas ?

Regards,

Greg.

0 Kudos

&LTAP-NLENR(K)& works fine for me with your requirment.

I have defined a L_VAR like this:

data: L_VAR type LTAP-NLENR.
l_var = '0000000000010000000001'.

In my script I use like this:

P1   &L_VAR(K)&

SO, try to pass that value to some other variable and see what happens.

Regards,

Naimesh Patel

0 Kudos

HI,

Try to declare that variable of type N and pass the value and print this varible in the script.

thanks

Mahesh

0 Kudos

hi Greg,

with (K) it has to work. I would suggest to check in debug if the variable really contains the leading zeros.

ec