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

ISO code in Inbound Order

Former Member
0 Likes
4,835

I am testing the inbound idoc orders05. Customer's PO has 'UN' in the field MENEE of E1EDP01. It is equivalent to EA.

When I try to post it , it gives me an error "ISO unit of measure UN is not assigned (item )"

I tried to maintain it in the UOM table but it didn't allow me to do so as an entry with EA already exist.

I changed dxvbap-vrkme and dxvbap-meins to EA through user exit but it is still giving me the same ISO error.

I am using the exit 'exit_saplveda_001'.

Cnn you tell me what I am doing wrong?

Thanks

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
3,496

In transaction CUNI, click on unit of measurement, select EA in the next screen and then press 'Display' icon. See what is there in the ISO code field. My guess is that it is EA. UN is not a valid ISO code. So you have to change E1EDP01-MENEE to EA. That should take care of it.

I am testing the inbound idoc orders05. Customer's PO has 'UN' in the field MENEE of E1EDP01. It is equivalent to EA.

When I try to post it , it gives me an error "ISO unit of measure UN is not assigned (item )"

I tried to maintain it in the UOM table but it didn't allow me to do so as an entry with EA already exist.

I changed dxvbap-vrkme and dxvbap-meins to EA through user exit but it is still giving me the same ISO error.

I am using the exit 'exit_saplveda_001'.

Cnn you tell me what I am doing wrong?

Thanks

7 REPLIES 7
Read only

Former Member
0 Likes
3,496

Hi Shahnila,

Please use this FM <b>UNIT_OF_MEASURE_SAP_TO_ISO</b> to convert to ISO code.

CALL FUNCTION 'UNIT_OF_MEASURE_SAP_TO_ISO'
    EXPORTING
      SAP_CODE    = I_LIPS-VRKME
    IMPORTING
      ISO_CODE    = I_LIPS-VRKME
    EXCEPTIONS
      NOT_FOUND   = 1
      NO_ISO_CODE = 2
      OTHERS      = 3.

Hope this will help.

Regards,

Ferry Lianto

Please reward points if helpful.

Read only

0 Likes
3,496

I used the FM in the userexit but the error is still there. Here is my code.

check contrl-mestyp = 'ORDERS'.

if segment-segnam = 'E1EDP01'.

move segment-sdata to l_edp01.

if l_edp01-menee = 'UN'.

xvbap = dxvbap.

xvbap-vrkme = 'EA'.

call function 'UNIT_OF_MEASURE_SAP_TO_ISO'

exporting

sap_code = xvbap-vrkme

importing

iso_code = xvbap-vrkme

exceptions

not_found = 1

no_iso_code = 2

others = 3.

xvbap-meins = xvbap-vrkme.

dxvbap = xvbap.

endif.

endif.

Read only

0 Likes
3,496

Hi Shahnila,

I check the FM stand alone and it works fine by returning 'EA' when i pass 'EA' . can you keep a beakpoint before function module and run step by step to check why you are getting error ?

Regards,

Vivek

Read only

Former Member
0 Likes
3,497

In transaction CUNI, click on unit of measurement, select EA in the next screen and then press 'Display' icon. See what is there in the ISO code field. My guess is that it is EA. UN is not a valid ISO code. So you have to change E1EDP01-MENEE to EA. That should take care of it.

Read only

0 Likes
3,496

I am changing XVBAP-vrkme through user exit. I don't know how to change the idoc segment itself for the incoming order. Can you tell me te user exit for this?

Read only

0 Likes
3,496

Which function module are you using? Is it IDOC_INPUT_ORDERS? Unfortunately, all the user exits are called after the error happens. There are none before. Your error is basically coming from here.


IDOC_INPUT_ORDERS
-->PERFORM interpret_idoc_orders
   -->PERFORM ZUORDNEN_ORDERS_E1EDP01.
      -->PERFORM IDOC_ISO_MEASURE_MOVE USING E1EDP01-MENEE XVBAP-VRKME
                              D_FLAG_K-UER2.

To avoid the error message, either you have to configure the ISO code UN in your system and assign that to EA using the CUNI transaction or your EDI subsystem must do the translation before converting the EDI message into IDoc. Adding the ISO unit and assigning it to EA is a complicated one (not the doing part of it but the implications part of it). So I suggest that you talk to the EDI subsystem people and ask them to change UN to EA in their mapping.

Read only

0 Likes
3,496

Thanks. I'll make changes in the EDI subsystem mapping.