Application Development 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: 

Function trouble with field domain that has conversion routine

Former Member
0 Kudos

I have a function that works when tested from the workbench but not when a value is passed to it. It contains the following:

IMPORTING

REFERENCE(I_PACK) TYPE LRMEI

SELECT SINGLE

umrez

INTO

w_packunit

FROM

marm

WHERE

matnr EQ w_cpos1-matnr AND

meinh EQ i_pack.

From the workbench 'CT' is converted to 'KAR' and the value is returned but when 'CT' is passed to the function from an outside routine the 'CT' is not converted and no value is returned. I have tried inserting CONVERSION_EXIT_CUNIT_INPUT function into my code but it did not work either. I am sure there must be a fundamental resolution for this.

1 ACCEPTED SOLUTION

christian_wohlfahrt
Active Contributor
0 Kudos

Hi Greg!

The conversion exit CUNIT is the right answer. I don't know, if you're system is different maintained, but I have to fill in CAR and language EN to get KAR as result.

An other option is to use ISO-code units. These are defined in T006 and should/can be used in interfaces with external systems.

In case of human interface, a CUNIT conversion exit is still the best.

Regards,

Christian

2 REPLIES 2

christian_wohlfahrt
Active Contributor
0 Kudos

Hi Greg!

The conversion exit CUNIT is the right answer. I don't know, if you're system is different maintained, but I have to fill in CAR and language EN to get KAR as result.

An other option is to use ISO-code units. These are defined in T006 and should/can be used in interfaces with external systems.

In case of human interface, a CUNIT conversion exit is still the best.

Regards,

Christian

0 Kudos

Thanks Christian,

I had was right there but just had a coding error when I implemented the CUNIT input function. I guess I just needed the confirmation that I was on the right track.

THanks!

Greg