Redefining the one-to-one relationship selection criteria

In this example, one instance of Contract is related to one instance of Condition.
Class Contract is associated to table CONTRACT and Class Condition is associated to table CONDITION.
CONTRACT contains only one field : ID (primary key) CONDITION contains one foreign key field to CONTRACT (CONTRACT_OID), one START_DATE and one END_DATE.
When loading the contract, I must take one given date (myGivenDate) in consideration so that only the condition including this date (START_DATE <= myGivenDate < END_DATE) is loaded.
I consider redefining the selection criteria of the one-to-one relationship by adding the criteria on the date. But how to introduce the givenDate parameter?
Please advice,
Chris

Hello Chris,
I'm sure you might have already seen the discussions on some of the pitfalls of implementing this, but if you haven't, check out:
Re: 1:M filtering
I would suggest instead not mapping the Contract -> Condition relationship, and instead query for it when you require the related Condition objects. This query could be hidden inside the Contract objects getCondition method so it is still hiden, and still ensure that what is in the cache reflects the database.
If this will not an option, then there is a suggestion made by Stephen that maybe what you are looking for in the thread at:
Associating selection criteria w/One-to-Many (1-M) indirect queries
Best Regards,
Chris

Similar Messages

  • SNC- New field adding to the Purchase due list for selection criteria

    Hi SNC Experts,
    I have to Add new fields from the existing available fields from the configuration in the purchasing  due list and for PO over view selection criteria. I want to know the configuration spot where should I go and look for thew list of exisitng fields which are not displayed for the selection criteria.

    HI Lata,
    which version is the system running on? We have BSP UI in lower releases and WD UI in latest releases.
    Best Regards,
    Harsha Gatt

  • The possibility to upload a selection criteria in the Web

    Hi ,
    When using the Bex Analyser as an Add-on for Excel ( BI 7.0 ) , the standaard selection screen of the SAP environment is being used. In this selection screen you will be able to copy the content of your clipboard in the selection screen or you will be able to upload a file to the selection screen. ( In order to avoid long retyping work ).
    Unfortunately, you will not be able to do the same thing in the web application ( Analyser ). And this is just the thing we want to realise. You can only enter and select entries for filling in the selection screen.
    Has anyone ever had this problem (or need) and created a solution for this ?
    Kind regards,
    Hans

    Hi ,
    When using the Bex Analyser as an Add-on for Excel ( BI 7.0 ) , the standaard selection screen of the SAP environment is being used. In this selection screen you will be able to copy the content of your clipboard in the selection screen or you will be able to upload a file to the selection screen. ( In order to avoid long retyping work ).
    Unfortunately, you will not be able to do the same thing in the web application ( Analyser ). And this is just the thing we want to realise. You can only enter and select entries for filling in the selection screen.
    Has anyone ever had this problem (or need) and created a solution for this ?
    Kind regards,
    Hans

  • Fetch the data from the Data base based on selection criteria in ABAP

    Hi
    I am new to ABAP and working on the Screen where User Enters Company code from and to , Document no and to, I have defined as specified below
      SELECT-OPTIONS Company     FOR p_ccode.
      SELECT-OPTIONS Document    FOR p_fdocnr.
      SELECT-OPTIONS Year           FOR p_fyear.
    When I debug in the pgm I get the values as
    IBT11001100 (From and To Company Code)
    IBT23234241002323424246 (From and To doc no)
    IBT20092009 (From and To Year)
    How can write a SQL select statement to fetch the data from the Database based on the above inputs
    Thanks
    PR

    Moderator message:
    Sorry - this isn't an ABAP training forum. Please press F1 on SELECT-OPTIONS and/or SELECT.
    Thread locked.
    Rob

  • Count() function with selective criteria?

    I'm struggling with what I would expect to be a fundamental reporting concept in CR.
    Suppose I have the following EMPLOYEE table:
    u2022 EMPLOYEE.ID
    u2022 EMPLOYEE.GENDER_CODE
    u2022 EMPLOYEE.MANAGER_FLAG
    I need to generate a statistical summary report containing the following:
    u2022 Total number of Employees
    u2022 Number of Male Employees
    u2022 Number of Management Employees
    This would be easy if I could just use a Count() function in the Function Workshop which
    contained selective criteria.  For example:  Count ({EMPLOYEE.GENDER_CODE} = 'M')
    But I can't figure out how to do this without getting a CR error message.
    Record Selection doesn't work, because I need the whole data set.
    Group Selection with Summaries doesn't work, because the gender and management
    attributes are not mutually exclusive.
    One solution that seems awkward to me is to create additional SQL commands in the
    Database Expert using COUNT(*) and WHERE criteria to get the number of Males
    and number of Managers.  But I have to believe that there is a better way.  Plus this
    approach causes problems elsewhere in my report.
    Am I missing something?
    Thanks,
    Bill

    Thanks Raghavendra!
    The good news is that I was able to create a "1 or 0" formula and then sum the resulting values.
    The bad news is that I'm only able to get this to work for part of my report.
    I am joining two tables.  As an example COMPANY and EMPLOYEE.
    I can use "1 or 0" formulas on all of the employee statistics.
    But I cannot do the same for company statistics, because the number of company records being assigned a 1 is being inflated by the join between the two tables.
    I have achieved a successful result by using Running Total Fields at the end of the report.
    But I want to place these summary statistics at the begining of my report.  (Such as Total Companies in the Western Region.)
    I tried to use "COMPANY.NAME = previous(COMPANY.NAME)" logic in my function, but then I was not allowed to summarize it.
    Any ideas?
    Thanks,
    Bill

  • BADI Impl. VB_BD_SELECTION to change selection criteria in batch det.

    Hye,
    I need to use the BADI VB_BD_SELECTION in order to change the selection criteria to be used during batch determination
    For this purpose  method RESTRICT_CONF_CHARS has been implemented.
    But I didn't find any documentation explaining how to manage this one:
    as result the characteristic record is deleted from the selection criteria instead of updating it with a new value specified in the structure CT_CONFIG-ATWRT.
    For example:
    in the strategy  we have the value car1 = A.
    If BADI is off than the system in production order uses right this criteria to determine the batches.
    If BADI is on than we want to define new criteria to find batches with the characteristic car1 = B but the system deletes car1 from  selection criteria.
    Thanks
    Anna

    Hi Anna,
    I have the same problem for another customer project.
    The big problem is I didn't found any documentation or an class example for that BAdI.
    Please help us.
    Thank you

  • RFIDITSR00:Selection criteria for MM invoices in IDITSR_SELECT_V

    Dear Gurus,
    Could you kindly share with us how you were able to manage the customising settings in IDITSR_SELECT_V for S03CCR report.
    The customising setting we made are: included Purchases account 6XXXXXXX in IDITSR_SELECT_V for reporting category S03CCR and while executing the report:excluded BE ,entered keydate,selected vendors(GL and customer not selected)
    The customising was working  fine when we raise an FI invoice and included the Purchases account 6XXXXXX in our customising(IDITSR_SELECT_V) and selected vendors on the selection screen while executing the report.
    However, this selection criteria is not working for MM invoices.
    For ex:We included the Purchases account 6XXXXXXX in out customising and while executing the report we selected All vendors and "did not select GL accounts" and the output doesnt show this good receipt.
    I can understand the logic as while Goods receipt the entry is
    Debit Purchases A/c
    Credit GR/IR A/c
    and as in our selection while executing the report we selected only vendors this entry is not been shown in the report.
    and while Invoice receipt the entry is
    Debit GR/IR A/c
    Creidt Vendor A/C
    Though we have vendor line here we do not have the Purchases a/c (6XXXXXXX)as counterpart debit and the invoice doesnt get included in the report.
    I tried adding the GR/IR account 4XXXXXXXXX in the customising of IDITSR_SELECT_V but that didnt help either and while executing the report selected GL accounts instead of vendors,in this case the transaction is included in the report but the country ISO code is always coming as BE.
    Could you kindly advice how you were able to generate the report to include the open items from MM in the S03CCR reporting category.
    Many thanks in advance.
    Prasad

    Hi Vee,
    The provided code did help and I have the following code now which works fine.
    $('input[name=f01]').change( function() {
      if ($(this).is(':checked')) {
        index_of_this = $('[name=f01]').index(this);
        for (i=0;i<index_of_this;i++) {
          if (!$('[name=f01]:eq('+i+')').attr('checked')) {
            $(this).attr('checked',false);
            alert('Check the sequence of invoices to be paid. Invoices should be one after another and you can not pay one Invoice before paying the one that is preceded');
           return false;
      else
      $('[name=f01]').checked = true
    alert('Check the sequence of invoices to be paid. Invoices should be one after another and you can not pay one Invoice before paying the one that is preceded');
      return false;
      setSelectedInvoiceValues ()
    setSelectedInvoiceValues ()Additionally I would like to add
    Assume that checkbox 1,2,3,4,5 is checked, then what happens when 3 is unchecked ? User should not be allowed to uncheck 3 unless 4 and 5 are unchecked.I have tried to handle this part in the else { } but it is not totally correct.
    I am not able to un-check the last checked which should be allowed.
    Also the following does not work in Mozilla Firefox but does in Internet Explorer.
    $('[name=f01]').checked = true
    Please help
    Thanks & Regards
    Arif Khadas
    Edited by: Arif Khadas on May 23, 2011 12:05 PM

  • Save selection criteria in payment wizard

    Hello,
    Does anyone know what the option 'Save selection criteria only' at the end of the payment wizard actually means?  Does it mean it will save the criteria you choose e.g selecting a specific property and BP group or does it mean it will save the results returned from your selection criteria the previous time you ran it?
    Many thanks,
    Kate

    Hi Gordon,
    I thought the same however when I tested this it did not seem to work in this way.  I selected property 6 which returned one business partner which was correct and when I got to the last step of the payment wizard i chose 'Save selection criteria only'.  I then went into the BP master data record of a different supplier and ticked property 6.  When I went back into the payment wizard and went through the one I had just saved, the second business partner was not displayed.  If i then start a new payment run and choose property 6 in the selection criteria, both suppliers were shown.  It seems to only be saving the results that it returns from the selection criteria rather than the selection criteria itself.
    Kind regards,
    Kate

  • Bookmark WebDynpro with Prepopulated Selection Criteria

    Hello All,
    Currently, we have a demo application using the SFLIGHT scenario.  This demo has selection criteria for the CARRID and CONNID. 
    We would like to bookmark the WebDynpro for different selection criteria.  For example, one scenario would be CARRID = AA and CONNID = 0017 whereas we would have another scenario that is CARRID = LH and CONNID = 0400. 
    Is it possible for an end user to bookmark the WebDynpro using their specific selection criteria?  If yes, does anyone know how this can be achieved?
    I appreciate any help in advance.  Thanks.
    John

    >Is it possible for an end user to bookmark the WebDynpro using their specific selection criteria? If yes, does anyone know how this can be achieved?
    Well, the application would have to be designed to take these selection criteria as URL parameters.  Even then the end user couldn't just hit the bookmark in the browser and save the current input values. They would have to manually add these parameters and values to the URL in the browser bar before creating the bookmark.

  • How to bring values with out loop as per selection criteria

    Hi Everyone,
    We are doing some re-design in IPAD in that i am facing an issue. There is one scenario where sub-action loop has been used(it is an existing functionality). We dynamically bring the question in this loop based on certain seller phase.
    Now they want to bring everything in one screen it self. The table they are looping is complex table.
    Any ideas how we can achieve this problem.
    The idea which i have:
    During fetch i need to loop and this complete table and get these values in to variables, so that i can hide remaining fields based. Is there any other way do it.
    Regards,
    Gupta

    It's difficult to really give steps without knowing your application better but here goes my best shot at it.
    In terms of underlying structures on the client, I am assuming you have a questionsCT, a question object (with the desired fields to displa and a tempQuestions collection on your Main Object to hold the displayed questions.
    1) Create an Edit Transaction on the main object with one property of the tempQuestions collection.  This property should be set to Auto-Initialize.  When this transaction is involved from an action and applied it will clear the tempQuestions collection.
    2) On the question object, create an Add transaction to populate the object fields from the corresponding questionCT current record.  For each of the transaction properties set the Initial Value to "From a different object property" and then browse to the Complex Tables selecting your questionsCT -> current record -> field name.
    3) Create your Add question Action to call the AddQuestion Transaction and Apply.  This will be the action called from your subaction loop.
    4) Create your refresh action with the following steps
        a) Transaction - (#1)
        b) Apply
        c) Sub-Action
            c1) Execution Type: Loop over collection
            c2) Collection: Browse and select your questionsCT
            c3) Execution Rule: Define a new rule to return true if the current record meets your selection criteria
            c4) Action: Seelct your Add question action (#3)
    On your detail screen, I am assuming you will have a dropdown or some similar way to set the selection criteria.  Create a button field that will call your refresh action (#4) and add a tile list control targeting the tempQuesitons collection as it's source.
    This should hopefully get you started in the right direction.
    --Bill

  • Selection Criteria needs to be change

    Hi,
    I have one Bex query ZHR_PONT_R_TOTALLUMPDISCOUNT.
    i want to change the selection screen from the Date to Year.
    Can anybody help me out in this issue. How to change.
    Thanks
    Priya

    Hi,
    Whappened while executing as per the previous thread:
    Re: BEx Selection Criteria need to be change
    Let me know the outcome.
    Regards
    Happy Tony

  • " STEPS TO  CREATE SELECTION CRITERIA IN WEBI-REPORTS ! "

    Hai friends ,
                                Let me know the procedure  to create a Selection Criteria on the webi-reports . Based on the Selection criteria, I should execute the report.

    aNSWERED

  • Purchase Requisition No data satisfying selection criteria

    We have created a Maintenance Notification and converted it into Maintenance Order, after approval of maintenance Order it will generate a MM purchase requisition automatically.
    But upon checking on Me53N or any other report for MM PR the PR does not exist. on Me53n it gives the error: No data satisfying selection criteria
    but the PR exist on table EBAN.
    thanks God bless

    If you give proper inputs in ME5K or ME5A, you can get the PR list without any problem.
    Also, while selecting PR in ME53N, have you given proper PR number directly or are you searching through some Search help option??
    Please post your screen shots PM Order document flow, Operation tab, Components tab, ME53N search steps as well as MM PR reporting selection screen with that error message.

  • Including User selection criteria along with LDB standard selection screen

    Hi
    While creating a HR report, along with the standard selection screen, if the cusomer requires some more fields to be added, How to retrive the data from the DB?
    Is it the way to retrive the data based on Standard selection criteria from the LDB and then filter it based on user criteria or any other way?
    Please help me out in this regard.
    Thank you.

    Yes thats the way. You get the data based on Selection screen of LDB (You can select Report Catogory you wish to) once you get data, You can put CHECK statement to see the data against PXXXX type to the filter value from you custom field on selection screen.

  • Changing invisible selection criteria for a variant...

    Hi,
    There is a invisible selection criteria when I goto a custom Z variant of program RFBIBL00. How can I change the variant value in invisible selection criteria ?
    Regards,
    Rajesh

    Hi,
    Using the ABAP workbench (SE38) use the menu option Goto -Variants
    choose the custom variant
    Choose the attributes subobject
    and click on the change button.
    then deselect the hide from the required variable.
    Regards
    David Cooper

Maybe you are looking for