‎2010 Feb 20 3:55 AM
Hello frnds,
i m create one rpt using module pool pgm, click display button display the table values .
Iwant to modify some fields that changes is update to table.
Bellow coding is correct or not, how can modify the fields with save changes.
TABLES : ZRFIM1.
DATA: ZREPNO TYPE ZRFIM1-ZREPNO,
ZPLANT TYPE ZRFIM1-ZPLANT,
ZRIMNO TYPE ZRFIM1-ZRIMNO,
ZRIMDAT TYPE ZRFIM1-ZRIMDAT,
DISPLAY TYPE C,
CLEAR TYPE C,
EXIT TYPE C,
SAVE TYPE C,
OK_CODE LIKE SY-UCOMM.
data : itab type table of zrfim1 with default key.
data : wa_itab type zrfim1.
CALL SCREEN 100.
&----
*& Module STATUS_0100 OUTPUT
&----
text
-
SET PF-STATUS 'SAVE'.
AT USER-COMMAND.
module STATUS_0100 output.
SET PF-STATUS 'xxxxxxxx'.
SET TITLEBAR 'xxx'.
CASE SY-UCOMM.
WHEN 'EXIT'.
LEAVE PROGRAM.
WHEN 'BACK'.
LEAVE PROGRAM.
WHEN 'DISPLAY'.
SELECT SINGLE ZREPNO ZPLANT ZRIMNO ZRIMDAT FROM ZRFIM1
INTO (ZRFIM1-ZREPNO, ZRFIM1-ZPLANT, ZRFIM1-ZRIMNO, ZRFIM1-ZRIMDAT)
WHERE ZREPNO = ZRFIM1-ZREPNO.
WHEN 'CLEAR'.
CLEAR ZRFIM1.
WHEN 'SAVE'.
select single * from zrfim1 into wa_itab where ZREPNO = ZRFIM1-ZREPNO.
wa_itab-zrepno = ZREPNO.
wa_itab-zplant = ZPLANT.
wa_itab-zrimno = ZRIMNO.
wa_itab-zrimdat = ZRIMDAT.
modify zrfim1 from wa_itab.
ENDCASE.
endmodule.
Thanks in advance.
‎2010 Feb 20 10:59 PM
hello,
change the code like:
(IF ZRFIM1 is the structure has been used on screen)
wa_itab-zrepno = ZRFIM1-ZREPNO.
wa_itab-zplant = ZRFIM1-ZPLANT.
wa_itab-zrimno = ZRFIM1-ZRIMNO.
wa_itab-zrimdat = ZRFIM1-ZRIMDAT.
modify zrfim1 from wa_itab.
thanks
K.
‎2010 Feb 20 10:59 PM
hello,
change the code like:
(IF ZRFIM1 is the structure has been used on screen)
wa_itab-zrepno = ZRFIM1-ZREPNO.
wa_itab-zplant = ZRFIM1-ZPLANT.
wa_itab-zrimno = ZRFIM1-ZRIMNO.
wa_itab-zrimdat = ZRFIM1-ZRIMDAT.
modify zrfim1 from wa_itab.
thanks
K.
‎2010 Feb 22 5:56 AM