Skip to Content
avatar image
Former Member

Calling RFC and getting ABAP dump when maximum GUI sessions reached in sap

Hi ,

Please help on this.

Calling a RFC in a standard program and it is causing ABAP dump when maximum sessions reached. If a session is available, occurred no issue. Pleas help me to get solution.

Sample code:
CALL FUNCTION 'Z_SALES_ORDER_CHANGE' STARTING NEW TASK 'TSK1' DESTINATION 'NONE' PERFORMING return_info ON END OF TASK

EXPORTING

i_vbeln = lwa_vbap2-vbeln

TABLES

it_sales_order = lit_sales_tmp .

IF sy-subrc = 0.

WAIT UNTIL functioncall ='X'.

IMPORT lit_return2[] FROM MEMORY ID 'ABC'.

functioncall = space.

ENDIF.

FORM RETURN_INFO using tsk1 TYPE any.

RECEIVE RESULTS FROM FUNCTION 'Z_SALES_ORDER_CHANGE'
TABLES
IT_SALES_ORDER = lit_sales_tmp
functioncall = 'X'.

ENDFORM. " RETURN_INFO

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Nov 16, 2017 at 10:59 AM

    You have to check yourself if free sessions are available before calling the asynchronous RFC in order to avoid the dump.

    call function 'TH_USER_INFO'
      importing
      act_sessions = act_sessions
      max_sessions = max_sessions.
    
    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      You still think updating of sales order A will take lot of time so you are updating in new task rather than updating in the same session of sales order B?

  • Nov 16, 2017 at 12:59 PM

    Really a short dump? Or is it a popup "maximum number of sessions". To know if there is an issue while calling a function module via RFC, you must handle these special RFC exceptions:

    • COMMUNICATION_FAILURE (connection broken...)
    • SYSTEM_FAILURE (short dump happening in the called function module, maximum of sessions...)

    And, as it's (asynchronous RFC with) wait for answer, those exceptions must be handled in the RECEIVE RESULTS FROM FUNCTION, not in the CALL FUNCTION !

    For more information, refer to the ABAP documentation.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Nov 16, 2017 at 11:31 AM
    -1

    If possible better call the RFC in the background task.

    Add comment
    10|10000 characters needed characters exceeded