IPAK Selection variable ABAP

Hi All
I am trying to set the value of a selection variable in an Ipak using ABAP using the following code
l_t_range-low = datetime.
l_t_range-sign = 'I'.
l_t_range-option = 'GT'.
I need to extract records with a timestamp greater than the value set in l_t_range-low.
However I get the error message
For sel. Field 'xxxxxxx', No selection with SIGN='I', OPTION 'GT' allowed.
I could use BETWEEN as a workaround but is there anything obviously wrong with the above code.
Thanx in advance
Asif

Hi,
Please check :
Ipak variable selection using ABAP
-Vikram

Similar Messages

  • Ipak variable selection using ABAP

    Hi All
    I am trying to set the value of a selection variable in an Ipak using ABAP using the following code
    l_t_range-low = datetime.
    l_t_range-sign = 'I'.
    l_t_range-option = 'GT'.
    I need to extract records with a timestamp greater than the value set in l_t_range-low.
    However I get the error message
    For sel. Field 'xxxxxxx', No selection with SIGN='I', OPTION 'GT' allowed.
    I could use BETWEEN as a workaround but is there anything obviously wrong with the above code.
    Thanx in advance
    Asif

    Hi Asif,
    In our case we had a requirement to load the data for the transactions occuring in the last 15 days only, so we have write the routine on the last modified date feild in the infopackage.so as to select only records modified or created in the last 15 days..
    attached is the sample code....
    data: l_idx like sy-tabix.
    read table l_t_range with key
    fieldname = 'LAST_MODIFIED_DA'.
    l_idx = sy-tabix.
    data : w_cdate type d .
    l_idx = sy-tabix.
    w_cdate = sy-datum.
    w_cdate = w_cdate - 15 .
    L_t_RANGE-LOW = w_cdate .
    L_t_RANGE-HIGH = sy-datum .
    L_t_RANGE-SIGN = 'I'.
    L_t_RANGE-OPTION = 'BT'.
    append l_t_range.
    modify l_t_range index l_idx.
    p_subrc = 0.
    Hope it helps...
    -Vikram

  • Selection variables dependencies

    Hi,
    I have a query where the selection screen have, among others, a Hierarcy variable (Financial statement version) and another selection variable Financial statement Item.
    What I would like is: When the user has chosen one of the Financial statement hierarchies, I would like the matchcode selection for the Financial statement items to be according to the selected hierachy.
    Eksample: The user choose a Financial statement hierarchy 'A'  and he want to restrict the selection further by selecting Financial statement items, I want the matchcode selection variables for the Financials statement items to be those valid for the selected Hierachy 'A' only.
    We are on version: SAP NetWeaver 2004s, BI 7.0 service pack 16, using Bex version 7.10 support package 4

    Hi,
    I would suggest you to check the forum on this as this has been discussed many number of times.
    But for ref:
    Variable add flexibility to reports because users can enter parametres (values of chars) for which they want to view the data. This is the basic use of variable (characteristic value variables).
    Other types of variables are Text (to replace texts in column headers), formula variables (to aid in calculations) etc.
    See this for complete details:
    http://help.sap.com/saphelp_nw04/helpdata/en/cf/579b3c494d8e15e10000000a114084/content.htm
    http://help.sap.com/search/highlightContent.jsp
    http://help.sap.com/saphelp_nw04s/helpdata/en/e3/e60138fede083de10000009b38f8cf/frameset.htm
    Regular" Variables can allow users to enter parametes for the report, for instance, only selecting data for a certain year or viewing data for one particular plant only
    Authorization variables are used to only allow users to view records that they are authorizied to see, according to their authorization profile
    Customer Exit variables are filled at runtime with ABAP code defined by you in transaction CMOD. This provides great flexibility
    Thanks
    Assign points if this helps

  • Selection variable with default value as previous weeks mon through sun

    Hi Experts,
    1.)
    I need to create a Selection Variable ZTRANS_DT ( type Interval ), with the default value as  "Previous week, Monday Through Sunday" .
    Should we have to write a customer exit to populate these interval values dynamically every time the user runs the report ?
    If so can you please write a sample ABAP code.
    2.)
    The filter restriction for the date feild ZBUSINSDT has to be set to ">=#1/1/CURRENT YEAR#" ..
    How to set current year dynamically.
    Help done would be appreciated and would be assigned points.
    Thanks,
    Santosh..

    Hello,
    I dont remember of any standard variable but still you can wait to see if any1 comes up with one.
    Or else you can try the foll:
    Create the variable as per your requirement.
    Then in CMOD, write a simple code for i_step = 1.
    logic can be l_t_range-low = sy-datum - 1.
    Regards,
    Shashank

  • Selection Variable Problem

    Hi All,
    We have the data in the backend as follows.
    Course            Prim instru  second instru      No. of Responses
    Java Course     Instruc1        Instruct2            12
    BW Course     Instruc3                                 10
    ABAP Course      Instruc2        Instruc3            15
    Portal Course      Instruc2                                 20
    we need to have a single selection variable for instructor and the result should be as follows.
    Variable Screen:
    Instructor = Instruc2
    Result:
    Course            Prim instru  No. of Responses
    Java Course     Instruc2       12
    ABAP Course      Instruc2       15
    Portal Course      Instruc2       20
    Any ideas on how to achieve this?
    Regards,
    rk.

    Hi there,
    It seems you're trying to achieve an "OR" in BEx queries, i.e., prime instructor OR second instructor as instructor2 (selected by the user as a variable input), is this right?
    If so, you can use another characteristic like for example named combined_instructor and fill it in the transactional data like this:
    Course            Prim instru  second instru         combined_instructor     No. of Responses
    Java Course     Instruc1        Instruct2              Instruc1_Instruct2         12
    BW Course     Instruc3                                   Instruc3                         10
    ABAP Course      Instruc2        Instruc3              Instruc2_Instruc3          15
    Portal Course      Instruc2                                   Instruc2                         20
    So, combined_instructor is the concetanation of the Prime and second instructor.
    So you can use a variable over combined_instructor, and if there is any
    *Instruct2*
    , you have all the options of Prime and second instructor with the Instruc2
    Diogo.

  • BW Transaction Code to View Variable ABAP Code

    Hello All,
      Is there a BW Transaction to view Variable ABAP Code?
    Thanks!

    hi Tina,
    If you are looking for Customer Exit Variable ABAP Code,
    1) Tcode: SE80 (Here select Class and Interface and give the technical name and display, you will get all customer exit variables created)
    2) Tcode: CMOD. Give Project name and then goto "components" --> Function Exit and in the code, goto "ZXRSRU01".
    3) Tcode: SE19 (Now, generally CMOD is not used, BADI is used. Initially SPOT enhancement implementation is created which can have many BADI Implementations and for each BADI implementation, class and filter is created where you write code for variable given in Filter.)
    Hope it helps
    Regards
    Lavanya

  • Pass user selected variable to Entity implementation class

    Guys,
    I need to pass the user selected variable to Entity class. and looking for the best way to do this ......
    If user selected process1 or process2 then I need to call stored procedure right before the commit. So i need to pass the user selected process to entity class file.
    I am thinking about having a transient attribute on entity and set the value on front end..... so that value will be pass to the entity class file and in beforeCommit method i can check the value of transient variable and then call stored procedure
    is this a good approach or any other suggestions are greatly appreciated....
    thank you
    -Raj

    Thank you Timo and Jobinesh....
    Good suggestion Jobinesh... will start the implementation
    Thank you
    -Raj

  • Script logic - how to use a selection variable within an allocation logic

    Hi,
    I want to implement a simple top-down distribution to distribute values from a yearly budget (Y20xx.TOTAL) to a quarter budget (Q20xx.Q1, ... Q20xx.Q4) using the actuals of the previous year as reference.
    If we hard code the members it works fine:
    *RUNALLOCATION
    *FACTOR=USING/TOTAL
    *DIM ACCOUNT WHAT=ACC_NOT_ASSIGNED; WHERE=BAS(FIN); USING=<<<; TOTAL=<<<
    *DIM TIME WHAT=Y2009.TOTAL; WHERE=BAS(Q2009.TOTAL); USING=BAS(Q2008.TOTAL); TOTAL=<<<
    *DIM CATEGORY WHAT=SBO; WHERE=<<<; USING=ACTUAL; TOTAL=<<<
    *ENDALLOCATION
    Of course, we want to make this dynamic, using the values inputted in the selection screen of the package: time, entity and category.
    So if we start with write the following logic, it does not work anymore:
    *RUNALLOCATION
    *FACTOR=USING/TOTAL
    *DIM ACCOUNT WHAT=ACC_NOT_ASSIGNED; WHERE=BAS(FIN); USING=<<<; TOTAL=<<<
    *DIM TIME WHAT=%TIME_DIM%; WHERE=BAS(Q2009.TOTAL); USING=BAS(Q2008.TOTAL); TOTAL=<<<
    *DIM CATEGORY WHAT=%CATEGORY_DIM%; WHERE=<<<; USING=ACTUAL; TOTAL=<<<
    *ENDALLOCATION
    So, how to use the selection variables in this allocation logic? %TIME%, %CATEGORY% also did not work ...
    regards
    Dries
    solved it ...
    Edited by: Dries Paesmans on Feb 22, 2009 8:31 PM

    Hi Dries,
    Looks like you solved this, but if I can just add a small point -- when you use syntax like this:
    *DIM ACCOUNT WHAT=ACC_NOT_ASSIGNED; WHERE=BAS(FIN);
    *DIM TIME WHAT=Y2009.TOTAL; WHERE=BAS(Q2009.TOTAL);
    each time the logic runs, it will scan through the dimension from the FIN and Q2009.TOTAL members, one level at a time, until it reaches the base members (where calc = 'n'). This may happen very quickly, if the dimension has very few levels, but could take a bit of extra time if it's a particularly deep dimension. (By which I mean many levels of hierarchy -- not some 1970's Pink Floyd musical reference.)
    You may speed things up by using a member property instead of the BAS(xyz). Flag all the base members using a specific property value, and that way the logic engine can pick up the complete list of members in the WHERE clause, in a single query.
    *DIM Account What=ACC_NOT_ASSIGNED; Where=[FloydProperty]="DarkSideOfTheMoon"; ...
    This adds some maitenance work in the dimension, which may be problematic if your admins are changing it regularly (and will cause problems if they forget to update this particular property).
    I can't predict how much time this will save you (maybe not much at all), but anyway I figure you'd want to know exactly what work you're asking the system to perform.
    Regards,
    Tim

  • Schedule Manager - Use of Selection Variable

    Hi all,
    My Question is "What is the use of Selection Variable settings in Schedule Manager screen?"
    I am not asking about defining selection variable in the variants to pick up values from TVARV table. My question is how I can make use of the Selection Variable(Extras->Settings->Selection Variable) in the Schedule Manager screen.
    The variable value column is ready for input in the Schedule Manager screen, is it possible to set the variant to pick up this value for the tasks in SCMA?
    Any help would be greatly appreciated.
    Thanks,
    Prabha

    Hi Prabha,
    After you have finished maintaining your variant, you would have to click on the "<b>Attributes</b>" button just below the title and maintain the description for your variant. Save this entry and press the back <b>green arrow</b>. Your save button would now be activated and you can save your settings now.
    I hope this helps.
    Do not forget to award the point please.
    Regards,
    Jacob

  • How to Create a Selection Variable for restricting the querry output

    Hi Gurus,
    I have created a query in query designer on a Multiprovider and the output of the query is a Formula in a structure which calculates a % value, the client is looking for entering a range of number during the query selection screen and the output should be restricted to the given selection values.
    Can any one tell me how i should create a selection variable that would take the input from the user during the query selection screen and then restrict the output to that value which user specified.
    Is there a need to write any customer exit or is there any alternative way to make the query work as the requirement is.
    I hope this explains my problem but if any questions please let me know so that i can give u specific information.
    Thanks,
    Nisha.

    Hi Nisha,
    Firstly, in order to restrict the query output by a key figure value, you will need to create a condition on that key figure. This is done in the query deisgner. Now when you are creating the condition you can also use user entry variables (formula variables with user entry) to let the users enter the value that they want to see.
    See here for more details:
    http://help.sap.com/saphelp_nw04/helpdata/en/73/702e39074dc93de10000000a114084/content.htm
    Hope this helps...

  • Selected variable value is different from the displayed value

    Hi all,
    I have an issue with variable selection in portal. I have a IO - customer which is compounded to source system. So I have soem customers with the same key with different sources. And I have a variable created on customer. For ex - i have 3 customers like below. 
    SA/1234567
    BP/1234567
    F5/1234567
    1 - And when I search for a customer 1234567 - I find only one customer that is SA/1234567. And IO properties are set to read all the masterdata values and not infoprovider or posted values.  - thats issue one - I would like to see all the three and let the user select what ever he wants.
    2 - Now when I select SA/1234567 and run the report. It shows me data for F5/1234567 - which is correct data for that customer. But in the template I have a info field web item to display the selected variables on the screen. That info field shows the Customer as BP/1234567 - which is wrong and confusing. I checked the properties of the web item and everything seems ok.  So in the variable screen I get a value, the result set if of another value and the variable value that shows in the Info tab is another customer. - Driving me nuts
    3 - When I recreate the same scenario in 3.x query - everything works the way they should - this only happens in 7.0 query. What am I missing here??
    Any pointer or insight is appreciated - sorry for the long post.
    Voodi
    Edited by: voodi on Jun 8, 2010 2:26 PM

    Sorry - its not how its displaying the values rather what its displaying - it misses on 2 other values from the three - though the Bex setting in IO are set to read all the values from materdata table. And in the query I'm using IO properties. And display settings are ok

  • Selection variable for dynamic selection in QE51n

    Hi All,
    I have a scenario were we have a repetitive Manufacturing and we create one insp. lot of origin 13 and keep creating insp. points for days, so my user wants the insp. points to be displayed only for the past 3 days based of the Date Insp. point identifier which is one of dynamic selection criteria under insp. points, I see with other transaction I can do selection variable on dates for dynamic selection fields but I cannot do that in QE51n, I can do the same in QE51 but not in QE51n, can some tell me if there is a OSS or other way to get this working.
    I appreciate your help.
    Thanks,

    Hi Srikant,
    I think you can meet the requirement in QE51N also.
    In the screen for QE51N :Result Recording Work list", Follow this Path,,,,,,,,,
    Edit--->Dynamic Selection.
    The system will pop-up new small window for "Dynamic selection for insp. lot and operation" here I there is one folder is available named "Inspection point " which is having the selection criteria "Inspection point",  double click on it and enter the desired values.
    Regards,
    Shyamal

  • Selection variable for next month in RFPERIOD_OPEN in closing cockpit

    Hi,
    we would like to use RFPERIOD_OPEN in the closing cockpit in order to open the next period on D-10 automatically. I would like to use the selection variables of the closing cockpit in the program variant in order to avoid unnecessary variant maintenance every month.
    Unfortunately I cannot find a variable for the next month. There is only SAP_FAST_CLOSE_PERIOD_P. Do you know if it is possible to base a calculation logic to derive the next period from SAP_FAST_CLOSE_PERIOD_P.
    Thanks!
    Kind regards,
    Mariya

    Thanks! I checked it, but the appearance of months and order is okay in T247.
    Any other ideas?
    I thought I read somewhere that this is a bug but can´t remember where I found that bug hint.

  • Need Selection variable name for "System Year - 1"

    Hi All,
    I have Fiscal Year field in the selection screen of a custom program. The value of this field comes from system variable.
    I need to create a variant where this fiscal year should have the value "Current year - 1".
    This has to be done using Selection Variable. Currently there is no such variable in the F4 help (TVARV table).
    Please tell me if there is a way to get such a selection variable...

    Hi Tolga,
    The selection screen parameter is defined as:
    parameters: p_gjahr        type gjahr obligatory memory id gjr,
    I cannot use the FM in the AT SELECTION SCREEN ON VALUE-REQUEST.
    When you create a variant for the program.. click button "Variant Attributes" - Here the checkbox for Selection variable is ticked for this field. Now click "Selection Variables". here we can provide the variable name which comes from TVARV table.
    I need this Selection variable. I am not allowed to do any program changes.

  • Selection Variables / Name of the Variable in a Variant

    Hi,
    I am trying to replicate / create the same variant from PRD back to DEV.
    But in PRD for the variant, there are values for attributes. (Selection Variable is having T and D)
    Number of variables are available for Name of the variable (f4 values)
    But these values are not available for the same variant in DEV.
    How can i bring the values for selection variables and name of the variables in DEV.
    Thanks in advance for your help.
    Regards,
    Ravi

    Ravi,
    you have to include the variant into a transport request than you can transport to the other system. In general, variants not transported automatically when you create a program, you have to include the variant into the request if you want to use in another system also.
    You can do this by:
    SE38 --> Variants --> Utilities --> Transport request
    Edited by: mrwhite on Apr 28, 2009 4:52 PM

Maybe you are looking for