BEA WebLogic User Manual page 291

Adapter for sap
Hide thumbs Also See for WebLogic:
Table of Contents

Advertisement

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
*"
*"
*"
EXPORTING
*"
*"
TABLES
*"
*"----------------------------------------------------------------------
ERRORCODE = 0.
CALL FUNCTION 'RFC_CUSTOMER_GET'
DESTINATION 'JRDEST'
EXPORTING
KUNNR
NAME1
TABLES
CUSTOMER_T
EXCEPTIONS
CASE SY-SUBRC.
WHEN 0.
ERRORCODE = 0.
EXIT.
WHEN -1 .
EXIT.
WHEN -2.
EXIT.
WHEN -3.
WHEN -5.
ERRORCODE
ENDCASE.
* IF SY-SUBRC <> 0.
*ERRORCODE = SY-SUBRC.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*
*ENDIF.
ENDFUNCTION.
BEA WebLogic Adapter for SAP User's Guide
VALUE(MYKUNNR) LIKE
VALUE(MYNAME1) LIKE
VALUE(ERRORCODE) LIKE
MYCUSTOMER_T STRUCTURE
COMMUNICATION_FAILURE = -1
SYSTEM_FAILURE
NOTHING_SPECIFIED
NO_RECORD_FOUND
OTHERS
ERRORCODE = 1.
ERRORCODE = 2.
ERRORCODE
=
3.
EXIT.
WHEN -4.
ERRORCODE = 4.
EXIT.
= 99999.
EXIT.
.
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
KNA1-KUNNR DEFAULT SPACE
KNA1-NAME1 DEFAULT SPACE
SY-SUBRC
BRFCKNA1
= MYKUNNR
= MYNAME1
= MYCUSTOMER_T
= -2
= -3
= -4
= -5.
Sample Files and Coding Techniques
D-11

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the WebLogic and is the answer not in the manual?

Subscribe to Our Youtube Channel

Table of Contents