`

funcation location分配classification

 
阅读更多
 data: lt_list like table of bapi1003_alloc_list,
        lt_num  like table of bapi1003_alloc_values_num,
        lt_curr like table of bapi1003_alloc_values_curr,
        lt_char like table of bapi1003_alloc_values_char.

  clear: lt_num,
         lt_curr,
         lt_char,
         lt_list.

  clear: gv_class,gv_object,gt_return,gt_char.

  if  gs_tab-n_feg_online is initial
  and gs_tab-n_feg_outage is initial
  and gs_tab-n_i0_status  is initial
  and gs_tab-n_quality    is initial.

  else.
* 将function  location的外部编码转换为内部编码
    call function 'CONVERSION_EXIT_TPLNR_INPUT'
      exporting
        input     = gs_tab-tplnr
      importing
        output    = gv_object
      exceptions
        not_found = 1
        others    = 2.

* 获取class
    gv_class = 'N_GENERAL'.  
  gv_ctype = '003'.

    call function 'BAPI_OBJCL_GETCLASSES'
      exporting
        objectkey_imp   = gv_object
        objecttable_imp = 'IFLOT'
        classtype_imp   = gv_ctype
        read_valuations = 'X'
        keydate         = sy-datum
        language        = sy-langu
      tables
        alloclist       = lt_list
        allocvalueschar = lt_char
        allocvaluescurr = lt_curr
        allocvaluesnum  = lt_num
        return          = gt_return.

    if not lt_char is initial.
      append lines of lt_char to gt_char.
    endif.

    if not lt_curr is initial.
      append lines of lt_curr to gt_curr.
    endif.

    if not lt_num is initial.
      append lines of lt_num to gt_num.
    endif.

* 获取特征值的value
    mcr_character_value:
           'N_FEG_ONLINE'        gs_tab-n_feg_online,   
           'N_FEG_OUTAGE'        gs_tab-n_feg_outage,   " 
           'N_I0_STATUS'         gs_tab-n_i0_status ,   " 
           'N_QUALITY_AND_SAFETY_CLASS'    gs_tab-n_quality.      "
    clear gt_return.
*******************************************************
    call function 'BAPI_OBJCL_CHANGE'
      exporting
        objectkey          = gv_object
        objecttable        = 'IFLOT'
        classnum           = gv_class
        classtype          = gv_ctype
        status             = '1'
        keydate            = sy-datum
      tables
        allocvaluesnumnew  = gt_num
        allocvaluescharnew = gt_char
        allocvaluescurrnew = gt_curr
        return             = gt_return.
*/--End of Change  On 2011-02-11-----*

    clear: gs_return,gs_error.
* 记录创建失败的错误信息
    read table gt_return into gs_return with key type = 'E'.

    if sy-subrc = 0.
      move-corresponding gs_tab to gs_error.
      loop at gt_return into gs_return where type = 'E'.
        concatenate gs_error-message gs_return-message into gs_error-message
                   separated by space.
      endloop.
      gs_error-lines  = gv_lines.
      append gs_error to gt_error.


      call function 'BAPI_TRANSACTION_ROLLBACK'.

    else.
      call function 'BAPI_TRANSACTION_COMMIT'
        exporting
          wait = 'X'.
    endif.
  endif.

 

分享到:
评论

相关推荐

    matlab终止以下代码-fourier-descriptor-classification:使用闭合轮廓的傅立叶描述符作为形状分类的特征

    Classification Test 1. Set Matlab's working directory to the location containing these files. 2. Run 'Descriptors.m' to load data from the training set and see how each descriptor method performs as...

    ISO 11452-8-2015.pdf

    测试报告(Test report)部分指明了测试完成后需要提交的文档要求,包括功能性能状态分类(Function performance status classification, FPSC)和测试结果的记录。 标准的附录部分(Annex A)提供了关于严重程度...

    SAX符号化序列范例源码

    classification and clustering, even when you do not follow up with access to the original data. See [1]. --------- sax_demo: --------- This code demonstrates the first case described in time...

    SAP Tables for Technical Consultants

    - **功能位置(Function location)**:定义设备在生产过程中的位置。 - **自定义表(Customising tables)**:存储系统自定义设置的数据。 - **总账账户(General ledger accounts)**:记录企业的财务交易。 - **...

    You Only Look OnceUnified, Real-Time Object Detectio.pdf

    YOLO的基本架构实现了极高的速度,但是由于它在训练过程中需要同时优化定位(location)和分类(classification)两个任务,因此它的定位精度相对于一些其他系统(如R-CNN系列)并不总是最优的。YOLO的损失函数...

    svm matlab版本

    Location: C:\Program Files\Microsoft Visual Studio Are these correct?([y]/n): y matlab> make Under 64-bit Windows, Visual Studio 2005 user will need "X64 Compiler and Tools". The package won't ...

    雷达技术知识

    13. Reach 1 LiDAR Cross Sections and Sample Point Location 31 14. Differences Between LiDAR and Field Based Elevations 37 15. Regression ofLiDAR and Field Cross section Elevations 38 16. Comparison of...

    python3.6.5参考手册 chm

    PEP 471 - os.scandir() function – a better and faster directory iterator PEP 475: Retry system calls failing with EINTR PEP 479: Change StopIteration handling inside generators PEP 485: A function...

    BURNINTEST--硬件检测工具

    PassMark BurnInTest V5.3 ...All Rights Reserved ... Overview ======== Passmark's BurnInTest is a software tool that allows all the major sub-systems of a computer to be simultaneously tested for reliability...

Global site tag (gtag.js) - Google Analytics