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: 

SHIFT - fieldsymbol

Former Member
0 Kudos

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

7 REPLIES 7

eddy_declercq
Active Contributor
0 Kudos

0 Kudos

Hi Eddy,

Condsense too creating a dump for decimals

Thanks

SDN powered

0 Kudos

Hi,

Condense is used for strings.

Eddy

Former Member
0 Kudos

don't give data type for ur field symbol, for example field-symbol <fs>.

u can use this field symbol for any data type.

andreas_mann3
Active Contributor
0 Kudos

hi,

use sth like this:

DESCRIBE FIELD <f> TYPE z.

  IF z = 'C'.
   shift <f> ....    
  ENDIF.

A.

Former Member
0 Kudos

Hi,

use condense to remove leading spaces

condense v_qty.

Regards

amole

0 Kudos

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