传值问题

来源:互联网 发布:python 字典 编辑:程序博客网 时间:2024/06/05 05:20

ror analysis
  An exception occurred that is explained in detail below.
  This exception cannot be caught in the context of the current statement.
  The reason for the exception is:
  The program attempted to interpret the value "gt_excel_c-field2" as a number,
   but
  since the value contravenes the rules for correct number formats,
  this was not possible.

 

FORM PROCESS_DATA .

  SORT  gt_excel_c BY  field1  field2  field3.


   LOOP AT gt_excel_c ASSIGNING  <fs>.
*    TRANSLATE <fs> TO UPPER CASE.
      DATA:  t_fld type  string ,
              str  type   string.

      clear str.
      CONCATENATE 'gt_excel_c-field' '1' INTO t_fld.
     ASSIGN (t_fld) TO <fs_fld>.


    IF <fs_fld>  NOT BETWEEN  0  AND 999.
      gv_err = 'X'.

      CLEAR gv_message.
      str = <fs_fld>.
      CONCATENATE  str  text-001 INTO gv_message.
      WRITE: / gv_message.
    ENDIF.

     UNASSIGN  <fs_fld>.
     clear str.

     CONCATENATE 'gt_excel_c-field' '2' INTO t_fld.
     ASSIGN (t_fld) TO <fs_fld>.

   
 IF t_fld  NOT BETWEEN  0  AND 9999.
      gv_err = 'X'.

      CLEAR gv_message.
      str = <fs_fld>.
      CONCATENATE  str  text-002 INTO gv_message.
      WRITE: / gv_message.
    ENDIF.
    UNASSIGN  <fs_fld>.

*     APPEND INITIAL LINE TO TO gt_alv.

ENDLOOP.

ENDFORM.

 

原创粉丝点击