Unit Testing: Supplying SYSDATE on a DATE parameter

hi all,
I have a procedure that I'm unit testing and one of the parameter is date, I want to supply a dynamic value to it relative to sysdate but SQL Developer only accepts hard coded date values. Does anyone know how I can supply SYSDATE or SYSDATE-50 to a date parameter directly. I can already solve this by using a wrapper procedure, just wondering if there's a solution to directly supply the value.
Thanks,
Alfredo

Hi Kranthi.
1. Assuming you are with Plus you can make the parameters optional in the parameters screen (tools -> parameters)
so that if they get NULL as value they will return all data.
2. the second way is if you like to keep it mandatory is to define a default value for the parameter and then take care of the situation in the condition.
for example you'll define the 1-Jan-1900 as your default date for the from_date.
Then in the condition change if you'll define it just as from_date > :P_from_date then you got what you wanted.
BTW In similar situations when you are dealing with varchar you can do a manipulation such as:
from_date > :P_from_date
Or
:P_from_date = '1-Jan-1900'
Tamir

Similar Messages

  • Issue in ABAP Unit Test

    Hi,
    I am having an issue in Unit Testing of Function Module. The issue is that Interface parameter of FM is not accessed in subroutine as the parameter goes like a field symbol. I get a dump while try to access the Interface parameter.
    Can anyone please help me out on this.

    * Following is my Unit Test Method
    METHOD get_user_formats.
         DATA lv_format   TYPE char35.
         PERFORM get_user_formats USING '2'.
         READ TABLE user_format INTO lv_format INDEX 1.
         " Expected Result
         cl_aunit_assert=>assert_equals( act = lv_format
                                         exp = 'DATE = MM/DD/YYYY').
       ENDMETHOD.     
    FORM get_user_formats USING datfm TYPE datfm.
       DATA: lv_format   TYPE char35.
       SELECT SINGLE ddtext FROM dd07t INTO lv_format
              WHERE domname = 'XUDATFM' AND
                   ddlanguage =  sy-langu AND domvalue_l = datfm.
       CONCATENATE 'DATE = ' lv_format INTO lv_format SEPARATED BY space.
       APPEND lv_format TO user_format.
       CLEAR lv_format.
    * Comment: user_format is a table in TABLES parameter of FM. It is having single field of type CHAR35
    ENDFORM.                    " get_user_formats
    Please note that I get dump ONLY at the time UNIT TESTING. Otherwise the program is running fine.

  • Unit Testing

    Hi All,
    I would like to inform to all, can any one explain to me the concept of Unit testing in FICO and how it should be drawn? If possible send any dcoumentation for this focus to my mail id: [email protected]
    Thanks with regards,
    Bala

    Hi
    refer below reward if helps
    Unit testing is done in bit and pieces. Like e.g. in SD standard order cycle; we do have 1-create order, then 2-delivery, then 3-transfer order, then 4-PGI and then 5-Invoice.  So we will be testing 1,2,3,4 and 5 seperately alone one by one using test cases and test data. We will not be looking and checking/testing any integration between order and delivery; delivery and TO; TO and PGI and then invoice.
    Whrereas System testing you will be testing the full cycle with it's integration, and you will be testing using test cases which give a full cyclic test from order to invoice.
    Security testing you will be testing different roles and functionalities and will check and signoff.
    Performance testing is refered to as how much time / second will take to perform some actions, like e.g. PGI.  If BPP defination says 5 seconds for PGI then it should be 5 and not 6 second.  Usually it is done using software.
    Regression testing is reffered to a test which verfies that some new configuration doesnot adversly impact existing functionality.  This will be done on each phase of testing.
    User Acceptance Testing:  Refers to Customer testing. The UAT will be performed through the execution of predefined business scenarios, which combine various business processes. The user test model is comprised of a sub-set of system integration test cases.
    We use different software during testing. Most commonly use are
    Test Director:  which is used to record requirement, preparing test plan and then recording the progress.  We will be incorporating defects that are coming during these testings using different test cases.
    Mercury Load Runner:  is used for performance testing.  This is an automatic tool.
    What does the following terms means :
    - Technical Unit Testing
    - Functional Unit Testing
    - IntegrationTesting
    - Volume Testing
    - Parallel Testing?
    Technical Unit Testing= Test of some technical development such as a user exit, custom program, or interface. the test usually consists of a test data set that is processed according to the new program.  A successful test only proves the developed code works and that it performed the process as as designed.
    Functional Unit Testing= Test of configuration, system settings or a custom development (it may follow the technical unit testing) These usually use actual data or data that is masked but essentially the same as a real data set. A successful test shows that the development or configuration works as designed and the data is accurate as a result.
    IntegrationTesting= Testing a process, development or configuration within the context of any other functions that the process, development or functionality will touch or integrate . The test should examine all data involved across all modules and any data indirectly affected. A successful test indicates that the processes work as designed and integrate with other functions without causing any problems in any integrated areas.
    Volume Testing= testing a full data set that is either actual or masked to insure that the entire volume does cause system problems such as network transmission problems, system resources issues, or any systemic problem, A successful test indicates that the processes will not slow or crash the system due to a full data set being utilized.
    Parallel Testing= Testing the new system or processes with a complete data set while running the same processes in the legacy system. A successful test will show identical results when both the legacy system and new system results are compared.
    I would also note that when a new implementation is being done you will want to conduct at least one cut over test from the old system to the new and you should probably do several.
    What kind of testings that are carried out in testing server?
    1. Individual Testing ( Individually which we've created)
    2. Regressive Testing ( Entire Process)
    3. Integration Testing ( Along with other integrated modules)
    The 3 types of testing is as follows:-
    1. Unit testing (where an individual process relevant to a SD or MM etc is tested)
    2. Integration testing (where a process is tested that cuts across all areas of SAP).
    3. Stress testing (where lots of transactions are run to see if the system can handle the data)
    http://www50.sap.com/businessmaps/6D1236712F84462F941FDE131A66126C.htm
    Unit test issues
    The unit tools test all SAP development work that handles business object processing for the connector. Also, the unit test tools enable you to test the interaction of your work with the ABAP components of the connector. The test tools allow you to test your development work as an online user (real-time) only.
    Note:
    It is important to understand the differences between testing the connector as an online user and testing the connector as if operating as a background user.
    The differences between testing the connector as an online user or as a background user are described as follows:
    Memory--When testing a business object, the connector must log into the SAP application.
          The connector runs as a background user, so it processes in a single memory space that is never implicitly refreshed until the connector is stopped and then restarted (therefore it is critical in business object development to clear memory after processing is complete). Since you are an online user, memory is typically refreshed after each transaction you execute.
          For more information, see Developing business objects for the ABAP Extension Module. Any problems that may occur because of this (for example, return codes never being initialized) are not detected using the test tool; only testing with the connector will reveal these issues.
    Screen flow behavior--Screen flow behavior is relevant only when using the Call Transaction API. The precise screen and sequence of screens that a user interacts with is usually determined at runtime by the transaction's code. For example, if a user chooses to extend a material master record to include a sales view by checking the Sales view check box, SAP queries the user for the specific Sales Organization information by presenting an additional input field. In this way, the transaction source code at runtime determines the specific screen and its requirements based on the data input by the user. While the test tool does handle this type of test scenario, there is a related scenario that the test tool cannot handle.
          SAP's transaction code may present different screens to online users versus background users (usually for usability versus performance). The test tool only operates as an online user. The connector only operates as a background user. Despite this difference, unit testing should get through most of the testing situations.

  • Bizunit restriction on Unit Test Adapter

    Hello !
      I'm using Bizunit 4.0 ,which, on its core, seems to use Microsoft testing framework. The tests I'm running are data-driven tests , I'm using a data source and the rows from the data source are parsed one by one , launching thus each test case . What
    I want is to restrict the data source , so only some test cases will be launched .
    In my test scripts , the TestMethod looks like this :              
            [TestMethod]
            [DataSource("ADatabase.ATable")]
            public void runMyTests()
      and the AppConfig : 
    <microsoft.visualstudio.testtools>
        <dataSources>
          <add name="ADatabase.ATable" connectionString="AConnectionString" dataTableName="ATable" dataAccessMethod="Sequential"/>
    I want to restrict the data source to only one row from "ATable"  , for example . I found this but still I can't figure it out where to restrict the Unit test Adapter : 
    After Initializing the Database in TestInitialize, Your Changes Do not Appear
    When the data-driven test runs, Unit Test Adapter connects to your data table and builds a list of data rows. Then for each row it executes the methods TestInitialize, TestMethod, and TestCleanup. If you change data rows in TestInitialize, the Unit Test Adapter
    will not see that change. Therefore, if you want to change your data table for a data driven test, do so in the ClassInitialize or AssemblyInitialize method.
    http://msdn.microsoft.com/en-US/library/ms404700(v=vs.80).aspx
    Thanks !

    After Initializing the Database in TestInitialize, Your Changes Do not Appear
    When the data-driven test runs, Unit Test Adapter connects to your data table and builds a list of data rows. Then for each row it executes the methods TestInitialize, TestMethod, and TestCleanup. If you change data rows in TestInitialize, the Unit Test Adapter
    will not see that change. Therefore, if you want to change your data table for a data driven test, do so in the ClassInitialize or AssemblyInitialize method.
    http://msdn.microsoft.com/en-US/library/ms404700(v=vs.80).aspx
    According to the analysis of this error message, you need change your data table in 
    ClassInitialize
    or
    AssemblyInitialize method.

  • Variable substitution in Unit Testing validation - Date format?

    Using SQL Developer unit testing, I am having difficulty comparing Date datatype in a validation.
    I use a Dynamic Value Query to set the parameters of an insertion procedure under test.
    select * from (select doc_nbr as p_mstr_doc_nbr, doc_nbr as p_assoc_doc_nbr, sysdate as p_date_added from documents sample(0.01) order by dbms_random.random)  where rownum <= 1;So P_DATE_ADDED is a DATE datatype.
    I wish to validate that the insertion was correct. So I run a Process Validation returning one or more rows.
    SELECT * FROM X100_ASSOC
      WHERE MSTR_DOC_NBR = '{P_MSTR_DOC_NBR}'
        AND ASSOC_DOC_NBR = '{P_ASSOC_DOC_NBR}'
        AND to_char(DATE_ADDED,'dd-MON-yy HH24:MI:SS')  = {P_DATE_ADDED};I understand that the {P_DATE_ADDED} is substituting in a string. From Help page :
    "What is actually substituted is the string representation of the parameter value. For example:
    If P1 is a parameter of type NUMBER and has the value 2.1, the string {P1} will be replaced by the string 2.1.
    If P1 is a parameter of type VARCHAR2 and has the value ABC, the string '{P1}' will be replaced by the string 'ABC'. (Note the single-quotation marks around {P1} in this example.)"
    I need to know the format that the date is cast into as a string. Then I can do the comparision on the where clause.
    Any answers? or details of where is more in depth documentation?
    Thank you,
    Bill

    I agree as a general rule. However in this case, it appears that the variable substitution routine is returning the default format. So to compare my expected data to the returned data I choose to use the default format. If the variable substitution routine specified an explicit format, I would use that. In my original question, I asked if anyone knew the format.
    Regards,
    Bill

  • 30EA2 - UNIT TESTING - Dynamic Value Query truncating time from dates.

    So i've been using the SQL Developer Unit Testing facility (very nice by the by) for a bit now and just recently upgraded to the latest beta release (3.0.02.83). It looks like a bug was introduced whereby the dynamic value queries are truncating all the time information from any DATE Data Types.
    This causes some serious sadness for my current test cases and for me since i have to revert to the previous beta release :)

    Irian wrote:
    I noticed that in the new 30EA2 the parameter:
    AddVMOption -Doracle.jdbc.mapDateToTimestamp=false has been introduced by default in
    [SQLDEveloper_install_dir]/sqldeveloper/bin/sqldeveloper.confmaybe this has something to do with the incorrect date behaviour, try to remove the parameter and check again.That seems to have done the trick.
    Many thanks!

  • TDD: Using Test-Data Containers(eCATT) in Unit-test

    Recently I learned about TDD, and learn how to write unit-test for some class. But When I write a report(with DB, post account doc) , I come across some problem.
    1. I  have some method just select some data form table , but I don't know how to write this unit-test? I know I can create a TDC though eCATT, but my method is select form table ,how do I finish this ?
    2. Also I have some method just handle data, such as check the data or move to another internal table, do I need to write unit-test for this kind method?
    Further more , I search the SCN many times , I didn't find a suitable program as TDD program (include SQL, input , output, data handle ). Is there anyone can share your example in TDD for us , thank you so much.
    Best Regards!

    Glad that you have interest in TDD. I write on ABAP unit at my site zevolving.com 
    TDD should not dependent on the data selection from the DB as the DB data could be changed and your test would fail without you being changing the logic.
    To avoid the dependency on the data, you need to prepare the dummy test data. You need to than also prepare the expected output from the dummy test data. Once you have the dummy test data, you can pass the data to the method (or subroutine or FM) and get the actual output. You compare the expected output with the actual output to verify it works as expected.
    For your example, you should modularize the program - method for GET_DATA, method for PREPARE_OUTPUT, method for GENERATE_OUTPUT. From these methods, you should be able to write unit test on PREPARE_OUTPUT.
    In your unit test, you need to declare local variables in your test class if you use the subroutine. if you use the class and methods, you can instantiate the object and you get all the variable access. Thats the reason it would be more easier and less confusing when using the objects with unit test.
    Fill up these tables. Say LT_VBRK, LT_VBFA, LT_VBAK. Make sure your subroutine PREPARE_OUTPUT has importing parameters. Pass these to them. Also, prepare the LT_OUTPUT_EXP with the expected results. Declare the table which would hold the actual values LT_OUTPUT_ACT and receive the results from the subroutine PREPARE_OUTPUT. Use the method  cl_aunit_assert=>assert_equals to check the values in the LT_OUTPUT_EXP and LT_OUTPUT_ACT.
    Regards,
    Naimesh Patel

  • Unit Test Generator - VS 2008 (Cannot add oracle data source)

    Hi All,
    Okay this might just be me (new to ODT for VS) - but If I start VS, go Test -> Add Test.
    Create a Database Unit Test.
    [Give it some name]
    write a query such as select * from <>
    add a test checksum condition , and try to configure the checksum condition.. (Hit configure on the properties - under misc).
    I go to new connection ...
    I only have SQL Server (sqlClient) available. Is the unit test generator/validator something that oracle does not currently yet support?
    (Yes the ODT 11i for VS 2008 is installed, can add a data connection to Oracle systems/query oracle in VS - just cannot add a Oracle database connection for unit database tests).
    Or has anybody found a way to make this very useful piece of functionality work ?
    Best Regards,
    D

    The same thing happens, If I go File -> Open -> Oracle Database Project Items -> SQL Script.
    This comes up as disconnected.
    When right click on the new script choose connect, only SQL Server provider is available with no ability to choose a oracle provider (greyed out to choose a diff connection provider).
    Prehaps someone has seen this before?

  • Required Unit test Plan for Data migration

    Dear All,
    I am looking for unit test plan Draft documents/templates which covers
    1. Testing tools
    2. Methods
    3. Error handling
    4. Reviews and approvals
    The project is a Oracle 10g data migration from one schema to another schema.
    It will be a greate help if anyone can forward the same to me.
    Thank you.

    Hi Vaishali,
    You may wish to refer the links below...
    https://service.sap.com/instguides --> SAP NetWeaver --> Release 2004s --> Upgrade
    https://www.sdn.sap.com/irj/sdn/developerareas/bi
    latest on upgrade tp BI7.0
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/2e8e5288-0b01-0010-2ea8-bcd4df5084a7
    Upgrading BW 3.X to SAP NetWeaver 2004s BI (PDF 2.6 MB)
    Front End Migration strategy
    Here's the migration strategy: Rolling out the New SAP NetWeaver 2004s BI Frontend Tools
    Presentation
    http://csc-studentweb.lrc.edu/swp/Berg/Articles/PM_2006_upgrade_NW2004s_Bjarne_Berg_v12.ppt
    Here are the frontend requirements:
    Troubleshoot the SAP NetWeaver 2004s BI Frontend Installation
    Here are the backend requirements in the product availabilty matrix:
    https://websmp110.sap-ag.de/~form/handler?_APP=00200682500000001303&_EVENT=DISP_NEW&00200682500000002804=01200615320900001250
    Migration of Web Teplates
    832713 - Migration of Web templates from BW 3.x to Netweaver
    Assign points if this helps.
    Regards,
    Anil

  • BeginTimer and EndTimer Not Working In Data-Driven Unit Test Using DataSource Attribute

    Using VS2012 Ultimate I have a unit test with the <DataSource> attribute which passes in values from a CSV file.  I'm wrapping the unit test in a load test.  I expect a Transaction to appear in the load test results for each row in my DataSource
    due to the BeginTimer and EndTimer methods in the unit test.  However, I only get 1 transaction, with response time roughly equal to the overall test time.  For example, if each row in the DataSource takes 1 second to process, then my test time and
    transaction time would be about 10 seconds with 10 rows in the CSV file.
    I've created a load test with Constant Load Pattern, 1 user, and 1 test iteration.  Seeing the behavior described above.
    I have tried with and without and the check for $LoadTestUserContext.  I'm only using that because I get a NotSupportedException when running the unit test on its own.  I can't believe this bug still
    exists, but that is another topic.
    Note also that I cannot see the Debug output in the Output window in VS2012.
    Any tips?  Thank you.
        <TestMethod()>
        <DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", "|DataDirectory|\TestData\MyValues.csv", "MyValues#csv", DataAccessMethod.Sequential)>
        Public Sub WebServiceTest()
            Dim service As MySvc = New MySvcClient()
            Dim input As MyInput = New MySvcInput()
            input.A = testContextInstance.DataRow("A")
            input.B = testContextInstance.DataRow("B")
            Dim g As Guid = Guid.NewGuid()
            If TestContext.Properties.Contains("$LoadTestUserContext") Then 'running as load test
                TestContext.BeginTimer("MySvcTrans")
                Debug.WriteLine("Begin Transaction MySvcTrans:  {0}", g)
            End If
            Dim output As MySvcOutput = service.Method(input)
            If TestContext.Properties.Contains("$LoadTestUserContext") Then 'running as load test
                Debug.WriteLine("End Transaction MySvcTrans:  {0}", g)
                TestContext.EndTimer("MySvcTrans")
            End If
            Assert.AreEqual(0, output.ReturnCode)
        End Sub

    Hi John,
    >> I expect a Transaction to appear in the load test results for each row in my DataSource due to the BeginTimer and EndTimer methods in the unit test.  However, I only get 1 transaction, with response time roughly equal to the overall test
    time.
    Could you share me a screen shot about the reslut in load test?
    Could you share us the load test result in "Transaction"Tables?
    About how to use the
    Transaction for unit tests, maybe you could get useful informaiton here:
    http://blogs.msdn.com/b/slumley/archive/2006/04/14/load-testing-web-services-with-unit-tests.aspx
    Best Regards,
    Jack
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How to pass a date parameter(from a procedure IN) to a API

    Hi,
    CREATE OR REPLACE package body xxal_basic_sal_increment_pkg1 as
    procedure emp_pro_inc1(ERRBUF VARCHAR2,RETCODE OUT NUMBER,
    p_business_group_id_enter in number,p_change_date in varchar2) is
    CURSOR STAFF IS
    SELECT pp.ASSIGNMENT_ID
    ,peo.EMPLOYEE_NUMBER employee_no
    ,pp.OBJECT_VERSION_NUMBER
    ,pp.PAY_PROPOSAL_ID
    ,pp.PROPOSED_SALARY_N basic_salary
    ,pp.PROPOSAL_REASON
    ,pp.change_date
    ,pp.BUSINESS_GROUP_ID
    ,pg.name
    ,pr.PERFORMANCE_RATING,
    '' v_effective_start_date,
    '' v_effective_end_date
    FROM per_all_people_f peo,
    per_all_assignments_f pa,
    per_pay_proposals pp,
    per_grades_tl pg,
    per_performance_reviews_v pr
    where pa.person_id = peo.PERSON_ID
    and pa.ASSIGNMENT_ID = pp.ASSIGNMENT_ID
    and peo.PERSON_ID=pr.PERSON_ID
    and pg.GRADE_ID=pa.GRADE_ID
    --and peo.EMPLOYEE_NUMBER=STAFF_VAR.employee_no
    and sysdate between peo.EFFECTIVE_START_DATE and peo.EFFECTIVE_END_DATE
    and sysdate between pa.EFFECTIVE_START_DATE and pa.EFFECTIVE_END_DATE
    and peo.BUSINESS_GROUP_ID = p_business_group_id_enter
    and pp.change_DATE = (select max(change_DATE) from per_pay_proposals temp
    where ASSIGNMENT_ID =pp.ASSIGNMENT_ID);
    --L_BUSINESS_GROUP_ID NUMBER:=5128;
    L_ASSIGNMENT_ID NUMBER;
    L_PAY_PROPOSAL_ID NUMBER;
    L_OBJECT_VERSION_NUMBER NUMBER;
    L_pyp_proposed_sal_warning BOOLEAN;
    L_additional_comp_warning boolean;
    l_person_id number;
    L_COMMON boolean;
    L_ELEMENT_ENTRY_ID NUMBER;
    TEMP NUMBER;
    L_EFFECTIVE_START_DATE DATE;
    L_MULTI VARCHAR2(30):='N';
    L_APPROVED VARCHAR2(30):='Y';
    L_CHANGE_DATE DATE:=TO_DATE('31-JAN-2008','DD-MON-YYYY');
    BEGIN
    v_disp_output:='EMPLOYEE_NUMBER'||','||
    'BASIC'||','||
    'EFF START DATE'||','||
    'EFF END DATE';
    fnd_file.put_line(FND_FILE.output,v_disp_output);
    FOR STAFF_VAR IN STAFF LOOP
    L_ELEMENT_ENTRY_ID:=null;
    begin
    select assign.assignment_id,assign.effective_start_date into
    l_assignment_id,l_change_date_new
    from per_people_f peo,per_assignments_f assign
    where peo.person_id=assign.person_id
    and sysdate between peo.effective_start_date and peo.effective_end_date
    and sysdate between assign.effective_start_date and assign.effective_end_date
    and current_employee_flag='Y'
    and primary_flag='Y'
    and peo.business_group_id=l_business_group_id
    and peo.employee_number=staff_var.employee_no;
    L_CHANGE_DATE_new:=L_CHANGE_DATE;
    --L_CHANGE_DATE_new:=STAFF_VAR.v_effective_start_date;
    begin
    HR_MAINTAIN_PROPOSAL_API.INSERT_SALARY_PROPOSAL
    P_PAY_PROPOSAL_ID=>L_PAY_PROPOSAL_ID
    ,P_ASSIGNMENT_ID=>staff_var.ASSIGNMENT_ID
    ,P_BUSINESS_GROUP_ID=>staff_var.BUSINESS_GROUP_ID
    ,P_CHANGE_DATE=>L_CHANGE_DATE_new
    ,P_PROPOSED_SALARY_N=>STAFF_VAR.basic_salary
    ,P_OBJECT_VERSION_NUMBER=>STAFF_VAR.OBJECT_VERSION_NUMBER
    ,p_multiple_components=>L_MULTI
    ,p_approved=>L_APPROVED
    ,P_VALIDATE=>false
    ,p_element_entry_id =>L_ELEMENT_ENTRY_ID
    ,P_INV_NEXT_SAL_DATE_WARNING=>l_common
    ,P_PROPOSED_SALARY_WARNING=>L_COMMON
    ,P_APPROVED_WARNING=>L_COMMON
    ,P_PAYROLL_WARNING=>L_COMMON
    in the above code the variable L_CHANGE_DATE DATE is hard coded .
    but we need to supply this variable value as dynamic, means (p_change date--procedure IN Parameter )
    i tried like below ,
    CREATE OR REPLACE package body xxal_basic_sal_increment_pkg1 as
    procedure emp_pro_inc1(ERRBUF VARCHAR2,RETCODE OUT NUMBER,
    p_business_group_id_enter in number,p_change_date in varchar2) is
    CURSOR STAFF IS
    SELECT pp.ASSIGNMENT_ID
    ,peo.EMPLOYEE_NUMBER employee_no
    ,pp.OBJECT_VERSION_NUMBER
    ,pp.PAY_PROPOSAL_ID
    ,pp.PROPOSED_SALARY_N basic_salary
    ,pp.PROPOSAL_REASON
    ,pp.change_date
    ,pp.BUSINESS_GROUP_ID
    ,pg.name
    ,pr.PERFORMANCE_RATING,
    '' v_effective_start_date,
    '' v_effective_end_date
    FROM per_all_people_f peo,
    per_all_assignments_f pa,
    per_pay_proposals pp,
    per_grades_tl pg,
    per_performance_reviews_v pr
    where pa.person_id = peo.PERSON_ID
    and pa.ASSIGNMENT_ID = pp.ASSIGNMENT_ID
    and peo.PERSON_ID=pr.PERSON_ID
    and pg.GRADE_ID=pa.GRADE_ID
    --and peo.EMPLOYEE_NUMBER=STAFF_VAR.employee_no
    and sysdate between peo.EFFECTIVE_START_DATE and peo.EFFECTIVE_END_DATE
    and sysdate between pa.EFFECTIVE_START_DATE and pa.EFFECTIVE_END_DATE
    and peo.BUSINESS_GROUP_ID = p_business_group_id_enter
    and pp.change_DATE = (select max(change_DATE) from per_pay_proposals temp
    where ASSIGNMENT_ID =pp.ASSIGNMENT_ID);
    --L_BUSINESS_GROUP_ID NUMBER:=5128;
    L_ASSIGNMENT_ID NUMBER;
    L_PAY_PROPOSAL_ID NUMBER;
    L_OBJECT_VERSION_NUMBER NUMBER;
    L_pyp_proposed_sal_warning BOOLEAN;
    L_additional_comp_warning boolean;
    l_person_id number;
    L_COMMON boolean;
    L_ELEMENT_ENTRY_ID NUMBER;
    TEMP NUMBER;
    L_EFFECTIVE_START_DATE DATE;
    L_MULTI VARCHAR2(30):='N';
    L_APPROVED VARCHAR2(30):='Y';
    L_CHANGE_DATE DATE:=TO_DATE(p_change_date,'DD-MON-YYYY');
    BEGIN
    v_disp_output:='EMPLOYEE_NUMBER'||','||
    'BASIC'||','||
    'EFF START DATE'||','||
    'EFF END DATE';
    fnd_file.put_line(FND_FILE.output,v_disp_output);
    FOR STAFF_VAR IN STAFF LOOP
    L_ELEMENT_ENTRY_ID:=null;
    begin
    select assign.assignment_id,assign.effective_start_date into
    l_assignment_id,l_change_date_new
    from per_people_f peo,per_assignments_f assign
    where peo.person_id=assign.person_id
    and sysdate between peo.effective_start_date and peo.effective_end_date
    and sysdate between assign.effective_start_date and assign.effective_end_date
    and current_employee_flag='Y'
    and primary_flag='Y'
    and peo.business_group_id=l_business_group_id
    and peo.employee_number=staff_var.employee_no;
    L_CHANGE_DATE_new:=L_CHANGE_DATE;
    --L_CHANGE_DATE_new:=STAFF_VAR.v_effective_start_date;
    begin
    HR_MAINTAIN_PROPOSAL_API.INSERT_SALARY_PROPOSAL
    P_PAY_PROPOSAL_ID=>L_PAY_PROPOSAL_ID
    ,P_ASSIGNMENT_ID=>staff_var.ASSIGNMENT_ID
    ,P_BUSINESS_GROUP_ID=>staff_var.BUSINESS_GROUP_ID
    ,P_CHANGE_DATE=>L_CHANGE_DATE_new
    ,P_PROPOSED_SALARY_N=>STAFF_VAR.basic_salary
    ,P_OBJECT_VERSION_NUMBER=>STAFF_VAR.OBJECT_VERSION_NUMBER
    ,p_multiple_components=>L_MULTI
    ,p_approved=>L_APPROVED
    ,P_VALIDATE=>false
    ,p_element_entry_id =>L_ELEMENT_ENTRY_ID
    ,P_INV_NEXT_SAL_DATE_WARNING=>l_common
    ,P_PROPOSED_SALARY_WARNING=>L_COMMON
    ,P_APPROVED_WARNING=>L_COMMON
    ,P_PAYROLL_WARNING=>L_COMMON
    but we are getting the error Cause: FDPSTP failed due to ORA-01839: date not valid for month specified
    ORA-06512: at "APPS.XXAL_BASIC_SAL_INCREMENT_PKG1", line 45
    ORA-06512: at line 1
    we tried the solution available in the metalink still its giving error ..
    pl help us to solve this issue ...
    how should we pass the date parameter while we run the concurrent program(we used date value set).
    also we tried with some other value set also ..
    Regards,
    kumar

    dear,
    I have the following code to create proposal, but the API create salary proposal for all record s and does not create entry for all records it just creates for the first record
    any advice
    the code ....
    /* Formatted on 2007/08/29 16:20 (Formatter Plus v4.8.8) */
    ----------------------- P R O P O S A L -------------------------
    DECLARE
    l_rows_processed NUMBER := 0;
    l_commit_point NUMBER := 500;
    l_business_group_id NUMBER
    := fnd_profile.VALUE ('PER_BUSINESS_GROUP_ID');
    l_proposal_salry NUMBER;
    l_approved CHAR (1);
    l_rowid VARCHAR2 (30);
    l_errmessage VARCHAR2 (400);
    l_entry_indecator NUMBER;
    l_assignment_id NUMBER;
    p_ctr_object_version_number NUMBER;
    -- Out Parameters --
    l_element_entry_id NUMBER;
    p_element_entry_id NUMBER;
    l_ctr_object_version_number NUMBER;
    l_pay_proposal_id NUMBER;
    l_inv_next_sal_date_warning BOOLEAN;
    l_proposed_salary_warning BOOLEAN;
    l_approved_warning BOOLEAN;
    l_payroll_warning BOOLEAN;
    CURSOR crs_dc_mn
    IS
    SELECT xdp.ROWID, xdp.assignment_id, xdp.change_date,
    xdp.proposal_reason, xdp.proposed_salary,
    xdp.assignment_number, xdp.employee_number, xdp.person_id,
    xdp.new_asg_id
    FROM apps.xx_dc_proposal xdp
    WHERE xdp.assignment_id <> -1
    AND xdp.processed = 'N'
    AND xdp.change_date =
    (SELECT MIN (xdc.change_date)
    FROM xx_dc_proposal xdc
    WHERE xdc.assignment_id = xdp.assignment_id
    AND xdc.processed = 'N')
    ORDER BY assignment_id, change_date ASC;
    pro_rcrd crs_dc_mn%ROWTYPE;
    CURSOR crs_dc_proposal1 (p_asg_id IN NUMBER)
    IS
    SELECT xdp.ROWID, xdp.assignment_id, xdp.change_date,
    xdp.proposal_reason, xdp.proposed_salary,
    xdp.assignment_number, xdp.employee_number, xdp.person_id,
    xdp.new_asg_id
    FROM apps.xx_dc_proposal xdp
    WHERE xdp.assignment_id <> -1
    AND xdp.processed = 'N'
    AND xdp.assignment_id = p_asg_id
    ORDER BY assignment_id, change_date ASC;
    BEGIN
    OPEN crs_dc_mn;
    FETCH crs_dc_mn
    INTO pro_rcrd;
    LOOP
    BEGIN
    hr_maintain_proposal_api.insert_salary_proposal
    (p_pay_proposal_id => l_pay_proposal_id,
    p_assignment_id => pro_rcrd.assignment_id,
    p_business_group_id => l_business_group_id,
    p_change_date => pro_rcrd.change_date,
    p_comments => NULL,
    p_next_sal_review_date => NULL,
    p_proposal_reason => NULL,
    p_proposed_salary_n => pro_rcrd.proposed_salary,
    p_forced_ranking => NULL,
    p_performance_review_id => NULL,
    p_attribute_category => NULL,
    p_attribute1 => NULL,
    p_attribute2 => NULL,
    p_attribute3 => NULL,
    p_attribute4 => NULL,
    p_attribute5 => NULL,
    p_attribute6 => NULL,
    p_attribute7 => NULL,
    p_attribute8 => NULL,
    p_attribute9 => NULL,
    p_attribute10 => NULL,
    p_attribute11 => NULL,
    p_attribute12 => NULL,
    p_attribute13 => NULL,
    p_attribute14 => NULL,
    p_attribute15 => NULL,
    p_attribute16 => NULL,
    p_attribute17 => NULL,
    p_attribute18 => NULL,
    p_attribute19 => NULL,
    p_attribute20 => NULL,
    p_object_version_number => l_ctr_object_version_number,
    p_multiple_components => 'N', -- 918219
    p_approved => 'Y',
    p_validate => FALSE,
    p_element_entry_id => l_element_entry_id,
    p_inv_next_sal_date_warning => l_inv_next_sal_date_warning,
    p_proposed_salary_warning => l_proposed_salary_warning,
    p_approved_warning => l_approved_warning,
    p_payroll_warning => l_payroll_warning
    UPDATE xx_dc_proposal
    SET processed = 'Y'
    WHERE ROWID = pro_rcrd.ROWID;
    l_rows_processed := l_rows_processed + 1;
    IF l_rows_processed = l_commit_point
    THEN
    COMMIT;
    l_rows_processed := 0;
    END IF;
    EXCEPTION
    WHEN OTHERS
    THEN
    l_errmessage := SQLERRM;
    UPDATE xx_dc_proposal
    SET err_message = l_errmessage
    WHERE ROWID = pro_rcrd.ROWID;
    END;
    END LOOP;
    CLOSE crs_dc_mn;
    COMMIT;
    END;
    ..............................

  • 2.1.0.62: Problem with Package.Functions and Unit Tests

    I like the new Sqldeveloper - I startet trying Unit Tests as described here: Link: [http://www.oracle.com/technology/obe/11gr2_db_prod/appdev/sqldev/sqldev_unit_test/sqldev_unit_test.htm#t4]
    It worked with a test-procedure. Now i am trying to test my package functions, but all i get is this:
    Die folgende Prozedur wurde ausgeführt.
    Ausführungsaufruf
    BEGIN
    :1 := "PKG_MYPACK"."CREATEFUNCTION"(IN_PROGRAMMEID=>:2,
    IN_AMOUNT=>:3,
    IN_SWS=>:4);
    END;
    Bind-Variablen verwendet
    1 INTEGER OUT (null)
    2 INTEGER IN 1
    3 INTEGER IN 10
    4 INTEGER IN 11
    Ausführungsergebnisse
    ERROR
    Ungültige Konvertierung angefordert
    oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:70)
    oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:110)
    oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:171)
    oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:227)
    oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:439)
    oracle.jdbc.driver.OraclePreparedStatement.setObjectCritical(OraclePreparedStatement.java:7723)
    oracle.jdbc.driver.OraclePreparedStatement.setObjectInternal(OraclePreparedStatement.java:7496)
    oracle.jdbc.driver.OraclePreparedStatement.setObjectInternal(OraclePreparedStatement.java:7978)
    oracle.jdbc.driver.OracleCallableStatement.setObject(OracleCallableStatement.java:4063)
    oracle.jdbc.driver.OraclePreparedStatementWrapper.setObject(OraclePreparedStatementWrapper.java:221)
    oracle.dbtools.raptor.datatypes.strategies.callablestatement.CallableBindingDatum.customBindIN(CallableBindingDatum.java:135)
    oracle. ...
    what can i do?

    Created
    Bug 8976245 - EA1: UNIT_TEST: INVALID CONVERSION ERROR USING INTEGER PARAMETER
    and have asked bug responder to keep you updated on status here in the forum.
    Bad news is that any INTEGER parameter for which you specify a non-null value will fail.
    Possibly helpful news is that if you create a 'clone' of you function using NUMBER as the data type, you can continue to experiment with how unit testing may be of use to you.
    Sorry no instant answer. :(
    Brian
    SQL Developer Team

  • SQL Developer 3 EA1: Unit test

    Hi,
    I just started using the unit test frame work in SQL Developer 3 EA 1 and I need some help defining a test case involving parent - child tables that are manipulated using a plsql API. The API for the child table requires the key of a record in the parent table. The parent record, and its key, is created by a test case startup process. The key is retrieved using a dynamic value query in the test implementation. It appears the dynamic value query is executed before the test case startup processes have been executed. Is this expected behaviour? My expectation is the startup processes are executed before the dynamic values query.
    Also, is it possible to use values from the startup processes as parameter values of the test case other than using a dynamic value query?
    Test case summary:
    2 Startup processes: The first deletes all data from parent and child tables. The second inserts in a record into the parent table.
    Zero Teardown processes.
    Test implementation: Dynamic value query that selects the key from the parent table and defines literals for the remaining parameters of the test case.
    1 Process validation: Test whether a record has been inserted into the childe table with the expected values.
    Thanks
    Alistair

    Hi Alistair -
    We execute the dynamic query to control how many times the test (start up, test case, validation, tear down) cycle executes.
    To get the behavior you want, put the test in a test suite and have the test suite start up do the table initialization for you.
    Brian Jeffries
    SQL Developer Team

  • How to unit test pl/sql collection in the unit test ?

    There is a function SPLIT_LIST (see below) to split a string list to a collection type .
    I'm trying to use the SQLP DEVELOPER to do the unit test on this fucntion. The idea is to use lookups to give multiple string list for different inputs such as 'A,B,C' 'D', '', 'EF,,GH'. for multiple tests a time.
    the expected result (function returns) are SPLIT_TBL('A','B',C'), SPLIT_TBL('D'), SPLIT_TBL(), SPLIT_TBL('EF','','GH')
    But I have problem to use unit test to verify the result based on the lookups as the out put is the collection. anyone has a good idea to do those ?
    create or replace TYPE SPLIT_TBL AS TABLE OF VARCHAR2(32767) ;
    create or replace
    FUNCTION SPLIT_LIST (
    P_LIST VARCHAR2,
    P_DEL VARCHAR2 DEFAULT ' ' )
    RETURN SPLIT_TBL PIPELINED DETERMINISTIC
    IS
    lv_idx PLS_INTEGER;
    lv_list VARCHAR2(32767) := P_LIST;
    lv_value VARCHAR2(32767);
    BEGIN
    LOOP
    lv_idx := instr(lv_list,p_del);
    IF lv_idx > 0 THEN
    PIPE ROW(SUBSTR(lv_list,1,lv_idx-1));
    lv_list := SUBSTR(lv_list,lv_idx+LENGTH(p_del));
    ELSE
    PIPE ROW(lv_list);
    EXIT;
    END IF;
    END LOOP;
    RETURN;
    END;
    /

    I'm having a similar problem - have you solved yours yet?
    As for me, when I return a collection as an output parameter from a procedure, I can't test the result.
    Example: I'm testing a procedure defined like this: Procedure check_this (p_id number, p_result out CompResult)
    where CompResult is defined as: create or replace type CompResult is varray(100) of CompObj;
    Unit Test understands that the data type of out parameter p_result is CompResult.
    It fills in schemaName.CompResult() as the result (empty varray).
    Editing of the result does not appear to be allowed - it's read only.
    So, when the proc returns a varray that isn't empty, the test fails.

  • [svn:osmf:] 10137: Dynamic streaming unit tests now pass.

    Revision: 10137
    Author:   [email protected]
    Date:     2009-09-10 16:01:37 -0700 (Thu, 10 Sep 2009)
    Log Message:
    Dynamic streaming unit tests now pass.
    Modified Paths:
        osmf/trunk/framework/MediaFramework/org/openvideoplayer/net/dynamicstreaming/NetStreamSwi tchableTrait.as
        osmf/trunk/framework/MediaFramework/org/openvideoplayer/traits/SwitchableTrait.as
        osmf/trunk/framework/MediaFrameworkFlexTest/org/openvideoplayer/MediaFrameworkTests.as
        osmf/trunk/framework/MediaFrameworkFlexTest/org/openvideoplayer/traits/TestISwitchable.as

    Hello!
    1) Given the string plugin is loaded from (file:///C:/alex/PlayerCDN/lib/PlugIN_junio.swf) application loads it from file system that "involves complex security" (our app can't load local files - we don't need it but nevertheless).
    You may want to try directing your Flex builder run configuration to use http://localhost/yourappwrapper.html as a "URL or path to launch" parameter.
    Try to set full path to plugin also (including host).
    2) As I can see, you don't have
    Security.allowDomain('*');
    in your plugin constructor.
    Although it is being loaded from the same host - do try to insert it
    Here is our plugins main file - everything works fine:
    package {
    import flash.display.Sprite;
    import flash.system.Security;
    import org.osmf.media.PluginInfo;
    import plugin.ControlBarPlugin;
    public class CBPlugin extends Sprite
      private var _pluginInfo:PluginInfo;
      public function CBPlugin()
       Security.allowDomain('*');
       _pluginInfo = (new ControlBarPlugin).pluginInfo;
      public function get pluginInfo():PluginInfo{
       return _pluginInfo;

Maybe you are looking for

  • NFe de Entrada - Tabela J_1BNFE_ACTIVE

    Srs. Estou precisando localizar uma tabela interna standard que contenha o campo DOCNUM9 da tabela J_1BNFE_ACTIVE. Estou precisando gravar 3 valores que serão exibidos em uma tela da J1B3N, são eles AUTHCOD, DOCNUM9 e CDV, e pretendo faze-lo através

  • Ipod Nano/iTrip/Car charger problems.

    I recently bought an itrip nano (the one that fits around your ipod) and i originally had a charger for my car, but thanks to the good people at apple I had to buy a new one because no cables would fit the old charger with the itrip plugin. *end rant

  • HT4623 When I go to Software Update, I keep getting the message, "Unable to Check for Update."

    When I try to access "Software Update", I keep getting the message, "Unable to Check for Update."  I am also unable to connect to the App Store.  Anyone have a solution, please?

  • Page Break in Adobe Form

    Hi, I have 10 line items in a table. i would like to display first 5 line item in first page of Adobe form and remaining 5 line item in 2nd page of Adobe form. How to do that?Since i have more space in first page itself it is showing all the items in

  • Error in execution of process chains

    Hi All, when i am trying to excute a process chain, i am facing follwoing error: 1)  My chains contains a ODS with its infopakage so data is flowing form infopakage to ods and get activated. 2)  delete index is executed at  cube level. and gets updat