Help needed on a customBAPI - autorization error

Question: Hi All,
Need some help.

Problem description:
We are facing an authorization issue for a particular custom BAPI (in SAP 4.6C ). When this BAPI is called from a java program through web services using same user-id, an authorization error is sent back to the java program (this happens only sometimes while most of the times it is successful).

The BAPI error is pointing to an SAP authorization “No authorization for Create for condition type ZPR8” but when checked authorizations for the user-id (ex: RFCBAPIusr through which this BAPI is executed) we found that this user-id has authorization to condition type ZPR8.

And I don’t think that this is an authorization issue as the same task for the same user is successfully executed when it was tried several times.

Does anyone has any idea on such BAPI authorization errors?

Thanks in advance.

Answer:
Look for all of the MESSAGE statements throughout the code being called from your BAPI (and the message IDs being returned and for what results) - just because it says Authorization failure, it doesn't always hold true - it may be drawing in the wrong message.

Have you already run a trace of execution with data that has produced the failure?

Regards,
Vincent

Answer:
Thanks for the reply Vincent,
I have enabled st01 trace once while the BAPI was called from the web services ... but it did not fail when i ran the trace.
(FYI: I could not find any log related to this user-id when i checked in the trace)

we can not predict when it can fails... so it is bit difficult to run the trace.

I have a question on how the BPAI gets executed... will it use any RFC destination ... if yes how to find the RFC destination used by a BAPI?
Copyright ?2007 - 2008 www.jt77.com