Quantcast
Channel: SCN : Discussion List - SAP NetWeaver Application Server
Viewing all articles
Browse latest Browse all 3078

how to call BAPI_XMI_LOGON and BAPI_XBP_JOB_START_IMMEDIATELY in a single session/transaction ?

$
0
0

Hi,

 

I tried the following code to execute a scheduled job immediately.

 

  RfcSessionManager.BeginContext(destination); 

  IRfcFunction rfcFunc = repository.CreateFunction("BAPI_XMI_LOGON");
  rfcFunc
.SetValue("extcompany","testC");
  rfcFunc
.SetValue("extproduct","testP");
  rfcFunc
.SetValue("interface","XBP");
  rfcFunc
.SetValue("version","3.0");

  rfcFunc
.Invoke(dest);

  rfcFunc
= repository.CreateFunction("BAPI_XBP_JOB_START_IMMEDIATELY");
  rfcFunc
.SetValue("jobname","MYSCHEDULEDJOB");
  rfcFunc
.SetValue("jobcount","15530600");
  rfcFunc
.SetValue("external_user_name","username");

  rfcFunc
.SetValue("target_server","devsapsystem");
  rfcFunc
.Invoke(dest);

   RfcSessionManager.EndContext(destination);



But I got the message "Internal problem (function BAPI_XBP_JOB_START_IMMEDIATELY)" in BAPIRet2 output. All parameters passed are correct.


How can I resolve this error ?


Viewing all articles
Browse latest Browse all 3078

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>