Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

CALL FUNCTION RemoteFunction STARTING NEW TASK usinf calling method

Hi guys,

i need sample code for CALL FUNCTION RemoteFunction STARTING NEW TASK using Calling Method.

this is my code i got error in the receving part of the method.

CLASS c1 DEFINITION.

PUBLIC SECTION.

METHODS: m1 importing "l_systuuid type string

P_TASK type string.

ENDCLASS.

CLASS c1 IMPLEMENTATION.

METHOD m1.

RECEIVE RESULTS FROM FUNCTION '/A1SSPC/ITP_FM_SYSTEMCHECK'

IMPORTING

EX_SYSTEM_UUID = L_SYST_UUID

EX_STATUS = L_STATUS

EXCEPTIONS

CX_AI_SYSTEM_FAULT = 1

CX_AI_APPLICATION_FAULT = 2.

RCV_JOBS = RCV_JOBS + 1. "Receiving data

IF SY-SUBRC NE 0.

  • Handling communication and system failure

ELSE.

  • IF SY-SUBRC = 0. "Daten registrieren

loop at IT_ITSAM_PC_SYSDICT_OUT into wa_ITSAM_PC_SYSDICT_OUT where

SYSTEM_UUID = P_TASK.

wa_ITSAM_PC_SYSDICT_OUT-STATUS = L_STATUS.

MODIFY IT_ITSAM_PC_SYSDICT_OUT FROM wa_ITSAM_PC_SYSDICT_OUT.

endloop.

  • ENDIF.

ENDIF.

ENDMETHOD.

ENDCLASS.

create object INST1 type c1.

P_TASK = L_SYST_UUID.

  • call part of the systum status function module

CALL FUNCTION '/A1SSPC/ITP_FM_SYSTEMCHECK'

STARTING NEW TASK P_TASK DESTINATION IN GROUP group

  • group defined in RZ12

calling INST1->m1 ON END OF TASK

exporting

IM_SYST_NUM = wa_ITSAM_PC_SYSDICT-SYSTEM_NUMBER

IM_HOST_NAME = wa_ITSAM_PC_SYSDICT-APP_HOST_NAME

IM_RUN_ID = L_NUMBER

IM_SYST_UUID = L_SYST_UUID

IM_SEC_NUM = L_SEC_NUMBER

EXCEPTIONS

RESOURCE_FAILURE = 1.

reg,

hariharan.

Tags:
Not what you were looking for? View more on this topic or Ask a question