cancel
Showing results for 
Search instead for 
Did you mean: 

Question related to BAPI Call

Former Member
0 Kudos

Hi All,

I am using a BAPI Call to SAP in my BLS transaction. One of the action blocks in the transaction is a SQL Query which updates a Oracle table based on the SAP returned values from the previous action block. For the most part, it works fine except once in a blue moon, the values show up as 'null' when in fact I expect some values to be returned from SAP. Is there anyone out there who has faced a similar issue? What would be a quick and easy solution to this? Thanks.

Regards,

V M.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Resolved successfully.

agentry_src
Active Contributor
0 Kudos

Hi Venki,

Please provide more information. Which BAPI and which field?

Thanks,

Mike

Former Member
0 Kudos

Hi Mike,

I am using the BAPI called 'BAPI_PRODORDCONF_CREATE_TT' and the SAP returned values that I am collecting are 'Counter', 'Message No.' and 'Message'. Hope it helps. Please let me know if you need more detail. Thanks.

Regards,

V M.

agentry_src
Active Contributor
0 Kudos

Hi Venki,

Possible response segments for CONF_CNT (in DETAIL_RETURN):

1) That BAPI will return "000000" for counter if the confirmation was unable to be processed for some reason, but you were able to connect to SAP. A fairly common reason is the record being locked if you run similar confirmations too close together. It takes time for the confirmation record to be released by SAP.

2) It will return a number "000001 or greater if the confirmation was successful (along with a confirmation number).

3) The circumstances where it will return an empty field are when it is unable to connect to SAP, but you should have a conditional to check for the success flag from the BAPI. This is standard error handling when using a BAPI. This will also leave all fields in the response segment blank.

4) And there is another set of circumstances which will leave the fields blank. This is fairly unusual, but does happen when the error handling inside the BAPI runs into a situation which it can't handle. So the BAPI crashes and never returns any information back to MII.

You will need to decide which of these situations are causing your null data. But put error handling in based on the Success flag for the BAPI for SAP unavailable and for a CONF_CNT = "000000" or blank.

Good luck,

Mike