Module pool Pgm

Hi Experts,
In the Transaction caa2, in Special Cases tab if i enter Program type '01' as we got, then the search help of the Status Code(3rd one)  field contain only some values not all the status codes. How can i solve this problem, if i take search help i am getting all the values but i don’t want all the values, only some of the Status Codes i want depend on Program Type. Can any one help me ASAP.
Regards
Rajendra

Hi Experts,
In the Transaction caa2, in Special Cases tab if i enter Program type '01' as we got, then the search help of the Status Code(3rd one)  field contain only some values not all the status codes. How can i solve this problem, if i take search help i am getting all the values but i don’t want all the values, only some of the Status Codes i want depend on Program Type. Can any one help me ASAP.
Regards
Rajendra

Similar Messages

  • Need module pool pgm

    hi friends ,
    i need module pool pgm with table control
    it should allow user to enter data and that data should be stored in
    ZTABLE.plz don't give demo pgm.if any one has developed give brief idea
    thaks in advance
    regards,
    soorya

    hi Soorya ,
        First of all you can get many module pool programs in the SDN search itelf .
    Anyways here is one samplw program for your reference :
    Creation of table controls in mpools
    Here you go with the  complete steps  for creating module pool programs  using table control:
    open se51, choose the icon like a table for table control . drag it and then place it in your screen . click on F6 and you will get a screen where youi need to provide the table name / field name that ( fields ) you are going to use in the screen and table control. after giving the ztable name click on get it from dictionary . you will get the list of available fields in a table. next choose the fields you wish to place in the table control , and if you want to place all fields in your table control then select every fields . after this you will get a structure which you should drag place inside the table control area .
    double click on the table control , set the proper attributes, tickmark the horizontal and vertical scroll bars to appear in your TC in the screen . save , check and activate ..
    following are the sample code you should follow to display datas in your table control ..
    write the following code in the flow logic of the screen ............
    process before output.
    module tc_01_init.
    loop at g_tc_01_itab
    into g_tc_01_wa
    with control tc_01
    cursor tc_01-current_line.
    module tc_01_move.
    module tc_01_get_lines.
    endloop.
    module status_0001.
    process after input.
    loop at g_tc_01_itab.
    chain.
    field sflight-carrid.
    field sflight-connid.
    field sflight-fldate.
    module tc_01_modify on chain-request.
    endchain.
    endloop.
    module tc_01_user_command.
    Write the following code in your Zmodulepool program !!
    program z_tst_mpool_tc_01.
    data: begin of l_tab_sflight occurs 10,
    carrid like sflight-carrid,
    connid like sflight-connid,
    fldate like sflight-fldate,
    end of l_tab_sflight.
    tables: sflight.
    types: begin of t_tc_01,
    carrid like sflight-carrid,
    connid like sflight-connid,
    fldate like sflight-fldate,
    end of t_tc_01.
    data: g_tc_01_itab type t_tc_01 occurs 0,
    g_tc_01_wa type t_tc_01. "work area
    data: g_tc_01_copied. "copy flag
    controls: tc_01 type tableview using screen 0001.
    data: g_tc_01_lines like sy-loopc.
    data: ok_code like sy-ucomm.
    include z_tst_mpool_tc_01_pbo .
    include z_tst_mpool_tc_01_pai .
    include z_tst_mpool_tc_01_incl01 .
    include z_tst_mpool_tc_01_status_0001.
    include Z_TST_MPOOL_TC_01_PBO .
    inside include
    module tc_01_init output.
    if g_tc_01_copied is initial.
    select * from sflight
    into corresponding fields
    of table g_tc_01_itab.
    g_tc_01_copied = 'X'.
    refresh control 'TC_01' from screen '0001'.
    endif.
    endmodule.
    module tc_01_move output.
    move-corresponding g_tc_01_wa to sflight.
    endmodule.
    module tc_01_get_lines output.
    g_tc_01_lines = sy-loopc.
    endmodule.
    hope this will be helpful to you ...
    Revert for further assistance if needed ...
    Regards,
    Ranjita

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

    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.

    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.

  • How to pass the field value from module pool program to smartform using submit?

    // AT pai of module pool pgm i entered the following: here gv_orderid is my value to be available at smart form(driver pgm) & zmusic_store_smf is the driver program of my smartform.
    gv_orderid= wa-itemid./
    SUBMIT ZMUSIC_STORE_SMF VIA SELECTION-SCREEN
                                  WITH p_order = gv_orderid
                                  AND RETURN.
    //AT driver pgm(zmusic_store_smf):
    START-OF-SELECTION.
    CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
        EXPORTING
          formname                 = 'ZMUSIC_SMARTFORM1'
    *   VARIANT                  = ' '
    *   DIRECT_CALL              = ' '
       IMPORTING
         fm_name                  = lv_form
       EXCEPTIONS
         no_form                  = 1
         no_function_module       = 2
         OTHERS                   = 3.
      IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    CALL FUNCTION lv_form
       EXPORTING
    *      iv_orderid = is_purchase_item-zorder_id.
    iv_orderid = gv_orderid.
    // here i'm trying to call my smartform('ZMUSIC_SMARTFORM1')  from this driver pgm but unable to access the value of gv_orderid please help me out with this.

    Declare the gv_orderid in modulepool program.
    And Declare the parameter as import parameter in smartform.
    CALL FUNCTION  lv_form
       EXPORTING
    *   ARCHIVE_INDEX              =
    *   ARCHIVE_INDEX_TAB          =
    *   ARCHIVE_PARAMETERS         =
    *   CONTROL_PARAMETERS         =
    *   MAIL_APPL_OBJ              =
    *   MAIL_RECIPIENT             =
    *   MAIL_SENDER                =
    *   OUTPUT_OPTIONS             =
    *   USER_SETTINGS              = 'X'
         i_input                    =  gv_orderid
    * IMPORTING
    *   DOCUMENT_OUTPUT_INFO       =
    *   JOB_OUTPUT_INFO            =
    *   JOB_OUTPUT_OPTIONS         =
    * EXCEPTIONS
    *   FORMATTING_ERROR           = 1
    *   INTERNAL_ERROR             = 2
    *   SEND_ERROR                 = 3
    *   USER_CANCELED              = 4
    *   OTHERS                     = 5

  • How to create transaction or screen variant for custom tcode in module pool

    Hi,
              I have one module pool program with custome tcode ,i want to create transaction or screen variant for this tcode.Next time when we run this tcode we need a variant for this tcode.
    I tried by using of SHD0 but it is working only for standred tcodes.Is there any possibilty please help me.
    thanks,
    Lavanya.

    Hi,
    you created a Custom Tcode for ur module pool Pgm..if u execute the Tcode in the output screen give the input details and press Save Option then variant will be created. Then you can use that variant.
    otherwise.. while creating a Tcode..
    select an option for Tcode type Tranasction With variant ..there u will provide the variant for ur Tcode ( which is already created ).
    Regards,
    PraVeen.

  • Module pool domain text display info req?

    hi
    i had an req to show a filed MATNR on a screen in module pool pgm,there shd be a i/p filed for material,user can select the material from the list of available materials,along with the test to be displayed for the filed next to material nos.
    the list of mateiral is based on the login user name.
    i am able to display the material list,but text is not coming.
    pls tell me how to show the text next to matnr no. in list.
    i had used the code:
    loop at itab_carrid.
        clear:text.
        CALL FUNCTION 'ADS2KIPBRO_GET_DOMAIN_TEXT'
          EXPORTING
            E_TABLE          = 'MARA'
            E_FIELD          = 'MATNR'
            E_VALUE          = itab_carrid-matnr
          IMPORTING
            I_TEXT           = text
          EXCEPTIONS
            ILLEGAL_INPUT    = 1
            DOMAIN_NOT_FOUND = 2
            OTHERS           = 3.
        IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
        move text to itab_carrid-text1.
        modify itab_carrid transporting text1.
      endloop.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
          retfield        = 'MATNR'
          value_org       = 'S'
        TABLES
          value_tab       = itab_carrid
        EXCEPTIONS
          parameter_error = 1
          no_values_found = 2
          OTHERS          = 3.
      IF sy-subrc <> 0.
      ENDIF.

    hi
    tell me,if i made a i/p field on screen from the data variable declared in my program
    like :data:actvt(3) type c.
    than on layout of screen:I/P filed-actvt.
    now i want to provide the f4 to this.i had written the POV for the filed,the data is there in itab,but not poping out.
    code:PROCESS ON VALUE-REQUEST.
      FIELD ACTVT MODULE create_dropdown_box.
    TYPES: BEGIN OF type_carrid,
             actvt(3)  type c,
             text1(40) type c,
           END OF type_carrid.
    DATA: itab_carrid type Type_carrid occurs 0 with header line.
       itab_carrid-actvt = '001'.
        append itab_carrid.
        itab_carrid-actvt = '002'.
        append itab_carrid.
        itab_carrid-actvt = '003'.
        append itab_carrid.
        itab_carrid-actvt = '004'.
        append itab_carrid.
        itab_carrid-actvt = '005'.
        append itab_carrid.
        itab_carrid-actvt = '006'.
        append itab_carrid.
        itab_carrid-actvt = '007'.
        append itab_carrid.
      endif.
      clear:itab_carrid.
      loop at itab_carrid.
        clear:text.
        CALL FUNCTION 'ADS2KIPBRO_GET_DOMAIN_TEXT'
          EXPORTING
            E_TABLE          = 'YLOGON1'
            E_FIELD          = 'ACTVT'
            E_VALUE          = itab_carrid-actvt
          IMPORTING
            I_TEXT           = text
          EXCEPTIONS
            ILLEGAL_INPUT    = 1
            DOMAIN_NOT_FOUND = 2
            OTHERS           = 3.
        IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
        move text to itab_carrid-text1.
        modify itab_carrid transporting actvt text1.
      endloop.
      clear:itab_carrid.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
          retfield        = 'ACTVT'
          DYNPNR          = SY-DYNNR
          DYNPPROG        = SY-REPID
          value_org       = 'S'
        TABLES
          value_tab       = itab_carrid
        EXCEPTIONS
          parameter_error = 1
          no_values_found = 2
          OTHERS          = 3.
      IF sy-subrc <> 0.
      ENDIF.
    plz tell me how to pop out this help in screen.

  • Tabsrip in module pool

    hi all
    when im tryin to create tabstrip in module pool pgm im gettin error as subscreen s not assigned to tab how do i assign the subscreen for the tabstrip

    hi,
    If you need it in selection screen,check this link.
    http://www.sapdevelopment.co.uk/reporting/selscr/selscr_tabstrip.htm
    also Check this.
    http://help.sap.com/saphelp_nw04/helpdata/en/17/5bf1b52ba211d2954f0000e8353423/content.htm
    According to the tab pressed,you can write the coding in PAI and display the output in PBO.
    Following is the sample code.I am using custom container.
    CONTROLS: main_tab TYPE TABSTRIP.
    DATA: BEGIN OF i_main_tab,
    subscreen LIKE sy-dynnr,
    prog LIKE sy-repid VALUE
    'ZZZ_TABSTRIP',
    pressed_tab LIKE sy-ucomm VALUE c_main_tab-tab1,
    END OF i_main_tab.
    MODULE status_9001 OUTPUT.
    SET PF-STATUS 'ZSTATUS'.
    SET TITLEBAR 'ZTITLE'.
    main_tab-activetab = i_main_tab-pressed_tab.
    CASE i_main_tab-pressed_tab.
    WHEN c_main_tab-tab1.
    IF o_custom_container1 IS INITIAL.
    Creating Object
    PERFORM f9000_objects_create.
    Building the field catalog
    PERFORM f9001_build_field_cat TABLES i_fcat
    USING 'ZZZ_GRID'.
    For Layout
    PERFORM f9002_layout USING sy-title c_x c_a c_x.
    i_main_tab-subscreen = '9100'.
    Displaying data
    CALL METHOD o_alvgrid1->set_table_for_first_display
    EXPORTING
    is_variant = w_variant
    i_save = c_a
    is_layout = w_layout
    CHANGING
    it_outtab = i_grid[]
    it_fieldcatalog = i_fcat[]
    EXCEPTIONS
    invalid_parameter_combination = 1
    program_error = 2
    too_many_lines = 3
    OTHERS = 4.
    IF sy-subrc <> 0.
    MESSAGE i005 WITH text-009."Error in ALV report display
    LEAVE LIST-PROCESSING.
    ENDIF.
    endif.
    when c_main_tab-tab2.
    if o_custom_container2 is initial.
    perform f9000_objects_create1 using:
    create custom container
    'o_custom_container2' '' '' '',
    Create splitter container
    'o_splitter' o_custom_container2 '2' '1',
    Create event reciever
    'o_eventreceiver' '' '' ''.
    Creating containers for the split grids
    call method o_splitter->get_container exporting row = 1
    column = 1
    receiving container = o_container1.
    call method o_splitter->get_container exporting row = 2
    column = 1
    receiving container = o_container2.
    Set where the splits on the screen comes
    call method o_splitter->set_row_height
    exporting
    id = 1
    height = 45
    exceptions
    cntl_error = 1
    cntl_system_error = 2
    others = 3.
    if sy-subrc ne 0.
    perform f9003_error_handle using text-E04.
    endif.
    perform f9000_objects_create1 using:
    Create the alv grids
    'o_alvgrid2' o_container1 '' '',
    'o_alvgrid3' o_container2 '' ''.
    set handler o_eventreceiver->handle_double_click for o_alvgrid2.
    perform f9001_build_field_cat tables i_fcat1
    using 'ZZZ_GRID1'.
    perform f9001_build_field_cat tables i_fcat2
    using 'ZZZ_GRID2'.
    For Layout
    PERFORM f9002_layout USING sy-title c_x c_a c_x.
    i_main_tab-subscreen = '9200'.
    if not i_grid1[] is initial.
    call method o_alvgrid2->set_table_for_first_display
    exporting
    is_variant = w_variant
    i_save = c_a
    is_layout = w_layout
    CHANGING
    it_outtab = i_grid1[]
    it_fieldcatalog = i_fcat1[]
    exceptions
    invalid_parameter_combination = 1
    program_error = 2
    too_many_lines = 3
    others = 4.
    if sy-subrc <> 0.
    message i005 with text-009."Error in ALV report display
    leave list-processing.
    endif.
    Populate the GRID2 data
    read table i_grid1 into w_grid1 index 1.
    if sy-subrc = 0.
    if not i_grid2[] is initial.
    Generate the grid2 data.
    call method o_alvgrid3->set_table_for_first_display
    exporting
    is_variant = w_variant
    i_save = c_a
    is_layout = w_layout
    CHANGING
    it_outtab = i_grid2[]
    it_fieldcatalog = i_fcat2[]
    exceptions
    invalid_parameter_combination = 1
    program_error = 2
    too_many_lines = 3
    others = 4.
    endif.
    endif.
    else.
    No data for the entered selection criteria
    message i005 with text-010.
    leave list-processing.
    endif.
    endif.
    WHEN OTHERS.
    DO NOTHING
    ENDCASE.
    ENDMODULE. " STATUS_9001 OUTPUT
    *& Module MAIN_TAB_ACTIVE_TAB_GET INPUT
    This is used to catch the pressed tab
    MODULE main_tab_active_tab_get INPUT.
    CASE sy-ucomm.
    WHEN c_main_tab-tab1.
    i_main_tab-pressed_tab = c_main_tab-tab1.
    i_main_tab-subscreen = '9100'.
    WHEN c_main_tab-tab2.
    i_main_tab-pressed_tab = c_main_tab-tab2.
    i_main_tab-subscreen = '9200'.
    WHEN OTHERS.
    DO NOTHING
    ENDCASE.
    ENDMODULE. " MAIN_TAB_ACTIVE_TAB_GET INPUT
    *& Module USER_COMMAND_9001 INPUT
    This is used for user command
    MODULE user_command_9001 INPUT.
    CASE sy-ucomm.
    WHEN 'BACK'.
    PERFORM exit_program.
    SET SCREEN '0'.
    WHEN 'EXIT' OR 'CANC'.
    PERFORM exit_program.
    LEAVE PROGRAM.
    ENDCASE.
    ENDMODULE. " USER_COMMAND_9000 INPUT
    For screen 9001 we need to write Flow logic as below. For subscreens, Flow logic is
    not required.
    PROCESS BEFORE OUTPUT.
    MODULE STATUS_9001.
    CALL SUBSCREEN main_tab_sca
    INCLUDING i_main_tab-prog i_main_tab-subscreen.
    PROCESS AFTER INPUT.
    MODULE user_command_9001.
    MODULE main_tab_active_tab_get.
    rgds,
    latheesh

  • How to create a top include for module pool program

    hi all..
      I want to add my global declarations in one top inlcude.. There are so many other includes in my pgm. But how can i create top include explicitly. Also I have one normal report pgm attached with this module pool.

    hi Cynthia ,
       there are two ways of creating a top include at your situation  ,
    1) Insert an include <Prog name >TOP  in your mpool program and cut n paste your declarations there .. check if this works ...
    2)else .. create another m pool program in SE80 , while creating a pop up will ask for with TOP include ... check mark that and then proceed ..
       anything of these two will work ...
    Reward if helpful !!
    Regards,
    Ranjita

  • Module pool  with object oriented programming

    can anyone send me links for module pool with object oriented programming.

    hi,
    some helful links.
    Go through the below links,
    For Materials:
    1) http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCABA/BCABA.pdf -- Page no: 1291
    2) http://esnips.com/doc/5c65b0dd-eddf-4512-8e32-ecd26735f0f2/prefinalppt.ppt
    3) http://esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
    4) http://esnips.com/doc/0ef39d4b-586a-4637-abbb-e4f69d2d9307/SAP-CONTROLS-WORKSHOP.pdf
    5) http://esnips.com/doc/92be4457-1b6e-4061-92e5-8e4b3a6e3239/Object-Oriented-ABAP.ppt
    6) http://esnips.com/doc/448e8302-68b1-4046-9fef-8fa8808caee0/abap-objects-by-helen.pdf
    7) http://esnips.com/doc/39fdc647-1aed-4b40-a476-4d3042b6ec28/class_builder.ppt
    8) http://www.amazon.com/gp/explorer/0201750805/2/ref=pd_lpo_ase/102-9378020-8749710?ie=UTF8
    1) http://www.erpgenie.com/sap/abap/OO/index.htm
    2) http://help.sap.com/saphelp_nw04/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm
    <u>Sample std pgms.</u>
    ABAP_OBJECTS_ENJOY_0           Template for Solutions of ABAP Object Enjoy Course
    ABAP_OBJECTS_ENJOY_1           Model Solution 1: ABAP Objects Enjoy Course      
    ABAP_OBJECTS_ENJOY_2           Model Solution 2: ABAP Objects Enjoy Course      
    ABAP_OBJECTS_ENJOY_3           Model Solution 3: ABAP Objects Enjoy Course      
    ABAP_OBJECTS_ENJOY_4           Model Solution 4: ABAP Objects Enjoy Course      
    ABAP_OBJECTS_ENJOY_5           Model Solution 5: ABAP Objects Enjoy Course      
    DEMO_ABAP_OBJECTS              Complete Demonstration for ABAP Objects          
    DEMO_ABAP_OBJECTS_CONTROLS     GUI Controls on Screen                           
    DEMO_ABAP_OBJECTS_EVENTS       Demonstration of Events in ABAP Objects          
    DEMO_ABAP_OBJECTS_GENERAL      ABAP Objects Demonstration                       
    DEMO_ABAP_OBJECTS_INTERFACES   Demonstration of Interfaces in ABAP Objects      
    DEMO_ABAP_OBJECTS_METHODS      Demonstration of Methods in ABAP Objects         
    DEMO_ABAP_OBJECTS_SPLIT_SCREEN Splitter Control on Screen
    Rgds
    Reshma

  • Module Pool ip Usr Name

    I have to develop a pgm using module pool
    INput:User name And Password..
    if any one type it has to update in a table... if any one modify the password that also have to be updated
    i want to use two buttons  one for update and other for modify in appln tool bar.. can any one give me the coding and step by step procedure...

    Hi Hema,
    Well, there's no need to use two buttons. MODIFY will help you achieve your goal. But still you can design whichever way it's comfortable for you. Use the approach given below:
    1. Create Screen '9000' and design screen according to your requirements. If you want to add, two buttons, you can do that in your GUI status. Assign a function code to the buttons. Set the OK_CODE for ypur screen elements
    2. in PAI, write two modules. First to handle the function code for MODIFY and UPDATe and other for at Exit Command.
    3. In Module for MODIFY and UPDATE, define two variables which will have exactly same name as the input fields for ID and password. Set these values to your table fields. Use MODIFY to update your table.
    (The point to note is, the variable names you have given to fields in your screen, and if you define them in your program, these program variables will contain the exact value what you have entered in the screen).
    Hope this helps.
    Cheers,
    Santosh Verma,
    Deloitte, India.

  • How to delete the row in table control with respect to one field in module pool programming?

    Hi,
    Can I know the way to delete the row in table control with respect to one field in module pool programming
    Regards
    Darshan MS

    HI,
    I want to delete the row after the display of table control. I have created push button as delete row. If I click on this push button, the selected row should get deleted.
    I have written this code,
    module USER_COMMAND_9000 input.
    DATA OK_CODE TYPE SY-UCOMM.
    OK_CODE = SY-UCOMM.
    CASE OK_CODE.
         WHEN 'DELETE'.
            LOOP AT lt_source INTO ls_source WHERE mark = 'X'.
                APPEND LS_SOURCE TO LT_RESTORE.
                DELETE TABLE LT_SOURCE FROM LS_SOURCE.
                SOURCE-LINES = SOURCE-LINES - 1.
            ENDLOOP.
    But I'm unable to delete the selected rows, It is getting deleted the last rows eventhough I select the other row.
    So I thought of doing with respect to the field.

  • How to use table maintenance view in module pool screen

    hi ,
    want to use table maintenance view in a module pool screen so that i can edit, insert, delete and update date in to the ztable.please help.

    You can simply call it via SM30.   Or you can call the table maintence view from any program(report or module pool) using a function module.
      call function 'VIEW_MAINTENANCE_CALL'
           exporting
                action                       = 'U'
                view_name                    = 'Z_Table_Name'
           exceptions
                client_reference             = 1
                foreign_lock                 = 2
                invalid_action               = 3
                no_clientindependent_auth    = 4
                no_database_function         = 5
                no_editor_function           = 6
                no_show_auth                 = 7
                no_tvdir_entry               = 8
                no_upd_auth                  = 9
                only_show_allowed            = 10
                system_failure               = 11
                unknown_field_in_dba_sellist = 12
                view_not_found               = 13
                others                       = 14.
    Regards,
    RIch Heilman

  • Error while transporting modification in module pool of a specific infotype

    HI experts,
    While transporting some modifications that have be done on the PAI of a module pool of a specific infotype, we have an error with code return = 8, the error is --> Original object R3TRPROGMP900730 must not be changed!!!
    Any suggestion .
    Tanhks a lot .

    Hi ,
    Nice to know that your problem is solved. If any of the replies were usefull please acknowledge their work.
    And it would be great if you can just put in your remarks about the best  solution you had in solving that problem.
    It might be useful to other users when they encoutner such problem.
    BR,
    Vijay.

  • Getting error while calling a subscreen in  module pool program

    HI  ALL,
                         ACTUALLY I'M GETTING A SYNTAX ERROR WHILE I'M CALLING A SUBSCREEN
                       IN A MODULE POOL PROGRAM IN PAI MODULE
                       THE ERROR IS AS FOLLOW
                           "." or "ID ... FIELD ..." expected after "SUBSCREEN"
                        CAN ANYBODY PLS HELP ME.
    REGARDS
    ANDREWS

    HI MAX ,
                      THE CODE IS AS FOLLOWS:
    *& Report  ZTABSTRIP_PS
    REPORT  ZTABSTRIP_PS.
    type-pools : vrm.
    DATA:number1 type I,
         number2 type I,
         result  type I,
         ok_code like SY-UCOMM,
         employee1 type c,
         ABAP(19)    type c,
         SALES(19)  type c,
         HR(19)      type c,
         MM(19)     type  c,
    employee type c.
        emp type c.
    CONTROLS  tabstrip TYPE TABSTRIP.
    CALL SCREEN 100.
    call screen 110.
    call screen 130.
    call screen 120.
    call screen  140.
    *&      Module  STATUS_0100  OUTPUT
          text
    MODULE STATUS_0100 OUTPUT.
      SET PF-STATUS 'STATUS'.
      SET TITLEBAR 'TITLE'.
      CASE OK_CODE.
        WHEN 'BACK' or 'EXIT' or 'DELETE'.
         leave program.
         WHEN 'SAVE'.
           MESSAGE 'please choose a valid function' TYPE 'I'.
       WHEN 'BACK'.
        leave PROGRAM.
    when  'EXIT' or 'DELETE'.
        leave to screen 0.
        WHEN 'SAVE'.
          MESSAGE 'please choose a valid function' TYPE 'I'.
    endcase.
    ENDMODULE.                 " STATUS_0100  OUTPUT
    *&      Module  USER_COMMAND_0100  INPUT
          text
    MODULE USER_COMMAND_0100 INPUT.
    CASE OK_CODE.
      when 'TAB1'.
    tabstrip-activetab = 'TAB1'.
       when 'TAB2'.
    tabstrip-activetab = 'TAB2'.
    result = number1 + number2.
       when 'TAB3'.
      tabstrip-activetab = 'TAB3'.
    SET TITLEBAR 'TITLE1'.
      when 'TAB4'.
        tabstrip-activetab = 'TAB4'.
       if employee = 'NEERAJ'.
         ABAP = 'NEERAJ'.
       elseif employee = 'UMESH'.
         SALES = 'UMESH'.
       ELSEIF employee = 'RAM'.
         HR = 'RAM'.
       elseif employee = 'ANIL'.
         MM = 'ANIL'.
         endif.
       employee = employee.
    WHEN 'BACK'.
        leave PROGRAM.
    when  'EXIT' or 'DELETE'.
        leave to screen 0.
        WHEN 'SAVE'.
          MESSAGE 'please choose a valid function' TYPE 'I'.
    ENDCASE.
       WHEN 'BACK' or 'EXIT' or 'DELETE'.
         leave program .
         WHEN 'SAVE'.
           MESSAGE 'please choose a valid function' TYPE 'I'.
    endcase.
    ENDMODULE.                 " USER_COMMAND_0100  INPUT
    *&      Module  STATUS_0110  OUTPUT
          text
    **MODULE STATUS_0110 OUTPUT.
    SET PF-STATUS 'STATUS1'.
    SET TITLEBAR 'xxx'.
    **case ok_code.
    **WHEN 'back' or 'exit' or 'delete'.
        leave PROGRAM.
        WHEN 'save'.
          MESSAGE 'please choose a valid function ' TYPE 'W'.
    ENDCASE.
    **ENDMODULE.                 " STATUS_0110  OUTPUT
    *&      Module  USER_COMMAND_0110  INPUT
          text
    MODULE USER_COMMAND_0110 INPUT.
      number1 = number1.
      number2 = number2.
    CLEAR NUMBER1.
    CLEAR NUMBER2.
    REFRESH NUMBER1.
    REFRESH NUMBER2.
    ENDMODULE.                 " USER_COMMAND_0110  INPUT
    *&      Module  STATUS_0130  OUTPUT
          text
    MODULE STATUS_0130 OUTPUT.
    SET PF-STATUS 'STATUS2'.
    SET TITLEBAR 'xxx'.
    RESULT = number1 + number2.
    *CLEAR RESULT.
    REFRESH RESULT.
    ENDMODULE.                 " STATUS_0130  OUTPUT
    *&      Module  STATUS_0120  OUTPUT
          text
    MODULE STATUS_0120 OUTPUT.
    SET PF-STATUS 'xxxxxxxx'.
    SET TITLEBAR 'xxx'.
    DATA:  l_name TYPE vrm_id,
            li_list TYPE vrm_values,
            l_value LIKE LINE OF li_list.
      l_value-key = '1'.
      l_value-text = 'ANIL'.
      APPEND l_value TO li_list.
      CLEAR l_value.
    CLEAR li_list.
      l_value-key = '2'.
      l_value-text = 'RAM'.
      APPEND l_value TO li_list.
      CLEAR l_value.
    CLEAR li_list.
      l_value-key = '3'.
      l_value-text = 'NEERAJ'.
      APPEND l_value TO li_list.
      CLEAR l_value.
    CLEAR li_list.
      l_value-key = '4'.
      l_value-text = 'UMESH'.
      APPEND l_value TO li_list.
      CLEAR l_value.
    CLEAR li_list.
    l_name =  'employee'.
      CALL FUNCTION 'VRM_SET_VALUES'
        EXPORTING
          ID                    =  l_name
          VALUES                =  li_list
       EXCEPTIONS
         ID_ILLEGAL_NAME       = 1
         OTHERS                = 2
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    CLEAR li_list.
    ENDMODULE.                 " STATUS_0120  OUTPUT
    *&      Module  USER_COMMAND_0120  INPUT
          text
    MODULE USER_COMMAND_0120 INPUT.
    INCLUDING sy-repid '140'.
    employee1 = employee.
    IF employee1 CS 'NEERAJ'.
      call SUBSCREEN    sub4  .
      ABAP = 'NEERAJ'.
      CLEAR ABAP.
    ELSEIF employee1 CS 'UMESH'.
       call SUBSCREEN  sub4  .
        SALES = 'UMESH'.
        CLEAR SALES.
    elseif employee1 CS 'RAM'.
      call SUBSCREEN sub4 .
       HR = 'RAM'.
       CLEAR  HR.
    ELSEIF employee1 CS 'ANIL'.
       call SUBSCREEN sub4 .
       MM = 'ANIL'.
       CLEAR MM.
       endif.
    ENDMODULE.                 " USER_COMMAND_0120  INPUT
    *&      Module  STATUS_0140  OUTPUT
          text
    MODULE STATUS_0140 OUTPUT.
    *CASE OK_CODE.
       WHEN employee1  'NEERAJ'.
         screen-active = 1.
         ABAP = 'NEERAJ'.
       WHEN employee1 = 'UMESH'.
         screen-active = 1.
         SALES = 'UMESH'.
       WHEN employee1 = 'RAM'.
         screen-active = 1.
         HR = 'RAM'.
       WHEN employee1 = 'ANIL'.
         screen-active = 1.
         MM = 'ANIL'.
         endif.
    *ENDCASE.
    ENDMODULE.                 " STATUS_0140  OUTPUT

  • Module pool - table control - update ztable

    hello , i doing a module pool that will have few screens , now i have one screen with a table control that fetch the data from a ztable when screen is call the table control is showing the data and is in grey and no editable i add a pf-status for change that mode i can delete the row from the table control but i don't figure out how update to the ztable when i press save , i wan't too another button for add a new row ( and remain the already in grey ) for add new entrie in the table and update the ztable
    pd: sorry for my bad english
    this is my code:
    TOP:
    PROGRAM  z_pp_lote_etiquetas MESSAGE-ID zz.
    TABLES:zc2p_lote_etique,
           zc2p_lider_modul.
    DATA: ok_code LIKE sy-ucomm.
    DATA save_ok LIKE sy-ucomm.
    * internal table
    DATA: it_zc2p_lote_etique LIKE STANDARD TABLE OF zc2p_lote_etique.
    DATA: it_zc2p_lider_modul TYPE STANDARD TABLE OF zc2p_lider_modul WITH HEADER LINE.
    DATA: it_zc2p_lider_modul_del TYPE STANDARD TABLE OF zc2p_lider_modul WITH HEADER LINE.
    **************Workarea
    DATA: wa_c2p_lote_etique TYPE zc2p_lote_etique.
    DATA: wa_c2p_lider_modul TYPE zc2p_lider_modul.
    DATA: wa_c2p_lider_modul_del TYPE zc2p_lider_modul.
    DATA: sel.
    DATA: MARK.
    DATA: init.
    DATA:  col TYPE scxtab_column.
    DATA: lines TYPE i.
    * Variable Declaration
    DATA : flg, "Flag to set the change mode
    ln TYPE i. "No. of records
    * Table Control Declartion.
    CONTROLS: zc2p_lider_crtl TYPE TABLEVIEW USING SCREEN '101'.
    **PROCESS BEFORE OUTPUT INCLUDE **
    *&  Include           Z_PP_LOTE_ETIQUETAS_O01
    *& Module set_status OUTPUT
    * Setting the GUI status
    MODULE status_0100 OUTPUT.
      SET PF-STATUS 'Z_PP_LOT_ETIQ_MENU'.
      SET TITLEBAR 'Z_PP_LOT_ETIQ'.
    ENDMODULE. " set_status OUTPUT screen 100
    *  MODULE status_0101 OUTPUT
    * Setting the GUI status
    MODULE status_0101 OUTPUT.
      SET PF-STATUS 'Z_PP_LOT_ETIQ_ME_101'.
      SET TITLEBAR 'Z_PP_LOT_ETIQ'.
    * Data retreving
      if init is INITIAL.
      select * from zc2p_lider_modul into CORRESPONDING FIELDS OF TABLE it_zc2p_lider_modul.
        DESCRIBE TABLE it_zc2p_lider_modul LINES ln.
        zc2p_lider_crtl-lines = ln + 10.
        init = 'X'.
    endif.
    ENDMODULE.                    "status_0101 OUTPUT
    module change_sdyn_conn output.
    * you can change the content of current table control line via
    * sdyn_conn
      READ TABLE it_zc2p_lider_modul INTO zc2p_lider_modul INDEX zc2p_lider_crtl-current_line.
    endmodule.                             " FILL_TABLE_CONTROL  OUTPUT
    MODULE set_screen_fields OUTPUT.
    LOOP AT SCREEN.
    IF flg IS INITIAL.
    screen-input = 0.
    ELSE.
    screen-input = 1.
    ENDIF.
    *ENDIF.
    * Modifying the screen after making changes
    MODIFY SCREEN.
    ENDLOOP.
    ENDMODULE. " set_screen_fields OUTPUT
    PROCESS AFTER INPUT INCLUDE.
    *  MODULE USER_COMMAND_0100 INPUT
    MODULE user_command_0100 INPUT.
      CASE ok_code.
        WHEN 'LIDM'.
          CALL SCREEN 101.
        WHEN 'CANC'.
          LEAVE PROGRAM.
        WHEN 'BACK'.
          LEAVE PROGRAM.
        WHEN 'EXIT'.
          LEAVE PROGRAM.
      ENDCASE.
    ENDMODULE.                    "USER_COMMAND_0100 INPUT
    *  MODULE USER_COMMAND_0101 INPUT
    MODULE user_command_0101 INPUT.
      save_ok = ok_code.
      CLEAR ok_code.
      CASE save_ok.
        WHEN 'SORT'.
          DATA: fldname(100),help(100).
          READ TABLE zc2p_lider_crtl-cols INTO col WITH KEY selected = 'X'.
          SPLIT col-screen-name AT '-' INTO help fldname.
          SORT it_zc2p_lider_modul BY (fldname).
        WHEN 'CHANGE'.
    * Setting the flag to make the table control in editable mode[excluding
    * primary key].
          flg = 'Y'.
        WHEN 'BACK'.
          CALL SCREEN 100.
          LEAVE SCREEN.
        WHEN 'CANCEL'.
          LEAVE PROGRAM.
        WHEN 'EXIT'.
          LEAVE PROGRAM.
        WHEN 'SAVE'.
          MODIFY  zc2p_lider_modul FROM it_zc2p_lider_modul.
          COMMIT WORK.
      ENDCASE.
    ENDMODULE.                    "USER_COMMAND_0101 INPUT
    *  MODULE read_table_control INPUT
    MODULE read_table_control INPUT.
    * Check input values
      IF mark = 'X' AND save_ok = 'DELETE'.
        DELETE TABLE it_zc2p_lider_modul FROM zc2p_lider_modul.
        DESCRIBE TABLE it_zc2p_lider_modul LINES zc2p_lider_crtl-lines.
      ENDIF.
    ENDMODULE.                             " READ_TABLE_CONTROL  INPUT
    Screen Flow Logic 100
    PROCESS BEFORE OUTPUT.
    MODULE status_0100.
    PROCESS AFTER INPUT.
    MODULE user_command_0100.
    Screen Flow Logic 101.
    PROCESS BEFORE OUTPUT.
      MODULE status_0101.
      LOOP AT it_zc2p_lider_modul INTO zc2p_lider_modul WITH CONTROL
    zc2p_lider_crtl.
    * Dynamic screen modifications
        MODULE set_screen_fields.
        MODULE change_sdyn_conn.
      ENDLOOP.
    PROCESS AFTER INPUT.
      MODULE user_command_0101.
      LOOP AT it_zc2p_lider_modul.
        MODULE read_table_control.
      ENDLOOP.
    i hope somebody can help for what i missing here  thanks

    >
    Sanjeev Kumar wrote:
    > Hello Edgar,
    >
    > Problem seems to be there in the flow logic of 101
    >
    >
    > PROCESS BEFORE OUTPUT.
    >   MODULE status_0101.
    >   LOOP AT it_zc2p_lider_modul INTO zc2p_lider_modul WITH CONTROL
    > zc2p_lider_crtl. " no need to have 'INTO zc2p_lider_modul' above
    > * Dynamic screen modifications
    >     MODULE set_screen_fields.
    >     MODULE change_sdyn_conn.
    >   ENDLOOP.
    > *
    > PROCESS AFTER INPUT.
    >   MODULE user_command_0101. "this should be shifted after the following LOOP...ENDLOOP.

    >   LOOP AT it_zc2p_lider_modul. "need to have 'WITH CONTROL zc2p_lider_crtl' here
    >     MODULE read_table_control.
    >   ENDLOOP.
    >
    >
    >
    > With MODULE user_command_0101 call before the LOOP calls the MODIFY statement (under case save_ok 'SAVE') first and Z-table is updated with the old values as the changes are transferred from screen into the internal table it_zc2p_lider_modul in the LOOP...ENDLOOP later.
    >
    > Try these changes and I hope it will work.
    >
    > Thanks
    > Sanjeev
    i do the firts advice but the second one i get syntax error :
    my code :
    PROCESS AFTER INPUT.
      LOOP  at it_zc2p_lider_modul WITH CONTROL zc2p_lider_crtl.
        MODULE read_table_control.
      ENDLOOP.
       MODULE user_command_0101.
    error :
    In the event PROCESS AFTER INPUT, no additions are allowed with "LOOP     
    AT".

Maybe you are looking for