Skip to Content
avatar image
Former Member

Module pool

Hi,

I'm new to module pool...

my requirement is

have 2 radio buttons like Update and Display...

if i click on update radiobutton have to get the data from ztable to table control and after modification have to update the ztable.

and if i click on dispaly radiobutton have to display the data in table control based on selection-screen(Range)?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • avatar image
    Former Member
    Aug 20, 2007 at 09:34 AM

    hi

    1) Create radiobuttons and group them

    2) Use the at selection-screen on output.

    3) Try to use mod id for the radiobuttons it will work

    Reward if useful

    Srinivas.D

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 20, 2007 at 09:40 AM

    Hui,

    Go to screen painter and create whatever u need in it...

    In case of radio buttons u create in group...

    After tht u can procedd to the coding part..

    In PAI u can write the condition to know which one is selected..And if update selected u can write the block of code in it and if other u can do code as per the need(Query)

    If u want to display allthese things,u can display the values which we have retrieved

    REWARD IF USEFUL

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 20, 2007 at 09:43 AM

    hi friend,

    iam giving you the sample code for your question try this one.as u know there are Four Includes i am giving coding for all of them.

    &----


    *& Include YROHIT_TABLECONTROLTOP Module Pool YROHIT_TABLECONTROL

    *&

    &----


    TABLES : EKKO,EKPO.

    CONTROLS DOCU TYPE TABLEVIEW USING SCREEN 2000.

    DATA : BEGIN OF ITAB OCCURS 100,

    EBELN LIKE EKPO-EBELN,

    STATU LIKE EKPO-STATU,

    MATNR LIKE EKPO-MATNR,

    BUKRS LIKE EKPO-BUKRS,

    MATKL LIKE EKPO-MATKL,

    MEINS LIKE EKPO-MEINS,

    END OF ITAB.

    &----


    *& Include YROHIT_TABLECONTROLI01

    &----


    &----


    *& Module USER_COMMAND_1000 INPUT

    &----


    • text

    ----


    MODULE USER_COMMAND_1000 INPUT.

    CASE SY-UCOMM.

    WHEN 'EXIT'.

    LEAVE PROGRAM.

    WHEN 'VIEW'.

    SELECT SINGLE * FROM EKKO WHERE EBELN = EKKO-EBELN.

    WHEN 'DETAILS'.

    SELECT * FROM EKPO INTO CORRESPONDING FIELDS OF TABLE ITAB

    WHERE EBELN = EKKO-EBELN.

    SET SCREEN 2000.

    WHEN 'REPORT'.

    LEAVE TO LIST-PROCESSING.

    LOOP AT ITAB.

    WRITE:/ ITAB-EBELN,ITAB-STATU,ITAB-MATNR,ITAB-BUKRS , ITAB-MATKL,ITAB-MEINS.

    ENDLOOP.

    ENDCASE.

    ENDMODULE. " USER_COMMAND_1000 INPUT

    &----


    *& Module USER_COMMAND_2000 INPUT

    &----


    • text

    ----


    MODULE USER_COMMAND_2000 INPUT.

    CASE SY-UCOMM.

    WHEN 'BACK'.

    SET SCREEN 1000.

    ENDCASE.

    ENDMODULE. " USER_COMMAND_2000 INPUT

    &----


    *& Include YROHIT_TABLECONTROLO01

    &----


    &----


    *& Module fetch OUTPUT

    &----


    • text

    ----


    MODULE FETCH OUTPUT.

    MOVE-CORRESPONDING ITAB TO EKPO.

    ENDMODULE. " fetch OUTPUT

    Cheers,

    Rohith.

    REward points if Useful.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 20, 2007 at 09:47 AM

    hi Balu..

    goto se38 and give ur prog name-> select create button..

    in the popup window select program type as module pool.

    and save it..

    now go to se51

    give ur module pool prog name

    and Screen no ( your own num)..

    select create button..

    Here design a selection screen.

    go back. and give another screen number for the same module pool program.

    Design your screen by placing table control button , ( Update & Display buttons (Push Buttons))..

    In the flow logic of the screen u have to write the logic of the program in PBO and PAI events according to that functionality( Update/ Display).

    Reward points if useful.

    Regards,

    Chandra

    Add comment
    10|10000 characters needed characters exceeded