Parameters and Select Option in ABAP OO

Hi all,
it's possible to build an application starts with a method of a class thats declares parameters and select-option or I have to do it custom creating a dynpro and some input field as parameters?
thanks
enzo

Just to add detail: the function module RS_REFRESH_FROM_SELECTOPTIONS returns a table of TYPE RSPARAMS_TT.
The structure of this table is:
SELNAME
RSSCR_NAME
KIND
RSSCR_KIND
SIGN
TVARV_SIGN
OPTION
TVARV_OPTI
LOW
TVARV_VAL
HIGH
TVARV_VAL
the first field is the name of the selection parameter, the others have the same structure obtained declaring a range with:
TYPES|DATA <rangetab> TYPE RANGE OF <type>.
see the help topic http://help.sap.com/saphelp_470/helpdata/en/9f/dba71f35c111d1829f0000e829fbfe/content.htm

Similar Messages

  • 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

  • Re : select-options in abap objects

    Dear friends,
    I want to give select-options in abap-objects program. How to give that.
    Thanking You
    with regards,
    Mani

    HI Mani,
    It's common mix ABAP Procedural with ABAP Objects in the same program.
    You should use the same way used in ABAP procedural program as Marco Cerdelli sad.
    But inside ABAP OBJECTS classes you can't use is these statement type.
    Don't forget to close this thread and all yours previous when your question be answered ! In case of doubt read the [rules of engagement|https://forums.sdn.sap.com/].
    Best Regards.
    Marcelo Ramos

  • How to set default value in select option for ABAP query

    Hi experts,
    What is the way to set up default values for select-options in ABAP query.
    e.g.
    I have one field 'Year' in my ABAP query selection screen.
    I want value of current year to be appeared here whenever user execute report
    Thanks in Advance
    -Harkamal

    Hi Harkamal,
    execute your Query via SQ01. On Selection-Screen
    goto save Variant. Mark your field
    as selection variable an press Button election variable.
    Take variable from TVARV and use it.
    Than save the Variant.
    Look at TVARV if the 'Year' is updated to the actualYear!
    regards, Dieter

  • Radio button and select option in one line

    Hi,
    I have an requirement in which i need to display the radio button and select option in one line in an report program.
    How can i do it? 
    Regards,
    Arun.

    Hi,
    Try this code.
    TABLES: bkpf.
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS: p_r1 RADIOBUTTON GROUP a.
    SELECTION-SCREEN COMMENT 4(20) text-001 FOR FIELD p_r1.
    SELECTION-SCREEN COMMENT 30(12) text-002 FOR FIELD p_date.
    SELECTION-SCREEN POSITION 39.
    SELECT-OPTIONS: p_date FOR bkpf-budat OBLIGATORY.
    SELECTION-SCREEN END OF LINE.
    PARAMETERS: p_r2 RADIOBUTTON GROUP a.
    text-001 = " Radio button"
    text-002 = "Posting date"

  • Re : select-options in abap-objects program

    Dear friends,
                      I want to give select-options in abap-objects program. How to give that.
                                 Thanking You
    with regards,
    Mani

    In the transaction SE24, enter your class name, click modify.
    in the tab named "Types" you have to declare two types. By example, if you want to receive one select-options that in your program that uses this class is declared like:
    " P_SAKNR FOR SKAT-SAKNR".
    you've got to declare two types in the class:
    a- TYPES:  begin of E_S_SAKNR,
                          sign(1),
                          option(2),
                          low(10),
                          high(10),
                      end of E_S_SAKNR.
    b - TYPES E_T_SAKNR type standard table of E_S_SAKNR.
    so, in the class method that you want to receive P_SAKNR as importing parameter. You got to do this:
    method TEST importing ET_SAKNR type E_T_SAKNR.
    now, in the implementation of this method you should be able to use ET_SAKNR as the same way as you usually use a parameter or a select-option. You could use it in a select with the operator IN by example..

  • Select-option in ABAP objects

    Hi Guys,
               I need a small help from you. I want to know how to populate the value from select-option to abap object. Please help me, it is very important

    check this code
    REPORT ZSELOPT_TO_CLASS .
    TABLES: VBRK.
    SELECT-OPTIONS: S_VBELN FOR VBRK-VBELN.
    DATA: IT_VBELN TYPE RSELOPTION.
    DATA: X_VBELN TYPE RSDSSELOPT.
    CLASS C1 DEFINITION.
    PUBLIC SECTION.
    DATA: IT_VBRP TYPE VBRP_TAB,
          X_VBRP LIKE LINE OF IT_VBRP.
    METHODS: GET_DATA IMPORTING S_VBELN TYPE RSELOPTION.
    METHODS: DISP_DATA.
    ENDCLASS.
    CLASS C1 IMPLEMENTATION.
    METHOD GET_DATA.
      *SELECT * FROM VBRP*
       INTO TABLE IT_VBRP
       WHERE VBELN IN S_VBELN.
    ENDMETHOD.
    METHOD DISP_DATA.
      LOOP AT IT_VBRP INTO X_VBRP.
        WRITE:/ X_VBRP-VBELN,
                X_VBRP-POSNR.
      ENDLOOP.
    ENDMETHOD.
    ENDCLASS.
    START-OF-SELECTION.
    DATA OBJ TYPE REF TO ZCL_SELOPT.
    CREATE OBJECT OBJ.
    LOOP AT S_VBELN.
      MOVE S_VBELN-LOW TO X_VBELN-LOW.
      MOVE S_VBELN-HIGH TO X_VBELN-HIGH.
      MOVE S_VBELN-SIGN TO X_VBELN-SIGN.
      MOVE S_VBELN-OPTION TO X_VBELN-OPTION.
      APPEND X_VBELN TO IT_VBELN.
    ENDLOOP.
    CALL METHOD OBJ->GET_DATA
                        EXPORTING
                          S_VBELN = IT_VBELN.
    CALL METHOD OBJ->DISP_DATA.
    Edited by: moazam hai on May 17, 2008 6:17 AM
    Edited by: moazam hai on May 17, 2008 6:19 AM

  • Difference between Multiple single values and Selection option variables

    Hi !
    Can any one tell me the difference between variable types:
    Multiple single values and Selection option?
    I used each one of them for selecting values for a characteristic but could not notice a difference in choosing values.
    Is there some difference in functionality or can they be used interchageably?
    Regards,
    Sri Harsha

    Harsha,
    When you go for slection option, in the variable input screen you will be having a button in the last where you can give your slections. There you can maintain either multiple single values and Multiple intervals or else not equal to also..
    Just check out there... you will be having tabs for each..
    Assign Points if it helps
    Gattu

  • Using roadmap and select-options

    I'm new to abap web dynpro, i'm using a roadmap with 4 views. This is working fine but, when I try to use select options in view1 they don't show. When I set view1 as default view the select options are working fine.
    this is how my current web dynpro looks like:
    Main view -> roadmap with viewcontainerUIElement
        view1 -> viewContainerUIElement + table (in the window I embedded the select options in the viewContainerUIElement)
        view2
        view3
        view4
    In view1 I'm using wddoinit to initialise the select options.
    Thanks in advance!

    Hi Srinivas,
    According to you mail, I will provide some solution please try them. It will definitely works.
    ---> Create a attribute which holds the lead selection values of the RADIO_GROUP.
    ---> When you click on the Next View, You will fire the plug. Right. Just before firing the Plug, update the above
          attribute with update information.
    > Do the same code for Select-options code in the WDDOINIT except the passing the values to the select-options.
    > Please pass the attribute information to Select-options with updated information in the method WDDOMODIFYVIEW every time. Without creating a attribute also you can approach the same method. Just for simple access we can create a attribute. Otherwise without that we can do the same.
    So Just populate the values into Select-options depending on the value of RADIO_GROUP you will do the same coding WDDOMODIFYVIEW. But initialization of SELECT-OPTIONS can be only done in the method WDDOINIT method only. WDDOINIT method only execute first time once you go through it and go back and move forward then this method won't execute.
    I hope this logic will work for you. If not Please send me the Code related to SELECT-OPTIONS and RADIO_GROUP Button information.
    I will be in office today up to 4.45 PM (IST). You can contact me in this time otherwise we will discuss on webex tomorrow morning at 9 AM.
    Warm Regards,
    Vijay

  • How to develop ALV and select-option element in BSP? Help!

    Hi Experts,
    I have a requirement where I have a selection screen with 3 select-option elements and a search button. On clicking the search button an ALV table report has to be shown.
    The ALV table is used for new row/rows entry, delete row/rows and update row/rows data. This is something like table control in normal ABAP.
    Additionaly, I want the download to Excel, sorting, filtering, column swapping options in ALV.
    How can I achieve this in BSP?
    Is there any existing SElect-option and ALV component in BSP?
    Any code sample will be really helpfull.
    How much development time will it take?
    Please help!
    Thanks
    Gopal

    I think you will find that most of what you are looking for does NOT exist out of the box for BSP.  There is no delivered selection-option or value help.  I ended up creating my own over the years (You can find some versions online here in SDN in my weblogs - however a complete implementation of select-options was only delivered along with the Advanced BSP Programming book). 
    There is no ALV either.  However with the htmlb:tableView, you can acomplish quite a bit.  You may have to learn about table view iterators to get it all done.  Downloading to Excel also isn't delivered.  I developed a reusable BSP Extension element for this as well (can be found on SDN in my weblogs or with the Advanced BSP Programming book).
    If you plan to recreate all these elements by yourself, your project will take some time.  It took a while to build so many complex UI elements. 
    What release are you running on?  In Netweaver04S you have Web Dynpro ABAP.  WDA has delivered components for value help, select-options, and ALV.

  • Selection-Screen Parameter and select option

    Hi
    I had a very small and silly problem , i have a selection screen in which i had one select-options and another parameter .
    when i define both variable as select option i get output but if i define plant as parameter i dont get any output, .the code .
    SELECTION-SCREEN : BEGIN OF BLOCK s_screen WITH  FRAME TITLE text-001.
    SELECT-OPTIONS:   s_matnr FOR plaf-matnr.",       " OBLIGATORY,
    PARAMETERS:       s_werks like plaf-pwwrk. "    ,  " OBLIGATORY.
    SELECTION-SCREEN: END OF BLOCK s_screen.
    in this code when
    i enter material number i dont get output .
    i enter plant the i get output
    SELECT afko~aufnr
           afko~gamng
           afko~plnbez
           afpo~dwerk
           afpo~psmng
           afpo~matnr
           INTO CORRESPONDING FIELDS OF TABLE i_afko
           FROM afko INNER JOIN
           afpo ON afpoaufnr = afkoaufnr
           WHERE afpo~dwerk = s_werks
           and   afpo~matnr IN s_matnr
           AND   afpo~elikz = space.
    regards
    answers will be definately awarded points

    Hi
    When you use the plant in select-option, your code should be:
    WHERE afpo~dwerk IN s_werks
          and afpo~matnr  IN s_matnr
    if it's parameter:
    WHERE afpo~dwerk = s_werks
           and afpo~matnr IN s_matnr
    Are u sayng in the first case you get the data and in the second one you don't?
    Max

  • How to assing parameters to select-options

    hi all
    thanks in advance
    how to assign parameter value to select-option
    date
    SELECTION-SCREEN: BEGIN OF BLOCK B1 WITH FRAME TITLE text-001.
      select-options    s_budat     FOR mkpf-budat  OBLIGATORY,
                              s_budat1     FOR mkpf-budat.
       parameters cperiod like mkpf-budat.
      SELECTION-SCREEN:END OF BLOCK B1.
    cperiod assign to s_budat-low
      or dummy s_budat1  and how give selection criteria
    thanks all

    Hi,
    I think you want to set some default values in select options.
    so following is code...
    TABLES:MKPF.
    SELECTION-SCREEN: BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
    SELECT-OPTIONS: S_BUDAT FOR MKPF-BUDAT OBLIGATORY,
                    S_BUDAT1 FOR MKPF-BUDAT.
    PARAMETERS CPERIOD LIKE MKPF-BUDAT.
    SELECTION-SCREEN:END OF BLOCK B1.
    AT SELECTION-SCREEN OUTPUT.
      S_BUDAT-LOW = SY-DATUM.
      append s_budat.
    hope it will help you...
    Award points if useful...

  • REPORT_ATTRIBUTE_ERROR_MESSAGE and SELECT-OPTIONS

    Hi,
    I'm still at a loss on how to use the REPORT_ATTRIBUTE_ERROR_MESSAGE on select-options using WDR_SELECT_OPTIONS.
    Do I need to create a Context Node and attributes in the view for the selection options I'm creating? Then, get the attributes of this node and context elements to pass to the REPORT_ATTRIBUTE_ERROR_MESSAGE?
    Thanks,
    Huntr

    Hi,
    I'm still at a loss on how to use the REPORT_ATTRIBUTE_ERROR_MESSAGE on select-options using WDR_SELECT_OPTIONS.
    Do I need to create a Context Node and attributes in the view for the selection options I'm creating? Then, get the attributes of this node and context elements to pass to the REPORT_ATTRIBUTE_ERROR_MESSAGE?
    Thanks,
    Huntr

  • Text for block and select option on the selection screen of Logical Databas

    Hi,
    I have copied a standard program (RFBELJ10) which is making use of LDB (BRF) and created a custom program. Now, the requirement is to add a selection screen option to the custom report and do some validation on the data extracted. I have added the select option and provided a text (lets say "Segment") to it using menu path Goto --> Text Elements --> Selection Texts and activated. But this text is not displayed on the screen when i execute the report. It is showing the string which i used while defining the select option.
    Also i need to provide a frame and title to it. but its not displayed.
    i have written the following code for that:
    SELECTION-SCREEN: BEGIN OF BLOCK seg WITH FRAME TITLE text-h01. " Segment
    SELECT-OPTIONS: s_segmnt FOR faglflexa-segment. " Segment
    SELECTION-SCREEN: END OF BLOCK seg.
    Could you please help me in getting the texts displayed for fram and the select option?
    Thanks,
    Phani

    Solved the problem. I have maintained the text in German. So, when I execute the report in english, it is not displaying the text. I have translated the texts to English and is working fine now.

  • Translating text symbols and selection texts in abap report

    Hi All,
    I have devolped a report and in that translation of selction texts and text symbols is required.
    Problem: In abap text elements  in the report i have gone for goto->translation->and then i have tried to translate by giving the target language as DE and changed all the texts but when i am tring to save it is showing a message that 'STILL 54 OF 54 TEXTS TO BE PROCESSED'.
    Alternative solution :I have tried even using se63 and selected <rept> selection texts.
    but still its showing the same error  ('STILL 54 OF 54 TEXTS TO BE PROCESSED'.)
    from se63.
    kindly give me solution for this issue.
    Thank you,
    bhavani.

    Hi Bhavani.
    Check the [SAP Document for translation|http://help.sap.com/saphelp_sm32/helpdata/EN/41/71601b3ab0f34a8e00aa01338c68f3/content.htm]

Maybe you are looking for