1

I have some jobs scheduled on the SAP system. I want to execute the SAP jobs or modify the timings of the jobs. How can I execute the jobs.

I know how to connect to SAP system via .NET Connector.

        RfcDestination dest = RfcDestinationManager.GetDestination(rfcConfigParams);
        RfcRepository repository = dest.Repository;
        IRfcFunction rfcFunc = epository.CreateFunction("TH_GET_USER_LIST");
        fcFunc.Invoke(dest);

This way I can call the function module, but don't know how to call SAP jobs.

Sandra Rossi
  • 11,934
  • 5
  • 22
  • 48
Arvind Kumar
  • 103
  • 1
  • 6

2 Answers2

2

There is a full API available to manage jobs externally. Look at function modules starting with "BAPI_XBP_JOB".

You can start a job with "BAPI_XBP_JOB_START_IMMEDIATELY" or "BAPI_XBP_JOB_START_ASAP".

Mikael G
  • 712
  • 5
  • 13
0

I'd like to complete Mikael answer. If you call BAPI_XBP_JOB_START_ASAP or any other XBP BAPI without first calling BAPI_XMI_LOGON (because XBP is an application of the "XMI family"), it returns a functional error in the parameter RETURN.

How it exactly works is answered here in details, in your on follow-up question.

Sandra Rossi
  • 11,934
  • 5
  • 22
  • 48