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

Query on Function Exit EXIT_SAPLIEL2_002

former_member55105
Participant
0 Likes
753

Hi,

When I try to instal an equipment at a Functional Location, internally the user exit IEQM0001 is executed. The function exit EXIT_SAPLIEL2_002 is one of the components available in the exit IEQM0001. I want to use this function module(EXIT_SAPLIEL2_002) as an Interface in SAP XI. But as this function is not remote enabled, I cann't use this function module as an interface.

I want this function exit as remote enabled so that I can use it as an interface in SAP XI. Do I have to create a new function exit for this? Please advise.

Also, please gimme possible solutions to this problem.

Thanks,

Vijay

5 REPLIES 5
Read only

Former Member
0 Likes
701

You should not use this a a trigger for XI to call.

Read only

0 Likes
701

Hi Martin,

Thanks for your response. May I know the reason of making the suggestion of not to use this function exit as a trigger for XI to call.

Thanks,

Vijay

Read only

Former Member
0 Likes
701

Do you mean you want to trigger the sending of data to SAP XI whenever this exit is invoked in the transaction?

If so you can simply generate the appropriate XI proxy and call the relevant execute method of the proxy from within the exit.

If you wish to get some data from an XI interface to use for validation etc within the exit, you can have the inbound proxy save the data in an appropriate Z table and then just read it as you need it when the user executes the transaction.

If you are trying to execute the transaction triggered from XI then you cannot and should not try to start it from an exit. You should have the XI proxy call the relevant BAPI for the transaction processing if there is one, or possibly have it execute a BDC call transaction session.

None of these cases require you th make a function RFC enabled.

Andrew

Read only

0 Likes
701

Hi Andrew,

Thanks for your response.

>> Do you mean you want to trigger the sending of data to SAP XI whenever this exit is invoked in the transaction?

- Yes I just want to pass the import parameters of the function exit EXIT_SAPLIEL2_002 to a web service through XI when an equipment is installed at a functional location. In other words, I want to trigger XI whenever this exit is invoked in transaction IE01.

>> If so you can simply generate the appropriate XI proxy and call the relevant execute method of the proxy from within the exit.

- Could you please elaborate this point in detail?

Thanking you,

Vijay

Read only

0 Likes
701

To generate XI proxy - use transaction code SPROXY - find appropriate interface definition in the displayed tree and double click. It should prompt for a couple of Z names, then generate class and structures.

Then just define object in your code, create instance, and then call method "EXECUTE_ASYNCRONOUS" from your code passing relevant structure fields. (The pattern button can be used to paste in the format of the CALL METHOD command). Remember to do COMMIT WORK to finish or it will not send. (NB be careful calling COMMIT WORK inside exit of SAP transaction - can result in data integrity problems - make sure exit is called after SAP has saved data and performed COMMIT.)

Andrew