cancel
Showing results for 
Search instead for 
Did you mean: 

SAPMEINT - Service transaction

Former Member
0 Kudos

Hi, in SAPME version 6.1, MEINT calls SAPME directly using API.

Does this means that if I want to call SAPME (in my adapted service transaction) I need to write my own handler in Java code and upload it to SAP MII?

thanks

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Seng, actually it's all the contrary you can now leverage sap me api directly from mii without any custom coding,

Have a look the SAP Note : Note 1732789 - SAP ME PAPI example

Regards,

Arnaud

Former Member
0 Kudos

Hi Arnaud. Thanks for providing the note.

I understand the example project but the example does not show how the response could be handled by SAPMEINT workflow.

Try to give an example. I created a new workflow to do data collection to sap me. In the workflow, I have created a transaction to call ME using papi. I inserted the path of the transaction to my workflow (under in my adapted service transaction). After the workflow executed, I do not think it will handle the response of the transaction.

0 Kudos

SAPMEINT workflow has Pass Handler Transaction and Fail Handler Transaction where you should implement your logic of analyzing the response, I guess.

Regards,

Sergiy

Answers (1)

Answers (1)

former_member182330
Active Contributor
0 Kudos

Hi Seng,

Yes, that's true - you can create your own handlers in Java. But regular MII transactions will also work. You can trigger ME webservices from transactions using Web Service action blocks.

Regards,

KC

Former Member
0 Kudos

The question is how can the workflow analyze if the call of the ME Webservice successfull.

i have simulate this exact concept and return the Webservice response to transaction output "outputXML" and hope that the workflow will analyze the result....but the workflow "hang (triangle icon).

Your input contradict to Sergiy's input.

former_member182330
Active Contributor
0 Kudos

Seng,

I can't see how it contradicts with what Sergiy has written, for plugging in your developments you can use either Java code ot MII transactions. If you plug in MII transaction with WS consumption, you should analyze the response within the transaction. Standard workflow has standard handler that has standardized input and output. Depending on the output framework changes status of the message in MEINT Message Queue. Based on this status pass/fail handlers are executed.

Br,

KC

Former Member
0 Kudos

Hi Konstantin

"If you plug in MII transaction with WS consumption, you should analyze the response within the transaction"

Unfortunately I still dont get how you mean. What should I do after analyze my response? How can I set the status of my message to successfull/error?

thanks

former_member182330
Active Contributor
0 Kudos

This is set by framework that reads and runs workflows. As an example lets take Z_MATMAS03:

Highlighted service transaction has specific input xml format (IDOC) and output (probably xml with results of execution). Depending on this output(result) MEINT framework sets the status of processed message. As I understand response xslt is used to transform WS/API call response to a specific status.

To wrap it up, status is set by framework based on output of handling transaction/XSLT transformation. If you want to override/modify the status, you can plug in a transaction at some point during workflow and update the message status directly in DB, but you should think how you do this and why you do this not to get conflicts between your customization and standard MEINT workflows/processing.

Br,

KC

Former Member
0 Kudos

Pic 1. Under Workflow I have select my transaction  (Custom Partner Transaction)

Pic 2. I have created example transaction in MII workbench. For the output (Transaction: outputXML) I have inserted example output from a successfull MEINT call of LOIPRO. I use outputXML as output variable as because I guess this is the output variable the workflow handler is waiting for.

Pic 3: The result stays...yellow triangle. Expected result ist successfull.

Am I wrong in understanding ?

former_member182330
Active Contributor
0 Kudos

I believe so. When you define partner trx, you substitute ERPProductionOrderHandler code. Thus all the logic within ERPProductionOrderHandler is not executed, and I believe appropriate result(xml) that is expected by framework to update message status is not returned by your trx, maybe outputXML is not the variable framework looks for.

Or I have one more guess - in your XML namespace is incorrect. According to GenericResponse.xslt MEINT checks for specific XML blocks with specific namespaces and assigns statuses accordingly:

Maybe that's the reason.

Regards,

KC

Former Member
0 Kudos

I am using the GenericResponse.xslt and outXML was simulate with an successfull LOIPRO02 that I previously tested. Moreover, I have tested the the result against the GenericResponse.xslt manually and I got expected result...

....<sch:status>SUCCESS</sch:status><sch:message>Service call succeeded.</sch:message>....

I guess the output variable, outputXML is not the right one or the workflow does not handle output from business logic transaction.

Hmmm.....any idea which is the right output variable ? Or any Idea?

Former Member
0 Kudos

Hi Seng Kiang, sorry, no real time to check that out just now.

Nevertheless, I noticed that you have a space in your transaction path for the partner service transaction.

The very first thing I would do is to move the transaction to a path without spaces.

For the rest I'll try to check later.

Regards,

Arnaud

Former Member
0 Kudos

Arnaud, thanks for taking time to view and try out my issue.

The transaction was executed (saw it in transaction manager). Nevertheless I also removed the empty space and retry as your advice...same result.