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

Quant field conversion in Valuepart1 - getting short dump

Former Member
0 Likes
701

I have user defined field of quant type enhanced from database table PRPS. To move the values back from valuepart1 to the structure BAPI_TE_WBS_ELEMENT,

move x_extensionout-valupart1 to x_bapi_te_wbs_element is resulting in an error because of mutual compataibility. So I proceeded by the approach of valuepart+index(offset) to fill in the fields I need. All the character fields seemed to be fine but when it comes to Quant fields I am getting short dump due to number conversion.

I have tried the following approaches:

valuepart+index(offset) where Quant value is there:

1. first moving to char and then to quant :still dump

2. multiplying by 1 ... Result : was not allowed

3. conversion exit for valuepart+index(offset) to char and seein the value: I see that the value is stored

as ###########`# (instead of numbers I see only hash symbols) . The result is the same even when the value is initial or some value is filled.

4. conversion exit for valuepart+index(offset) to char and then to quant :still dump

Any input is appreciated.

I have user defined field of quant type enhanced from database table PRPS. To move the values back from valuepart1 to the structure BAPI_TE_WBS_ELEMENT,

move x_extensionout-valupart1 to x_bapi_te_wbs_element is resulting in an error because of mutual compataibility. So I proceeded by the approach of valuepart+index(offset) to fill in the fields I need. All the character fields seemed to be fine but when it comes to Quant fields I am getting short dump due to number conversion.

I have tried the following approaches:

valuepart+index(offset) where Quant value is there:

1. first moving to char and then to quant :still dump

2. multiplying by 1 ... Result : was not allowed

3. conversion exit for valuepart+index(offset) to char and seein the value: I see that the value is stored

as ###########`# (instead of numbers I see only hash symbols) . The result is the same even when the value is initial or some value is filled.

4. conversion exit for valuepart+index(offset) to char and then to quant :still dump

Any input is appreciated.

3 REPLIES 3
Read only

Former Member
0 Likes
628

Hi,

Try this Fm HR_99S_COPY_STRUC1_STRUC2

Read only

0 Likes
628

Thanks for the function module. I used it and now the dump is eleminated but the problem is not entirely solved. If the quant value is 12.000, based on the casting in the HR_99S_COPY_STRUC1_STRUC2, it is converting to type x (as I understand xstring ) and giving the value as 0000012000 and when I move char to quant, it wrongly converts to as: 12,000.000

How to avoid this and get the correct quant value??

Read only

0 Likes
628

As suggested in other forms, I converted to char and now there is no issue with quant values