Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

using module pool pgm, Con't modify the table field valus

Former Member
0 Likes
504

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.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
462

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.

2 REPLIES 2
Read only

Former Member
0 Likes
463

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.

Read only

0 Likes
462

sloved my issue.

meet again (after any issue)

Thank u for help