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: 

ABAP code help... 2 :-)

Former Member
0 Kudos

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

former_member624107
Contributor
0 Kudos

Hi use no grouping...

write field NO-GROUPING.

or u can use replace statement...

hop this will help u

reward if useful..

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

Thanks a lot!!

Former Member
0 Kudos

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

Former Member
0 Kudos

Hi,

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

REPLACE ALL OCCURRENCES OF '.' IN text

WITH ' '.

CONDENSE text.

WRITE 😕 text.

Try this,

KC

0 Kudos

the best solution is NO-GROUPING,

thanks