cancel
Showing results for 
Search instead for 
Did you mean: 

How to display kbetr value in smartform

Former Member
0 Kudos

Hi friends,

I have a small problem. Actually my requirement is i want to display total (amount) value in my smartform. if the total amount is 0(ZERO) that time i need to display N/C if not ZERO that time i need to display corresponding value.

For that i declard char field insteded of kbetr field. Now the issue is, its not printing with comma's. Normally kbetr value will display with comma's.

example : 1,000,00.00. but in my case its showing 100000.00. how to correct this?

Mohana.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Try like below.

GV_KBETR TYPE CHAR18.

IF NOT <ko>-kbetr IS INITIAL.

WRITE <ko>-kbetr CURRENCY <ko>-koei1 TO gv_kbetr .

ELSE.

gv_kbetr = space.

ENDIF.

Use gv_kbetr for display.

Cheers,

Balaji

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Dude,

Open a code node inside ur smartform and declare a variable like this.

Data : xxx(3).

Then based on the country key which ever it is move it to XXX. For example if it is USA then move 'USA' TO xxx.

Then make a command like.


 SET country xxx

this will surely have an impact on the kbetr field value

Hope this can solve ur problem.

Cheers,

Joe

Edited by: meetjoe on Jul 21, 2009 2:50 PM

Former Member
0 Kudos

Hi,

Delcare 2 variables

IF ZERO

Print CHAR variable

ELSE

Print kbetr.

Please check ur setting also..

Regards,

Aditya

former_member194416
Contributor
0 Kudos

use "write to" while assigning amount to char or use condition and display another text module in smartform for 0 values.

Former Member
0 Kudos

write to is not working properly. If i use another text variable that time its not printing properly. Allignment got changed.

Former Member
0 Kudos

Hi Vijayan,

If it alignment probelm then u can create a new character format of the same that is for printing KBETR and tht to the text variable.Hope that should solve your problem.

Regards,

Aditya