zoukankan      html  css  js  c++  java
  • ABAP程序拆分JOB

    【ZDQFI_601_JOB 调用 ZDQFI_601拆分JOB】
    
    
    data: name   type tbtcjob-jobname.
    data: number type tbtcjob-jobcount.
    
    form f_create_job .
    
      concatenate name1  fnum into name.
    
    **step1. JOB_OPEN
      call function 'JOB_OPEN'
        exporting
          jobname          = name
        importing
          jobcount         = number
        exceptions
          cant_create_job  = 1
          invalid_job_data = 2
          jobname_missing  = 3
          others           = 4.
      clear: r_bukrs[].
      r_bukrs-low = it_bukrs-bukrs.
      r_bukrs-sign = 'I'.
      r_bukrs-option = 'EQ'.
      append r_bukrs.
      if sy-subrc = 0.
    
    **step2.调用子程序
        submit zdqfi_601
                                     with s_bukrs in r_bukrs
                                     with s_gjahr in s_gjahr
                                     with fnum = fnum
                                     with p_user = p_user
                                     with p_pwd = p_pwd
                                     with p_host = p_host
                                     with ftp_path = ftp_path
                                     with p_date = p_datum
                                     with p_max = max_num
                         via job name number number
                         and return.
    
        if sy-subrc = 0.
    
    **step3.关闭JOB
          call function 'JOB_CLOSE'
            exporting
              jobcount             = number
              jobname              = name
              strtimmed            = 'X'
    *          targetserver         = v_device
            exceptions
              cant_start_immediate = 1
              invalid_startdate    = 2
              jobname_missing      = 3
              job_close_failed     = 4
              job_nosteps          = 5
              job_notex            = 6
              lock_failed          = 7
              others               = 8.
          if sy-subrc <> 0.
            ...
          endif.
        endif.
      else.
        write:/10 'CREATE JOB FAIL!'.
        leave program.
      endif.
    
      wait up to 1 seconds.
    
    endform.                    " f_create_job
  • 相关阅读:
    [CQOI2006]凸多边形
    NOIP后省选集训前文化课划水记
    FFT字符串匹配
    ghj1222的代码规范
    博弈论
    P1350 车的放置
    P2110 欢总喊楼记
    虫食算
    3192: [JLOI2013]删除物品
    逛公园
  • 原文地址:https://www.cnblogs.com/rainysblog/p/10815656.html
Copyright © 2011-2022 走看看