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

Quantity Prob in BDC

former_member368216
Participant
0 Likes
684

I am uploading a quantity value of 1.000 from file and passing the value to BDC Process. while uploading the value from file i am considering the Quantity field as character type. This works fine for me for the settings but for my user has different settings. The '.' means ',' to my user and the quantity value is considered as 1,000 for further processing and the calculated values are 1000 times more than what should have been.

I have a situation where user wants to keep the settings and also the file format remains the same with quantity value 1.000 and now i have to look for the alternative to handle it in the code. Please, guide me to solve this prob.

I am uploading a quantity value of 1.000 from file and passing the value to BDC Process. while uploading the value from file i am considering the Quantity field as character type. This works fine for me for the settings but for my user has different settings. The '.' means ',' to my user and the quantity value is considered as 1,000 for further processing and the calculated values are 1000 times more than what should have been.

I have a situation where user wants to keep the settings and also the file format remains the same with quantity value 1.000 and now i have to look for the alternative to handle it in the code. Please, guide me to solve this prob.

4 REPLIES 4
Read only

Former Member
0 Likes
645

Let this '.' get converted into ',' by using the character format. but while calculating the processed values(since it is 1000 times more than what it should be.) divide the value by 1000, which will in turn rr\retain the old value(1.000).

Read only

Former Member
0 Likes
645

You can try like this to populate amount and Quantity fields.

You need to check the amount format that you are using in File.(check Sytem->user profiles-> Decimal notation), the same format need to give.You may be using wrong field type for mapping. Try to trace out with Recording.

Read only

Former Member
0 Likes
645

Hi Ashok,

While you pass the decimal values to a character, use write statement and pass to the character,by this the character will have values as per the user settings.

For an example..... if quantity is 1.00 when you pass to a character do this

data : c1(10) type c,

c2(10) type c.

write c1 to c2.

pass the c2 into bdc.

If you dont use write statement then the value shall not be converted as per the user settings, nothing to explicitly handle apart from write statement.

PLEASE AWARD if found suitable.

Regards

Prashanth

Read only

former_member368216
Participant
0 Likes
645

Got the idea. Please ignore.

Thanks for all ur help.

Thanks,

Ashok