ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 求合计

求合计

原创 Linux操作系统 作者:103104521 时间:2013-01-08 10:24:50 0 删除 编辑
*  CLEAR TH_RESULT1.
*  CLEAR Z_INDEX.
*  CLEAR TH_LAST_RESU1.
*  CLEAR TD_LAST_RESU1.
*  LOOP AT TD_RESULT1 INTO TH_RESULT1.
*15309831108
*    IF SY-TABIX = 1.
*      TH_LAST_RESU1 = TH_RESULT1.
*      APPEND TH_LAST_RESU1 TO TD_LAST_RESU1.
*      Z_INDEX = Z_INDEX + 1.
*      CONTINUE.
*    ENDIF.
*
*    IF  TH_LAST_RESU1-KOSTL  = TH_RESULT1-KOSTL
*    AND TH_LAST_RESU1-ARBPL  = TH_RESULT1-ARBPL
*    AND TH_LAST_RESU1-GJAHR  = TH_RESULT1-GJAHR
*    AND TH_LAST_RESU1-MONAT  = TH_RESULT1-MONAT
*    AND TH_LAST_RESU1-PLNBEZ = TH_RESULT1-PLNBEZ.
*      TH_LAST_RESU1-XMNGA = TH_RESULT1-XMNGA + TH_LAST_RESU1-XMNGA.
*      IF TH_LAST_RESU1-GMNGA < TH_RESULT1-GMNGA.
*        TH_LAST_RESU1-GMNGA = TH_RESULT1-GMNGA.
*      ENDIF.
*      IF TH_LAST_RESU1-PLAN_F_QTY > TH_RESULT1-PLAN_F_QTY.
*        TH_LAST_RESU1-PLAN_F_QTY = TH_RESULT1-PLAN_F_QTY.
*      ENDIF.
*      MODIFY TD_LAST_RESU1 FROM TH_LAST_RESU1 INDEX Z_INDEX
*                           TRANSPORTING GMNGA
*                                        XMNGA
*                                        PLAN_F_QTY.
*    ELSE.
*      TH_LAST_RESU1 = TH_RESULT1.
*      APPEND TH_LAST_RESU1 TO TD_LAST_RESU1.
*      Z_INDEX = Z_INDEX + 1.
*
*    ENDIF.
*
*    CLEAR TH_RESULT1.
*
*  ENDLOOP.
*
*  CLEAR TH_RESULT2.
*  CLEAR Z_INDEX.
*  CLEAR TH_LAST_RESU2.
*  CLEAR TD_LAST_RESU2.
*  LOOP AT TD_RESULT2 INTO TH_RESULT2.
*
*    IF SY-TABIX = 1.
*      TH_LAST_RESU2 = TH_RESULT2.
*      APPEND TH_LAST_RESU2 TO TD_LAST_RESU2.
*      Z_INDEX = Z_INDEX + 1.
*      CONTINUE.
*    ENDIF.
*
*    IF  TH_LAST_RESU2-KOSTL  = TH_RESULT2-KOSTL
*    AND TH_LAST_RESU2-ARBPL  = TH_RESULT2-ARBPL
*    AND TH_LAST_RESU2-GJAHR  = TH_RESULT2-GJAHR
*    AND TH_LAST_RESU2-MONAT  = TH_RESULT2-MONAT
*    AND TH_LAST_RESU2-PLNBEZ = TH_RESULT2-PLNBEZ.
*      TH_LAST_RESU2-XMNGA = TH_RESULT2-XMNGA + TH_LAST_RESU2-XMNGA.
*      IF TH_LAST_RESU2-GMNGA < TH_RESULT2-GMNGA.
*        TH_LAST_RESU2-GMNGA = TH_RESULT2-GMNGA.
*      ENDIF.
*      IF TH_LAST_RESU2-PLAN_F_QTY > TH_RESULT2-PLAN_F_QTY.
*        TH_LAST_RESU2-PLAN_F_QTY = TH_RESULT2-PLAN_F_QTY.
*      ENDIF.
*      MODIFY TD_LAST_RESU2 FROM TH_LAST_RESU2 INDEX Z_INDEX
*                           TRANSPORTING GMNGA
*                                        XMNGA
*                                        PLAN_F_QTY.
*    ELSE.
*      TH_LAST_RESU2 = TH_RESULT2.
*      APPEND TH_LAST_RESU2 TO TD_LAST_RESU2.
*      Z_INDEX = Z_INDEX + 1.
*
*    ENDIF.
*
*    CLEAR TH_RESULT2.
*
*  ENDLOOP.
*
*  CLEAR TH_RESULT3.
*  CLEAR Z_INDEX.
*  CLEAR TH_LAST_RESU3.
*  CLEAR TD_LAST_RESU3.
*  LOOP AT TD_RESULT3 INTO TH_RESULT3.
*
*    IF SY-TABIX = 1.
*      TH_LAST_RESU3 = TH_RESULT3.
*      APPEND TH_LAST_RESU3 TO TD_LAST_RESU3.
*      Z_INDEX = Z_INDEX + 1.
*      CONTINUE.
*    ENDIF.
*
*    IF  TH_LAST_RESU3-KOSTL  = TH_RESULT3-KOSTL
*    AND TH_LAST_RESU3-ARBPL  = TH_RESULT3-ARBPL
*    AND TH_LAST_RESU3-GJAHR  = TH_RESULT3-GJAHR
*    AND TH_LAST_RESU3-MONAT  = TH_RESULT3-MONAT
*    AND TH_LAST_RESU3-PLNBEZ = TH_RESULT3-PLNBEZ.
*      TH_LAST_RESU3-XMNGA = TH_RESULT3-XMNGA + TH_LAST_RESU3-XMNGA.
*      IF TH_LAST_RESU3-GMNGA < TH_RESULT3-GMNGA.
*        TH_LAST_RESU3-GMNGA = TH_RESULT3-GMNGA.
*      ENDIF.
*      IF TH_LAST_RESU3-PLAN_F_QTY > TH_RESULT3-PLAN_F_QTY.
*        TH_LAST_RESU3-PLAN_F_QTY = TH_RESULT3-PLAN_F_QTY.
*      ENDIF.
*      MODIFY TD_LAST_RESU3 FROM TH_LAST_RESU3 INDEX Z_INDEX
*                           TRANSPORTING GMNGA
*                                        XMNGA
*                                        PLAN_F_QTY.
*    ELSE.
*      TH_LAST_RESU3 = TH_RESULT3.
*      APPEND TH_LAST_RESU3 TO TD_LAST_RESU3.
*      Z_INDEX = Z_INDEX + 1.
*
*    ENDIF.
*
*    CLEAR TH_RESULT3.
*
*  ENDLOOP.
*
*  CLEAR TH_RESULT4.
*  CLEAR Z_INDEX.
*  CLEAR TH_LAST_RESU4.
*  CLEAR TD_LAST_RESU4.
*  LOOP AT TD_RESULT4 INTO TH_RESULT4.
*
*    IF SY-TABIX = 1.
*      TH_LAST_RESU4 = TH_RESULT4.
*      APPEND TH_LAST_RESU4 TO TD_LAST_RESU4.
*      Z_INDEX = Z_INDEX + 1.
*      CONTINUE.
*    ENDIF.
*
*    IF  TH_LAST_RESU4-KOSTL  = TH_RESULT4-KOSTL
*    AND TH_LAST_RESU4-ARBPL  = TH_RESULT4-ARBPL
*    AND TH_LAST_RESU4-GJAHR  = TH_RESULT4-GJAHR
*    AND TH_LAST_RESU4-MONAT  = TH_RESULT4-MONAT
*    AND TH_LAST_RESU4-PLNBEZ = TH_RESULT4-PLNBEZ.
*      TH_LAST_RESU4-XMNGA = TH_RESULT4-XMNGA + TH_LAST_RESU4-XMNGA.
*      IF TH_LAST_RESU4-GMNGA < TH_RESULT4-GMNGA.
*        TH_LAST_RESU4-GMNGA = TH_RESULT4-GMNGA.
*      ENDIF.
*      IF TH_LAST_RESU4-PLAN_F_QTY > TH_RESULT4-PLAN_F_QTY.
*        TH_LAST_RESU4-PLAN_F_QTY = TH_RESULT4-PLAN_F_QTY.
*      ENDIF.
*      MODIFY TD_LAST_RESU4 FROM TH_LAST_RESU4 INDEX Z_INDEX
*                           TRANSPORTING GMNGA
*                                        XMNGA
*                                        PLAN_F_QTY.
*    ELSE.
*      TH_LAST_RESU4 = TH_RESULT4.
*      APPEND TH_LAST_RESU4 TO TD_LAST_RESU4.
*      Z_INDEX = Z_INDEX + 1.
*
*    ENDIF.
*
*    CLEAR TH_RESULT4.
*
*  ENDLOOP.
*
*
*  CLEAR TH_RESULT5.
*  CLEAR Z_INDEX.
*  CLEAR TH_LAST_RESU5.
*  CLEAR TD_LAST_RESU5.
*  LOOP AT TD_RESULT5 INTO TH_RESULT5.
*
*    IF SY-TABIX = 1.
*      TH_LAST_RESU5 = TH_RESULT5.
*      APPEND TH_LAST_RESU5 TO TD_LAST_RESU5.
*      Z_INDEX = Z_INDEX + 1.
*      CONTINUE.
*    ENDIF.
*
*    IF  TH_LAST_RESU5-KOSTL  = TH_RESULT5-KOSTL
*    AND TH_LAST_RESU5-ARBPL  = TH_RESULT5-ARBPL
*    AND TH_LAST_RESU5-GJAHR  = TH_RESULT5-GJAHR
*    AND TH_LAST_RESU5-MONAT  = TH_RESULT5-MONAT
*    AND TH_LAST_RESU5-PLNBEZ = TH_RESULT5-PLNBEZ.
*      TH_LAST_RESU5-XMNGA = TH_RESULT5-XMNGA + TH_LAST_RESU5-XMNGA.
*      IF TH_LAST_RESU5-GMNGA < TH_RESULT5-GMNGA.
*        TH_LAST_RESU5-GMNGA = TH_RESULT5-GMNGA.
*      ENDIF.
*      IF TH_LAST_RESU5-PLAN_F_QTY > TH_RESULT5-PLAN_F_QTY.
*        TH_LAST_RESU5-PLAN_F_QTY = TH_RESULT5-PLAN_F_QTY.
*      ENDIF.
*      MODIFY TD_LAST_RESU5 FROM TH_LAST_RESU5 INDEX Z_INDEX
*                           TRANSPORTING GMNGA
*                                        XMNGA
*                                        PLAN_F_QTY.
*    ELSE.
*      TH_LAST_RESU5 = TH_RESULT5.
*      APPEND TH_LAST_RESU5 TO TD_LAST_RESU5.
*      Z_INDEX = Z_INDEX + 1.
*
*    ENDIF.
*
*    CLEAR TH_RESULT5.
*
*  ENDLOOP.
*
*  CLEAR TH_RESULT6.
*  CLEAR Z_INDEX.
*  CLEAR TH_LAST_RESU6.
*  CLEAR TD_LAST_RESU6.
*  LOOP AT TD_RESULT6 INTO TH_RESULT6.
*
*    IF SY-TABIX = 1.
*      TH_LAST_RESU6 = TH_RESULT6.
*      APPEND TH_LAST_RESU6 TO TD_LAST_RESU6.
*      Z_INDEX = Z_INDEX + 1.
*      CONTINUE.
*    ENDIF.
*
*    IF  TH_LAST_RESU6-KOSTL  = TH_RESULT6-KOSTL
*    AND TH_LAST_RESU6-ARBPL  = TH_RESULT6-ARBPL
*    AND TH_LAST_RESU6-GJAHR  = TH_RESULT6-GJAHR
*    AND TH_LAST_RESU6-MONAT  = TH_RESULT6-MONAT
*    AND TH_LAST_RESU6-PLNBEZ = TH_RESULT6-PLNBEZ.
*      TH_LAST_RESU6-XMNGA = TH_RESULT6-XMNGA + TH_LAST_RESU6-XMNGA.
*      IF TH_LAST_RESU6-GMNGA < TH_RESULT6-GMNGA.
*        TH_LAST_RESU6-GMNGA = TH_RESULT6-GMNGA.
*      ENDIF.
*      IF TH_LAST_RESU6-PLAN_F_QTY > TH_RESULT6-PLAN_F_QTY.
*        TH_LAST_RESU6-PLAN_F_QTY = TH_RESULT6-PLAN_F_QTY.
*      ENDIF.
*      MODIFY TD_LAST_RESU6 FROM TH_LAST_RESU6 INDEX Z_INDEX
*                           TRANSPORTING GMNGA
*                                        XMNGA
*                                        PLAN_F_QTY.
*    ELSE.
*      TH_LAST_RESU6 = TH_RESULT6.
*      APPEND TH_LAST_RESU6 TO TD_LAST_RESU6.
*      Z_INDEX = Z_INDEX + 1.
*
*    ENDIF.
*
*    CLEAR TH_RESULT6.
*
*  ENDLOOP.

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/13973563/viewspace-752282/,如需转载,请注明出处,否则将追究法律责任。

下一篇: 取最大值
请登录后发表评论 登录
全部评论

注册时间:2011-03-30

  • 博文量
    18
  • 访问量
    21269