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

Function Module Required

Former Member
0 Likes
1,801

Hi

is there any function module to convert like1000(Quantity field) to 1,000(Quantity field) in smartform

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,717

also try FM :WOSI_CONVERT_STRING_TO_NUM.

pass parameter,

P_ACTION = '2H' "Quantiy Conversion Mandatory value for action.

P_STRING_100 = 12525.

o/p :

P_ERFMG 12 525,000 .

15 REPLIES 15
Read only

Former Member
0 Likes
1,717

Hi,

Use Integer field and move the data to the integer variable.

Hope this helps.

Regards,

Amit Teja

Read only

Former Member
0 Likes
1,717

try WRITE TO statement.

Read only

former_member242255
Active Contributor
0 Likes
1,717

data: l_var type i.

move 1000 to l_var.

write l_var.

Read only

former_member242255
Active Contributor
0 Likes
1,717

data: l_var type i.

move 1000 to l_var.

write l_var.

Read only

sreeramkumar_madisetty
Active Contributor
0 Likes
1,717

Hi

Quan(8) = 1000

Concatenate quan1(1) ',' quan2(6) into quan.

Write:/ quan,

It will display as 1,000 instead 1000.

Regards,

Sreeram Kumar.Madisetty

Read only

Former Member
0 Likes
1,717

Hi:

Do one thing, find its data element and then go its domain->Definition -> find its conversion Routine

this conversion routine must have function module to convert into internal / external type.

use that function module to convert it .

Regards

Shashi

Read only

Former Member
0 Likes
1,717

If u are sure to put , after first place only then first u have to split 1000 into 2 bariables then

concatanate var1 ',' var2 into var1.

hope it help u out

Read only

Former Member
0 Likes
1,717

Hi Chitti,

No need to have any FM,based on your settings in SU3(defaults tab) u can see the data in the format u want.

Just Change the settings there and take print.

Hope this solves your problem,

Regards,

Rock.

Read only

0 Likes
1,717

hi

Thank u for yoyr reply if we have any function module can u send that name to me

Read only

Former Member
0 Likes
1,721

also try FM :WOSI_CONVERT_STRING_TO_NUM.

pass parameter,

P_ACTION = '2H' "Quantiy Conversion Mandatory value for action.

P_STRING_100 = 12525.

o/p :

P_ERFMG 12 525,000 .

Read only

0 Likes
1,717

call function 'RS_CONV_EX_2_IN_NO_DD'

exporting

input_external = l_str

importing

output_internal = p_erfmg

exceptions

error_message = 100

others = 200.

Read only

0 Likes
1,717

Hi Santosh Sarda ,

Thank u for ur reply

WOSI_CONVERT_STRING_TO_NUM.

what is P_ACTION = '2H' in the above function module

Read only

0 Likes
1,717

if you look inside the code of FM, P_Action detrmines, what kind of conversion is expected.

for quantity conversion we have:

constants: c_convert_to_erfmg type functioncode value '2H'.

you can see this easily inside function module code.

does it work for you?

Read only

0 Likes
1,717

Thank u

Read only

Former Member
0 Likes
1,717

Hi Chitti,

The same issue i faced in scripts, for the there is a remedy i used is,

TEMP = "your variable"

WHILE TEMP CA ',' .

REPLACE ',' IN TEMP WITH ' '.

ENDWHILE.

"Variable with type currency"(in your program) = TEMP.

Regards

Bhaskar Arani