Selecting key of Days Range

Hi All,
I am calculating number of days between 2 dates (dt2-dt1)+1
i have a traget table with ranges specified as
key     days_from     days_to
1     1     4
2     5     10
3     11     30
4     31     99999999999999
like....
select KEY from days_range where ( (dt2-dt1)+1
) between(DAYS_FROM,DAYS_TO)
how do i get the key after i calculate number of days, i dont want to use case statement, as my range table might grow and i will ahve to revisit the case statement.
please suggest.
thanks
Edited by: user633377 on Jun 30, 2009 7:43 AM

More rows added
SQL> with d as (
  2  select  to_date('01-Jan-2009','dd-Mon-yyyy') dt1,
  3     to_date('21-Jan-2009','dd-mon-yyyy') dt2  from dual union all
  4  select  to_date('01-Jan-2009','dd-Mon-yyyy') dt1,
  5     to_date('06-Jan-2009','dd-mon-yyyy') dt2  from dual union all
  6  select  to_date('11-Jan-2009','dd-Mon-yyyy') dt1,
  7     to_date('12-Jan-2009','dd-mon-yyyy') dt2  from dual
  8  ),
  9  keys as (
10  select 1 key, 1 days_from, 4 days_to from dual union all
11  select 2, 5, 10  from dual union all
12  select 3, 11, 30 from dual union all
13  select 4, 31, 99999999999999 from dual
14  )
15  select keys.*, dt2 - dt1 +1  diff
16  from d , keys
17* where dt2 - dt1 +1  between days_from and days_to
       KEY  DAYS_FROM    DAYS_TO       DIFF
         3         11         30         21
         2          5         10          6
         1          1          4          2SS

Similar Messages

  • Ageing report-Days range as an I/p

    Based on posting date we designed an Ageing report
    0  30  60  90  120  ....
    now users want day range as an i/p
    means => user will i/p day range say 40 then report will be executed for 0  40  80  120 .....
    if i/p for day range is 60 then 0  60  120  180 ......
    previously we resticted the key figure by posting date variable by settng the offset range
    like RFK1--- 0balance restricted by var (0-30)
          RKF2--- 0balance restricted by var (31-60) and so on...
    before we were able to hardcore it but with the current requirment we have to take user i/p var and then accordingly ageing report will be generated..
    pl let us know the right way

    okay...
    we have created one char : ZOFFSET (no of days) and included in the target on which ageing report is based on...,,,, after that we crearted a user exit variable Zvar_offset(ready for i/p) on char ZOFFSET.....
    In ZXRSRU01,
    when zpost_dt  {zpost_dt is the user exit variable ,ready for i/p,defined for posting date}
    if i_step = 1
    date_low = zpost_dt.
    date_high = zpost_dt - Zvar_offset. {not sure whether this logic will work or not!!!}
    CLEAR L_S_RANGE.
    L_S_RANGE-LOW  = date_low.
    L_S_RANGE-high  = date_high.
    L_S_RANGE-SIGN = 'I'.
    L_S_RANGE-OPT  = 'BT'.
    APPEND L_S_RANGE TO E_T_RANGE.
    even after this we cant achieve the motive, as zpost_dt will have range value high and low after user exit execution  but in our query its a single value i/p (user will give only one posting date) ,,,
    also what abt other buckets (other ranges for the same offset) because code will return only one range however we want more ranges for different intervals

  • E55 Selection Keys (display e.g. Gallery, Web etc)...

    Hi. Hope I can get some assistance on this one, bought the phone a few days ago and am loving it, so when it started acting up, it was really disappointing to say the least. Recently, when the phone is in normal standby mode i.e. no bluetooth or any applications whatsoever running, all the selection keys viz. right, left and selection key itself disappear. I have to press the Menu key to get them back. At the same time, my key shortcuts using navigation button also don't work until the Menu button, as above, is pressed. This looks like a software issue so I checked and have the latest version, which I downloaded a day after getting the phone, as prompted by the phone itself. I'm starting to wonder if this is perhaps the cause in the form of a virus. Surely also it can't be correct for the displays of the selection keys to go missing? Any help will be appreciated.

    Make sure that you allow pages to choose their colors and that you haven't enabled High Contrast in the Accessibility settings.
    *Tools > Options > Content : Fonts & Colors > Colors : [X] "Allow pages to choose their own colors, instead of my selections above"
    *http://kb.mozillazine.org/Website_colors_are_wrong
    *http://kb.mozillazine.org/Websites_look_wrong
    You can reset all preferences to undo all the changes that you made.
    *http://kb.mozillazine.org/Resetting_preferences
    *https://support.mozilla.org/kb/Resetting+preferences

  • 2700 classic - shortcut for right selection key

    I bought Nokia 2700 classic recently.  When I tried to setup shortcut for right selection key, I am getting a list of application which I am not going to use frequently on a day to day basis.  If we get Music player or radio in this application list, it would be very much useful.  Guys do you have any idea how to get music player or radio on right selection key?
    Solved!
    Go to Solution.

    try menu/settings/shortcuts right selection key options change a list with apps or bookmarks should appear music play or radio should appear
    If  i have helped at all a click on the white star below would be nice thanks.
    Now using the Lumia 1520

  • Nokia E72 Navi Black Select Key In-Flight

    On every normal day, the new Nokia E72 Navi Black Select Key works fine, when used in-flight, the Navi Black Select key become inoperative ? Don't understand why?
    After landing & on ground, the Navi Optical black select key starts to work in normal way.
    Is there any reason why the black navi select key on Nokia E72 become inoperative in-flight?
    Is this normal on all Nokia E72 phones?
    Please note that I downloaded Version 023.002 in my Nokia E72.

    This is a backward step from the E71. In fact, I am very unimpressed with the email solution on the E72 compared with the E71, which is inferior to the lastest version on my E71 (I've moved back to the E71 from my E72).
    Whether I want to see HTML emails (I do) or not should be for me to decide in the settings as I can in Nokia Messaging on the E71. The E72 is a step backward in that you still have to select 'view HTML email' and even then the HTML support is poor. This was like one of the previous verisons of Nokia Messaging on the E71 before Nokia updated it.
    Don't be fooled into thinking that Nokia Messaging being integrated into the firmware on the E72 is a good thing; it's not! The solution is inferior to the current standalone version of Nokia Messaging available on the E71.
    MfE may be a step forward, but when it won't work with Google Mail for Domains (like my E71 did without any problems) it is pointless. I even have problems with Roadsync in that 'push' email causes some loop on the contacts synchronisation which then results in push email being switched off.
    All in all, the E72 is not the great step forward unless you use Exchange 2007 and use the newer version of MfE. For any other 'consumer' email (which we all like to have work and personal email on out smartphones) it is POOR!
     Come on, Nokia, sort it out! Don't you have any beta testers? Surely some ex-E71 users would have been able to point out these massive inadequacies!

  • What is the diffrence  between "Key to Select" and "Selected Key" while creating Radio  Buttons?

    While creating radio buttons there is a confusion regarding two properties "Key to Select" and "Selected Key".Can anybody explain it with example?
    Thanks,
    Vimal

    Hi Vimal,
    Please find my explanation as below
    Key to Select: This is the unique key for each radio button to identify which one is selected
    Selected Key: This holds the "KEY" of selected radio button
    Example:
       Let us say we have 2 radio buttons : Male & Female
         Create a context attribute SELECTED_KEY of type STRING.
         Create an action ON_SELECT for radio button select event
         Now,
         the properties for "MALE" radio button as below
              KEY_TO_SELECT = 'M'
              SELECTED_KEY = "bind to the context attribute SELECTED_KEY
              OnSelect = 'ON_SELECT'.
         The properties for 'Female" radio button as below
              KEY_TO_SELECT = 'F'
              SELECTED_KEY = "bind to the context attribute SELECTED_KEY
              OnSelect = 'ON_SELECT'.
    If we select radio button 'Male', we get the key as 'M' and for 'Female' radio button 'F'.
    check inside the event handler method ONACTIONON_SELECT, you get the 'KEY' of selected radio button.
    So, the context attribute 'SELECTED_KEY'  gets filled with the key of selected radio button
    Hope this helps you in distinguishing the 'KEY TO SELECT' & 'SELECTED KEY' .
    Regards,
    Rama

  • How to select a single day from month view

    From my ipad on IOS7 I can not select a single day from the month view? From the old versions all I had to do was double click a single date even if it had multiple appointments in it to view it. Was this feature removed?  Please help

    It appears to me as though it has indeed been removed. You can tap and hold down on a day while in month view to create or view an event, but you cannot tap on the day to open the whole day's events.

  • Free PO indicator in field selection key/group

    Hi all,
    I would like to make Free PO indicator as mandatory field in PO thru specific document type field selection reference key. When I search for the field, it is not available for existing field selection key (Field selection group).
    How can I add the Free PO indicator into this field selection key/group or Does it represented in different name.
    Kindly clarify.
    With regards
    Suddy

    Hi,
    "Free Indicator" doesn't exist in field selection. If you wanto to have Free Indicator ON for a specific PO Document Type then you need to do ABAP Development for this.
    Use BAdi --> ME_PROCESS_PO_CUST
    Interface --> PROCESS_ITEM (Processing of Item Data)
    Below is the Sample Code for your reference;
    If w_bsart EQ 'ZPOD'.
        wa_item3-repos = ' '.
      ELSE.
      ENDIF.

  • How to select Key figs in Variable Selection of the BEx Report

    Hi,
    My requirement is User want to execute Report on Selected Key figures. Eg. User want to execute Report where the Revenue = $150. This is an example similarly user want to filter  their own values < , >, = ....etc.
    User is end user they dont know how to restrict in Query design.
    Thanks
    Vani

    Hi,
    Check the following link:
    http://help.sap.com/saphelp_nw70ehp1/helpdata/en/44/99de7254236341e10000000a114a6b/content.htm
    http://help.sap.com/saphelp_nw70ehp1/helpdata/en/43/e954daf7e5719ce10000000a1553f6/content.htm
    hope it helps...
    regars,
    Raju

  • Select Last 7 days

    How can I select last 7 days from my table, I use query but it is calculating according to sysdate
    It is the data of my talble
    DP_DATE
    03-APR-10
    21-APR-10
    22-APR-10
    23-APR-10
    26-APR-10
    27-APR-10
    28-APR-10
    29-APR-10
    30-APR-10
    03-MAY-10
    04-MAY-10
    11 rows selected.
      select distinct dp_date
      from dailyprice
      where trunc(dp_date) between trunc(sysdate-7) and trunc(sysdate)
    this query is returning
    DP_DATE
    29-APR-10
    30-APR-10
    03-MAY-10
    04-MAY-10I want to select last 7 days
    26-APR-10
    27-APR-10
    28-APR-10
    29-APR-10
    30-APR-10
    03-MAY-10
    04-MAY-10
    kindly guide
    regards

    Hi,
    Kame wrote:
    with t
    as
    select 'abcFund' FND , to_date('09-MAY-10','dd-mon-rr') dpdate, 10 price from dual union all
    select 'dddFund', to_date('09-MAY-10','dd-mon-rr'), 12 from dual union all
    select 'abcFund', to_date('09-MAY-10','dd-mon-rr'), 12 from dual union all
    select 'edfFund', to_date('09-MAY-10','dd-mon-rr'), 12 from dual union all
    select 'eeeFund', to_date('09-MAY-10','dd-mon-rr'), 12 from dual union all
    select 'dddFund', to_date('08-MAY-10','dd-mon-rr'), 12 from dual union all
    select 'abcFund', to_date('08-MAY-10','dd-mon-rr'), 12 from dual union all
    select 'edfFund', to_date('08-MAY-10','dd-mon-rr'), 12 from dual union all
    select 'eeeFund', to_date('08-MAY-10','dd-mon-rr'), 12 from dual union all
    select 'eeeFund', to_date('08-MAY-10','dd-mon-rr'), 12 from dual union all
    select 'dddFund', to_date('07-MAY-10','dd-mon-rr'), 12 from dual union all
    select 'abcFund', to_date('07-MAY-10','dd-mon-rr'), 12 from dual union all
    select 'edfFund', to_date('07-MAY-10','dd-mon-rr'), 12 from dual union all
    select 'edfFund', to_date('05-MAY-10','dd-mon-rr'), 11 from dual union all
    select 'dddFund', to_date('05-MAY-10','dd-mon-rr'), 12 from dual union all
    select 'eeeFund', to_date('05-MAY-10','dd-mon-rr'), 12 from dual union all
    select 'dddFund', to_date('04-MAY-10','dd-mon-rr'), 12 from dual union all
    select 'abcFund', to_date('04-MAY-10','dd-mon-rr'), 12 from dual union all
    select 'dddFund', to_date('03-MAY-10','dd-mon-rr'), 12 from dual union all
    select 'abcFund', to_date('03-MAY-10','dd-mon-rr'), 12 from dual union all
    select 'edfFund', to_date('03-MAY-10','dd-mon-rr'), 12 from dual union all
    select 'eeeFund', to_date('03-MAY-10','dd-mon-rr'), 12 from dual union all
    select 'dddFund', to_date('01-MAY-10','dd-mon-rr'), 12 from dual union all
    select 'abcFund', to_date('01-MAY-10','dd-mon-rr'), 12 from dual union all
    select 'abcFund', to_date('30-APR-10','dd-mon-rr'), 11 from dual
    )Hot to get my result from this data.What result is that?
    Do you mean what you posted in your first message?
    I want to select last 7 days
    26-APR-10
    27-APR-10
    28-APR-10
    29-APR-10
    30-APR-10
    03-MAY-10
    04-MAY-10The last thing I saw posted
    this query will not work in this situation
    select dp_date
    from ( select dp_date
    , row_number() over (order by dp_date desc) rn
    from mytable
    where rn <= 7ROW_NUMBER will get the 7 most recent rows , whether they all have the same dp_date, 7 different dp_dates, or anything in between.
    DENSE_RANK will get the 7 most recent values , whether they come from 7 rows or more.
    select DISTINCT
         dp_date
    from      (
              select      dp_date
              ,     DENSE_RANK () over (order by dp_date desc)      AS rn
              from      mytable
    where      rn     <= 7If you want the 7 most recent calendar days, then use TRUNC (dp_dtate) in the analytic function:
    DENSE_RANK () over (order by TRUNC (dp_date) desc)      AS rnThis will count (for example) these 3 distinct DATE values:
    6-May-2010 07:00
    6-May-2010 08:10
    6-May-2010 23:59
    all as one value.

  • CAML query to select data in specfic range

    CAML query to select data in specfic range.
    I have a list-A and it has a column 'Col1' which has thousands records, I want to fetch data in a specific range as:
    select Col1,Col2 from list-A where Col1 > 100 and Col1 < 600

    Hi,
    The following code with the CAML query for your reference:
    using (SPSite site = new SPSite("http://spsite/"))
    using (SPWeb web = site.OpenWeb())
    string sQuery = @"<where><and><gt><fieldref name='Col1' /><value type='number'>100</value></gt><lt><fieldref name='Col1' /><value type='number'> 600 </value></lt></and></where>";
    string sViewFields = @"<fieldref name='Col1' /><fieldref name='Col2' />";
    string sViewAttrs = @"Scope='Recursive'";
    var oQuery = new SPQuery();
    oQuery.Query = sQuery;
    oQuery.ViewFields = sViewFields;
    oQuery.ViewAttributes = sViewAttrs;
    SPList oList = web.Lists["ListName"];
    SPListItemCollection collListItems = oList.GetItems(oQuery);
    foreach (SPListItem oListItem in collListItems)
    More information about the CAML:
    http://msdn.microsoft.com/en-us/library/office/ms467521(v=office.15).aspx
    http://msdn.microsoft.com/en-us/library/office/ms462365(v=office.15).aspx
    Here is a tool will help you to build and test SharePoint CAML Queries:
    https://spcamlqueryhelper.codeplex.com/
    Best Regards
    Dennis Guo
    TechNet Community Support

  • FIELD SELECTION KEY

    Hi,
           I have a query regarding Field Selection Key.
    I want to know the difference between Field Selection Keys AKTH, ME21, and ME21N.
    I have observed during Testing that, AKTH and ME21N are almost the same.
    But, I like to know the difference.
    Which is to be used when?
    Please give suitable suggestions in this regard.
    Thanks in advance.
    Thanks & Regards,
    Srinivasa M.S
    +91-9910077829

    Hi,
    Go through following information.
    Field selection key: -
    You should not delete the field selection keys listed below, which the dialog program uses for control purposes, otherwise the dialog may terminate during processing:
    1. Field selection key: transaction
    The field selection key that corresponds to the transaction code: for example, field selection key ME22 for the transaction "Change Purchase Order". For the Enjoy Purchase Order transactions (creating, changing, displaying), there is only field selection key ME21N.
    2. Field selection key: activity type
    Is set from the activity type as follows:
    AKTH    In creation mode
    AKTV    In change mode
    AKTA    In display mode
    AKTE    With PO extension
    You should note that you can also add items in change mode (for example, transaction ME22). Field selection key AKTH would be used for this item.
    3. Field selection key: purchasing document type
    The field selection key that you have assigned to the document type for the purchasing document. For example, field selection key UBF is assigned to document type UB, which is used for stock transfer orders (within a company code). In this key, the fields Price and Price unit are suppressed.
    4. Field selection key: item category/document category
    This is determined from the item and document categories as follows: The first two characters consist of the letters 'PT', the third character of the item category (internal representation), and the fourth of the document category:
    A   for RFQs,
    B   for purchase requisitions
    F   for purchase orders
    K   for contracts
    L   for scheduling agreements
    Accordingly, field selection key PT3F would be used for a subcontracting item in a purchase order.
    Field selection key: function authorization/release status
    Purchasing documents: Used for authorization control. If the user parameter EFB (function authorizations in Purchasing) has been assigned and a field selection key has been assigned to the relevant value, this field selection key is used. Otherwise, field selection key $$$$ is used if the user has insufficient authorization to display prices.
    Purchase requisitions: If the purchase requisition is subject to a release strategy and a field selection key has been assigned to the current release indicator, this field selection key is used.
    Field selection key: subitem/creation indicator
    Purchasing documents: Is only used in the case of subitems. The field selection key is put together in the same way as for the item categories (field selection key 4), with the string 'UP', the subitem category, and the document type.
    Purchase requisitions: the field selection key that is derived from the creation indicator in the purchase requisition, that is, ESTV, ESTF, or ESTD, is used in the case of purchase requisitions generated from within Sales and Distribution, from a production order, or through direct procurement.
    5. Field selection key: purchase requisition
    In addition to the available field selection keys, you can define a field selection key at function authorization level to influence the input characteristics of fields in the Enjoy Purchase Requisition.
    You can use this field selection key to set up groups of users that have certain restrictions when editing purchase requisitions.
    SAP Recommendation: -
    SAP recommends that you accept the settings defined in the standard system. In this case, no action is required on your part.

  • Field Selection Keys related to Purchase Order

    Hi,
           I have a query regarding Field Selection Key.
    When we go to Field Selection Screen connected to Purchase Order, we can find so many Field Selection Keys viz., $$$$, $$$2, AKTH, ME21N, etc.
    How to judge which is to be used when?
    I like to know how these Field Selection Keys are linked to Purchase Order Screen in the background.
    Please guide me in this regard by giving proper suggestions in this regard.
    Thanks in advance.
    Thanks & Regards,
    Srinivasa M.S
    +91-9910077829

    Hi Karthik,
                        Thanks for your valuable information.
    I like to know few more things.
    1) Is it possible to create our own Field Selection Key?
    2) If you observe the list of Field Selection Keys related to Purchase Order Screen, you can see that there are Field Selection Keys by name ME21N, ME21, AKTH, etc.
    If the Field Selection Keys are predefined by SAP, it is OK. But, if there is an option to create our own Field Selection Key, then what is the procedure to do the same?
    It seems that ME21N, ME21, and AKTH are used for Create Purchase Order Screen.
    There are also keys ME22N and ME23N used for Change Purchase Order Screen and Display Order Screen.
    I am little bit confused about this.
    We are linking the Field Selection Keys to the Document Types.
    But, I think it is only for create Purchase Order Screen. Please correct, if I am wrong.
    Also, I like to know how we are linking the Field Selection Keys related to Change Purchase Order Screen and Display Purchase Order Screen?
    Please clarify all my doubts by giving proper suggestions.
    Thanks in advance.
    Thanks & Regards,
    Srinivasa M.S
    +91-9910077829

  • Field Selection Key in Purchase order

    Hi Friends
    We have defined two different ZFK1, ZFK2 Custom Field selection keys for payterms & GR/IR  Indicators in  Purchase order .
    ZFK1  is used across all(most of the ) company codes and document types as defined in config .
    But our requiremnt  is that ZFK1 must be replaced  with ZFK2 for certain compnay code and document types combination dynamically in ABAP without chnaging the config in SPRO.
    Please help me out if any body knows  how this can be achieved and what are the user-exits should be used .
    Thanks in advance ,
    Siva.

    Hi Friends
    We have defined two different ZFK1, ZFK2 Custom Field selection keys for payterms & GR/IR  Indicators in  Purchase order .
    ZFK1  is used across all(most of the ) company codes and document types as defined in config .
    But our requiremnt  is that ZFK1 must be replaced  with ZFK2 for certain compnay code and document types combination dynamically in ABAP without chnaging the config in SPRO.
    Please help me out if any body knows  how this can be achieved and what are the user-exits should be used .
    Thanks in advance ,
    Siva.

  • WD: Select Options shows empty ranges

    Hi there,
    Im using select options in my wd application... I defined a few fields (numeric, dats and so on).  I was expecting that the select options in wd works like the normal ones in normal abap report.
    But when I try to read the results from select options , the result range table has no sign or option value (low value ok) ... when I reach the result to a Select statement a shortdump happen with the notice there is no sign or option value in the IN parameter of the Selection statement.
    Does any one know if this is standard behavior of WD select options ?

    Hi ,
    try to understand following code .
    METHOD wddoinit .
      DATA:
           lr_componentcontroller TYPE REF TO ig_componentcontroller,
           l_ref_cmp_usage TYPE REF TO if_wd_component_usage.
      DATA:
          lt_range_table       TYPE REF TO data,
          lt_types             TYPE string_table,
          rt_range_table       TYPE REF TO data,
          text                 TYPE string,
          typename             TYPE string.
      DATA: vbeln TYPE lips-vbeln,
            erdat TYPE lips-erdat,
            auart TYPE vbak-auart,
            trnsp TYPE vtadd01t-add_info,
            kunnr TYPE likp-kunnr.
      DATA:
        num_events TYPE i.
      DATA: uname TYPE sy-uname.
      uname = sy-uname.
      wd_context->set_attribute(  name = 'CUSTOMER'
      value = uname  ).
    *  wd_context->GET_ATTRIBUTE( Name = 'TRANSPORTER_CODE'
    *  Value = uname ).
    * create the used component
      l_ref_cmp_usage = wd_this->wd_cpuse_select_options( ).
      IF l_ref_cmp_usage->has_active_component( ) IS INITIAL.
        l_ref_cmp_usage->create_component( ).
      ENDIF.
    * get a pointer to the interface controller of the select options component
      wd_this->m_wd_select_options = wd_this->wd_cpifc_select_options( ).
    * init the select screen
      wd_this->m_handler = wd_this->m_wd_select_options->init_selection_screen( ).
      lt_range_table = wd_this->m_handler->create_range_table( i_typename = 'VBELN_VL' ).
      wd_this->m_handler->add_selection_field(
        i_description                = 'Sales Document'
        i_id                         = 'VBELN'
        i_obligatory                 = 'X'
        it_result                    = lt_range_table
        i_value_help_structure       = 'LIPS'
        i_value_help_structure_field = 'VBELN' ).
      lt_range_table = wd_this->m_handler->create_range_table( i_typename = 'ERDAT' ).
      wd_this->m_handler->add_selection_field( i_id = 'ERDAT'  i_obligatory = 'X' it_result = lt_range_table ).
    *lt_range_table = wd_this->m_handler->create_range_table( i_typename = 'VTTK_ADD01' ).
    *wd_this->m_handler->add_selection_field( i_id = 'VTTK_ADD01' I_DESCRIPTION  = 'CHAHA' it_result = lt_range_table ).
    *    wd_this->m_handler->add_selection_field(
    *      i_description                = 'Transporters Code'
    *      i_id                         = 'VTTK_ADD01'
    *      it_result                    = lt_range_table
    *      i_value_help_structure       = 'VTADD01T'
    *      i_value_help_structure_field = 'ADD_INFO' ).
    *Supress Global options in Used Component
      wd_this->m_handler->set_global_options(
          i_display_btn_cancel  = ''
          i_display_btn_check   = ''
          i_display_btn_execute = ''
          i_display_btn_reset   = '' ).
      lt_range_table = wd_this->m_handler->create_range_table( i_typename = 'VBAK-AUART' ).
      wd_this->m_handler->add_selection_field(
        i_description                = 'Sales Document Type'
        i_id                         = 'AUART'
         i_obligatory                = 'X'
        it_result                    = lt_range_table
        i_value_help_structure       = 'VBAK'
        i_value_help_structure_field = 'AUART' ).
    ENDMETHOD.
    METHOD onactionexecute .
      DATA: node_saledoc TYPE REF TO if_wd_context_node.
      DATA: node_crdate TYPE REF TO if_wd_context_node.
      DATA: node_transcode TYPE REF TO if_wd_context_node.
      DATA: node_doctype TYPE REF TO if_wd_context_node.
      DATA: node1 TYPE REF TO if_wd_context_node.
      DATA: node2 TYPE REF TO if_wd_context_node.
      DATA: rt_saledoc TYPE REF TO data.
      DATA: rt_crdate TYPE REF TO data.
      DATA: rt_transcode TYPE REF TO data.
      DATA: rt_doctype TYPE REF TO data.
      FIELD-SYMBOLS: <fs_saledoc> TYPE table,
                      <fs_crdate> TYPE table,
                      <fs_transcode> TYPE table,
                      <fs_doctype> TYPE table.
    * Retrieve the data from the select option
      rt_saledoc = wd_this->m_handler->get_range_table_of_sel_field(
      i_id = 'VBELN' ).
    * Assign it to a field symbol
      ASSIGN rt_saledoc->* TO <fs_saledoc>.
    * Retrieve the data from the select option
      rt_crdate = wd_this->m_handler->get_range_table_of_sel_field(
      i_id = 'ERDAT' ).
    * Assign it to a field symbol
      ASSIGN rt_crdate->* TO <fs_crdate>.
    * Retrieve the data from the select option
      rt_doctype = wd_this->m_handler->get_range_table_of_sel_field(
      i_id = 'AUART' ).
    * Assign it to a field symbol
      ASSIGN rt_doctype->* TO <fs_doctype>.
    * Retrieve the data from the select option
    *rt_transcode = wd_this->m_handler->get_range_table_of_sel_field(
    *i_id = 'VTTK_ADD01' ).
    ** Assign it to a field symbol
    *assign rt_transcode->* to <fs_transcode>.
      node_saledoc = wd_context->get_child_node( name = 'S_VBELN' ).
      node_saledoc->bind_table( <fs_saledoc> ).
      node_crdate = wd_context->get_child_node( name = 'S_ERDAT' ).
      node_crdate->bind_table(  <fs_crdate> ).
      node_doctype = wd_context->get_child_node( name = 'S_AUART' ).
      node_doctype->bind_table( <fs_doctype> ).
      IF <fs_doctype> IS NOT INITIAL
        AND <fs_crdate> IS NOT INITIAL
        AND <fs_saledoc> IS NOT INITIAL
        wd_comp_controller->execute_zotddelvnote_vend_tari( ).
      ENDIF.
    ENDMETHOD.
    Regards,
    Amit solanki
    Edited by: Amit Solanki on Aug 19, 2009 11:30 AM
    Edited by: Amit Solanki on Aug 19, 2009 11:32 AM

Maybe you are looking for