Getting content and address of select-options (created dynamically)

Hi guys,
Suppose I have a dynamically created select-options in a program
SELECT-OPTIONS it_ranges FOR ...
Let's say I can determine its name ( IT_RANGES ) only during program execution.
Now I know I can use field symbols to get its content like below:
FIELD-SYMBOLS: <fs>.
"here I will have content of the table in <FS>
ASSIGN ('IT_RANGES[]') TO <fs>.
...but I would like to know how can I get the content of this select-options table through date reference
TYPES: BEGIN OF t_ranges,
        sign TYPE c,
        option(2) TYPE c,
        low TYPE i,
        high TYPE i,
       END OF t_ranges.
"let say tt_ranges is of the same type like IT_RANGES
TYPES: tt_ranges TYPE TABLE OF t_ranges.
DATA: ref TYPE REF TO data.
CREATE DATA ref TYPE tt_ranges.
The above will only create typed reference to table but I want it to point to my table IT_RANGES. The statement below don't work here.
GET REFERENCE OF ('IT_RANGES[]') INTO ref.
Is there any other way I can get (using data reference)?
1) address of this select-options table
2) content of this select-options table
Thanks for help in advance
M.
Edited by: Marcin Pciak on Nov 28, 2008 11:33 AM

Statement CREATE DATA would only make sense when you are trying to create the dynamic select options. You can use the addition TYPE HANDLE in order to create the Range Table. Check method implementation CREATE_RANGE_TABLE in class CL_WDR_SELECT_OPTIONS.
Once the Select-option is created, you need to use the GET REFERENCE to get the data reference of the Select-options. We can't specify the dynamic reference with brackets in the GET REFERENCE statement. So, you need to use the field-symbols to do the dynamics.
DATA: ref TYPE REF TO data.
DATA: ref_fs TYPE REF TO data.
FIELD-SYMBOLS: <fs>.
DATA: w_range TYPE i.
SELECT-OPTIONS it_rang FOR w_range.
START-OF-SELECTION.
  GET REFERENCE OF it_rang[] INTO ref.
  ASSIGN ('IT_RANG[]') TO <fs>.
  GET REFERENCE OF <fs> INTO ref_fs.
  write: 'done'.
Regards,
Naimesh Patel

Similar Messages

  • How to declare and work with select-option in screen painter?

    hello there,
    can anybody plz suggest me ,how to declare and work with select-option in screen painter?
    neon

    Hi Blue,
    Please check these threads which will help you a lot..
    module pool programming " to add selection-option on screen"
    Re: Select option in Dialog program screen
    Re: SELECT-OPTIONS in Screen
    Good luck
    Narin

  • Can't get iCal and Address Book to sync properly

    I recently upgraded to Office 2008. Since then, I can't get iCal and Address book to sync properly with Entourage 2008 (I did set all three sync criteria in Entourage preferences). None of Entourage's events go into iCal (iCal is blank) and the Address Book has 10 times as many names as Entourage. Everything in Entourage 2008 is correct and everything in iCal and Address Book is essentially wrong.
    Is there some way for me to erase everything in Address Book and iCal and start the sync between them and Entourage from scratch? Ultimately, I am trying to get Entourage to sync with my new Blackberry, which it does through iCal and Address Book using Missing Sync. I can't make this happen until information is flowing properly from Entourage to iCal and Address Book.
    Thank you!

    BEFORE YOU DO ANYTHING - BACK UP ALL YOUR DATA IN ENTOURAGE.
    You can delete everything in iCal by deleting the calendar (Entourage or Personal or temp or whatever Calendar is there). You can delete everything in Address book either by highlighting all the contacts and hitting delete or by deleting the Address Book folder in Address Book.
    The key in getting them to sync properly with Entourage is deleting all the preferences in your Library folder under <your user>. Delete anything with Microsoft Entourage in it. I also deleted iCal preferences and Address Book Preferences.
    I also found it necessary to go to the Office folder and delete the sync services folder.
    Also go to Entourage sync services and turn OFF syncing with iCal and Address Book. Exit Entourage.
    Go to your application folder, isync - reset sync history (button at bottom of screen).
    Then bring up Entourage, sync services, and reactivate syncing with iCal and Address Book.
    Everything should work. I have been struggling with this the last week or two. I've had innumerable exchanges with MS who have said anything with syncing is not their problem it's an apple application. Through these discussion boards I pieced together all of the elements above. But be sure to back up anything you want to keep before you do any of this.
    It should work. It did for me (at least last night and all day today). Good luck.

  • 'Erase All Content and Settings' i selected it and it's taking too long it's not even loading! Is it really tooks a several hours ? is there any problem how can i fix it. Please tell me

    'Erase All Content and Settings' i selected it and it's taking too long it's not even loading! Is it really tooks a several hours ? is there any problem how can i fix it. Please tell me

    Likewise bro... atleast mine has the Apple logo... and the circular thing... I saw this online and i'll be trying it ASAP... http://support.apple.com/kb/HT1808

  • Need to disable one of the select-options in dynamic selection screen

    Hi,
    we have copied the Standard program: RFDOPR00 into Z, my requirement is to disable one of the select-options in dynamic selection screen for ex: Reason code(User shouldnot able to enter anything in it).
    Can anyone please tell me the procedure to do it... I had tried using at selection-screen but it doesnt work as it in 'LOOP AT SCREEN', i am not able to capture the Parameter name(screen-name).
    Thanks,
    Ravi

    Hi,
    Get inside your selection screen, by executing your program.
    Now type /h in the field where you enter transaction code and press enter.
    Now again press enter, this will take you debugger starting from your Selection screen.
    You might be knowing this, still if you are not aware of this, this might be a valuable tip.
    From here , you can trace your Parameter name.

  • Hiding and then making select-options visible on the selection-screen

    I've created a selection screen. On this i've got a field (pr_inpt) depending on whose value i have to display the rest select-options viz. (so_c1, so_n1, so_d1, so_t1) say ,
    1.)if (pr_inpt) contains value 'A' then display (so_c1 & so_d1)
    2.)if (pr_inpt) contains value 'B' then display (so_n1, so_d1 & so_t1)
    To achieve it, in the initialization event, i looped at the screen and for all (so_c1, so_n1, so_d1, so_t1) i made screen-active = '0'. Due to this my objective to hide fields in the beginning is achieved.
    Next when user is entering value into (pr_inpt), i am making screen-active = '1' at selection-screen output event, for those relevant select-options (say if A, then made active for so_c1 & so_d1) but my problem is that it is making all select-options (so_c1, so_n1, so_d1, so_t1) visible on the screen which i don't want.
    How can i achieve this, also is it possible to change the label of the select-options while displaying.
    Plz help.

    hi just copy and paste following code into ur abap editor and see weather this logic helps u ????
    REPORT Z_HRA1.
    tables: pa0000, pa0001.
    parameters: p_chk1 as checkbox user-command rusr,
    p_chk2 as checkbox user-command rusr,
    p_chk3 as checkbox user-command rusr,
    p_chk4 as checkbox user-command rusr,
    p_chk5 as checkbox user-command rusr.
    selection-screen: begin of block blk1 with frame.
    select-options: s_pernr for pa0000-pernr modif id ABC no-extension no intervals,
    s_stat2 for pa0000-stat2 modif id DEF,
    s_werks for pa0001-werks modif id GHI,
    s_persg for pa0001-persg modif id JKL,
    s_persk for pa0001-persk modif id MNO.
    selection-screen: end of block blk1.
    AT SELECTION-SCREEN output.
    LOOP AT SCREEN.
    IF SCREEN-GROUP1 = 'ABC'.
    IF p_chk1 = 'X'.
    SCREEN-ACTIVE = 1.
    ELSE.
    SCREEN-ACTIVE = 0.
    ENDIF.
    MODIFY SCREEN.
    ENDIF.
    IF SCREEN-GROUP1 = 'DEF'.
    IF p_chk2 = 'X'.
    SCREEN-ACTIVE = 1.
    ELSE.
    SCREEN-ACTIVE = 0.
    ENDIF.
    MODIFY SCREEN.
    ENDIF.
    IF SCREEN-GROUP1 = 'GHI'.
    IF p_chk3 = 'X'.
    SCREEN-ACTIVE = 1.
    ELSE.
    SCREEN-ACTIVE = 0.
    ENDIF.
    MODIFY SCREEN.
    ENDIF.
    IF SCREEN-GROUP1 = 'JKL'.
    IF p_chk4 = 'X'.
    SCREEN-ACTIVE = 1.
    ELSE.
    SCREEN-ACTIVE = 0.
    ENDIF.
    MODIFY SCREEN.
    ENDIF.
    IF SCREEN-GROUP1 = 'MNO'.
    IF p_chk5 = 'X'.
    SCREEN-ACTIVE = 1.
    ELSE.
    SCREEN-ACTIVE = 0.
    ENDIF.
    MODIFY SCREEN.
    ENDIF.
    ENDLOOP.
    Regards
    Gagan

  • Get-Content and add Date and Time in a new file

    Hello,
    in a existing file I have data like:
    1;Idle
    5;chrome
    1;spoolsv
    Now I need to grab the content and add date and time in front of each line and save it to another file like:
    07.04.2015;10:18;1;Idle
    07.04.2015;10:18;5;chrome
    07.04.2015;10:18;1;spoolsv
    But I don't have any idea how I could solve this challange. Does anyone have a helping hand for me?
    Greetings

    Hello,
    If you need a new file with the desired output try this
    get-content .\current.txt | Foreach-Object{ $dntv = (get-date) ; "$dntv" + $_} | Out-File newfile.txt
    regards,
    V
    Venu

  • How to get calender in f4 helpfor select options in module pool (urgent)

    Hi All,
    how to get calender in f4 help for select options in module pool
    Please help .
    Thanx in advance,
    amruta

    Hi,
    Check this Example..
    Tables:Mara.
    Select-options:s_matnr for mara-matnr.
    Types:Begin of i_mara,
           matnr like mara-matnr,
           end of i_mara.
      data:it_mara type standard table of i_mara.
      At selection-screen on value-request for s_matnr-low.
      Select matnr from mara into table it_mara.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
        DDIC_STRUCTURE         = ' '
          RETFIELD               = 'MATNR'
        PVALKEY                = ' '
         DYNPPROG               = SY-REPID
         DYNPNR                 = SY-DYNNR
         DYNPROFIELD            = 'S_MATNR-LOW'
        STEPL                  = 0
        WINDOW_TITLE           =
        VALUE                  = ' '
         VALUE_ORG              = 'S'
        MULTIPLE_CHOICE        = ' '
        DISPLAY                = ' '
        CALLBACK_PROGRAM       = ' '
        CALLBACK_FORM          = ' '
        MARK_TAB               =
      IMPORTING
        USER_RESET             =
        TABLES
          VALUE_TAB              = IT_MARA
        FIELD_TAB              =
        RETURN_TAB             =
        DYNPFLD_MAPPING        =
       EXCEPTIONS
         PARAMETER_ERROR        = 1
         NO_VALUES_FOUND        = 2
         OTHERS                 = 3

  • How to get content of custom fields that were created via the EEWB for CIC?

    Hi
    Can anyone tell me how to get the content of custom fields that were created via the EEWB for CIC? This is required at a time when the data has not been written to the database.
    I would like to know how to read this data in the CRM_APPOINTMENT_MERGE method of CRM_APPOINTMENT_BADI.
    Thanks

    Hi Michael,
    I have a requirement to replicate custom setype data created for CRM sales order to R/3 sales order.These fields have been created at item level.
    Do you know the set of steps to achieve the same.
    Any help would be appreciated.
    Thanks,
    Chamu

  • Selection Tools, Click and drag to select option

    Hi! I would really appreciate some help with AI. Im working on a Mac book pro.
    I have previously been working on CorelDraw and have now moved over to AI again.
    I dont understand why I cant Click and drag my selection tool over certain objects and then select those objects. When I click and drag the selection tool or any other selection tool, it selects EVERYTHING on the page. I just want to click, drag and select the objects that I want to group together. Is there some sort of setting where I can do this??  I have watched tutorials about the selection tools. The tutorials show that this is possible but for some reason mine isnt doing it...
    I hope this makes sense, please please can someone assist me.
    Thank you!

    valentevn,
    This may be relevant to the strangenesses that you encounter.
    The following is a general list of things you may try when the issue is not in a specific file (you may have tried/done some of them already); 1) and 2) are the easy ones for temporary strangenesses, and 3) and 4) are specifically aimed at possibly corrupt preferences); 5) is a list in itself, and 6) is the last resort.
    1) Close down Illy and open again;
    2) Restart the computer (you may do that up to 3 times);
    3) Close down Illy and press Ctrl+Alt+Shift/Cmd+Option+Shift during startup (easy but irreversible);
    4) Move the folder (follow the link with that name) with Illy closed (more tedious but also more thorough and reversible);
    5) Look through and try out the relevant among the Other options (follow the link with that name, Item 7) is a list of usual suspects among other applications that may disturb and confuse Illy, Item 15) applies to CC, CS6, and maybe CS5);
    Even more seriously, you may:
    6) Uninstall, run the Cleaner Tool (if you have CS3/CS4/CS5/CS6/CC), and reinstall.
    http://www.adobe.com/support/contact/cscleanertool.html

  • E66 get hanged and restarted when selecting any th...

    Hi friends,
    I just purchased E66 3 week ago.
    Its just awesome phone.
    But when I tried to change theme from Grey to White steel directly without preview it gets hanged and restarted.
    Anybody having this type of problem?
    let me know

    In the search window, if you can, search for "com.apple.finder.plist". Trash it, and restart.
    If you can't do it, put your machine in Target Mode, and connect to a buddies machine. Search for, and remove, that same file.

  • Call Transaction and fill a select-options field with more than one value?

    Hello everybody,
    how can I fill a select-options field with more than one value.
    Here is the code example:
      CLEAR: GT_BDCDATA, GS_BDCDATA.
      GS_BDCDATA-program = 'RHALEINI'.
      GS_BDCDATA-DYNPRO = '1000'.
      GS_BDCDATA-DYNBEGIN = 'X'.
      APPEND GS_BDCDATA TO GT_BDCDATA.
      CLEAR: GS_BDCDATA.
      GS_BDCDATA-FNAM = 'PCHOTYPE'.
      GS_BDCDATA-FVAL = 'P'.
      APPEND GS_BDCDATA TO GT_BDCDATA.
      CLEAR: GS_BDCDATA.
      LOOP AT gt_hrobjinfty INTO gs_hrobjinfty.
        GS_BDCDATA-FNAM = 'PCHOBJID-LOW'.
        GS_BDCDATA-FVAL = gs_hrobjinfty-objid.
        APPEND GS_BDCDATA TO GT_BDCDATA.
        CLEAR: GS_BDCDATA.
      ENDLOOP.
      CALL TRANSACTION 'PFAL' USING GT_BDCDATA MODE 'A'
                       MESSAGES INTO GT_MESSAGES.
    THX.

    Hi,
    Please refer the code below:
    *Code used to populate 'select-options' & execute report
    DATA: seltab type table of rsparams,
          seltab_wa like line of seltab.
      seltab_wa-selname = 'PNPPERNR'.
      seltab_wa-sign    = 'I'.
      seltab_wa-option  = 'EQ'.
    * load each personnel number accessed from the structure into
    * parameters to be used in the report
      loop at pnppernr.
        seltab_wa-low = pnppernr-low.
        append seltab_wa to seltab.
      endloop.
      SUBMIT zreport with selection-table seltab
                                    via selection-screen.
    Thanks,
    Sriram Ponna.

  • Issue when reading values of Select-options for Dynamic F4

    Hi All,
    I have provided dynamic F4 help on class name (ESTCAT) and characteristic name (ATNAM). Both are select options with no intervals. The class name should be entered to get the F4 help for characteristic name, else an message would appear to select a class name first. My message is coming when i press F4 on characteristic name without giving any class name. This is correct but if i enter the class name after this message and do an F4 for characteristic name, it still shows the same message which is not correct. The reason is the class name entered is not captured in the FM RS_REFRESH_FROM_SELECTOPTIONS output table and it is captured only if i hit enter after entering the class name.
    Is it possible to get the class name in the FM output without hitting enter or any other way to resolve this issue?
    Thanks in advance,
    Srilakshmi.

    In Flow Logic
    PROCESS ON VALUE-REQUEST.
      FIELD itab-connid MODULE f4_get.
    In Program
    MODULE f4_get INPUT.
      DATA : fnam TYPE string,
             fval TYPE string.
    *         lin TYPE i.
      DATA : BEGIN OF f4_tab OCCURS 0,
             carrid TYPE sflight-carrid,
             connid TYPE sflight-connid,
        END OF f4_tab.
       CLEAR lin.
      GET CURSOR FIELD fnam VALUE fval LINE lin. " This gives the Current Line in Table Control
      DATA : dynpread TYPE TABLE OF dynpread WITH HEADER LINE.
      REFRESH dynpread.
      CLEAR dynpread.
      dynpread-fieldname = 'ITAB-CARRID'.
      dynpread-stepl = lin.  " You need to pass this line Value here
      APPEND dynpread.
      CLEAR dynpread.
      CALL FUNCTION 'DYNP_VALUES_READ'
        EXPORTING
          dyname                               = sy-repid
          dynumb                               = sy-dynnr
        TABLES
          dynpfields                           = dynpread
       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 IS INITIAL.
        READ TABLE dynpread WITH KEY fieldname = 'ITAB-CARRID'.
        IF sy-subrc IS INITIAL.
          SELECT carrid connid FROM sflight
                INTO TABLE f4_tab
                 WHERE carrid = dynpread-fieldvalue.
          CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
            EXPORTING
              retfield               = 'CONNID'
             dynpprog               = sy-repid
             dynpnr                 = sy-dynnr
             dynprofield            = 'ITAB-CONNID'
             value_org              = 'S'
            TABLES
              value_tab              = f4_tab
        ENDIF.
      ENDIF.
    ENDMODULE.                 " f4_get  INPUT
    Regards
    Surendra P

  • Select option value dynamic

    Hi,
    I have a select option which must have a default value. This default value is the current date -1 (yesterday...).
    DATA ws_date TYPE p0001-begda.
    SELECT-OPTIONS s_date FOR ws_date DEFAULT sy-datum - 1.
    But sy-datum - 1doesn't exist.
    The 'RP_CALC_DATE_IN_INTERVAL' function allows to calculate a date.
    I do :
    SELECT-OPTIONS s_date FOR ws_date.
    INITIALIZATION.
      w_current_date = sy-datum.
      CALL FUNCTION 'RP_CALC_DATE_IN_INTERVAL'
        EXPORTING
          date      = w_current_date
          days      = '01'
          months    = '00'
          signum    = '-'
          years     = '00'
        IMPORTING
          calc_date = w_new_date.
      s_date = w_new_date.
    But the new date is not display as like a default value...

    Hi,
    You need to write the code like this.
    data : ws_date type sy-datum.
    Select-options : S_date for ws_date.
    Initialization.
    s_date-option = 'EQ'.
    s_date-Sign = 'I'.
    s_date-low = sy-datum - 1.
    append s_date.
    Hope this helps.
    Regards,
    Pramod

  • When placing a PDF created with Distiller, I only get Crop and Media as import options -- I need it to crop to the Trim! PLEASE HELP!

    I'm having a MAJOR problem placing PDF files in InDesign CS4...
    When I try to place a PDF that has been created in Distiller, the ONLY import options I can choose are CROP and MEDIA. I need it to crop to the TRIM, but that option is grayed out. The PDFs I'm trying to place were created in-house, and converted from Post Script files to PDFs using Distiller. We use PDF/X-1a equivalent settings when creating our PDFs.
    If I export the file as a PDF and then try to place it into a CS4 file, I am able to select Trim as an option.
    ALSO, if I open the Distiller PDF in Acrobat and then save it (without changing anything), I am able to select Trim as an option. A workaround I have found is to open all of the PDF files in Acrobat, save them to my desktop, and then save over the ones I need to place. Here's the problem with that: I work for a publishing company, and need to place hundreds of ads for each issue of our publications, and it adds a lot of time if I have to go and re-save everything just to be able to place all the ads. 
    Does anyone know how to fix this problem? I need to get this figured out so we can use CS4 for all of our publications again. -- We've gone back to using CS3 until I can get this figured out...
    - Valerie

    Steve,
    Thanks for the reply, but my PDFs all have trim boxes on them. If I try to place the same PDF in InDesign CS3, it gives me Trim as an option. Also, if I open the PDF and save a copy to my desktop, I am able to select Trim as an option when placing the PDF, and I didn't change anything about it.
    I've been trying to see if it's something with the Print Preset settings I'm using, but I can't find anything that seems like it would affect how InDesign would read the Trim area of the PDF.
    I've attached 2 PDF files. One that was created with Distiller, and one that was exported from InDesign CS4. The Distiller one doesn't show Trim as an option in CS4, but the exported one does.... but they started out as the same ad.  Ugh!  Help me please!
    - Valerie

Maybe you are looking for

  • Jaxrpc compilation exception(plz Help very Urgent Plz)

    Hello there.... while deploying a simple webservice using deploytool i m getting this error while the application that is being deployed is not even using ejbs.... i m trying to compile the example given on the forum by Qusay H. Mahmoud, so plz help

  • Crash when open the Sound Pref panel

    Hello, I have a problem with the sound pref panel : when I try to open it, the Preference panel crah. Thanks in advance for your help Po The log goes : Host Name: Po Date/Time: 2006-05-21 21:03:55.738 +0200 OS Version: 10.4.6 (Build 8I127) Report Ver

  • Loading config files

    Is there a "standard" way to load config files? I remember reading something about ResourceBundler or something to that effect, but can't find that thread now. Essentially i don't want to have to put "../../conf/myconf.xml" in my code. I also believe

  • Failed to build mocha shape data

    Hello, I come with error that adobe is sending me when im trying to paste my mocha shape data in AE. This is what is showing in message : "AEGP Plugin MochaShapeConverter : Failed to build correct mocha shape data. ( 5027 :: 12 )" I took some steps t

  • Workflow to send notifications to multiple supplier email ID's

    Hi, I am little stuck in one logic. Don't seem to be a complecated but just looking for the right approach. I have a custom concurrent program which has a SQL query which returns multiple rows. Each row is a for each supplier e.g. Supplier1      [ema