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

BAPI runs in SE37 but not from MII using JCo

$
0
0

Hi all,

I'm using a custom BAPI to record QM Inspection Lot data.  This custom BAPI will accept just one sample's worth of data or the whole inspection lot's data (multiple operations / inspection points) depending on what's been sent up.  The key principle though is that it's atomic - the whole set of data must be processed or it must all be rolled back. 

 

One of the issues we had was when we tried to record multiple samples against an operation, it only recorded the last sample and not the previous ones we uploaded for the operation.  This seemed to be because we didn't commit the data till the end, so the earlier samples were over written by the new samples as the data was processed.  We've modified the custom BAPI to now first create the samples in SAP before we update them with the results and this now gives us what we want - multiple samples are recorded against the operation.

 

Problem is, when we call the BAPI from SE37, it works without any problems however when we call the BAPI in MII, we get an error saying the Sample has already been created.

 

<RETURNTABLE>

<item>

<TYPE>E</TYPE>

<ID>QT</ID>

<NUMBER>421</NUMBER>

<MESSAGE>A sample number already exists for the given key fields</MESSAGE>

<LOG_NO/>

<LOG_MSG_NO>000000</LOG_MSG_NO>

<MESSAGE_V1/>

<MESSAGE_V2/>

<MESSAGE_V3/>

<MESSAGE_V4/>

<PARAMETER/>

<ROW>0</ROW>

<FIELD/>

<SYSTEM>QASCLNT500</SYSTEM>

</item>

</RETURNTABLE>

 

The user account is the same for SE37 and MII.   We're on MII 12.2 build 65

 

Thanks - would really appreciate some input.


Viewing all articles
Browse latest Browse all 4841

Trending Articles



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