凡尘clsoho™的博客

E-mail & MSN: clsoho@hotmail.com
QQ1超级群: <101817641已满> QQ2群:<110722895已满>
QQ3超级群:<23765855>QQ4超级群:<85338969>

I want to call the function RSPC_API_CHAIN_START via RFC.
How can I set the priority (A, B or C) for the job?

If I test the function via SE37 the popup appears, and I do not know how to set the necessary parameters.

Thank you un advance for your help & regards

在使用FM RSPI_API_CHAIN_START触发Process Chain时,总是会弹出assign priority对话框,如果后台运行触发处理链

程序,则不会出现 。

所以在FM RSPC_API_CHAIN_START中加入:

sy-batch = 'X'.

即可解决此问题。

 FUNCTION Z_RSPC_API_CHAIN_START.
*"----------------------------------------------------------------------
*"*"Local Interface:
*"  IMPORTING
*"     VALUE(I_CHAIN) TYPE  RSPC_CHAIN
*"     VALUE(I_T_VARIABLES) TYPE  RSPC_T_VARIABLES OPTIONAL
*"     VALUE(I_SYNCHRONOUS) TYPE  RSPC_SYNCHRONOUS OPTIONAL
*"     VALUE(I_SIMULATE) TYPE  RSPC_SIMULATION OPTIONAL
*"     VALUE(I_NOPLAN) TYPE  RS_BOOL OPTIONAL
*"     VALUE(I_DONT_WAIT) TYPE  RS_BOOL OPTIONAL
*"     VALUE(I_POLL) TYPE  RS_BOOL OPTIONAL
*"  EXPORTING
*"     VALUE(E_LOGID) TYPE  RSPC_LOGID
*"  EXCEPTIONS
*"      FAILED
*"----------------------------------------------------------------------

*设置为批处理执行模式
  sy-batch 'X'.

*调用函数执行处理链
  CALL FUNCTION 'RSPC_CHAIN_START'
    EXPORTING
      i_chain       i_chain
      i_t_variables i_t_variables
      i_synchronous i_synchronous
      i_simulate    i_simulate
      i_noplan      i_noplan
      i_dont_wait   i_dont_wait
      i_poll        i_poll
    IMPORTING
      e_logid       e_logid
    EXCEPTIONS
      error_message 1.
  IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4
            RAISING failed.
  ENDIF.
ENDFUNCTION.

 

网上提到用参数I_DONT_WAIT可解决此问题,但我未测试成功。具体网址如下:

https://forums.sdn.sap.com/message.jspa?messageID=7101769

I solved my problem by myself!

I've installed OSS Note 1253902 - Correction: Start of HybridProvider chain in DIA process.
It corrects FM RSPC_CHAIN_START and RSPC_API_CHAIN_START, adding a parameter to these FMs
I_DONT_WAIT TYPE RS_BOOL OPTIONAL that permits to solve my problem.

SET THE INTERFACE I_NOPLAN TO ‘X’ ALSO CAN SOLVE THE PROBLEM.

IT CALLED THE FM 'RSPC_JOB_PRIORITY'.

  FUNCTION rspc_job_priority.
*"----------------------------------------------------------------------
*"*"Local Interface:
*"  IMPORTING
*"     REFERENCE(I_BATCHCLASS_IN) TYPE  CHAR1
*"     REFERENCE(I_EDITEABLE) TYPE  RS_BOOL DEFAULT RS_C_TRUE
*"  EXPORTING
*"     REFERENCE(E_BATCH_CLASS) TYPE  CHAR1
*"  EXCEPTIONS
*"      ABORTED_BY_USER
*"----------------------------------------------------------------------
  DATAl_ignore_frontend TYPE rs_bool.

  l_ignore_frontend g_ignore_frontend.
  IF i_editeable rs_c_true.
    g_ignore_frontend rs_c_true.
  ENDIF.

  g_job_class i_batchclass_in.
  IF g_job_class IS INITIAL.
    g_job_class 'C'.
  ENDIF.
* ---- Make a call to the Screen----
  DO.
    CALL SCREEN 1400 STARTING AT 3.
    e_batch_class g_job_class.
    IF ok_code 'EXIT'.
      MESSAGE e213(rsmRAISING aborted_by_user.
    ENDIF.
    IF NOT e_batch_class IS INITIAL.
      EXIT.
    ENDIF.
  ENDDO.
  g_ignore_frontend l_ignore_frontend.

ENDFUNCTION.

 

posted on 2011-08-29 13:51  凡尘clsoho  阅读(1623)  评论(0编辑  收藏  举报