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: 

Smart forms --- Currency problem

Former Member
0 Kudos

Hello, My friend,

Sorry for disturb you .

Who was using smart forms for report program.

I met a problem about currency ,How to put the minus sign to the front of money in smart forms. How to configuration.

Thank you in adavance

looking forward to your reply

Kevin

10 REPLIES 10

Former Member
0 Kudos

The easiest method is

concatenate '-' amount into a variable, and then display this variable in the smart form .

Or use this method to modify your internal table (your internal table should have this variable as a field).Now loop and write it in the smartform.

Regards

Binoo

NB: Award points if it works

0 Kudos

Hello Binoo,

Thanks for you quick answer.

I have found the solution.

Your methods are good. but it is not fitable for smart forms.

Just you can only write the output variable like follwing format

&GS_LINE-DMBTR(<)&

it's enough to insure the right output format.

thank you again,

Kevin

0 Kudos

Hi Kevin,

Kindly assign points to helpful answers and close the thread.

Thanks

Vinod

Vinod_Chandran
Active Contributor
0 Kudos

Hi,

Use this.

&VBAK-NETWR(<)&

Also the SET SIGN LEFT command put the sign on the left side of all numeric value.

Cheers

Vinod

Message was edited by: Vinod C

0 Kudos

Vinod,

thank you very much.

Are you good at smart forms?

I wanna ask you another question about Date.

How to output the date. I have converted date format like 20050930

but when i output the day ( &GS_LINE-DATE+6(2)), the wrong format is displayed like 9.3;

The date became 2005.09.03 in Smart forms, So wrong format was displayed.

How to solved it.

Thank you very much in advance.

Kevin

0 Kudos

Hi Kevin,

The display of date format depends upon the user default.

Check the date format for the user in SU01D. It should be the one you would like to have. The type of the field GS_LINE-DATE must be DATE. Do not remember whether you have to log off and login again to affect the changes.

Cheers

Vinod

Message was edited by: Vinod C

0 Kudos

hi Vinon

I want to display the day of bldat LIKE bkpf-bldat,

Because the configuration of end user is different. So My requirement is that day is right in any configuration.

Normally it 's right in ABAP programming. But in smartforms i can not solved it.

I writed the field into another variable , which type is like SY-DATUM.

Do you understand what i said, maybe my comments are not distiguished.

Regards

Kevin

0 Kudos

Hi Kevin,

I understand that you want to display the date in a particular format irrespective of the user setting. For this you need to move the date to another variable using the command WRITE and using a format.

DATA: w_bldat(8).

WRITE bldat TO w_bldat DD/MM/YY.

Then display the field w_bldat in the smartform.

Cheers

Vinod

0 Kudos

Hi ALL,

I have defined reference field in currency/quantity tab of smart foms global definition.

If i deleted these referece field.

I can't use the syntax & GS_LINE-dmbtr(<)& ?

If i done, the system popup a warning, some field is unknown.

why?

Kevin

Former Member
0 Kudos

hi,

use this piece of code.

if p_amount ca '-'.

replace '-' with '' into p_amount.

concatenate '-' p_amount into p_amount.

endif.

you can write this in command lines before displaying the amount.

hope ur problem will be solved with this.