Application Development and Automation 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: 
Read only

How do I suppress zero values in SAP Script?

Former Member
0 Likes
2,462

Hi,

How do I suppress zero values in SAP Script?

Also, how can I have more than 1 formatting options for a program symbol in SAP Script?

Thanks.

1 ACCEPTED SOLUTION
Read only

Former Member
1,431

there are 2 possibilities.

1. format option (I).

e.g.

A1 &MARA-MATNR(I)&

will only display on form if mara-matnr is not initial.

2. with comment

e.g.

A1 &'MaterialNo. : 'MARA-MATNR&

this is even better. if you have a mara-matnr lets say 'RF23443' the output would be:

MaterialNo. : RF23443

if your mara-matnr is initial there will be nothing in your outpuit since this format option will not even output the comment once the value is blank.

ugh sorry i misunderstood you.

suppressing leading zeros will be (Z)

suppressing leading spaces will be (C).

just have a look at:

http://help.sap.com/saphelp_47x200/helpdata/de/d1/803445454211d189710000e8322d00/frameset.htm

Edited by: Florian Kemmer on Aug 27, 2008 12:17 PM

there are 2 possibilities.

1. format option (I).

e.g.

A1 &MARA-MATNR(I)&

will only display on form if mara-matnr is not initial.

2. with comment

e.g.

A1 &'MaterialNo. : 'MARA-MATNR&

this is even better. if you have a mara-matnr lets say 'RF23443' the output would be:

MaterialNo. : RF23443

if your mara-matnr is initial there will be nothing in your outpuit since this format option will not even output the comment once the value is blank.

ugh sorry i misunderstood you.

suppressing leading zeros will be (Z)

suppressing leading spaces will be (C).

just have a look at:

http://help.sap.com/saphelp_47x200/helpdata/de/d1/803445454211d189710000e8322d00/frameset.htm

Edited by: Florian Kemmer on Aug 27, 2008 12:17 PM

5 REPLIES 5
Read only

bpawanchand
Active Contributor
0 Likes
1,431

Hi

Use

&symbol(Z)&

Regards

Pavan

Read only

Former Member
0 Likes
1,431

Hi,

In the print program use SHIFT <field name> LEFT DELETING LEADING '0'.

Thanks,

Read only

Former Member
1,432

there are 2 possibilities.

1. format option (I).

e.g.

A1 &MARA-MATNR(I)&

will only display on form if mara-matnr is not initial.

2. with comment

e.g.

A1 &'MaterialNo. : 'MARA-MATNR&

this is even better. if you have a mara-matnr lets say 'RF23443' the output would be:

MaterialNo. : RF23443

if your mara-matnr is initial there will be nothing in your outpuit since this format option will not even output the comment once the value is blank.

ugh sorry i misunderstood you.

suppressing leading zeros will be (Z)

suppressing leading spaces will be (C).

just have a look at:

http://help.sap.com/saphelp_47x200/helpdata/de/d1/803445454211d189710000e8322d00/frameset.htm

Edited by: Florian Kemmer on Aug 27, 2008 12:17 PM

Read only

Former Member
0 Likes
1,431

hiii

use Z with variable in script like

only z in capital letter.

&wa_value(Z)&

regards

twinkal

Read only

Former Member
0 Likes
1,431

To suppress leading zero values... write 'z' in bracket beside your variable

e.g. wa_vbeln(z)