Reg. cursor-selection in module pool....have ur points.

Hi all,
Pleas. help me with  a simple example of at cursor-selection in module pool programming.
with simple code & steps
<b>Have ur points.</b>
Regards,
[email protected]

Hi Pradeep,
The Best explanation with example comes from our help.sap.com....
<i><b>http://help.sap.com/saphelp_nw04/helpdata/en/9f/dbabbd35c111d1829f0000e829fbfe/content.htm</b></i>
Also this might help...
<b>MODULE mod [ AT {EXIT-COMMAND|CURSOR-SELECTION} ]
[ ON {CHAIN-INPUT|CHAIN-REQUEST} ]
[ SWITCH switch ].
... AT CURSOR-SELECTION</b>
The AT CURSOR-SELECTION addition at the event PAI causes the module mod to be called only if
The function used to trigger event PAI has function code "CS" and function type "S"
The cursor is placed on a single input or output field of the screen at the moment of the user action
The call occurs within the usual PAI processing, meaning that the automatic input checks defined in the system or in the ABAP Dictionary are executed and the MODULE statement is called according to its position in the event block. You can use the addition in connection with the FIELD statement.
If the PAI event is triggered under the above circumstances, the function code is not passed to sy-ucomm and the OK field. They keep their previous values.
<b>Note</b>
The function type and function code of a function are determined in the Screen Painter or in the Menu Painter. We recommend to assign function code "CS" in the Menu Painter to function key F2 in order to simultaneously assign the double-click function of the mouse to it. This allows you to assign dialog modules to the selection of input or output fields.
<b><u>Refer thread:</u></b> <i><b>Re: MODULE REQUEST
Hope that helps!!
<i><b>*Reward useful answers*</b></i>
Regards,
Naveenan.

Similar Messages

  • Reg. POV in module pool---have ur points...

    Hi all,
    I m trying to use POV event in module pool, I wrote
    PROCESS ON VALUE-REQUEST.
    FIELD ZPHOGAT-ROLLNO MODULE ABC.
    Here in module ABC is wrote 'break-point'. when i click on F4 help of that field i my break-point is not getting executed.
    Pleas help me out...
    Have ur point.s
    regards,

    First make sure everything is compiled, then try an extended check on the main program to make sure you have your variable names, module pool name etc etc synchonised (in case you have a typo in the module or variable name)... then try changing your break-point for "message s398(00) with 'This is my POV' space space space." or something similar.

  • How to track the cursor in the MODULE POOL?

    Hello everyone,
    I have developed one module pool program. I am facing a problem in tracking the cursor position.
    Let me tell you in detail. I have display/change button on the screen. If I come in change mode and gives a invalid value to any of the field, then after pressing 'ENTER' my screen gets gray out i.e. in display mode with flashing an error message. If I press again 'ENTER' it gets in change mode by removing all the invalid entries user changed.
    Now the requirement is I want the cursor to be placed at that particular entry in that particular column, where I have got the error message for invalid value.
    Please Help me on this.
    Thanks in advance.

    Hi Ganesh,
    Use this Syntax to set cursor
    <b>SET CURSOR { { FIELD field [LINE line] [[DISPLAY] OFFSET off] }
               | { col lin } }.</b>
    Regards,
    Balavardhan.K

  • Make fields invisible based on selection in module pool screen

    I have a several fields in my module pool screen.
    There i have a box called Ref Obj.
    Inside the box i have fields a b c d e f.
    suppose my input has parameter 1.
    I need to show only fielda a and b inside the box
    suppose my input has parameter 2.
    I need to show only fielda c and d inside the box
    suppose my input has parameter 3.
    I need to show only fielda e and f inside the box
    suppose my input has parameter 4.
    I should not show any fields and box should be invisible.
    I would appreciate if any one could help me regarding this
    Thanks in advance

    hi,
    go through this code, and make the required changes according to u'r requirement but the logic is same.
    TABLES: mara , lfa1.
    SELECTION-SCREEN: BEGIN OF BLOCK b1 WITH FRAME.
    PARAMETERS: p_matnr LIKE mara-matnr DEFAULT 'M633640000' MODIF ID m1,
                p_ersda LIKE mara-ersda DEFAULT '30.06.2004' MODIF ID m2,
                p_aenam LIKE mara-aenam DEFAULT 'DOVIND' MODIF ID m3,
                p_matkl  LIKE mara-matkl DEFAULT '0000' MODIF ID m4,
                p_meins LIKE mara-meins DEFAULT 'ST' MODIF ID m5,
                p_mbrsh LIKE mara-mbrsh DEFAULT 'M' MODIF ID m6,
                p_vpsta LIKE mara-vpsta DEFAULT 'KV' MODIF ID m7.
    SELECTION-SCREEN: END OF BLOCK b1.
    SELECTION-SCREEN: BEGIN OF BLOCK b2 WITH FRAME.
    PARAMETERS: p_lifnr LIKE lfa1-lifnr DEFAULT 5070001063 MODIF ID s1 ,
                p_land1 LIKE lfa1-land1 DEFAULT 'FR' MODIF ID s1,
                p_name1 LIKE lfa1-name1 DEFAULT 'HONDA' MODIF ID s3,
                p_ort01 LIKE lfa1-ort01 DEFAULT 'PARIS' MODIF ID s4.
    SELECTION-SCREEN: END OF BLOCK b2.
    AT SELECTION-SCREEN OUTPUT.
      LOOP AT SCREEN.
        IF screen-group1 = 'M1' .
          screen-input = 0.
          MODIFY SCREEN.
        ELSE.
          IF screen-group1 = 'M2' .
            screen-invisible = 1.
            MODIFY SCREEN.
          ELSE.
            IF screen-group1 = 'M3' .
              screen-intensified = 1.
              MODIFY SCREEN.
            ELSE.
              IF screen-group1 = 'M5' .
                screen-length = 10.
                MODIFY SCREEN.
              ELSE.
                IF screen-group1 = 'M6' .
                  screen-active = 0.
                  MODIFY SCREEN.
                ELSE.
                  IF screen-group1 = 'M7' .
                    screen-display_3d = 1.
                    MODIFY SCREEN.
                  ELSE.
                    IF screen-group1 = 'M4' .
                      screen-output = 0.
                      MODIFY SCREEN.
                    ELSE.
                      IF screen-group1 = 'S1' AND
                      screen-name = 'P_LIFNR'.
                        screen-values_in_combo = 1.
                        MODIFY SCREEN.
                      ELSE.
                        IF screen-group1 = 'S1' AND
                        screen-name = 'P_LAND1'.
                          MODIFY SCREEN.
                        ENDIF.
                      ENDIF.
                    ENDIF.
                  ENDIF.
                ENDIF.
              ENDIF.
            ENDIF.
          ENDIF.
        ENDIF.
      ENDLOOP.
    <b>please reward points if helpfull.</b>
    with regards,
    radhika kolluru.

  • How to remove symbol of line selection in module pool

    Hello Experts,
    I am working on a module pool where I have created a line selection.
    In this line selection when we click on the order number I have made a coding where it call new transaction.
    But I dont want the default symbol which comes during line selection..the magnifying type symbol.
    How can I delete this symbol.
    My coding is:
    at pbo:
    MODULE CALL_STATUS_LIST OUTPUT.
    LEAVE TO LIST-PROCESSING AND RETURN TO SCREEN 0.
      SET PF-STATUS SPACE.
      SUPPRESS DIALOG.
    ENDMODULE.                 " call_status_list  OUTPUT
    at line-selection.
    and than the coding.
    Thanks and Regrds,
    Nikhil.

    Hi Keshu,
    Not working,
    I have used this coding:
    DATA: pf_itab TYPE TABLE OF sy-ucomm.
    APPEND 'PICK' TO pf_itab.
    SET PF-STATUS 'STA3' EXCLUDING pf_itab.
    but than again my line selection does not work.
    Thanks,
    Nikhil.

  • Reg : Variant saving for Module Pool Programming

    Hey Friends,
       Plz help me in how to create variant for Module Pool Programming as in normal reports.Thanx in advance.

    Hi,
    You can create variants for Module pool program using the transaction SHD0. You can create Screen variants for your screens using this Tcode.
    Go to SHD0 -> Give the Transaction code(ZTRAN) for which you want to create a variant -> name of some variant (ZVAR) -> create -> takes you to your transaction -> Give the values that you want to be displayed as variants -> Click on Save -> Opens a pop up to confirm the screen entries -> Check the check boxes of those fields that you have entered the data with (the column with check boxes that says W.Content) -> Exit and Save -> Save the variant -> You can see a screen variant created (ZVAR_0100)
    Now Goto -> Create variant transaction -> Give your transaction variant name (ZVAR) -> Select Transaction with variant -> Takes you to SE93 transaction -> Give the transaction variant name  -> save. Run with the created transaction.
    Edited by: Nitwick on Jul 27, 2009 4:49 PM

  • At line selection in module pool

    Hello Experts.
    I am working on module pool.
    I have created a transaction where I need to create a order number when I press the 'SAVE' button.
    My order number is getting created but my issue is I need to call a transaction when I click on this order number.
    For eg: I am getting a message as 'ORDER NUMBER 50000645 SAVED.
    When I will click on 50000645 I need to call transaction 'IWBK' and this order number needs to get entered in ORDER field name aufnr-low.
    what should I write in pbo and pai?
    Let me know if it is possible.
    Thanks and Regrds,
    Nikhil.

    Hi, Nikhil
    Test the following Sample Code Hope will Solve out your problem
    DATA: it_bdcdata TYPE TABLE OF bdcdata,
          wa_it_bdcdata LIKE LINE OF it_bdcdata.
    DATA opt TYPE ctu_params.
    CLEAR wa_it_bdcdata.
    wa_it_bdcdata-program  = 'RIAUFMVK'.
    wa_it_bdcdata-dynpro   = '1000'.
    wa_it_bdcdata-dynbegin = 'X'.
    APPEND wa_it_bdcdata TO it_bdcdata.
    CLEAR wa_it_bdcdata.
    wa_it_bdcdata-fnam = 'BDC_CURSOR'.
    wa_it_bdcdata-fval = 'AUFNR-LOW'.
    APPEND wa_it_bdcdata TO it_bdcdata.
    CLEAR wa_it_bdcdata.
    wa_it_bdcdata-fnam = 'AUFNR-LOW'.
    wa_it_bdcdata-fval = '50000645'. " Your Order Here
    APPEND wa_it_bdcdata TO it_bdcdata.
    opt-dismode = 'E'.
    CALL TRANSACTION 'IWBK' USING it_bdcdata OPTIONS FROM opt.
    Regards,
    Faisal

  • Reg alv grid  using module pool programming

    Dear Friends,
    I have a situation where i am using alv grid in module programming where in when i click the total button in the tool bar for any numeric column, the screen goes for a run time error.
    I have giving all conditions such as made the column in the field structure of lvc_field_catalog as do_sum = 'X',
    still goes for a dump...can anyone throw some hints to do more or the reason behind this and also have not excluded the function code for this total pushbutton while passing to the method set_table_for_first_display
    thanks...

    hi,
    check this up
    internal tables
    DATA: i_tab TYPE TABLE OF zchangereq,
    w_tab TYPE zchangereq.
    display field details
    DATA: w_field_cat_wa TYPE lvc_s_fcat. " Field Catalog work area
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-020.
    PARAMETERS: p_outs RADIOBUTTON GROUP g1,
    p_comp RADIOBUTTON GROUP g1.
    SELECTION-SCREEN END OF BLOCK b1.
    *MACROS
    DEFINE add_field.
    &1 = FIELDNAME &2 = HEADING &3 = Key field flag
    clear w_field_cat_wa.
    w_field_cat_wa-fieldname = &1.
    lw_field_cat_wa-ref_table = p_ref_table.
    lw_field_cat_wa-inttype = p_inttype.
    lw_field_cat_wa-decimals = p_decimals.
    lw_field_cat_wa-coltext = p_coltext.
    lw_field_cat_wa-seltext = p_seltext.
    lw_field_cat_wa-do_sum = p_do_sum.
    lw_field_cat_wa-no_out = p_no_out.
    lw_field_cat_wa-col_pos = p_col_pos.
    lw_field_cat_wa-reptext = p_coltext.
    lw_field_cat_wa-colddictxt = p_colddictxt.
    w_field_cat_wa-scrtext_m = &2.
    w_field_cat_wa-key = &3.
    append w_field_cat_wa to i_field_cat.
    END-OF-DEFINITION.
    ALV specific Declarations...........................................
    ALV specific Internal table declarations.............................
    DATA: i_field_cat TYPE lvc_t_fcat, " Field catalogue
    i_alv_sort TYPE lvc_t_sort. " Sort table
    ALV variables........................................................
    DATA: w_alv_layout TYPE lvc_s_layo, " ALV Layout
    w_alv_save TYPE c, " ALV save
    w_alv_variant TYPE disvariant. " ALV Variant
    ALV Class definitions................................................
    CLASS lcl_event_handler DEFINITION.
    PUBLIC SECTION.
    METHODS: handle_double_click
    FOR EVENT double_click OF cl_gui_alv_grid
    IMPORTING e_row e_column.
    METHODS: handle_hotspot
    FOR EVENT hotspot_click OF cl_gui_alv_grid
    IMPORTING e_row_id e_column_id.
    ENDCLASS. " CLASS LCL_EVENT_HANDLER DEF..
    ALV Class implementation............................................
    In the Event of a Double Click drill down to the corresponding CHANGE REQUEST
    CLASS lcl_event_handler IMPLEMENTATION.
    METHOD handle_double_click.
    DATA: l_tab LIKE LINE OF i_tab.
    CHECK e_row-rowtype(1) EQ space.
    READ TABLE i_tab INDEX e_row-index INTO l_tab.
    SET PARAMETER ID 'ZTY' FIELD l_tab-ztype.
    SET PARAMETER ID 'ZCR' FIELD l_tab-zcref.
    CALL TRANSACTION 'ZCRT' AND SKIP FIRST SCREEN.
    ENDMETHOD. " HANDLE_DOUBLE_CLICK
    not working yet - hotspot seems to stay in the gui!!
    METHOD handle_hotspot.
    DATA: l_tab LIKE LINE OF i_tab.
    CHECK e_row_id-rowtype(1) EQ space.
    READ TABLE i_tab INDEX e_row_id-index INTO l_tab.
    SET PARAMETER ID 'ZTY' FIELD l_tab-ztype.
    SET PARAMETER ID 'ZCR' FIELD l_tab-zcref.
    CALL TRANSACTION 'ZCRT' AND SKIP FIRST SCREEN.
    ENDMETHOD. " HANDLE_DOUBLE_CLICK
    ENDCLASS. " CLASS LCL_EVENT_HANDLER IMPL...
    ALV Grid Control definitions........................................
    DATA:
    ALV Grid Control itself
    o_grid TYPE REF TO cl_gui_alv_grid,
    Container to hold the ALV Grid Control
    o_custom_container TYPE REF TO cl_gui_custom_container,
    Event handler (defined in the class above)
    o_event_handler TYPE REF TO lcl_event_handler.
    INITIALIZATION.
    PERFORM create_field_catalogue. " Create ALV Field Catalog
    START-OF-SELECTION.
    Outstanding requests
    IF p_outs = 'X'.
    SELECT * FROM zchangereq
    INTO TABLE i_tab
    WHERE zstatus < 99.
    ELSE.
    completed requests
    SELECT * FROM zchangereq
    INTO TABLE i_tab
    WHERE zstatus = 99.
    ENDIF.
    END-OF-SELECTION.
    PERFORM list_output_to_alv. " Perform ALV Output operations
    FORM LIST_OUTPUT_TO_ALV *
    This subroutine is used to call the screen for ALV Output. *
    There are no interface parameters to be passed to this subroutine. *
    FORM list_output_to_alv.
    CALL SCREEN 100.
    ENDFORM. " LIST_OUTPUT_TO_ALV
    Module STATUS_0100 OUTPUT *
    This is the PBO module which will be processed befor displaying the *
    ALV Output. *
    MODULE status_0100 OUTPUT.
    SET PF-STATUS '0100'. " PF Status for ALV Output Screen
    IF p_outs = 'X'.
    SET TITLEBAR 'STD'.
    ELSE.
    completed requests
    SET TITLEBAR 'COMP'.
    ENDIF.
    CREATE OBJECT: o_custom_container
    EXPORTING container_name = 'SC_GRID',
    o_grid
    EXPORTING i_parent = o_custom_container.
    PERFORM define_alv_layout. " ALV Layout options definitions
    PERFORM save_alv_layout_options. " save ALV layout options
    PERFORM call_alv_grid. " Call ALV Grid Control
    ENDMODULE. " STATUS_0100 OUTPUT
    Module USER_COMMAND_0100 INPUT *
    This is the PAI module which will be processed when the user performs*
    any operation from the ALV output. *
    MODULE user_command_0100 INPUT.
    CASE sy-ucomm.
    WHEN 'EXIT' OR 'BACK' OR 'CANC'.
    may need to do this so display is refreshed if other report selected
    CALL METHOD o_custom_container->free.
    SET SCREEN 0.
    ENDCASE.
    ENDMODULE. " USER_COMMAND_0100 INPUT
    FORM DEFINE_ALV_LAYOUT *
    This subroutine is used to Define the ALV layout. *
    FORM define_alv_layout .
    w_alv_layout-numc_total = 'X'. " Numc total line
    w_alv_layout-cwidth_opt = 'X'. " Optimal column width
    w_alv_layout-detailinit = 'X'. " Show values that are initial in
    " detail list.
    w_alv_layout-sel_mode = 'A'. " Column selection mode
    w_alv_layout-no_merging = 'X'. " No merging while sorting columns
    w_alv_layout-keyhot = 'X'.
    ENDFORM. " DEFINE_ALV_LAYOUT
    FORM SAVE_ALV_LAYOUT_OPTIONS *
    This subroutine is used to Save the ALV layout options. *
    FORM save_alv_layout_options.
    See the ALV grid control documentation for full list of options
    w_alv_save = 'A'.
    w_alv_variant-report = sy-repid.
    ENDFORM. " SAVE_ALV_LAYOUT_OPTIONS
    FORM CALL_ALV_GRID *
    This subroutine is used to call ALV Grid control for processing. *
    FORM call_alv_grid.
    CALL METHOD o_grid->set_table_for_first_display
    EXPORTING
    is_layout = w_alv_layout
    i_save = w_alv_save
    is_variant = w_alv_variant
    CHANGING
    it_outtab = i_tab[]
    it_sort = i_alv_sort
    it_fieldcatalog = i_field_cat.
    Link used Events and Event Handler Methods
    CREATE OBJECT o_event_handler.
    Set handler o_event_handler->handle_top_of_page for o_grid.
    SET HANDLER o_event_handler->handle_double_click FOR o_grid.
    ENDFORM. " CALL_ALV_GRID
    *& Form create_field_catalogue
    set up field catalogue
    FORM create_field_catalogue .
    Fieldname Heading Key?
    *eg add_field 'ZTYPE' 'Type' 'X'.
    ENDFORM. " create_field_catalogue

  • Come on abapers.....n have ur points

    Hi all,
    I m trying to use at cursor-selection in module pool. Some buddy suggested me to use, function code "CS" and function type "S" for fields..
    but how can we define function codes for fields... it's strange...
    Ples let me know in simple ur written language, demo of at cursor-selection pleas.
    <b>have ur points.</b>
    cheers.
    [email protected]

    hI....
    Calling Modules after Cursor Selection
    You can specify that a module should only be called if the cursor is positioned on a particular screen element. To do this, use the statement
    <b>MODULE <mod> AT CURSOR-SELECTION.</b>
    The module <mod> is called whenever the function code of the user action is CS with function type S. If you use this statement,<b> it is best to assign the function code CS to function key F2. This also assigns it to the mouse double-click.</b>
    The module is called in the sequence in which it occurs in the flow logic. It does not bypass the automatic input checks. Data is transported from screen fields in the order in which it is defined by the FIELD statements. The function code is empty, and neither SY-UCOMM nor the OK_CODE field is affected. You can also combine this MODULE statement with the FIELD statement:
    <b>FIELD <f> MODULE <mod> AT CURSOR-SELECTION.</b>
    <b>Reward if Helpful</b>

  • Is it possible to save a variant in Module Pool program

    Hi,
    We have got a requirement to save a Variant for the user selections in Module Pool Program. Is it possible to save a variant in a Module Pool Program?
    Please let me know how to do that if it is possible.
    Thanks in Advance.

    hi Dagny,
      You can't have variants for module pool. It is possible only for selection screen.
    You have following alternatives :-
    1. Create a report with same selection screen as you have now in module pool.
    And then make a call screen to your intial module pool.
    In this way you can all the advantage of variants as well as module pool.
    OR
    2. Create a transaction variant using transaction SHDO.
    Hope it is helpful.
    and do search the form , it is already answered before.
    regards
    venkat

  • Reg. module pool....have ur points..

    Hi all,
    In module pool programming, we see "MODULE CANCEL AT EXIT-COMMAND" in PAI. Pleas let me know the meaning of this in simple language.....
    <b>n Have ur points.</b>

    Hi,
    AT EXIT-COMMAND, only checks for the function code which is marked as 'E' in PF-STATUS, and the module below that is executed whenever you press that key associated with the function code.
    AT USER-COMMAND, works for all keys with function-code.
    So if you press F3, which is BACK and is usually associated with 'E' , and if you have both AT EXIT-COMMAND and AT USER-COMMAND, module below AT EXIT-COMMAND will be executed.
    MODULE
    Syntax
    MODULE mod [ AT {EXIT-COMMAND|CURSOR-SELECTION} ]
    [ ON {CHAIN-INPUT|CHAIN-REQUEST} ].
    ... AT EXIT-COMMAND
    Effect
    Addition AT EXIT-COMMAND at the event PAI causes module mod to be called exactly if:
    The function used to trigger event PAI has function type "E"
    Into the input field of the standard toolbar, the user entered a character string starting with "E" and confirmed it using ENTER.
    The dialog module is called before the automatic input checks defined in the system or in the ABAP Dictionary and independent of its position in the event block. The only screen field transported to the ABAP program is the OK field. If the function that triggered the PAI event does not fulfill any of the above prerequisites, the MODULE statement is not executed.
    If several MODULE statements have the AT EXIT COMMAND addition, only the first one is executed. If no MODULE statement has the addition AT EXIT COMMAND, a normal PAI processing is executed: The predefined input checks are executed and then the PAI event block is processed sequentially. Provided the screen processing is not terminated in the dialog module mod, after the return from the dialog module, the complete PAI processing is executed. You must not use the addition AT EXIT COMMAND in connection with the statement FIELD.
    Note
    The function type of a function is determined in the Screen Painter or Menu Painter. Usually those functions of the user interface are defined with function type "E" that are assigned to the icons Back, Exit and Cancel in the standard toolbar of the GUI status. Therefore, the called dialog module should terminate the screen processing and allow security checks, if required.
    reward if it helps..
    Regards,
    Omkar.

  • Cursor position on screen data in module pool programming(urgent)

    Hi all,
    I developed a module pool  program which will save the data after  scanning the barcode data.
    In my program screen 100 is there which contains field  ‘2dbar’. scanned data is comming to 2dbar field.
    we r doing scan 4 times.once for vendor number,once for material no. like this.
    After 1st scan, vendor number will come to field ‘2dbar’.
    Then I developed logic to put comma after each scanned data come to this field ‘2dbar’.
    MODULE put_comma INPUT.
    CASE OK_CODE.
    when ''.
    move 2dbar to 2dbar1.
    clear 2dbar.
    concatenate 2dbar1 ',' into 2dbar2.
    *replace 2dbar with 2dbar2 into 2dbar.
    move 2dbar2 to 2dbar.
    *write 2dbar2 to 2dbar.
    condense 2dbar no-gaps.
    *move '' to 2dbar.
    *set cursor field 2dbar offset 5.
    *write
    ENDCASE.
    ENDMODULE.                 " put_comma  INPUT
    By above logic, comma  comes to the starting position of 2dbar after each scan. i.e cursor position is coming to the starting position of screen field ‘2dbar’.
    Now  I need to move the cursor position after the comma position on 2dbar after each scan.
    after 1st scan, 2dbar contains
    vmotorola
    then my logic puts a comma when u put enter on screen 100.
    now 2dbar contains
    vmotorola,
    i should get the cursor position after the comma.but i am getting cursor position before 'v'.so how to move this cursor position  beyond comma after each scan.
    I added set cursor  command but it is not working.plz
    What is the logic, I need to put in PAI  to move the cursor on selection screen.
    Already the logic I have mentioned.  with that logic, I can put comma.now I need to add cursor movement logic  to move the cursoron  on screen field ‘2dbar’.
    Plz reply me as it is urgent.
    Thanks in advance.
    Regards
    pabitra

    CASE OK_CODE.
    when ''.
    move 2dbar to 2dbar1.
    clear 2dbar.
    concatenate 2dbar1 ',' into 2dbar2.
    move 2dbar2 to 2dbar.
    condense 2dbar no-gaps.
    len = strlen ( 2dbar ).
    len = len - 1.
    set cursor field 2dbar offset len.
    ENDCASE.
    ENDMODULE. " put_comma INPUT

  • Select current line through push button in module pool

    Hi,
    I have created one module pool program with table control. There I have inserted on push button where some logic is deployed.
    Logic :-
    If I push button on current line or any line, that line should be selected in the program. So that I can move that line to next internal table.
    But, it always shows first line.
    Please suggest the same.

    hi amol,
    GET CURSOR only works on the number of table control lines that can be displayed on screen at any one time.  So, if your screen can display only 4 lines, all you'll ever get from GET CURSOR is a number 1 to 4.  
    But your screen also knows which of your table control records is currently displayed as the top line of your table control.  This information is held in field TC_ITEMS-TOP_LINE (where TC_ITEMS is the name of your table control).  By combining these two bits of information, you can find the correct line number of your selected record. 
    For example in the case you describe where you are clicking on line 5 but GET CURSOR thinks it is line 4 because your screen has moved down a record, I would think that TC_ITEMS-TOP_LINE would be 2.  Add 4 and 2 together, subtract 1 and you'll get your correct line number.
    hope it helps,
    vikas

  • How to attach FCODE to select option in Module Pool

    Hi all,
          I have created Select option in Module pool by attaching a Subscreen. Now when user enters any value into the select option I need to fetch values from the database in to the table control based on the value entered in select option.
    Is it possible and how?
    Thanks.

    <b>Hi
    If u have one select options in module pool programming,Then there is no need for FCODE
    bcoz FCODE is needed for push button,check box..like etc.
    But select option is a input field.
    So u can trace the input as u have done in report
    Like
    select * from dtab1 into corresponding fields of table itab where field1 in <b>selectoption.</b>
    Or if u want that program to be executed after giving input in select option then user will press F8
    So Use FCODE 'F8'.
    Regs
    Manas Ranjan Panda
    Message was edited by:
            MANAS PANDA</b>
    Message was edited by:
            MANAS PANDA

  • How can i decleare select-options in module pool table control?

    Hi everybody!!
    Can anyone tell me how can I decleare select-options in module pool table control screen?. I have declared it in a screen with a table control but a dump is triggered due to an error when generating the selection screen.
    Regards...

    My suggestion will be try to use fm
        call function 'FREE_SELECTIONS_DIALOG'
    Please search this forum you can find lot of threads related to this.

Maybe you are looking for