10-25-2006 7:44 AM
Hello,
In my program I have to use SHIFT inorder to shift the contents of the field symbol deleting the leading spaces.
Field symbol will be assigned of any type(c,n,d,P,).
Problem :-
When field symbol is assigned with a decimal value, The code short dumps.
Is there any other command which gives the same functionality. Or is there some thing i have to modify with SHIFT. Please let me know the solution.
Thanks
SDN powered
10-25-2006 8:10 AM
Hi,
Use the condense command.
Check http://help.sap.com/saphelp_nw2004s/helpdata/en/fc/eb33e6358411d1829f0000e829fbfe/frameset.htm for details.
Eddy
10-25-2006 1:35 PM
Hi Eddy,
Condsense too creating a dump for decimals
Thanks
SDN powered
10-25-2006 1:47 PM
10-25-2006 9:25 AM
don't give data type for ur field symbol, for example field-symbol <fs>.
u can use this field symbol for any data type.
10-25-2006 9:28 AM
hi,
use sth like this:
DESCRIBE FIELD <f> TYPE z.
IF z = 'C'.
shift <f> ....
ENDIF.
A.
10-25-2006 1:52 PM
Hi,
use condense to remove leading spaces
condense v_qty.
Regards
amole
10-25-2006 1:59 PM
That's funny, it does dump for me at all.
report zrich_0001 .
data: c(10) type c value '0000012345',
p type p decimals 2 value '12345.67',
n(4) type n value '0003'.
field-symbols: <fs>.
assign c to <fs>.
shift <fs> left deleting leading '0'.
write:/ <fs>.
assign p to <fs>.
shift <fs> left deleting leading '0'.
write:/ <fs>.
assign n to <fs>.
shift <fs> left deleting leading '0'.
write:/ <fs>.
Regards,
Rich Heilman