MODULE POOL:MAKING A PARAMTER FIELD INVISBLE

Hi Experts,
i have screen 9000 on which there are 2 radio buttons for 'YES' and "NO'
when i click on "YES" , on screen 9001(next screen to 9000), the field "Name " should be displayed.
when i click on "NO",  on screen 9001(next screen to 9000), the field "NAme" should not be displayed.
How to achieve this module pool??? kindly help.

Hi
In Screen 9001 keep a field (V_NAME) for displaying the Name or NAme
in 9000 PAI based on the radio button populate that value to that field v_name
if r1 = 'X'.
  v_name = 'Name'.
else.
  v_name  = 'NAme'.
endif.
Check the below link:
http://wiki.ittoolbox.com/index.php/FAQ:What_is_module_pool_program_in_abap%3F
http://help.sap.com/saphelp_46c/helpdata/en/35/26b1aaafab52b9e10000009b38f974/content.htm
http://sap.mis.cmich.edu/sap-abap/abap09/sld011.htm
http://sap.mis.cmich.edu/sap-abap/abap09/index.htm
http://www.geocities.com/ZSAPcHAT
http://www.allsaplinks.com/files/using_table_in_screen.pdf
http://help.sap.com/saphelp_webas630/helpdata/en/9f/db9cdc35c111d1829f0000e829fbfe/content.htm
http://www.sapdevelopment.co.uk/dialog/dialoghome.htm
http://www.sap-img.com/
http://help.sap.com/saphelp_46c/helpdata/en/08/bef2dadb5311d1ad10080009b0fb56/content.htm
http://www.sapgenie.com/links/abap.htm
http://help.sap.com/saphelp_nw04/helpdata/en/c9/5472fc787f11d194c90000e8353423/frameset.htm
You can also check the transaction ABAPDOCU which gives you lot of sample programs.
Also you can see the below examples...
Go to se38 and give demodynpro and press F4.
YOu will get a list of demo module pool programs.
One more T-Code is ABAPDOCU.
YOu can find more examples there.
See the prgrams:
DEMO_DYNPRO_TABLE_CONTROL_1 Table Control with LOOP Statement
DEMO_DYNPRO_TABLE_CONTROL_2 Table Control with LOOP AT ITAB
http://www.geocities.com/ZSAPcHAT
http://www.allsaplinks.com/files/using_table_in_screen.pdf
Regards
anji

Similar Messages

  • Module pool to create input field dynamically.

    Hi All,
    I have a requirement in module pool programming,
    Where I have one input field,based on the value given in this input I have to get the
    input fields dynamically in the screen.
    Is it possible to achieve this?
    If yes, please do tell me the solution to approach this requirement.
    With Regards,
    S.Asha.

    Hi,
    You can use IMPORT DYNPRO / EXPORT DYNPRO.
    Please check this URL: [Import/Export dynpro not working|Import/Export dynpro not working]
    [EXPORT DYNPRO or GENERATE DYNPRO|EXPORT DYNPRO or GENERATE DYNPRO]
    Cheers,

  • Current time in module pool programming in text field

    Hello Friends,
    In module pool programming ther is a input output field for time i want the current system time should be displayed in that field and when user press saves tht time should get saved in the database tables.
    regards,
    Sunny

    Hi, sunny,
    If I understand your question correctly than I think that the following code will help you, you will have to write this code in the called program means where you are calling your screens.
    data: tf_rec_no(10). u201Ctf_rec_nou201D is the field name on your screen
    initialization.
    write: sy-uzeit to tf_rec_no.
    after this you can update db using this field.
    Replay if any problem or you have some different query.
    Kind Regards,
    Faisal.

  • How to create a Drop down with values in Module Pool for a screen field.

    Hi all,
    I have created a Screen on which one field is created Say Bank Name. I would like to give some spcific value for this fileld where user can select only seeing in drop down cann't enter.
    Can anyone tell how can we do it ?

    Hi,
    The selected value key will be stored in the parameter.
    eg: Refer below code. Here if i select Vinod then po_name will be 1. After this read i_values WITH this key and get the actual value.
    PARAMETERS: po_name(30) TYPE c VISIBLE LENGTH 20 AS LISTBOX.
    TYPE-POOLS: VRM.
    DATA: i_values TYPE vrm_values,
          wa_values LIKE LINE OF i_values.
    AT SELECTION-SCREEN OUTPUT.
      wa_values-key = '1'.
      wa_values-text = 'Vinod'.
      APPEND wa_values TO  i_values.
      wa_values-key = '2'.
      wa_values-text = 'Kumar'.
      APPEND wa_values  TO i_values.
      wa_values-key = '3'.
      wa_values-text = 'Reddy'.
      APPEND wa_values  TO i_values.
      CALL FUNCTION 'VRM_SET_VALUES'
           EXPORTING
                id              = 'PO_NAME'
                values          = i_values
           EXCEPTIONS
                id_illegal_name = 1
                OTHERS          = 2.
    START-OF-SELECTION.
    READ TABLE i_values INTO wa_values WITH KEY key = po_name.
    MOVE wa_values-text TO w_name. " This will be ur actual value.
    Thanks,
    Vinod.
    Edited by: Vinod Reddy Vemuru on Jul 8, 2008 4:16 PM

  • Module Pool : queries related to fields

    Hi,
    I have three fields in screen.
    say f1, f2 and f3.
    i fill f1, f2 and f3.
    now there is a validation for f1 and f3. these fields are linked. and if the entered value is not liniked then it displays a error.
    and screen is again available for input.
    but second time only F1 and F3 allows values to be entered. and not F2. Second time after error message field F2 goes into display mode and is not editable. and shows only previous value.
    can anybody help here. is there any setting i need to take care off.
    Thanks in advance.
    Hem

    Hem,
    Not seeing you code, this is an educated guess.
    Your chain statement in the PAI routine must contain all the fields that are editable IF there is an error.
    Therefore, you likely have coded
    CHAIN:
      FIELDS: F1, F3.
      MODULE EDIT_F1_F3.
    ENDCHAIN.
    If you want F2 to be editable before the error is complete corrected, add F2 to the Chain list
    CHAIN:
      FIELDS: F1, F2, F3.
      MODULE EDIT_F1_F3.
    ENDCHAIN.

  • Module Pool:editable field not changing

    Hi All,
    I created one module pool program with three fields MATNR,EBELN,KTMNG(qty). KTMNG is user key in accordingly to create delivery order.
    Now the problem is when user key in KTMNG field value let say 10.000.when press enter Again its taking the database value(20.000 for example).
    how to keep the user key value 10.000.
    here is my coding:
    PROCESS BEFORE OUTPUT.
    LOOP AT ITAB INTO WA WITH CONTROL tabcontrol.
    MODULE STATUS_0100.
       ENDLOOP.
    PROCESS AFTER INPUT.
    MODULE USER_COMMAND_0100.
       LOOP AT ITAB.
         ENDLOOP.
    MODULE USER_COMMAND_0100 INPUT.
      CASE SY-UCOMM.
        WHEN 'DIS'.
          REFRESH:ITAB.
          SELECT EBELN MATNR KTMNG INTO CORRESPONDING FIELDS OF TABLE ITAB FROM EKPO
                                                    WHERE EBELN EQ EKPO-EBELN.
        WHEN 'EXIT'.
          LEAVE PROGRAM.
      ENDCASE.
    ENDMODULE.                 " USER_COMMAND_0100  INPUT
    MODULE STATUS_0100 OUTPUT.
      SET PF-STATUS 'ZTESTING'.
      SET TITLEBAR 'ZTEST'.
      MOVE:WA-EBELN TO EKKO-EBELN,
           WA-KTMNG TO EKPO-KTMNG,
           WA-MATNR TO EKPO-MATNR.
      VCONTROL-LINES = SY-DBCNT.
    ENDMODULE.   
    Please help me.
    Thank You,
    Anu.

    PROCESS BEFORE OUTPUT.
    LOOP AT ITAB INTO WA WITH CONTROL tabcontrol.
      MODULE STATUS_0100.
        ENDLOOP.
    PROCESS AFTER INPUT.
      MODULE USER_COMMAND_0100.
        LOOP AT ITAB.
    "  add this
          CHAIN.
            FIELD EKKO-EBELN.
            FIELD EKPO-KTMNG.
            FIELD EKPO-MATNR.
            Modify tablecontrol.
         ENDCHAIN.
      ENDLOOP.
    MODULE USER_COMMAND_0100 INPUT.
       CASE SY-UCOMM.
         WHEN 'DIS'.
    "  Comment this start and Pushi to PBO and check if  ITAB  is initial then do below Qyery
           REFRESH:ITAB.
           SELECT EBELN MATNR KTMNG INTO CORRESPONDING FIELDS OF TABLE ITAB FROM EKPO
                                                     WHERE EBELN EQ EKPO-EBELN.
    " Comment this end
         WHEN 'EXIT'.
           LEAVE PROGRAM.
       ENDCASE.
    ENDMODULE.                 " USER_COMMAND_0100  INPUT
    MODULE STATUS_0100 OUTPUT.
       SET PF-STATUS 'ZTESTING'.
       SET TITLEBAR 'ZTEST'.
       MOVE:WA-EBELN TO EKKO-EBELN,
            WA-KTMNG TO EKPO-KTMNG,
            WA-MATNR TO EKPO-MATNR.
       VCONTROL-LINES = SY-DBCNT.
    ENDMODULE.   
      MODULE TABLECONTROL OUTPUT.        "New addition in PAI for Modify
      MOVE:EKKO-EBELN TO WA-EBELN,
            EKPO-KTMNG TO WA-KTMNG  ,
            EKPO-MATNR TO WA-MATNR .
      MODIFY ITAB FROM wa    INDEX tabcontrol-current_line
    ENDMODULE

  • Custom module pool + Amount field decimals display same as standard screen display

    Hi All,
    Requirement: A custom module program screen field has to be designed which displays decimal values of amount fields same as amount fields in standard screen.
    Standard screen behavior: If the standard screen fields are observed, they refer to data elements WRBTR or AZSOL_F05A (transactions FB50/FB03/FB01). However, number of decimal places that are visible on screen are dependent on the currency that is provided.
    Both the data elements have 2 decimal places.
    For currency USD two decimal places are displayed - in TCURX - decimal places are two.
    For currency JPY or CLP - zero decimal places are displayed  - in TCURX - decimal places are zero.
    i.e., even though the screen field refers to data element or domain that has the characteristic to show 2 decimal places, based on currency, decimal places are adjusted.
    I would like to know how this is happening on standard screen fields.
    Solution Required for: How to make the custom screen amounts to display same number of decimal places as standard screen amount fields.
    P.S: Before posting the query here, research has been done in SDN and other places. It has been identified that quantity fields adjustments are discussed. However for amount field even though discussed earlier, did not reach a conclusion.
    I would like to get a solution for this one.
    Thanks in advance.
    Goutham.

    Thank you all for taking time to take a look at this query.
    This issue has been resolved.
    Resolution: If the standard transactions (FI transactions in specific) are observed, whenever there is a field that displays amount value, there will be a corresponding field (may not be beside the amount field, somewhere on the screen or in the same sequence of screens) where the currency key value would be entered.
    For instance, if you look at FB50 - there is field on top for the user to input currency key value (like USD or CLP or INR).
    When any amount field is declared - this currency key field is provided as the reference field in the screen attributes of the amount field.
    In short, in the custom module pool program, provide a field that holds currency key value and use this field as reference field for the amount fields.
    Do repond to this thread if the resolution is not clear.
    Thank you all once again.
    Goutham.

  • Input must bein module pool and the output should be in ALV report

    Dear Friends,
    Greetings.....................
    Please give me solution for my problem.
    Consider there is one module pool screen with the fields empno, edob, ecity.There is one search button.if the user clicks the search button.it should display the employee details based on empno and output must be in ALV reports.
    Thanks in advance
    Raj

    Hi,
    Try to use
    call function 'REUSE_ALV_POPUP_TO_SELECT'
           exporting
                i_title               = text-021
                i_zebra               = 'X'
                i_tabname             = 'P_YSIZE1'
                it_fieldcat           = p_fieldcat[]
                it_excluding          = p_excltab[]
                i_screen_start_column = 02
                i_screen_start_line   = 02
                i_screen_end_column   = 45
                i_screen_end_line     = 15
           importing
                e_exit                = p_exit
                es_selfield           = p_selfield
           tables
                t_outtab              = p_ysize1.

  • Module pool custom fiel ZTEST doesen't memorize value

    hello, i have create a module pool with a custom field ZTEST declared in the TOP include. The same name i have declared in the Dympro '0100'. In the after input i tried to get the value but the variable ZTEST doesen't contains value also if i have filled in the dympro; infact when i press "enter button" the value is not saved in the CHAIN ENCHAIN.
    Why?
    Please help me
    Marco

    Please check if there is any FIELD statement with the new field in the screen flow logic, viz.,
    FIELD ZTEST
    the system transfers the values of the screen fields to the program fields only after the FIELD statement

  • Date in Module pool !!

    Hi,
    I want to show a date field in Module pool Screen. I need this date field should have Search help and Auto Validation.
    Should i declare date field in Module pool as
    data: v_date(10).
    OR
    data: v_date like sy-datum.

    Hi,
    You need to take the field as
    <b>data: v_date like sy-datum.</b>
    Inthe module pool you create the field in the Screen, then double click on the field then Attributes window will open there the Type will be there for this field, select DATS there to check the field validation
    Regards
    Sudheer

  • How to write module pool program

    hai,
    what is the module -pool program ?
    what are the procedures to write the module-pool program.
    plz give the simple program for module-pool programs?
    regards
    surender

    Hi
    This component though is not attached to the screen painter, plays important role in transaction. Normally, for reports, on line executable programs are written but for transaction, Module Pool Programs are written. The module pool program contains only modules to handle various events associated with screen and data declaration statements.
    System divides the module pool program into several include program. These are global field, PBO modules, and PAI modules. It is entirely user’s decision whether to use these modules or write directly into main program.
    Creation of Module Pool Program
    You can create module pool program either through
    Object browser
    System automatically creates the module pool program and for these program which are created through object browser, system creates the include modules.
    Or
    ABAP/4 editor
    It is similar to normal program creation. Type of program should be given ‘M’ and is not created by system.
    Communication between Dynpro and Module Program
    For each screen, the system executes the flow logic, which contains corresponding events. The control is passed to Module Pool Program. Module Pool Program handles the code for these events and again passes back control to the flow logic and finally to screen. Unlike on line program, in this case, the control remains with flow logic. The switching of control between flow logic and module pool program and back is common process when user executes transaction.
    Creation of a Complete Transaction
    Steps involved to create a complete transaction
    •     Create module pool program.
    •     From screen painter create screens.
    •     Write flow logic for each screen.
    •     Write code for all the events in module pool program.
    •     Check for any error in screen and flow logic.
    •     Generate each and every component of screen i.e. flow logic and screen.
    •     Single screen can be tested using Screen Painter.
    •     Create transaction code through object browser.
    •     Generate the transaction code.
    •     User can execute the transaction by entering the transaction code in the command field.
    Handling Function Code
    The function code or OKCODE is the last field of Field list. Function code can be handled as follows:
    During the Designing of the screen, a function code is assigned to pushbutton.
    •     In field list, developer needs to specify OKCODE as last field.
    •     In module program it is a global field and can be evaluated in the PAI event.
    •     A function code is treated in the same way, regardless it comes from pushbutton, menu item or any other GUI element.
    When the user clicks on the Display button, you want to display details of sflight, with corresponding carrid and connid (which is entered by the user).
    Module pool program to handle this particular screen is as follows:
    Program YVTEST7.
    TABLES: SFLIGHT.
    DATA: OKCODE (4).
    MODULE INPUT1 INPUT,
    CASE OKCODE.
       WHEN ‘DISP’.
         SELECT * FROM SFLIGHT
                WHERE CARRID =  SFLIGHT – CARRID AND
                               CONNID = SFLIGHT – CONNID.
         ENDSELECT.
         LEAVE TO SCREEN 200.
       WHEN ‘EXIT’.  LEAVE TO SCREEN 0.
      ENDCASE.
    ENDMODULE.               “INPUT1 INPUT
    MODULE USER_COMMAND_0200 INPUT.
    CASE OKCODE.
    WHEN ‘BACK’. LEAVE TO SCREEN 100.
    ENDCASE.
    ENDMODULE.                    “USER_COMMAND_0200 INPUT
    When the user clicks on display, control is transferred to screen no. 200 on which you display sflight details & on the same screen, when user clicks on BACK button, he comes back to main screen.
    Flow logic for screen 100 is as follows:
    PROCESS AFTER INPUT.
    MODULE INPUT.
    Flow logic for screen 200
    PROCESS AFTER INPUT.
    USER_COMMAND_0200.
    MODULES: Modules are handled in module pool program.
    You need to write flow logic for screen 200 and design screen 200.
    In case of transaction transfer of data from program to screen is automatic i.e. you need not transfer the data from program to screen explicitly. The fields, which you define in the screen receives the data from program and displays the same.
    The Field Checks
    As already mentioned Transaction is the only method, which SAP recommends to update the database tables. Data entered in the database table should be valid and correct. Data entered is validated at each and every point. ABAP/4 offers various methods to validate data and those are as follows:
    •     Automatic field checks
    •     Checks performed in the flow logic
    •     Checks performed in the ABAP/4 module pool program
    Automatic Field Checks
    These checks are based on the field information stored in the dictionary. These checks are performed by the system automatically when the user enters the data for the screen field. System performs these checks before PAI event is triggered. Types of field checks performed by system are as follows:
    •     Required input
    While designing the screen, for particular screen field if you click the Req. Entry checkbox, the field becomes mandatory. When the transaction is executed if user leaves this particular field blank, the system displays error message. User cannot proceed until the user enters some data.
    •     Proper Data Format
    Each field has its own data format whether it is table field or screen field. Whenever data is entered, system checks for the proper format of the data. For example date. Each user has its own format for date, which is defined in the user master record. If the date defined in the user master record is in the format DD/MM/YYYY, if the user enters the date, say, in YY/DD/MM, the user displays the error message. System also checks for the value of month or days. For example if month entered is greater than twelve then the error message is displayed.
    •     Valid Value for the Field
    In data dictionary two tables are related by Primary key-Foreign key relationship.  Whenever the user enters the data, the system checks for the check table values.   Also in Domain, if you have fixed values, then the system checks for these values.
    Automatic field checks are repeated each time the user enters the data.
    About at Exit – Command
    Automatic field checks can be avoided by AT EXIT-COMMAND, which works exactly the same way as Cancel works on application tools bar. In the R/3 screen, if you want to quit the processing of that particular screen without entering the mandatory fields, user can click the Cancel button. Same functionality can be incorporated in the user-defined transaction by using AT EXIT-COMMAND. This module can be called before the system executes the automatic field checks and it goes without saying that before PAI event. Code for AT EXIT-COMMAND in flow logic and in module pool program can be written as follows:
    In Flow Logic
    Process After Input.
    Module exit AT EXIT-COMMAND.
             In module pool program.
    Module exit.
    Case okcode.
    When ‘Exit’.
    Leave to screen 0.
    To achieve this kind of functionality a pushbutton or menu item should be assigned a function type ‘E’. It tells the system to process this particular module before carrying out any field checks.
    Flow Logic Validations
    Consider the case where you want user to enter only ‘LH’ and ‘SQ’ for sflight-carrid. In this case, you are restricting value of a screen field. This cannot be achieved by automatic field check. Hence there is a need of additional validation. It can be done in flow logic by using following statement:
    Field -
    Values
    Syntax
    PAI.
    Field sflight-carrid values (‘LH’).
    For multiple values
    PAI.
    Field sflight-carrid values (‘LH’ ‘SQ’).
    Field sflight-price values (between 1000 and 2000).
    In this case when the user enters the value, PAI is triggered  and field is checked for  that particular value. If the value entered happens to be wrong, that field is enabled for user to enter. If you have multiple Field statements in your flow logic, it is sequential execution.
    Consider the following case:
    PAI.
    Module  assign.
    Field sflight-carrid values (‘LH’ ‘SQ’).
    In ABAP/4
    Module  assign.
    Data: carrid1 like sflight-carrid.
    Carrid1 = sflight-carrid.
    Endmodule.
    In this case, Sflight-carrid is used in the flow logic before the field statement. The system will give invalid value or some previous value as the field sflight-carrid is used in module before it is checked i.e., field statement is after the module in which sflight-carrid is being used. The field is not available to the system unless it executes the field statement. Field statement transfers the values to the program and is done only once. If you don’t have Field statement in your flow logic, transfer of values takes place in PAI event.
    Consider one more case where you have multiple field statement
    PAI.
    Field Sflight-carrid values (‘LH’).
    Field Sflight-connid values (‘0400’ ‘0500’).
    In this case if the user enters only carrid wrong, then this particular field is enabled and rest of the fields are disabled for user to input. Many times if the user enters wrong value for one field, then you might want to give option to user to enter all the fields, which is not possible by using Field statement only. This functionality can be achieved by CHAIN – ENDCHAIN.
    Syntax
    Chain.
    Field sflight-carrid value (‘LH’).
         Field sflight-connid values (between ‘200’ and ‘500’).
    Endchain.
    Field sflight-price values (‘100’ ‘1000’).
    In this case, if the user enters wrong value only for carrid, both the fields i.e. carrid and connid are enabled as they are grouped together in the Chain statement. The field price will be disabled for input. Usually, logically related fields are grouped together with Chain-Endchain statement.
    Module Pool Program Validations
    Checking fields ABAP/4 program includes
    •     Field statement in flow logic.
    •     Module statement in ABAP/4 module pool Program.
    Syntax
    PAI.
    Field sflight-carrid module <name>.
    This module can be handled in the main program i.e. module pool program.
    In ABAP/4 program
    Module Check.
    Select single * from sflight where carrid = sflight-carrid.
    If sy-subrc ne 0.
         Message e001.
    Endif.
    In this case, field sflight-carrid is checked in the table for its existence.
    Dynamically Calling the Screens
    About Displaying Next Screen
    Transaction is a sequence of screens, which are displayed one after the other. The next screen displayed depends upon the attributes of first screen. In attributes you need to give Next Screen number i.e. if next screen displayed should be 200 screen, then this number should be given in next Screen attributes. These are static attributes of the screen. By default, if nothing is specified in the program, the system branches out to the screen number, which is specified in the attribute screen.
    In this case, if user selects MARA pushbutton, then fields from Mara table are displayed. When the user clicks on the MARD, then the fields from MARD table are displayed. Depending upon users selection, the screen is branched out and this has to be done during runtime. This functionality can be achieved by dynamically calling the screen in module pool program.
    The screen can branch out to new screen depending upon user selection. Following command in module pool program can do this:
    •     SET SCREEM
    •     CALL SCREEN
    •     LEAVE TO SCREEN <NUMBER>
    All these commands override the specifications given in the attributes. This overriding is temporary. The values stored in the attribute are not changed.
    Set Screen
    Syntax
    Set screen <number>.
    In module pool program
    Case okcode.
         When  ‘DISP’.
              Set screen 200.
         When ‘LIST’.
              Set screen 300.
    Endcase.
    In this case, the entire processing of current screen takes place and then the system branches out to next screen. If you want to branch out to the next screen without processing the current screen, LEAVE SCREEN should be used along with the SET SCREEN.
    For Example:
    Case okcode..
         When  ‘DISP’.
              Set screen 200.
              Leave Screen.
         When ‘LIST’.
              Set screen 300.
              Leave Screen.
    Endcase.
    When SET SCREEN is used, control cannot be transferred to the main screen or previous screen, unless you write code for the same.
    Call Screen
    Usually used for pop up screens. Many times, there is a need for user to enter additional information or secondary information on another screen or pop up screen. Once the user enters the data, he should be able to go back to main screen or to the screen where he started. This is not possible by using SET SCREEN. CALL SCREEN achieves this functionality.
    Syntax
    Call Screen 200.
    Will simply call a screen number 200 from a main screen. Once the screen is displayed the user can enter all the data and return to the main screen by clicking BACK button.
    To call screen as pop up screen the syntax is
    Call screen starting at <col.no.> <line no>
                         Ending at <col no> <line no>.
    In this case window will be popped as window and user can close it by using BACK button.
    Leave to screen
    To SET a new screen without processing current screen, you need to use the following two statements together:
    SET SCREEN 200.
    LEAVE SCREEN.
    Or a Single statement
    LEAVE TO SCREEN 200.

  • How to throw error in Module pool

    Hi Experts,
    I have one probelum in Module pool Programm and i need you solution,
    i have 10 input fields in  module pool, and the first field is land1,
    when i will give input in land1 as "US" so it should throw error "not allowed"
    and all the field should be enable. should not be disable
    please help me out.
    thanks
    Vikash

    Hi Vikas,
    try this,
    if  LAND1 EQ 'US'.
    MESSAGE 'No Data can be found!' TYPE 'S' DISPLAY LIKE 'E'.
    LEAVE LIST-PROCESSING. 
    endif.
    Regards,
    Venkat.

  • Edit a field in ALV tree in a subscreen of a module pool

    Hi
    I want to make a field editable in the ALV tree based on some condtions in a subscreen of a module pool.  I used the edit = 'X' field in the fieldcatalog still it  is showing the field as display and not edit.
    Please help me to get the field as editable and save it to the database table.
    Please not this is ALV TREE
    Regards,
    Mozila

    Hi Mayank,
    Thanks for the reply
    I am using oops method.
    I tried making the field which is to be made editable  as wa_fieldcatalog-edit = 'X'. But its not working. I didnt get you when you said  edit in layout object.
    I also went through the demo programs but these programs are not having editable fields.
    My code is as follows:
    IF tree4 IS INITIAL.
    * create container for alv-tree
      l_tree_container_name = 'TREE4'.
      CREATE OBJECT l_custom_container
        EXPORTING
          container_name              = l_tree_container_name
        EXCEPTIONS
          cntl_error                  = 1
          cntl_system_error           = 2
          create_error                = 3
          lifetime_error              = 4
          lifetime_dynpro_dynpro_link = 5.
    * create tree control
      CREATE OBJECT tree4
        EXPORTING
          i_parent                    = l_custom_container
          i_node_selection_mode       = cl_gui_column_tree=>node_sel_mode_multiple
          i_item_selection            = 'X'
          i_no_html_header            = 'X'
          i_no_toolbar                = 'X'
        EXCEPTIONS
          cntl_error                  = 1
          cntl_system_error           = 2
          create_error                = 3
          lifetime_error              = 4
          illegal_node_selection_mode = 5
          failed                      = 6
          illegal_column_name         = 7.
    * create hierarchy
      CALL METHOD tree4->set_table_for_first_display
        EXPORTING
          is_layout       = s_layo
        CHANGING
          it_sort         = it_sort
          it_outtab       = it_final
          it_fieldcatalog = it_fieldcat.
    ELSE.
      CALL METHOD tree4->refresh_table_display
        EXPORTING
          it_sort           = it_sort
        EXCEPTIONS
          program_error     = 1
          failed            = 2
          cntl_system_error = 3
          others            = 4
      IF sy-subrc <> 0.
       MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                  WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    endif.

  • How to make the field as mandatory in module pool program.

    Hi Experts,
    Could you please advice me in making a screen field as mandatory input field in module pool programming.
    Thanks in advance.

    Or you could add a check in a PAI module to check if there is some value, if not give error message.
    module check_value.
      if lv_value is initial.
        message e001(00) with 'Enter a value'.
      endif.
    endmodule
    In the PAI screen flow logic...
    Process after input.
    field lv_value module check_value.
    Regards,
    Rich Heilman

  • 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.

Maybe you are looking for