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

User Exits - IDocs

Former Member
0 Likes
2,943

Greetings,

I'm using the MBGMCR02 IDoc in conjunction with message type MBGMCR and Process code BAPI (actually calls BAPI_GOODSMVT_CREATE eventually) to integrate 101 movements for PO receivings in a decentralized warehouse landscape (46C system). I need to implement a userexit on this inbound message where I check the storage location and either leave it alone or change it. I have been sifting through SMOD and I haven't been able to location a user exit for this, if anybody knows one to look at that's pretty much all I need.

Thanks!

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
2,042

Hi ,

If you are working in ECC 6.0 .

Try with Enhancement framework .You wll definately get answer.

Just search materail in web. If not give your mail id . I wll forward it to u .

Thanks

Jagadeesh.G

Greetings,

I'm using the MBGMCR02 IDoc in conjunction with message type MBGMCR and Process code BAPI (actually calls BAPI_GOODSMVT_CREATE eventually) to integrate 101 movements for PO receivings in a decentralized warehouse landscape (46C system). I need to implement a userexit on this inbound message where I check the storage location and either leave it alone or change it. I have been sifting through SMOD and I haven't been able to location a user exit for this, if anybody knows one to look at that's pretty much all I need.

Thanks!

9 REPLIES 9
Read only

Former Member
0 Likes
2,043

Hi ,

If you are working in ECC 6.0 .

Try with Enhancement framework .You wll definately get answer.

Just search materail in web. If not give your mail id . I wll forward it to u .

Thanks

Jagadeesh.G

Read only

0 Likes
2,042

Jagadeesh we are not on ECC 6.0 (yet) still on 46C at the moment so I do not have access to it's enhancement framework.

Just to clarify I'm looking to identify a user exit that would allow me access to the IDoc data prior to it being passed to the application BAPI (in this case BAPI_GOODSMVT_CREATE) as I need to evaluate the storage location and perhaps change it, something similiar to VEDA0001 which is used for SD Incoming EDI Orders but in this case I need for the MBGMCR02 IDoc /MBGMCR message.

Read only

0 Likes
2,042

Hi,

Cannot you modify it in BAPI? Or create a wrapper for this process code and inside it call the main process code it's also the solution.

Best regards,

Wojciech

Read only

0 Likes
2,042

I would have thought a user exit would have been the simpler solution as as is the process works fine with my one requirement to evaluate the storage location element.

I'm not familiar with your solution can you expound on it or point me to documentation on it?

Read only

0 Likes
2,042

In that case you are creating another process code with new function module. Later inside that function module you are making a check and calling the function module which is attached to BAPI process code. Interface of both of them must be the same it will be a wrapper.

But still in my opinion you should do it in BAPI.

Best regards,

Wojciech

Read only

0 Likes
2,042

Wojciech - It seems to me that your solution would be best however I'm not really familar with how to execture it. Could you point me to some documentation and/or helpful links? I think this would serve as the answer to this question.

Thank you.

Read only

0 Likes
2,042

Hi Joseph,

I'll try to elaborate on it a little bit more:

- first you are checking the function module which is attached to process code BAPI

it's transaction: WE42

you can see that there is function module: BAPI_IDOC_INPUT1

- create a copy of it e.g. call it ZDUPA_DUPA

- delete all content of ZDUPA_DUPA

- here inside IDOC_DATA you have all IDOC segments (line type is EDIDD). You can create a loop and access the idoc content.

code:

data: w_idoc_data type eidd.
data: s_segment type segment_type.
data: w_idoc_data type eidd.
constants:  c_segment_name type edidd-segnam value 'SEGMENT_NAME'.

loop at IDOC_DATA into w_idoc_data.
case w_idoc_data-segnam.
  when c_segment_name.
    move w_idoc_data-sdata to s_segment.
*in   s_segment you have all values which you can check
  when others.
endloop.

- later if your condition is fullfilled you can either call BAPI_IDOC_INPUT1 or not. In case of calling it please use the values which you have in your ZDUPA_DUPA.

- later you are configuring function module in BD51

- afterwards you are assigning it to message type in WE57

- in the end you are creating your process code with that fm. It's transaction WE42. You can call it ZBAPI.

I wish I have highlighted it more deeply.

Best regards,

Wojciech

Read only

Former Member
0 Likes
2,042

Hi,

Please go to this BAPI and try to locate user exit here:

BAPI_GOODSMVT_CREATE

And do everything here. Inside the process code you won't find any specific business data. It's the standard method of calling asynchronous BAPI.

Please look also for BADI (try to find CL_EXIT_HANDLER).

/wg

Edited by: Wojciech Gasiorowski on Feb 25, 2008 7:53 PM

Read only

Former Member
0 Likes
2,042

hi ,

try this includes for the idocs

include ZXEDFU03,

include ZXEDFU04,

include ZXEDFU01.

<REMOVED BY MODERATOR>

venkat.

Edited by: Alvaro Tejada Galindo on Mar 3, 2008 2:05 PM