cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to do 2 times UD (Conditional and Final UD) through Bapi BAPI_INSPLOT_SETUSAGEDECISION

0 Kudos

Hi Experts,

I am using the test sequence by putting the first line as BAPI_INSPLOT_SETUSAGEDECISION

And in second line as BAPI_TRANSACTION_COMMIT, for both Conditional UD and Final UD.

For Conditional UD the BAPI is working fine and updated the status of the inspection lot in QA32.

Refer Attachement 1

attachment-1jpg.png

After complete the result recording and do Final UD, if I execute BAPI it is showing error as Access to inspection lot is not allowed.

Refer Attachement 2

attachment-2jpg.png

It is working in SAP ECC system in QA11. But I want the UD through BAPI.

And also I follow the links but unable to resolve.

https://archive.sap.com/discussions/thread/2067297

https://archive.sap.com/discussions/thread/1536659

How can I do final UD through BAPI??

Thanks in Advance,

Regards,

SIS.

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member42743
Active Contributor

I'm not sure I can help you much but what you are trying to do are two very different things in SAP.

First, when you initially record a UD you typically use QA11.

When changing a UD, you use QA12.

I suspect the BAPI you are using is only for the intitial "creation" of the first UD. Once the first UD is created, (what you call conditional), you have to use QA12 to change the UD.

So I believe that to change the UD to the "Final" UD you might have to use BAPI_INSPLOT_GETDETAIL for the second pass. That gets the UD info for the lot and I beleive it allows you to export a new UD for the lot.

Craig

busyaban7
Active Contributor
0 Kudos

I think Craig's feedback would be the best one for this case. Else, please try BAPI_INSPLOT_GETLIST, before you try BAPI_INSPLOT_SETUSAGEDECISION by taking help from ABAP team.