Skip to main content


 

Symptoms


Testing a BAPI in the K2 Connect Test Cockpit produces an error.
 

Diagnoses


Table parameters are handled differently between local calls (in SAP / SAP GUI) and through RFC
 

Resolution

The value existence check for Table parameters in BAPIs should be done slightly differently.
For example , the following statement will check the table header and not the table itself

IF SALES_DOCUMENTS IS INITIAL.
MESSAGE 'Sales document(s) not provided' TYPE 'E'.
EXIT.
ENDIF.

Because Table parameters over RFC only transfers the table and not the header, that check will return false.
Instead the table itself should be checked as such :

IF SALES_DOCUMENTSN] IS INITIAL.
MESSAGE 'Sales document(s) not provided' TYPE 'E'.
EXIT.
ENDIF.

Client implemented the above code and the K2 Connect Test Cockpit was able to test her BAPI successfully without error.
 




 
Be the first to reply!

Reply