Select option in modular programming...?

Hi Abapers,
                 I have a problem where in i want to use select options in modullar programming.....
and one more thing that when ever i  am using an EXECUTE button which has been defined manually by me..
the report show the output but wen i am coming back to the screen and again i am using EXECUTE  butto
the value are repeated..
so can anyone answer to both of my questions pls......

for answer to ur first Question
Best option is to go for a report program
If still you need to go for module pool there is one solution.
1. Define a subscreen on ur screen.
2. Define The screen as we do in report program but with addition 'AS SUBSCREEN' .
3.call the subscreen in ur flow logic of main screen.
Following code may help.
define this in ur top include.
SELECTION-SCREEN BEGIN OF SCREEN 200 AS SUBSCREEN.
SELECT-OPTIONS:
                s_vkorg1  FOR zadvhead-vkorg  NO-EXTENSION NO INTERVALS,
SELECTION-SCREEN END OF SCREEN 200.
in screen flow logic
PROCESS BEFORE OUTPUT.
CALL SUBSCREEN subscr_is1 INCLUDING sy-repid dynnr_is1.
"dynnr_is1 = 0200 & subscr_is1 = subscreen area name
PROCESS AFTER INPUT.
CALL SUBSCREEN subscr_is1.
for more info
Re: Module Pool Program
Edited by: mrugesh phatak on Oct 1, 2008 12:23 PM

Similar Messages

  • Select-Option in Dialog programming

    Hi Experts,
      Can we use select-options in Dialog programming?
    If yes, Please help me, how to do that?
    <REMOVED BY MODERATOR>
    Edited by: Alvaro Tejada Galindo on Jun 12, 2008 12:27 PM

    Hi Asrar,
    Definitely you can use select-options in dialog programming.
    You can do this using Subscreen.
    define this scubscreen in top include.
    selection-screen : begin of screen 100 as subscreen.
    select-option : kunnr for kna1-kunnr.
    selection-screen : end of screen 100.
    in screen 200 where this selection screen appears, create a subscreen area 'SSA'.
    Process on output. "200 screen.
    call subscreen SSA including sy-repid '100'.
    other modules
    Process on input.    "200 screen.
    call subscreen SSA.
    other modules
    now you can access kunnr like other screen 200 objects.
    <REMOVED BY MODERATOR>
    Regards
    Megha
    Edited by: Alvaro Tejada Galindo on Jun 12, 2008 12:27 PM

  • Select-options in Dialog Programming

    Hi,
    I am designing a custom dialog programming screen.
    I want to create a filed on thescreen which can allow the range of values to be entered like select-options in a report.
    How do I create a field which can accept range of values in dialog programming?
    Thanks,
    Ashok.

    Hi,
    In your selection screen program, Use Export  command
      Export r_Purchase_Order To Memory Id 'PO'.
                 Export r_Po_Item        To Memory Id 'POITEM'.
                 Export r_Plant          To Memory Id 'PLANT'.
                 Export r_Vendor         To Memory Id 'VENDOR'.
                 Export r_Material       To Memory Id 'MATNR'.
                 Export r_Batch          To Memory Id 'BATCH'.
                 Export r_Arrival_Date   To Memory Id 'ADATE'.
                 Export r_Arrival_Time   To Memory Id 'ATIME'.
                 Export r_Delivery_No    To Memory Id 'DEL'.
                 Export r_Reference_No   To Memory Id 'REF'.
                 Export r_User           To Memory Id 'USER'.
                 Export t_Display_Data   To Memory Id 'DISPDAT'.
    In your Module pool program, Use Import Command
        When c_Ok_0100_Execute.
                   IMPORT r_Purchase_Order From Memory Id 'PO'.
                   IMPORT r_Po_Item        From Memory Id 'POITEM'.
                   Import r_Plant          From Memory Id 'PLANT'.
                   Import r_Vendor         From Memory Id 'VENDOR'.
                   Import r_Material       From Memory Id 'MATNR'.
                   Import r_Batch          From Memory Id 'BATCH'.
                   Import r_Arrival_Date   From Memory Id 'ADATE'.
                   Import r_Arrival_Time   From Memory Id 'ATIME'.
                   Import r_Delivery_No    From Memory Id 'DEL'.
                   Import r_Reference_No   From Memory Id 'REF'.
                   Import r_User           From Memory Id 'USER'.
                   Import t_Display_Data   From Memory Id 'DISPDAT'.
    Thanks

  • Select-options in Dynpro program

    hi ,guys,
    now i want add a screen field in my dynpro program, the field should be like the the select-options in a normal report's selection-screen's field of select-options which can hold multiple inputs, batween a range and use can choose the operators.
    pls help.

    You need to create subscreen in the module pool program and need to write select options logic in separate include.
    Please check [this link|https://www.sdn.sap.com/irj/scn/wiki?path=/display/abap/select-options%252bin%252bmodule%252bpool%252bprogramming]
    Edited by: Satya suresh Donepudi on Mar 8, 2009 10:03 PM

  • Select option in Dialog program screen

    Hi friends,
    do we have any way to get a select option displayed in dialog programming ?
    or
    create a screen field with the properties of a select option in dialog screen ?
    or
    any standard function module to support this scenario ?
    Thanks and Regards
    Sakthi.

    Hi,
    i don't know you checked it or not, but i am able to do it, i send the screen shot also to you check it..
    it is possible,with some coding also  check it once...
    REPORT  ZTEST_SCREEN                            .
    DATA : BEGIN OF IT_DYNPFIELDS OCCURS 3.
            INCLUDE STRUCTURE DYNPREAD.
    DATA : END OF IT_DYNPFIELDS.
    DATA: TEST(10) TYPE C.
    RANGES:  R_UNAME FOR SY-UNAME.
    DATA:     V_USERNAME LIKE  SY-UNAME.
    DATA : V_PROG LIKE D020S-PROG VALUE 'ZTEST_SCREEN',
           V_DNUM LIKE D020S-DNUM VALUE '0100'.
    CALL SCREEN 100.
    *&      Module  STATUS_0100  OUTPUT
    *       text
    MODULE STATUS_0100 OUTPUT.
      SET PF-STATUS 'TEST'.
    *  SET TITLEBAR 'xxx'.
    ENDMODULE.                 " STATUS_0100  OUTPUT
    *&      Module  USER_COMMAND_0100  INPUT
    *       text
    MODULE USER_COMMAND_0100 INPUT.
      CASE SY-UCOMM.
        WHEN 'BACK'.
          LEAVE TO SCREEN 0.
      ENDCASE.
    ENDMODULE.                 " USER_COMMAND_0100  INPUT
    *&      Module  GET_CURSOR_USERNAME  INPUT
    *       text
    MODULE GET_CURSOR_USERNAME INPUT.
      REFRESH IT_DYNPFIELDS.
      CLEAR   IT_DYNPFIELDS.
      MOVE 'V_USERNAME' TO IT_DYNPFIELDS-FIELDNAME.
      APPEND IT_DYNPFIELDS.
      CLEAR   IT_DYNPFIELDS.
      CALL FUNCTION 'DYNP_VALUES_READ'
        EXPORTING
          DYNAME               = V_PROG
          DYNUMB               = V_DNUM
          TRANSLATE_TO_UPPER   = 'X'
        TABLES
          DYNPFIELDS           = IT_DYNPFIELDS
        EXCEPTIONS
          INVALID_ABAPWORKAREA = 1
          INVALID_DYNPROFIELD  = 2
          INVALID_DYNPRONAME   = 3
          INVALID_DYNPRONUMMER = 4
          INVALID_REQUEST      = 5
          NO_FIELDDESCRIPTION  = 6
          INVALID_PARAMETER    = 7
          UNDEFIND_ERROR       = 8
          DOUBLE_CONVERSION    = 9
          STEPL_NOT_FOUND      = 10
          OTHERS               = 11.
      IF SY-SUBRC = 0.
        READ TABLE IT_DYNPFIELDS WITH KEY FIELDNAME = 'V_USERNAME'.
        IF SY-SUBRC = 0.
          V_USERNAME = IT_DYNPFIELDS-FIELDVALUE.
        ENDIF.
      ENDIF.
      PERFORM GET_MULTIPLE.
    ENDMODULE.                 " GET_CURSOR_USERNAME  INPUT
    *&      Form  GET_MULTIPLE
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM GET_MULTIPLE .
    * Dynamically holding Field name
      FIELD-SYMBOLS: <FST> TYPE STANDARD TABLE.
      IF  R_UNAME[] IS INITIAL.
        IF NOT V_USERNAME IS INITIAL.
          R_UNAME-SIGN = 'I'.
          R_UNAME-OPTION = 'EQ'.
          R_UNAME-LOW = V_USERNAME.
          APPEND R_UNAME.
          CLEAR  R_UNAME.
        ENDIF.
      ENDIF.
      ASSIGN R_UNAME[] TO <FST>.
      CALL FUNCTION 'COMPLEX_SELECTIONS_DIALOG'
        EXPORTING
          TITLE             = 'Select Multiple Value'(059)
          TEXT              = 'Finish Group'(058)
          SIGNED            = 'X'
          LOWER_CASE        = ' '
          NO_INTERVAL_CHECK = 'X'
          JUST_DISPLAY      = ' '
          JUST_INCL         = 'X'
        TABLES
          RANGE             = <FST>
        EXCEPTIONS
          NO_RANGE_TAB      = 1
          CANCELLED         = 2
          INTERNAL_ERROR    = 3
          OTHERS            = 4.
      IF SY-SUBRC = 0.
        READ TABLE R_UNAME INDEX 1.
        IF SY-SUBRC = 0.
          V_USERNAME = R_UNAME-LOW.
        ENDIF.
      ENDIF.
    ENDFORM.                    " GET_MULTIPLE
    Flow loogic....
    PROCESS BEFORE OUTPUT.
    MODULE STATUS_0100.
    PROCESS AFTER INPUT.
    MODULE USER_COMMAND_0100.
    PROCESS ON VALUE-REQUEST.
    *- To capture the cursor and for f4
      FIELD V_USERNAME      MODULE GET_CURSOR_USERNAME.
    in screen i have one field v_username
    for that field do this
    <b>double click on field which you want to make it as select option, it will display the attributes screen, in that click on program attributes button , now go to poss. entries in the dropdown choose 1 show at selection.</b>
    Regards
    vijay

  • Select-Options in dialog program

    Hi there,
    I'm using a selection-screen in a dialog program, I declared it in the TOP.
    Selection-screens
    SELECTION-SCREEN BEGIN OF SCREEN 101 AS SUBSCREEN.
    parameters: p_lifnr type lfa1-lifnr  obligatory ,
                p_werks type t001w-werks obligatory .
    SELECT-OPTIONS:
      s_licha FOR zbrtconsig-licha.
    SELECTION-SCREEN END OF SCREEN 101.
    I have to use the event at selection-screen on value-request for s_licha-low, and I need the values from the fields p_lifnr and p_werks. the problem is:
    If I only fill the fields p_lifnr, p_werks and click on F4 for s_licha, the values of p_lifnr and p_werks are not updated, they are empty. Only wether I do an Enter this fields is updated.
    Thanks,
    Alexandre Nogueira

    Hi,
    i am not clear about your problem, please expalin it clearly.
    use FM : DYNP_VALUES_UPDATE to update screen fields.
    use FM : DYNP_VALUES_READ to read screen fields.
    use SET /GET Parameter id's to set parameters
    this FM will update the screen fields before to PBO event.
    check this link for sample code :
    Re: Issue Related to Module pool
    Regards
    Appana

  • How to pass standard program selection  options to custom program?

    Hi... i want to use standard program select-options in a custom program.. actually in a custom program i'm using one standard program  and one custom program. standard program contains selection scren. i want to use that selection screen in custum program.
    can anybody please provide solution for this.
    looking forward for ur updates

    first you must find where the selection screen logic is written in standard one.once you get this details than you may Include the same screen and include program in your zprogram.and here your work is not finished you may need to do some change apart from copy all this details.
    Amit.

  • Select Options for my program and i need to get the code from coding wizard

    Hi Experts,
    i am new to Webdynpro programming.
    i want to use Select-options in my component. and also please tell me how to use coding wizard,
    Please let me know if you need any information.
    Thanks in advance
    Lava.

    Hi Lava,
    To create select options we have to use the existing component WDR_SELECT_OPTIONS.
    For using this component in our WebDynpro component we need to specify this in used components tab in our WebDynpro component.
    check the standard components WDR_TEST_SELECT_OPTIONS .
    Also refer the following links.
    [https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/60811d03-b69e-2b10-cd86-ad2790e44ecc]
    Saptechnical->tutorials->webdynproabap->select options
    Regards,
    Radhika .

  • How can we pass the select-option value to modulepool program?

    hi,
      how can we pass the select-option value to modulepool program ?
      Because if i declared select-options in executable program and i used SSCRFIELDS to define push buttons in selection screen.
               My requirement if enter the values to select-options and press UPDATE pussbotton then i want call screen which contains tablecontrol.
               How i get select-option values to PAI of call screen for getting the data from database table to my internal table?

    Oh I thought that you have selection-screen and again you are working on dialog programming.
    if you want to use select-option directly in module pool then it is not possible.
    but you can do other way.
    create two varaiables
    data : v_kun_low like kna1-kunnr,
             v_kun_high like kna1-kunnr.
    use these two variables in layout ,let user knows that he can not give options like gt,lt,eq ,it will be always BT.
    and also when you see normal report program,you can use multiple values in either low or high,but here it is not possibel.
    use can enter only low value and high value.
    when you come to program point of view
    declare one range
    ranges r_kunnr for kna1-kunnr.
    do the coding like
    r_kunnr-low = v_kun_low.
    r_kunnr-high = v_kun_high.
    r_kunnr-options = 'BT'.
    r_kunnr-sign = 'I'.
    append r_kunnr.
    now you can use r_kunnr in select query ,it will work like select-option.
    other than this there is no option.
    Thanks
    Seshu

  • Select-option field in dialog programming

    hi guys,
    i need to declare field matnr as select-option range in dialog programming..how can i code it in the module program?

    This questions has been answered many times (even in february)
    - search sdn wiki (2 commented samples at [SELECT-OPTIONS on Dialog programming screen|http://wiki.sdn.sap.com/wiki/display/ABAP/SELECT-OPTIONSonDialogprogrammingscreen] and [Select-Options in Module Pool Programming|http://wiki.sdn.sap.com/wiki/display/ABAP/Select-OptionsinModulePoolProgramming])
    - search abap online help ([SELECTION-SCREEN - AS SUBSCREEN |http://help.sap.com/abapdocu_70/en/ABAPSELECTION-SCREEN_SUBSCREEN.htm] with sample at [Selection Screens as Subscreens |http://help.sap.com/abapdocu_70/en/ABENSEL_SCREEN_SUBSCREEN_ABEXA.htm])
    Regards,
    Raymond

  • Select options in function module

    hi friends, pls help me reg my query.
    I have wERKS select-options
    on the selection screen.
    (This same thing, i want to pass in FM)
    2. So in FM, I have used the
    TABLES parameter (Not import, nor export)
    3. And the type given is
    WERKS_RANG
    i defined it like
    plant type WERKS_RANG
    (This WERKS_RANG has 4 fields,
    just like a select option
    SIGN
    OPTION
    LOW
    HIGH
    4. Then inside fm,
    i used SELECT Query,
    and use IN WERKS.
    below is my code in FM.
    select lgort labst
    from mard
    into table imard1
    where PLANT in werks
    and material1 = matnr.
    but i am getting an error "field plant is unknown". i have defined it under tables parameter..pls help
    how shud i get the values i enter in select option for main program in se38 to function module field 'plant'...

    Hi
    You can define your TABLE parameter WERK without reference and define a range in your fm:
    FUNCTION Z_PROVA_PROVA.
    ""Interfaccia locale:
    *"  IMPORTING
    *"     REFERENCE(MATNR) TYPE  MATNR
    *"  TABLES
    *"      SEL_WERKS
      RANGES R_WERKS FOR MARD-WERKS.
      R_WERKS[] = SEL_WERKS[].
      DATA: BEGIN OF IMARD1 OCCURS 0,
               LGORT LIKE MARD-LGORT,
               LABST LIKE MARD-LABST,
            END   OF IMARD1.
      SELECT LGORT LABST FROM MARD  INTO TABLE IMARD1
      WHERE WERKS IN R_WERKS
      AND MATNR = MATNR.
    Max

  • Select-options in tabstrip subscreen

    Hello
    I am developing a report in which i have the following components,
    Report first calls a main screen 100 which will display a Tabstrip.The first tab in the tabstrip has a subscreen 111 to display the selection screen.
    Now i need to have select-options in this subscreen 111. I think the only way to have the select-options is by programming a selection-screen with screen number 222 and call this in the subscreen 111.
    I am able to see the select-options, But the issue is, the value of the select-options are not getting passed to the program.They seem to be blank.
    Did i miss any step or is anything wrong? Your help please.
    Thanks
    Subha

    Hi,
    The issue in my case is the selection-screen is not called directly by a main screen in a report program. The selection-screen is present in a tabstrip control subscreen. So the flow is, report calls a main screen -> main screen contains tabstrip control -> first tab of tabstrip has a subscreen which should have select-options. Since select-options cannot be directly put using screen painter options, i need to use another subscreen. So how do i pass the value of this select-option to the main program?
    Thanks
    Subhashini

  • Select-option in DP

    Hi Guru,
      Can we use select option in dialogue programming..Plz tell me how it possible if yes.

    Hi,
    Please check the links below.
    https://forums.sdn.sap.com/click.jspa?searchID=15672099&messageID=822147
    https://forums.sdn.sap.com/click.jspa?searchID=15672099&messageID=11727
    https://forums.sdn.sap.com/click.jspa?searchID=15672099&messageID=2462730
    https://forums.sdn.sap.com/click.jspa?searchID=15672099&messageID=4535834
    https://forums.sdn.sap.com/click.jspa?searchID=15672099&messageID=2548768
    https://forums.sdn.sap.com/click.jspa?searchID=15672099&messageID=4219569
    Hope this will help.
    Cheers,
    Rama.

  • How to write text name of parameters / select options in  ABAP list??

    Hi gurus, i must read the text name of parameterd / select options in ABAP program and write it in a list of the same program for log.......how can i do it??
    Thanks in advance!
    Best regards!
    Ferdinando
    Message was edited by:
            Ferdinando Sellitto

    Hello Ferdinandino
    Useful function modules are:
    RS_PRINT_SELECTIONS
    RS_LIST_SELECTION_TABLE (Generates list according to values in selection table(RSPARAMS))
    RS_REFRESH_FROM_SELECTOPTIONS (Current contents of selection screen)
    Function module RS_REFRESH_FROM_SELECTOPTIONS can provide the input for function module RS_LIST_SELECTION_TABLE.
    Regards
      Uwe

  • How to retrieve DB values using select-options

    Hi all,
            I have problem to run this code for getting select option values in runtime.  Is there any function, methods or structure to know this?  I didnot get DB values when I click select-option button.
            I would like to display DB field values when i click select-option pushbutton.  select-option values while programs working in runtime.
    Example Code:
    REPORT  ZBAPUSHBUTTON.
    data: lryrctno type ZLRYRCT-ZEBELN,
          LDRIVER_FN type ZLRYRCT-DRIVER_FN,
          LZDELDT TYPE ZLRYRCT-ZDELDT,
          LZLRYNO TYPE ZLRYRCT-ZLRYNO,
          LZDRIVERID type zlryrct-ZDRIVERID.
    DATA: LRYRCT TYPE ZLRYRCT.
    SELECTION-SCREEN PUSHBUTTON 10(10) LB1 USER-COMMAND PB1.
    SELECTION-SCREEN PUSHBUTTON 25(10) LB2 USER-COMMAND PB2.
    SELECTION-SCREEN BEGIN OF SCREEN 100 TITLE T1.
    PARAMETERS: PLRYCTNO like lryrctno,
              PDR_FN LIKE LDRIVER_FN,
              PZDELDT LIKE LZDELDT,
              PZLRYNO LIKE LZLRYNO.
    SELECTION-SCREEN END OF SCREEN 100.
    SELECTION-SCREEN BEGIN OF SCREEN 200 TITLE T2.
    select-options: slryctno for lryrctno,
                    sdr_fn for ldriver_fn,
                    szdeldt for lzdeldt,
                    szlryno for lzlryno,
                    pzdrid for lzdriverid no intervals.
    SELECTION-SCREEN END OF SCREEN 200.
    INITIALIZATION.
    T1 = 'SELECT CHECK BOX AND RADIO BUTTON'.
    T2 = 'SELECT PARAMETERS'.
    LB1 = 'PARAMETER'.
    LB2 = 'SELECT-OPTION'.
    AT SELECTION-SCREEN.
    CASE SY-UCOMM.
    WHEN 'PB1'.
    CALL SELECTION-SCREEN 100.
    select single * from zlryrct into lryrct where zebeln = plryctno.
        if sy-subrc = 0.
          message 'primary key already exists. enter different lorry rect. no.' type 'W'.
        endif.
        LRYRCT-ZEBELN    = PLRYCTNO.
        LRYRCT-DRIVER_FN = PDR_FN .
        LRYRCT-ZDELDT    = PZDELDT.
        LRYRCT-ZLRYNO    = PZLRYNO.
        INSERT INTO ZLRYRCT VALUES LRYRCT.
        if not sy-subrc = 0.
          MESSAGE 'Insert not possible' TYPE 'W' .
        endif.
    WHEN 'PB2'.
    CALL SELECTION-SCREEN 200.
        select * from zlryrct into lryrct where
                 zebeln in slryctno and
                 driver_fn in sdr_fn and
                 zdeldt in szdeldt and
                 zlryno in szlryno.
          write: / lryrct-zebeln, LRYRCT-DRIVER_FN, LRYRCT-ZDELDT, LRYRCT-ZDELDT, LRYRCT-ZLRYNO .
        endselect.
    ENDCASE.

    What you are looking for is called "search help" (SE11 transaction), you may reuse an existing one (it must be attached to data element, or structure component as foreign key, etc.) Please look at SAP documentation and forums. You may also program it yourself by using AT SELECTION-SCREEN ON VALUE-REQUEST FOR ...

Maybe you are looking for

  • Bar Chart- How to center graph lines

    I am very new to Xcelsuis and am fighting with someing that is easy to most, but driving me crazy. I have a Label Bar that poplulates a list box and when I click on an item in the list box the correct information appears on the bar chart.  The proble

  • How can I download all podcast episodes in Itunes 11.1.3?

    When I subscribe to a podcast, only the first episode downloads (in spite of my default settings, etc.). Now I have to manually click on each little "cloud/arrow" icon and download them individually. Before apple developers took stupid pills and crea

  • How to change the output as text format in Apps R12.1.3

    Hi All, Currently iam trying to modify the Java Concurrent Program (FDExtractAndFormatting) in Batch Payment Process. This Program is generated in text format in 11i APPS. Now we are upgrading to R12.1.3. In R12.1.3 output is coming as PDF format. He

  • A/P Invoice Query

    Hello, I want to come up with a Query to track pricing changes done for items on the A/P Invoice before it's added. For instance: in the GRPO, Bread = 2$                     in the target A/P invoice, Bread = 3$ At times, the users have to change the

  • CDs, DVDs, disk images won't appear in Sidebar or on Desktop

    Hello, Brand new iMac 2.16, right out of the box. CDs, DVDs, and Disk Images won't appear on the desktop or in the Sidebar. Nothing is shown over the horizontal gray line at the top of the sidebar, no Macintosh HD, Servers, etc. Disk Images are fully