Skip to Content
avatar image
Former Member

Question related to BAPI Call

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.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Oct 01, 2008 at 02:10 PM

    Hi Venki,

    Please provide more information. Which BAPI and which field?

    Thanks,

    Mike

    Add comment
    10|10000 characters needed characters exceeded

    • 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

  • avatar image
    Former Member
    Jan 07, 2009 at 03:27 PM

    Resolved successfully.

    Add comment
    10|10000 characters needed characters exceeded