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

Format problem in SAP script printing

former_member541575
Participant
0 Likes
749

Hi

i want a format of amount field in main window and total window should be 234,00 or 5,90

but in my program it is printing like 234.00 and 5.90

i changed the format through System-->User Profile ---> Own data but i did not get required format.

Regards

Atul

7 REPLIES 7
Read only

Former Member
0 Likes
728

You have to logout of your SAP system and relogin for the changed settings to take effect. Did you try that?

Read only

Former Member
0 Likes
728

Hi,

did u use any type of P(packed decimal)in ur program..

if so declare it as I(int variable)

Did u logout from the sytem...if not logout and then login..u wont be getting any problems later..

Regards

Kiran

Read only

0 Likes
728

Hi,

or else..

Declare like this

&symbol(I)& in ur main window currency field...

Regards

Kiran

Read only

0 Likes
728

Hi,

Use the Standard Changing formats in the sapscript menu bar,

may be it could help.

Thanks & Regards,

Dileep .C

Read only

0 Likes
728

Hi

i applied below lines in my program but get the result in Whole Number values like 45(Without decimal)

while i want format like 45,00 or 1.234,00 (Thousand seperator)

data : w_gross_amt(20) TYPE c,

lo_sum(20) TYPE c.

SELECT SINGLE dcpfm

FROM usr01

INTO usr01-dcpfm

WHERE bname = sy-uname.

IF usr01-dcpfm NE c_x.

  • REPLACE ',' IN w_gross_amt WITH '.' .

TRANSLATE w_gross_amt USING '.,'.

CONDENSE w_gross_amt NO-GAPS.

ENDIF.

READ TABLE ta_out_table

ASSIGNING <fs_itcsy> INDEX 3.

IF sy-subrc EQ 0.

MOVE w_gross_amt TO lo_sum.

SHIFT lo_sum LEFT DELETING LEADING space.

MOVE lo_sum TO <fs_itcsy>-value.

ENDIF.

Thanks

Atul

Read only

Former Member
0 Likes
728

Hi,

try using this text editor.

/: set country 'COUNTRY' -


> Give the required country name.

example : /: set country 'IN' -


>India

( This is for country dependent formatting,number fields with thousand seperartors,date fileds ).

For country names see T005 land1 field.

Read only

Former Member
0 Likes
728

Hi,

Use the codes:

* Translate the Component value
* If comma is used for decimal separator "e.g. 2.900.010,004
if field1 eq space.
TRANSLATE px_in-value USING '. '.
TRANSLATE px_in-value USING ',.'.
* If dot is used for decimal separator "e.g. 2,900,010.004
elseif field1 eq 'X'.
TRANSLATE px_in-value USING ', '.
endif.