RFC Study Notes

Source: Internet
Author: User

I took a look at Mr. Huang Jia's sap advanced application development. In general, I think the writing is average. Of course, I made some notes and thought it was a review, the record is as follows:

1, RFM: Remote Function Model

2. RFC communication mode: synchronous communication and asynchronous communication

3. RFC mode: SRFC, synchronous RFC
ARFC, asynchronous RFC
Trfc, transaction RFC
Qrfc, queued RFC
Prfc, parrodel FRC

4, FRM: a parameter Declaration: the Parameter definition must be declaration <passed valued>
Format B Conversion: the length of the real parameter cannot exceed the length of the called parameter.
C Exception Handling: Raise exception

5. Call RFM: Call function rfm_name
Destination dest
Parameter List
Destination DEST is defined in sm59.

FM: sxpg_command_execute
Call function-destination SRFC
Call function-starting new task ARFC
Call function-in background task trfc

6. RFC Context

A local normal call: in the work process of the hop Application

B Remote Call: Independent Working Process

C. All remote calls have an independent RFC context in the target system, that is, the RFC context.

D. Normally, the function module call is in the same luw as the main program, and does not trigger commit/rollback. Therefore, the execution must be displayed. However, each FM in the SRFC and ARFC calls has its own luw, that is, each call will trigger the submission implicitly.

7. The dialog process can exist in SRFC and ARFC, such as call screen and call transcation. Although the RFC can be processed in the background, if it is processed in the background, the RFC conversation will cause system_failture.

8. RFC mode: For ARFC, remote mode is enabled for new sessions.

9. SRFC call: The calling program will wait for return.

10. ARFC: The called function module is executed immediately. The calling program does not wait for the result. <strating new task>

A: The importing parameter cannot be specified.

B: Dialog processing and tuning: open a new session and switch back and forth. Open a new session: tuning window.

C: receive results when ARFC is called

Ming return_form on end of task

Form return_form using taskname
... Receive results from funcation rfc_name

Endform.

Generally, set user_command 'okcd' is set in rerun_form, and at user_command is used in the main program.

D: Waiting for asynchronous calls

Wait until must be used at the same time as padding Ming.

Wait until log_exp [up to SEC seconds] can assign values to the conditions in log_exp in return_form to wait for the RFC to return results.

11. trfc: bind multiple logically related remote calls to the same luw and execute the call in the order of calls. update all the plans when the commit work arrives.

<In background task .... Commit work>

A: The trfc department requires immediate execution when called. If the remote system is unavailable, it will be stored in the local queue. If the remote system is still unavailable within the specified time, automatically set as a background job

B: results cannot be returned, interactive dialogs and debugging are not allowed.

C: there cannot be an export parameter in FM, and improting cannot be specified during call funcation.

D: Transaction ID: Table arfcstate: luw execution status

Arfcsdate: input data

Sm58 view and restart RFM with an error

E: Multi-RFC processing: Multiple RFC for different targets

F: error: the system report rsafcse is re-executed.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.