Skip to Content
0
Former Member
Jul 11, 2007 at 01:14 PM

Module pool question

16 Views

Hi,

I have a module pool program, in that the initial screen contains 'Display Contents', when I click that the Custom table contents will be displayed

with a check box in the front for each record. In that screen I added the button 'Creat Credit Memo' on application tool bar in pf-status 'List'. Where should I write the code to create Credit Memo.

I have to create credit memo request for only checked records.

Please help me.

Thanks,

Neelu.

PROCESS BEFORE OUTPUT.
 MODULE STATUS_0100.
*
PROCESS AFTER INPUT.
 MODULE USER_COMMAND_0100.
--------------

MODULE USER_COMMAND_0100 INPUT.
  CASE OK_CODE.
    WHEN 'DISP'.
      CLEAR OK_CODE.
      CALL SCREEN 200.
----------------

PROCESS BEFORE OUTPUT.
* MODULE STATUS_0200.
MODULE PREPARE_LIST.
PROCESS AFTER INPUT.
* MODULE USER_COMMAND_0200.
--------------------------------

MODULE PREPARE_LIST OUTPUT.
  LEAVE TO LIST-PROCESSING AND RETURN TO SCREEN 100.
  PERFORM EDIT_LIST.
  LEAVE SCREEN.
ENDMODULE.                 " PREPARE_LIST  OUTPUT
------------------------------------

FORM EDIT_LIST.
 Data: chbox(1) type c value ' '.

  SET PF-STATUS 'LIST'.
  NEW-PAGE LINE-SIZE 158.
  SELECT * FROM ZPPPRICE.
    SELECT SINGLE NAME1 FROM KNA1 INTO KNA1-NAME1
                   WHERE KUNNR = ZPPPRICE-KUNNR.
    WRITE: /01 SY-VLINE,
            02 chbox as checkbox,
            04 SY-VLINE,
            05 ZPPPRICE-KUNNR,
            16 SY-VLINE,
            17 KNA1-NAME1,
            43 SY-VLINE,
            44 ZPPPRICE-MATNR,
            63 SY-VLINE,
            64 ZPPPRICE-CRDATE,
            75 SY-VLINE,
            76 ZPPPRICE-EFDATE,
            87 SY-VLINE,
            88 ZPPPRICE-SPRICE,
            104 SY-VLINE,
            105 ZPPPRICE-EPRICE,
            122 SY-VLINE,
            123 ZPPPRICE-EOHQTY,
            134 SY-VLINE,
            135 ZPPPRICE-AOHQTY,
            146 SY-VLINE,
            147 ZPPPRICE-CRMEMO,
            158 SY-VLINE.
  ENDSELECT.
  CLEAR ZPPPRICE.
  WRITE: /01(158) SY-ULINE.
ENDFORM.