Calls a specified RFC-enabled function module.
Type: | autocall macro |
Requirement: | Function modules that are called using this macro must be RFC-enabled, synchronous, and have no user interaction. |
Data source: | R/3 |
See: | RFC_LOGON_INFO macro variable, Using the R/3 BAPI Connector: Logon Window |
passes field values or structures to the specified function module. The EXPORTING parameters are declared as import parameters in the function interface. Here is how they are defined.
passes field values or structures from the specified function module back to SAS. Here is how they are defined.
passes references to input SAS data sets. Here is how they are defined.
specifies alternate connection parameters when you log on to the SAP system. By default, the %CALLRFC macro uses the connection parameters that are defined in the RFC_LOGON_INFO variable. However, if you want to use an alternate set of connection parameters, create a variable that contains those parameters and reference that variable in the USING parameter. The alternate logon variable must be defined before the function call is submitted.
%macro example5; %global bapi_return; /* create the input data set */ data WORK.IDRANGE; sign='I'; option='BT'; low='0000000000'; high='9999999999'; output; run; %callrfc(BAPI_CUSTOMER_GETLIST IMPORTING RETURN=BAPI_RETURN INTABLES IDRANGE=WORK.IDRANGE OUTTABLES ADDRESSDATA=WORK.ADDRESSES); %if %substr(&bapi_return,1,1)=E or %substr(&bapi_return,1,1)=W %then %do; %put An error occurred while calling the BAPI_CUSTOMER_GETLIST function.; %put bapi_return=&bapi_return; %end; %else %do; proc print data=WORK.ADDRESSEs; run; %end; %mend; %example5;