关闭

传值问题

60人阅读 评论(0) 收藏 举报

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.

 

0
0

查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    个人资料
    • 访问:1034次
    • 积分:40
    • 等级:
    • 排名:千里之外
    • 原创:4篇
    • 转载:0篇
    • 译文:0篇
    • 评论:0条
    文章存档
    阅读排行
    评论排行