RFC_LOGIN_INFO is a standard SAP function module available within R/3 SAPsystems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import/export parameters, exceptions etc as well as any documentation contributions specific to the object. See here to view full function module documentation and code listing, simply by entering the name RFC_LOGIN_INFO into the relevant SAP transaction such as SE37 or SE80.
CALL FUNCTION ‘RFC_LOGIN_INFO’ “
rfc_login_complete = ” sy-debug
rfc_dialog_user = ” sy-debug
. ” RFC_LOGIN_INFO
rfc_login_complete = 1 – OK
rfc_login_complete = 2 – Error
rfc_dialog_user = ‘Y’ or ‘N’
The ABAP code below is a full code listing to execute function module RFC_LOGIN_INFO including all data declarations. I have tried to use the latest IN-LINE DATA DECLARATION SYNTAX but this can not be used is not possible to use on function module importing parameters.
You would get the messages “The inline declaration “DATA(LD_RFC_LOGIN_COMPLETE)” is not possible in this position.
ABAP code snippet therefor does not look any different from using the original method of declaring data variables up front. This will allow you to compare and fully understand the new inline method. Please note some of the newer syntax such as the @DATA is not available until a later 4.70 service pack (SP8).
DATA: ld_rfc_login_completebb TYPE SY-DEBUG, ld_rfc_dialog_user TYPE SY-DEBUG. CALL FUNCTION 'RFC_LOGIN_INFO' IMPORTING rfc_login_complete = ld_rfc_login_complete rfc_dialog_user = ld_rfc_dialog_user . " RFC_LOGIN_INFO
IF SY-SUBRC EQ 0. "All OK ENDIF.
Just for convenience below is a few examples of using the new 7.40 ABAP inline syntax.
select * from BKPF into TABLE @DATA(it_bkpf).
DATA(ld_newfield) = 1