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

ABAP code help... 2 :-)

Former Member
0 Likes
1,023

Hi,

I'm changing an old report with write sentences... I would like to do "write" value data type CURR in format -99999999999,99, now i have vaules displayed in format 999.999.999,99-

How Can I change this?

example:

TYPES: BEGIN OF line,

gross LIKE bseg-dmbtr, "Brutto versteuerter Betrag

netto LIKE bseg-dmbtr, "nicht versteuerter Betrag N0

END OF line.

......

WRITE: /153 itab-gross, itab-netto.

Thanks + points granted

Saso

7 REPLIES 7
Read only

Former Member
0 Likes
918

Hi use no grouping...

write field NO-GROUPING.

or u can use replace statement...

hop this will help u

reward if useful..

Read only

Former Member
0 Likes
918

hi ,

following code may solve half of your problem...


DATA : text type char18.
text = itab-gross.      "field with value 999.999.999,99 
REPLACE ALL OCCURRENCES OF   '.' IN  text
  WITH ' '.
CONDENSE text.
WRITE :/153 text.

Message was edited by:

Sudhakar G

Read only

Former Member
0 Likes
918

Try using the statement after write

WRITE: /153 itab-gross CURRENCY w

Effect

Correct format for currency specified in the field w.

Treats the contents as a currency amount. The currency specified in w determines how many decimal places this amount should have.

The contents of w are used as a currency key for the table TCURX; if there is no entry for w, the system assumes that the currency amount has 2 decimal places.

Else u can try <b>SET COUNTRY</b> command and den use write stmts

Hope dis helps

Reward if it does

Read only

Former Member
0 Likes
918

Thanks a lot!!

Read only

Former Member
0 Likes
918

I want to reward points, but i don't have this option on this question???

Read only

Former Member
0 Likes
918

Hi,

DATA : text(18) value '999.999.999,99'.

REPLACE ALL OCCURRENCES OF '.' IN text

WITH ' '.

CONDENSE text.

WRITE 😕 text.

Try this,

KC

Read only

0 Likes
918

the best solution is NO-GROUPING,

thanks