Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

diff between Processing and Execution

Former Member
0 Kudos
80

Could you please Help Me??

what is synchronous processing and Execution.

3 REPLIES 3

former_member235056
Active Contributor
0 Kudos
56

hi,

In <b>synchronous processing</b>, the program waits: control returns to the program only when the task has been completed.

In asynchronous processing, the program does not wait: the system returns control after merely logging the request for execution

To run an external, non-SAP program, you must identify the host to run the program on and the path to the program as well as any arguments the program needs. The background processing system runs the external program by starting the SAP server program SAPXPG on the target host system and then uses RFCs to communicate with SAPXPG.

You can also specify how to manage the execution of the external program. For example, in <b>synchronous execution</b>, the background job waits until SAPXPG returns with the final status of the external program, while in asynchronous execution, the job proceeds immediately to the next job step once it has started SAPXPG. <b>Synchronous execution</b> also allows you to retrieve error output and a return code from the external program.

Pls reward points.

Regards,

Ameet

Former Member
0 Kudos
56

hi

synchronous processing is that in which the progaram can not continue to execute until u get the response from it.

execution is normal execution of the prgram which can be either synchronous and asynchronous.

<b>example</b>



data: oref type ref to CX_SY_DYN_CALL_ILLEGAL_FUNC,
      text type string  .

try.

CALL FUNCTION 'ABAP4_CALL_TRANSACTION' 
  EXPORTING
    tcode                   = 'SM59'"                   
"transaction sm59  opens in same session
  
EXCEPTIONS
    call_transaction_denied = 1
    tcode_invalid           = 2
    OTHERS                  = 3.
IF sy-subrc <> 0.
 MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.


CASE sy-subrc.

  when 1.
    WRITE 😕 'call transaction denied'.

  WHEN 2.
    WRITE 😕 ' transaction doesnot exist'.

ENDCASE.

catch CX_SY_DYN_CALL_ILLEGAL_FUNC  into oref.

text = oref->get_text( ).


endtry.

WRITE / text.

WRITE: / 'End Of Demo For Synchronous RFC'.

regards

ravish

<b>plz dont forget to reward points if helpful</b>

Former Member