Sample Files and Coding Techniques
BEA WebLogic Adapter for SAP User’s Guide
D-11
The following is an example of a wrapper module for the SAP test function named
RFC_CUSTOMER_GET.
FUNCTION Z_CALL_EXTERNAL.
*"----------------------------------------------------------------------
*"*"Local interface:
*" IMPORTING
*" VALUE(MYKUNNR) LIKE KNA1-KUNNR DEFAULT SPACE
*" VALUE(MYNAME1) LIKE KNA1-NAME1 DEFAULT SPACE
*" EXPORTING
*" VALUE(ERRORCODE) LIKE SY-SUBRC
*" TABLES
*" MYCUSTOMER_T STRUCTURE BRFCKNA1
*"----------------------------------------------------------------------
ERRORCODE = 0.
CALL FUNCTION 'RFC_CUSTOMER_GET'
DESTINATION 'JRDEST'
EXPORTING
KUNNR = MYKUNNR
NAME1 = MYNAME1
TABLES
CUSTOMER_T = MYCUSTOMER_T
EXCEPTIONS
COMMUNICATION_FAILURE = -1
SYSTEM_FAILURE = -2
NOTHING_SPECIFIED = -3
NO_RECORD_FOUND = -4
OTHERS = -5.
CASE SY-SUBRC.
WHEN 0.
ERRORCODE = 0.
EXIT.
WHEN -1 .
ERRORCODE = 1.
EXIT.
WHEN -2.
ERRORCODE = 2.
EXIT.
WHEN -3.
ERRORCODE = 3.
EXIT.
WHEN -4.
ERRORCODE = 4.
EXIT.
WHEN -5.
ERRORCODE = 99999.
EXIT.
ENDCASE.
.
* IF SY-SUBRC <> 0.
*ERRORCODE = SY-SUBRC.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
*ENDIF.
ENDFUNCTION.
Summary of Contents for WebLogic Server
Page 1: ...BEA WebLogic Adapter for SAP User s Guide DN3501342 0406 April 19 2006 ...
Page 8: ...viii BEA Systems Inc ...
Page 22: ...Component Information for the BEA WebLogic Adapter for SAP 1 10 BEA Systems Inc ...
Page 54: ...Creating an XML Schema 3 20 BEA Systems Inc ...
Page 163: ...Management and Monitoring BEA WebLogic Adapter for SAP User s Guide 7 45 ...
Page 164: ...7 46 BEA Systems Inc ...
Page 294: ...Using Staging BAPIs to Retrieve SAP BW Metadata D 14 BEA Systems Inc ...