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

Decimal fields.

Former Member
0 Likes
460

Hi Guys ,

Can anybody tell me Hw to make Blanks to be right justified with blank padding to the left to maintain the succeeding field’s starting position for Decimal Fields?

How to keep Minus sign in the Left of the Most Significant bit?

For Example like this Samples in a fourteen (14) digit field delimited by quotes

“ -9999.999990”

“ 9999.999999”

“ 0.999999”

“ -0.999999”

Thanks,

Gopi.

4 REPLIES 4
Read only

Former Member
0 Likes
442

Hi Guys,

Can anybody reply to the above mail Very urgent.

Thanks in advance,

Gopi.

Read only

former_member194669
Active Contributor
0 Likes
442

Hi,

Check this


DATA: c1(4) VALUE 'ABCD', 
      i1 TYPE I VALUE '-1234', 
      p1 TYPE P VALUE '-1234'. 
WRITE: /     c1 USING EDIT MASK  '__:__'.     ->  AB:C             
WRITE: /(15) c1 USING EDIT MASK  '__:__'.     ->  AB:CD            
WRITE: /(15) c1 USING EDIT MASK  '__:_'.      ->  AB:C             
WRITE: /(15) c1 USING EDIT MASK  'RR__:__'.   ->            AB:CD  
WRITE: /(15) c1 USING EDIT MASK  'RRR__:__'.  ->           RAB:CD  
WRITE: /(15) c1 USING EDIT MASK  '_a_b_c_d'.  ->  AaBbCcDd         
WRITE: /(15) i1 USING EDIT MASK  '____'.      ->  1234             
WRITE: /(15) i1 USING EDIT MASK  '____V'.     ->  1234-            
WRITE: /(15) i1 USING EDIT MASK  'V____'.     ->  -1234            
WRITE: /(15) i1 USING EDIT MASK  'RRV____'.   ->            -1234  
WRITE: /(15) p1 USING EDIT MASK  '____'.      ->  1234             
WRITE: /(15) p1 USING EDIT MASK  '____V'.     ->  1234-            
WRITE: /(15) p1 USING EDIT MASK  'V____'.     ->  -1234           

Use syntax

Write < Use edit mask according to your need > to v_your_variable

aRs

Read only

0 Likes
442

Hi aRs,

I have to copy the data into a text File.So can u Help me is there any FM ?

Thanks,

Gopi.

Read only

former_member194669
Active Contributor
0 Likes
442

Hi,


data : begin of i_output occurs 0,
         v_digit(14) type c,
         v_desc(50) type c.
data : end of i_output.

Write < Use edit mask according to your need > to i_output-v_digit.
                                       " mentioned as above thread
write : 'Test' to i_output-v_desc.

append i_output.

Use open dataset or gui_download to write the i_output table.

aRs