Quantcast
Channel: SCN: Message List - SAP Manufacturing Integration and Intelligence (SAP MII)
Viewing all articles
Browse latest Browse all 4841

Re: BAPI runs in SE37 but not from MII using JCo

$
0
0

Hi Lawrence,

 

This type of problem occurs when you donot call "BAPI_TRANSACTION_COMMIT" in the loop where you are recording multiple Inspection Results. You need to check for status and commit within the loop itself for each result recording.

 

As far as difference in executing from SE37 and MII, if the ZRFC  executes "COMMIT WORK", then it will commit only from SE37 because WORK represents R/3 System work process which will not be accessible from MII System. Hence, calling "BAPI_TRANSACTION_COMMIT" is recommended.

 

I have gone through these things and to solve the above I created a ZRFC where I declared a table parameter where all Inspection Lots and corresponding results were passed.

 

Firstly I sorted this table by Inspection Lot number and Characteristics number. Then I used ABAP's LOOP...ENDLOOP to record results After every distinct Inspection Lot, I checked for Success/Error and accordingly called BAPI_TRANSACTION_COMMIT or BAPI_TRANSACTION_ROLLBACK.

 

The output was a RETURN_TABLE where I appended all errors and returned at once. The MII BLS has nothing extra to do except to check this return table whether any  Lot(s) encountered error and what error. This even maximized the performance as there was only one round trip between MII and ERP  ie, Pass Inputs, get the outputs.

 

Regards,

Prashant


Viewing all articles
Browse latest Browse all 4841

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>