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

Convert Quantity field to User profile format

Former Member
0 Likes
3,130

Hi,

I have developed a BDC pgm, which will post QUANTITY field in QA12 transaction.

While fetching Quantity (LMENGEZUB) field from QALS table, the value is being fetched as 10.000 (which is just value 10)

I have set my user profile as 1.23.456,000

Now the pblm is i have to convert 10.000 as 10,000 (according to user profile).

Please help me out in solving this issue.

Thanks,

DhanaLakshmi M S

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,655

1) Better you change the user profile to the required format, then load the data. After loading revert the user profile setting.

2) Else use the below statement to convert the quantity into required format.

data: quan(13) type c.

move quantity to quan.

replace all occurances of '.' in quan with ',' .

Hi,

I have developed a BDC pgm, which will post QUANTITY field in QA12 transaction.

While fetching Quantity (LMENGEZUB) field from QALS table, the value is being fetched as 10.000 (which is just value 10)

I have set my user profile as 1.23.456,000

Now the pblm is i have to convert 10.000 as 10,000 (according to user profile).

Please help me out in solving this issue.

Thanks,

DhanaLakshmi M S

4 REPLIES 4
Read only

Former Member
0 Likes
1,656

1) Better you change the user profile to the required format, then load the data. After loading revert the user profile setting.

2) Else use the below statement to convert the quantity into required format.

data: quan(13) type c.

move quantity to quan.

replace all occurances of '.' in quan with ',' .

Read only

0 Likes
1,655

Hi Chandrasekar,

Thanks for your reply. I need a functional module to convert this. There may be any type of decimal notation selected in User profile. so i need to change the field dynamically.

DhanaLakshmi M S

Read only

0 Likes
1,655

No need for a function, With BDC quantity fields must be passed as CHAR. So do a write of your quantity field to a CHAR field and all will be well.

Read only

0 Likes
1,655

Maen,

Thanks a lot. It solved my problem.

DhanaLakshmi M S