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

IDOC_INPUT_INVOIC_MRM issue

Former Member
0 Likes
1,794

Hi,

My requirement is to create custom message type ZINVOICE with standard idoc type INVOICE01 and function module "IDOC_INPUT_INVOIC_MRM".

After doing all settings, when i try to post a document through WE19, it throws an error saying that "Wrong function module IDOC_INPUT_INVOIC_MRM has been called". When i debugg the FM, in the very first of FM, message type INVOIC has been verified and because i am using custom message type, it is throwing the above error.

I have copied all settings for the standard message type INVOIC and the process code INVL. Created new process code ZINVL and did the all settings.

1) WE81 2)WE82 3)BD51 4)WE57 5)WE42 6)BD67

My question : Can we use IDOC_INPUT_INVOIC_MRM with basic type INVOIC01 and custom message type ZINVOICE and a custom process code ZINVL?

Appreciate your help.

Thanks

Sudheer

Hi,

My requirement is to create custom message type ZINVOICE with standard idoc type INVOICE01 and function module "IDOC_INPUT_INVOIC_MRM".

After doing all settings, when i try to post a document through WE19, it throws an error saying that "Wrong function module IDOC_INPUT_INVOIC_MRM has been called". When i debugg the FM, in the very first of FM, message type INVOIC has been verified and because i am using custom message type, it is throwing the above error.

I have copied all settings for the standard message type INVOIC and the process code INVL. Created new process code ZINVL and did the all settings.

1) WE81 2)WE82 3)BD51 4)WE57 5)WE42 6)BD67

My question : Can we use IDOC_INPUT_INVOIC_MRM with basic type INVOIC01 and custom message type ZINVOICE and a custom process code ZINVL?

Appreciate your help.

Thanks

Sudheer

3 REPLIES 3
Read only

Former Member
0 Likes
1,267

As you mentioned in the question, Standard function module "IDOC_INPUT_INVOIC_MRM" can be used with the message type. See the validation in Line number 14 of LMRMHF0F.

data : c_mestyp_invoic like edidc-mestyp  value 'INVOIC',
if i_idoc_contrl-mestyp ne c_mestyp_invoic.
raise wrong_function_called.
    exit.
endif.

You may have to copy the standard function module to a Z-FM and assign to the custom message type.

Read only

Former Member
0 Likes
1,267

Hi,

If you think everything else would be ok you can try to skip this check using implicit enhancements.There is one avaliable just above the check.

Regards,

Himanshu

Read only

Former Member
0 Likes
1,267

Hi,

Solved problem by creating a custom function module.In the custom function module reset Message type to SAP standard message type INVOIC. This is done basically client wants to have a differentialtion between my code and the already existing functionality.

Thank you all for your suggestions.

Sudheer