Error in BODS 4.1 while executing BAPI

Hi Everyone,

We are trying to make a RFC call from BODS to ECC using BAPI ‘SALESORDER_CREATEFROMDAT2’. We have been able to import the function in BODS and made a function call by passing the required fields.

Issue 1: If we use RETURN as the output parameter, it gives an error during execution “Cannot resolve column whose full path is <Query_1.RETURN> in nested schema . Ensure that in the FROM clause for nested schema , path <Query_1.RETURN> is defined; or that it is defined in the FROM clause for any of the parent schemas.”
Looks like this is a bug in BODS 4.1 where the output parameter is mapped as QUERY.“RETURN”.FIELDNAME instead of QUERY.RETURN.

Issue 2: If we map any other output table parameters (other than SALESDOCUMENT and AL_RFC_RETCODE fields), we get an error during execution.

Issue 3: By keeping only 2 fields as output parameter of the BAPI (SALESDOCUMENT and AL_RFC_RETCODE), the job executes with AL_RFC_RETCODE as RFC_OK but the SALESDOCUMENT field has all null values.


Ankit J (BOB member since 2013-03-14)

  1. Did you unnest it?
  2. What kind of error? Not all datatypes are supported by BODS and sometimes what comes back from the BAPI cannot be checked
  3. Null values, but is the document created in SAP? How about executing manually in a test sequence with tx37 and the SALESORDER_CREATEFROMDAT2 and the BAPI_TRANSACTION_COMMIT?

Johannes Vink :netherlands: (BOB member since 2012-03-20)

  1. Yes, the RETURN table has been unnested but still gives the error
  2. The error is pretty generic <Could not execute RFC function, bad data returned> and the AL_RFC_RETCODE is some bunch of un-readable symbols. If we remove all the output table parameters, then AL_RFC_RETCODE returns RFC_OK
  3. The Sales Document has not been created. We are unable to read the error as well since the output parameters are all NULL and the return table cannot be used as output parameter due to issue (1)

Ankit J (BOB member since 2013-03-14)

Okay the 2) problem looks like a data format that is returned that BODS does not support. Thankfully enough for the workings of a BAPI this is not relevant. Sadly enough for figuring out why no data was changed this makes it slightly more difficult.

Regarding 3): my recommendation is first to figure out how to post a document succesfully via tx se37, so that you get a feeling what kind of input parameters are required. Then the next step is to get it also correct in BODS.


Johannes Vink :netherlands: (BOB member since 2012-03-20)

Is this issue resolved, If so can you please let me know how to do this.

Thanks.


rbatchu (BOB member since 2012-10-24)