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

bdc program

Former Member
0 Likes
972

Hi,

I am working on a bdc program where i want to upload anumerical value 1.293,00 .

i have used ' REPLACE ',' WITH space INTO v_wrbtr.

condense v_wrbtr no-gaps.

in the program.But in the o/p when i try to process the session i am getting 1,29300 value and when i try to process it it is giving error as 'enter numeric value'.

can any one tell me how to solve this?

1 ACCEPTED SOLUTION
Read only

Former Member
934

hi,

1. first convert the currecny to Character value using any of the below FM.

HRCM_STRING_TO_AMOUNT_CONVERT
or
PSSV_TEXT_INTO_FIELD_CURRENCY

2. then use the below logic.

data: l_amnt(100) type c.

l_amnt = '1,234,567,89'.

replace all occurrences of  ', ' in l_amnt with '.'.

write : l_amnt.

Regards

Reshma

7 REPLIES 7
Read only

Former Member
0 Likes
934

Hi,

Declare the variable as string or character where you want to store the decimal value . and try to save it.

i hope it works.

Regards,

Srinivas

Read only

Former Member
0 Likes
934

Hi

Check for the decimal notation by going the path

System->UserProfile->Own data

and modify the way u want the decimal notation

Regards

Sandhya

Read only

0 Likes
934

Hi Sandhya,

None of the decimal notations are working for this .Is there any other method to solve this?

Regards,

Hema

Read only

Former Member
935

hi,

1. first convert the currecny to Character value using any of the below FM.

HRCM_STRING_TO_AMOUNT_CONVERT
or
PSSV_TEXT_INTO_FIELD_CURRENCY

2. then use the below logic.

data: l_amnt(100) type c.

l_amnt = '1,234,567,89'.

replace all occurrences of  ', ' in l_amnt with '.'.

write : l_amnt.

Regards

Reshma

Read only

0 Likes
934

Hi,

Could u pls give an example how to use these function modules?

It would be very helpful to me if u could help me.

Regards,

Hema

Read only

Former Member
0 Likes
934

Hi,

try not using the replace and condense statements. What message do you get?

Regards,

Alexandros.

Read only

Former Member
0 Likes
934

Hi Hema,

I think this is a currency conversion problem. I hope following code will solve your problem.

If wrbtr contains 1.293,00, then v_wrbtr will contain the final value.


  DATA : v_wrbtr(16) TYPE c.
  WRITE wrbtr TO v_wrbtr CURRENCY bkpf-waers.

Reward points if the answer is helpful.

Regards,

Mukul