ITPub博客

首页 > Linux操作系统 > Linux操作系统 > SAP DIALOG

SAP DIALOG

原创 Linux操作系统 作者:ytfsrs2008 时间:2010-04-06 13:27:44 0 删除 编辑

report zrpptest05 .

tables: mara,marc,makt.

DATA:T_CODE LIKE SY-UCOMM.

DATA: BEGIN OF ITAB OCCURS 0,

        WERKS LIKE MARC-WERKS,

        MATNR LIKE MARA-MATNR,

        MAKTX LIKE MAKT-MAKTX,

      END OF ITAB.

DATA: LINES TYPE I.

CONTROLS: FTAB TYPE TABLEVIEW USING SCREEN 100.

CALL SCREEN 100.

 

MODULE STATUS_0100 OUTPUT.

  SET PF-STATUS 'PF100'.

ENDMODULE.

 

MODULE USER_COMMAND_0100.

  CLEAR T_CODE.

  CASE SY-UCOMM.

    WHEN 'EXEC'.

      PERFORM. GET_DATA_FORM. USING MARC-WERKS MARA-MATNR.

    WHEN 'BACK' OR 'CANC'.

      LEAVE TO SCREEN 0.

   ENDCASE.

ENDMODULE.

*&-----------------------------------------------------------------*

*&      Form  GET_DATA_FORM

*&-----------------------------------------------------------------*

form. GET_DATA_FORM. using    p_werks  p_matnr.

  CHECK P_MATNR = ''.

   SELECT MARC~WERKS MARA~MATNR MAKT~MAKTX

         INTO CORRESPONDING FIELDS OF TABLE ITAB

         FROM MARC

         INNER JOIN MARA ON MARC~MATNR = MARA~MATNR

         INNER JOIN MAKT ON MARC~MATNR = MAKT~MATNR

        WHERE MARC~WERKS = P_WERKS

        AND MAKT~SPRAS = 'EN'.

endform.

*&----------------------------------------------------------------*

*&      Module  READ_TABLE_CONTROL  INPUT

*&----------------------------------------------------------------*

module READ_TABLE_CONTROL input.

  LINES = SY-LOOPC.

endmodule.

*&-----------------------------------------------------------------*

*&      Module  FTAB_MODIFY  INPUT

*&-----------------------------------------------------------------*

module FTAB_MODIFY input.

 CLEAR T_CODE.

   T_CODE = SY-UCOMM.

    CASE T_CODE.

     WHEN 'SAVE'.

      MODIFY ITAB INDEX FTAB-CURRENT_LINE transporting MAKTX.

      UPDATE MAKT SET MAKTX = ITAB-MAKTX

                  WHERE MATNR = ITAB-MATNR AND  SPRAS = 'EN'.

     ENDCASE.

endmodule.

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

上一篇: 常用的MRP函数
下一篇: BDC MMSC
请登录后发表评论 登录
全部评论

注册时间:2008-10-31

  • 博文量
    52
  • 访问量
    50895