How to Include in Customer Exit to select max of the date

Hi,
Every Employee will have a health Insurance Policy which is valid for 6 six months.
From Source System i am getting
Employee and his policy Start date,Based on Policy Start Date in Transformations i am calculacting the Policy Expiry date (Policy Start date + 6 Months)(Ex:If Policy Start Date is 01/Nov/2007 then Exp date is 01/May/2008)
My report is to Show employees who doesn't had a valid policy on the day report executed (Sys Date)
For that i created a Customer Exit Variable on Policy Expiry Date
(If Policy Expiry date is < Sys Date)
IF i_step = 2.
      CLEAR l_s_range.
      l_s_range-low = sy-datum.
      l_s_range-sign = 'I'.
      l_s_range-opt = 'LT'.
      APPEND l_s_range TO e_t_range.
    ENDIF.
Problem:
Data in the cube
Employee--Policy Start date-Policy Expiry Date
1--01/01/2008-----30/06/2008
1--01/07/2007-----31/12/2007
1--01/01/2007-----30/06/2007
When i execute the report i should expect the Emp 1 shouldn't be displayed as he had valid policy which is going to expir in June 2008....but the above exit is displaying the below 2 records
Can i include any changes in the above exit that will select the Max Policy Expire date and then it will check with the Sys Date
Please update me on how to proceed
Thanks

Hi thomos,
Thanks for the update
Bit Confused.....could you please explain me
"Your variable (intervall) should be based on the Policy Expiry Date
l_s_range-low = '10000101'.
l_s_range-high = 'sy-datum - 1.
l_s_range-sign = 'I'.
l_s_range-opt = 'BT'
How this is going to solve my problem....
As i got 3 records on a employee one of which got expiry date greater tha sys date
Thans

Similar Messages

  • How do I find customer exits quickly using SE80,SE81 or other transactions?

    Hello all,
    Is there a way of using SE80 or SE81 or any other transaction for that matter, to quickly find customer or user exists being used within a given program rather than doing a global search for CALL CUSTOMER within the program? Example, transaction EG31 (Installation Full) which runs the program SAPLE30D.
    In SE80 there seem to be no reference to user or customer exits. As for SE81 I was unable to relate SAPLE30D with an application component, or at least I don't know how to do it.
    In the Repository Info System (SE81 also) there is a reference to customer exits, but, you MUST know which project is tied to your program, otherwise you'll be chasing your tail!
    I guess you can say the easiest way would be to do a global search in the program using the CALL CUSTOMER key words.
    Well, I tried that too. The first set of results pointed to INCLUDES which turned out to be empty exits! That is, no code. So, by pure chance and unknowingly, I stumbled upon a customer exit which was the source of my errors. How I did it, I cannot remember. But the problem is that this exit was hidden in a program which was called by SAPLE30D at a later stage.
    So, all this searching took a long time and more importantly, it was a lucky find. Not a methodic approach.
    So the question is: How do I find customer exits quickly using SE80, SE81 or any other transaction for that matter?
    Your help is greatly appreciated.

    edited
    Edited by: abhinay chelamcherla on Feb 24, 2008 9:49 AM

  • HOW TO CREATE A CUSTOMER EXIT VARIABLE

    <Moderator Message: use lower case letters next time, we don't want you to shout. --> see rules of engagement>
    hi,
          How to create a customer exit variable..!
    in a query designer i  have created the customer exit variable ,in the cmod i have created the project
    for the exit rsap0001 and kept the break-point....but when i executing the query via BEX-Analyzer
    where control not stoping in the break-point..
    can any one help me ..what is the approch i need to do.because i new to BI..
    Regards,
    shahina.....!
    Edited by: Siegfried Szameitat on Dec 17, 2008 10:37 AM

    Hi Shahina,
    1. Create formula variable var1 from to date using replacement path.
    2. Create another formula variable var2 for current date using customer exit or you can use standard
    formula variable for current date
    3. Create calculate key figure ckf using var1 & var2.
    ckf = var1 - var2.
    Thanks == points
    Regards
    Sudheer
    Edited by: SUDHEER on Dec 17, 2008 10:41 AM

  • How to Write a CUstomer Exit for a variable in BEx

    Hi,
    How to write a customer exit variable in bex Query designer
    Do i need developers key for this (If so what type of key do i need so that i can ask basis tean to generate)
    Info Object: ZEXP_DTE (Expiry Date)
    Variable on ZEXP_DTE :
    ZEDTE
    Type: Customer Exit
    Can any one please tell me how to write a code in CMOD from this (Step-by Step)
    Expiry Date > Current Cal Day
    As arun said
    'l_s_range-low = SY-DATUM.
    l_s_range-opt = 'I'.
    l_s_range-sign = 'GT'.
    APPEND l_s_range TO e_t_range.'
    I want to insert the above code for the above customer exit but as i am new to BW as  ABAP please explain me what are the steps involved in CMOD
    Thanks

    Hi,
    To write customer exit for a variable, you require Access key.
    Contact your BASIS to get that.
    Access Key,BASIS?
    To write Customer exit,
    User Exits
    User Exit for Variable
    /thread/809285 [original link is broken]
    Hope these helps u...
    Regards,
    KK.

  • How to use multiple selection parameters in the data model

    Hi, after have looked all the previous threads about how to use multiple selection parameters , I still have a problem;
    I'm using Oracle BI Publisher 10.1.3.3.2 and I'm tried to define more than one multiple selection parameters inside the data template;
    Inside a simple SQL queries they work perfectly....but inside the data template I have errors.
    My data template is the following (it's very simple...I am just testing how the parameters work):
    <dataTemplate name="Test" defaultPackage="bip_departments_2_parameters">
    <parameters>
    <parameter name="p_dep_2_param" include_in_output="false" datatype="character"/>
    <parameter name="p_loc_1_param" include_in_output="false" datatype="character"/>
    </parameters>
    <dataTrigger name="beforeReport" source="bip_departments_2_parameters.beforeReportTrigger"/>
    <dataQuery>
    <sqlStatement name="Q2">
    <![CDATA[
    select deptno, dname,loc
    from dept
    &p_where_clause
    ]]>
    </sqlStatement>
    </dataQuery>
    <dataStructure>
    <group name="G_DEPT" source="Q2">
    <element name="deptno" value="deptno"/>
    <element name="dname" value="dname"/>
    <element name="loc" value="loc"/>
    </group>
    </dataStructure>
    </dataTemplate>
    The 2 parameters are based on these LOV:
    1) select distinct dname from dept (p_dep_2_param)
    2) select distinct loc from dept (p_loc_1_param)
    and both of them have checked the "Multiple selection" and "Can select all" boxes
    The package I created, in order to use the lexical refence is:
    CREATE OR REPLACE package SCOTT.bip_departments_2_parameters
    as
    p_dep_2_param varchar2(14);
    p_loc_1_param varchar2(20);
    p_where_clause varchar2(100);
    function beforereporttrigger
    return boolean;
    end bip_departments_2_parameters;
    CREATE OR REPLACE package body SCOTT.bip_departments_2_parameters
    as
    function beforereporttrigger
    return boolean
    is
    l_return boolean := true;
    begin
    if (p_dep_2_param is not null) --and (p_loc_1_param is not null)
    then
    p_where_clause := 'where (dname in (' || replace (p_dep_1_param, '''') || ') and loc in (' || replace (p_loc_1_param, '''') || '))';
    else
    p_where_clause := 'where 1=1';
    end if;
    return (l_return);
    end beforereporttrigger;
    end bip_departments_2_parameters;
    As you see, I tried to have only one p_where_clause (with more than one parameter inside)....but it doesn't work...
    Using only the first parameter (based on deptno (which is number), the p_where_clause is: p_where_clause := 'where (deptno in (' || replace (p_dep_2_param, '''') || '))';
    it works perfectly....
    Now I don't know if the problem is the datatype, but I noticed that with a single parameter (deptno is number), the lexical refence (inside the data template) works.....with a varchar parameter it doesn't work....
    So my questions are these:
    1) how can I define the p_where_clause (inside the package) with a single varchar parameter (for example, the department location name)
    2) how can I define the p_where_clause using more than one parameter (for example, the department location name and the department name) not number.
    Thanks in advance for any suggestion
    Alex

    Alex,
    the missing thing in your example is the fact, that if only one value is selected, the parameter has exact this value like BOSTON. If you choose more than one value, the parameter includes the *'*, so that it looks like *'BOSTON','NEW YORK'*. So you need to check in the package, if there's a *,* in the parameter or not. If yes there's more than one value, if not it's only one value or it's null.
    So change your package to (you need to expand your variables)
    create or replace package bip_departments_2_parameters
    as
    p_dep_2_param varchar2(1000);
    p_loc_1_param varchar2(1000);
    p_where_clause varchar2(1000);
    function beforereporttrigger
    return boolean;
    end bip_departments_2_parameters;
    create or replace package body bip_departments_2_parameters
    as
    function beforereporttrigger
    return boolean
    is
    l_return boolean := true;
    begin
    p_where_clause := ' ';
    if p_dep_2_param is not null then
    if instr(p_dep_2_param,',')>0 then
    p_where_clause := 'WHERE DNAME in ('||p_dep_2_param||')';
    else
    p_where_clause := 'WHERE DNAME = '''||p_dep_2_param||'''';
    end if;
    if p_loc_1_param is not null then
    if instr(p_loc_1_param,',')>0 then
    p_where_clause := p_where_clause || ' AND LOC IN ('||p_loc_1_param||')';
    else
    p_where_clause := p_where_clause || ' AND LOC = '''||p_loc_1_param||'''';
    end if;
    end if;
    else
    if p_loc_1_param is not null then
    if instr(p_loc_1_param,',')>0 then
    p_where_clause := p_where_clause || 'WHERE LOC in ('||p_loc_1_param||')';
    else
    p_where_clause := p_where_clause || 'WHERE LOC = '''||p_loc_1_param||'''';
    end if;
    end if;
    end if;
    return (l_return);
    end beforereporttrigger;
    end bip_departments_2_parameters;
    I've written a similar example at http://www.oracle.com/global/de/community/bip/tipps/Dynamische_Queries/index.html ... but it's in german.
    Regards
    Rainer

  • NAV 2013 R2; How to run a customized report (206 sales invoice) in the classic client

    Hello, in preparing a newly installed NAV 2013 R2, I'm questioning the following:
    In the Development Environment I have customized report 206 Sales - Invoice in the Design menu View Layout with the space of the logo (by Microsoft SQL Server Report Builder) and
    finally saved and compiled.
    When I do run it connects to the server of what I call the classic client or the real NAV 2013 R2 and I can select a posted sales invoice to show the new layout and the result is
    fine as customized as I wanted.
    When I later ordinary print one of the posted sales invoices this customized logo layout doesn't appear on the print. I print in PDF and paper. When I make a next new sales invoice
    this new layout is not in use either.
    Another thing is run print started from the Development Environment is called Sales - Invoice in the header and not just Invoice that it the name when printing when invoicing and
    printing of posted documents.
    Additionally this form of Sales - Invoice shows our company details and good information as web, e-mail, bank account and bank name that is well demanded on a perfect invoice.
    How to get these informations out normally?
    Is the classic client having a wrong report as sales invoice?
    How to run a customized report (206 sales invoice) in the classic client NAV 2013 R2?
    It is like the customized report (206 sales invoice) is not in use yet in the classic client.
    All you wise people out there are welcomed to help me now
    Best regards
    Carsten

    Try on Dynamics Community forum: https://community.dynamics.com/nav/f/34.aspx

  • How to add a customer field or extn coll in the tab1&2&3..of a UDO doc?

    Hi Experts,
    Does anybody know how to add a customer field or extn collection in the unused  tabs like tab1&2...in a UDO document?
    Thanks for your reply in advance.
    Thanks & Regards,
    David

    Hi Subhasini - <br><br>
    It seems you have discovered that adding an extension field to the Project Suppliers collection is not possible; many of the collections in E-Sourcing do not support extensions and, even when they do, typically, the table view of the data cannot be changed to show the extension value (it would only show on a "details" page, for example.<br><br>
    The solution that you have proposed may work, although I think there is a slight mistake in your logic. I believe you are saying that the script would take data from the newly created extension collection and populate data in the out-of-the-box vendor collection. <br><br>
    In thinking about your solution, I believe the benefit is that any logic and reporting based on the standard collection continues to function correctly (e.g., creating an RFx from the Project will use the out-of-the-box vendor collection).<br><br>
    That being said, I generally am reluctant to do a "replace" of a standard collection with an extension collection as you propose. My recommendation is that you challenge the customer on the importance of this requirement. For example, could the code be maintained on the vendor record? Why is it maintained in Projects? If it is maintained in the vendor record, could you just populate a read only collection the Projects that shows the vendor and code? Could a report be written that can be launched from within the Project to show the values? How does the customer intend to use this field? Could the display name of the vendor object be the right place for it?<br><br>
    I hope these ideas are helpful.<br><br>
    Regards,<br><br>
    Rob<br><br>

  • How to use X-Fi Effects without selecting SB as the default sound device?

    How to use X-Fi Effects without selecting SB as the default sound device?Hello everyone,
    That's my situation.
    I have Sound Blaster X-Fi Go sound card and I am using SRS HD Audio Lab. SRS HD Audio Lab was selected as the default audio device and X-Fi effects (X-Fi CMSS-3d, Equalizer etc.) was working without any problem in Windows Xp. I have Windows 7 now and when i select SRS HD Audio Lab as the default device, Creative effects are not working, i must select "SB X-Fi Go!" to get them working but i can't use SRS HD Audio Lab in that case. SRS is also using SB X-Fi Go sound card as the output and volume adjustment on console launcher is working but something is disabling the effects. Any solutions to enable effects ?
    Thanks.

    If the kernel modules for your sound card and webcam both support the index parameter (use modinfo to find out) then adding
    options <name_of_preferred_card's_kernel_module> index=0
    options <name_of_second_card's_kernel_module> index=1
    to /etc/modprobe.d/modprobe.conf (or another modprobe conf file of your choice) should solve the problem.

  • How do I stop my cursor from selecting things on the page? It shows up like I want to type something and when I press the down key it goes through all the words like its a word document.

    How do I stop my cursor from selecting things on the page? It shows up like I want to type something and when I press the down key it goes through all the words like its a word document.
    == This happened ==
    Every time Firefox opened
    == June 27, 2010

    You have '''caret browsing''' enabled - that preference appears as set in your Troubleshooting Information.
    http://kb.mozillazine.org/Accessibility.browsewithcaret
    Hit the '''F7''' key to disable '''''caret browsing'''''.

  • Custom PL/SQL API that inserts the data into a custom interface table.

    We are developing a custom Web ADI integrator for importing suppliers into Oracle.
    The Web ADI interface is a custom PL/SQL API that inserts the data into a custom interface table. We have defined the content, uploader and an importer. The importer is again a custom PL/SQL API that will process the records inserted into the custom table and updates the STATUS column of the custom interface table. We want to show the status column back on the spreadsheet.
    Defined the 'Document Row' import rule and added the rows that would identify the unique record.
    Errored row import rule, we are using a SELECT * from custom_table where status<>'Success' and vendor_name=$param$.vendor_name
    The source of this parameter is import.vendor_name
    We have also defined an Error lookup.
    After the above setup is completed, we invoke the create document and click on Oracle->Upload.
    The records are getting imported, but the importer program is failing with An error has occurred while running an API import. The ERRORED_ROWS step 20003:ER_500141, parameter number 1 must contain the value BIND in attribute 1.'

    The same issue.
    Need help.
    Also checked bne.log, no additional information.
    <bne:document xmlns:bne="http://www.oracle.com/bne">
    <bne:message bne:type="DATA" bne:text="BNE_VALID_ROW_COUNT" bne:value="11" />
    <bne:message bne:type="DATA" bne:text="BNE_INVALID_ROW_COUNT" bne:value="0" />
    <bne:message bne:type="ERROR" bne:text="An error has occurred while running an API import"
    bne:cause="The ERRORED_ROWS step 20003:ER_500165, parameter number 1 must contain the value BIND in attribute 1."
    bne:action="" bne:source="BneAPIImporter" >
    <bne:context bne:collection="collection_1" />
    </bne:message><bne:message bne:type="STATUS"
    bne:text="No rows uploaded" bne:value="" >
    <bne:context bne:collection="collection_1" /></bne:message>
    <bne:message bne:type="STATUS" bne:text="0 rows were invalid" bne:value="" >
    <bne:context bne:collection="collection_1" /></bne:message></bne:document>

  • How do I get pages 5.2 to automatically update the date - use 10.9.2

    How do I get pages 5.2 to automatically update the date in my documents - before the update I could do this. Does anybody have the knowledge or a workaround.
    If not I will dump pages 5.2 and use my old version!!! this feature is important for any and all businesses using pages??
    Any advice on how to achieve this is greatly appreciated
    I use a number of macs all using OSX
    10.9.2

    I have the same problem.
    What confuses me is that all the apple provided templates in pages seem to auto update their time and date upon opening.
    So there MUST be a way to do it... Ive been unable to work out how...
    Amnon

  • How do i insert a drop down calender to insert the date field.

    How do i insert a drop down calender to insert the date field i my create a form

    Hi,
    You can use the date object FormsCentral provides. When you test the form in browser, the date field will show a pulldown calendar when clicked upon.
    Thanks,
    Wenlan

  • How can I clear a form after submitting and saving the data in the iOS Acrobat Reader App

    How can I clear a form after submitting and saving the data in the iOS Acrobat Reader App

    Darrell,
    Thanks for this response. After I posted mine, I saw that the resetForm JavaScript method is documented as being supported starting with version 10.5: http://www.adobe.com/devnet-docs/acrobatetk/tools/Mobile/js.html
    But I haven't been able to get it to work. Can you clarify if support was indeed added and if it works for you?

  • How to assign a Customer exit variable to Key figure

    Hi,
    I have created a Customer Exit variable to findout no. of days in the month. 
    But I dont know how to assign that variable to a Keyfigure value.  Can you please let me know how to assign it.
    Regards
    Sankar

    Hi Sankar,
    From what I could understand, you want to display the output of that key figure for some no. of days of a month (calculated in your customer exit variable)...right ???
    If that is the case then you can create a structure in columns. Create a new selection...include your key figure and that customer exit variable in it.
    That shall serve the purpose.
    Regards
    Shalabh Jain
    Edited by: Shalabh Jain on Dec 15, 2008 1:46 PM

  • Formel Variable - how to fill with Customer Exit from control table

    Hello Experts,
    I have create in BEx-Analyser a formel Variable ZEXRATE1 filled through Customer Exit. In BW I had a "control tabel" with keyfigures.
    In the query definition I have include 0FISCPER, 0FISCVARNT and 0VTYPE. This
    are the keys which should give the values for the selectstatement to select my keyfigure from the "control table" to fill ZEXRATE1.
    If it possible to do with Customer Exit (CMOD -> RSR00001 -> ZXRSRU01) or do I have to implement a Bapi. Perhaps someone can give me a code example.
    Regards Dieter

    Hi,
    Code may look like this
    WHEN 'ZEXRATE1'.
    check i_step = 2.
        LOOP AT I_T_VAR_RANGE INTO L_S_RANGE.
          CASE L_S_RANGE-IOBJNM.
            WHEN 'ZFISCPER'. GV_ZFISCPER = L_S_RANGE-LOW.
            WHEN 'ZFISCVARNT'. GV_ZFISCVARNT =  L_S_RANGE-LOW.
            WHEN 'ZVTYPE'. GV_ZVTYPE =  L_S_RANGE-LOW.
          ENDCASE.
        ENDLOOP.
        SELECT SINGLE RATE into INTO GV_RATE
                  FROM ZTABLE
                  WHERE 0FISCPER = GV_ZFISCPER
                  AND   0FISCVARNT = GV_ZFISCVARNT
                 AND 0VTYPE = GV_ZVTYPE   .
    Assumptions : ZTABLE name of control table
                          ZFISCPER name of variable represents fiscal period
                          'ZFISCVARNT' name of variable representing fiscal year variant 
                          'ZVTYPE'. name of variable representing value type
    Hope that helps.
    Regards
    Mr Kapadia
    Assigning points is the way to say thanks in SDN.

Maybe you are looking for

  • Excise invoice not created in t code j1IS

    Hi All Please suggest me on the below issue, I tried to create Excise Invoice with reference to material document for rejection of material in J1IS and encountered the error "Vendor not related to material document. Please revert back Thanks Goutam

  • How to simplify a cumbersome workflow?

    Nearly everyday I need to update 5 large .html pages, each currently around 1.5 MB. The work involved to get these pages published is cumbersome to say the least and time consuming. I'm looking for tips or suggestions on ways to achieve this more eas

  • Can't print on HP 3700..."waiting for printer to become available..."

    I can't print on my HP 3700. I've disconnected all cables, re-booted and nothing. I tried to remove and re-add the printer from 'Print & Fax' in System Preferences. I send something to print (from any application) and then in the print queue says "wa

  • Is it possible to reconfigure the Iphone 4 from a PC to a Mac

    I just recently purchased a MacBook Pro and moved all of my music to the Mac from my desktop PC. How can I reconfigure my IPhone from the PC to my Mac?

  • Trouble viewing calendar in public folders

    The Exchange server at my work has a calendar in the public folders for each department (probably over 30 calendars total). I have one user who cannot view the calendar for her department, but she doesn't seem to have any issues viewing the calendar