Get_num_value not returning correct value

Hello,
I anm developing with Designer/Headstart 9i. I'll try to be clear on my problem. I am using the function get_num_value form one of my table CAPI. Here is the scenario
1. I do a get_num_value and get 2 as a value
2. I update the column to -1.
3. A business rule does not permit the update so I rollback
4. I do the same get_num_value on the column and I get -1
So what is happening is that the function get_num_value is calling a function get_row. The function get_row checks to see if the row has already been fetched and it returns the value in it's cached variables rather than fetching the value with the tapi slct procedure. Even if I put the same_record parameter to false, it's checks the cached variables before the parameter. Here is a test case and this problem occurs with any CAPI table.
serveroutput ON
DECLARE
v1 NUMBER;
BEGIN
v1 := Gem_Lot_Capi.get_num_value('PROFONDEUR',4122263);
dbms_output.put_line('Value before' || TO_CHAR(v1));
UPDATE GEM_LOTS SET profondeur = -1
WHERE id = 4122263;
v1 := Gem_Lot_Capi.get_num_value('PROFONDEUR',4122263);
dbms_output.put_line('Value after' || TO_CHAR(v1));
EXCEPTION
WHEN OTHERS THEN
v1 := Gem_Lot_Capi.get_num_value('PROFONDEUR',4122263);
dbms_output.put_line('Value exception after ' || TO_CHAR(v1));
SELECT profondeur
INTO v1
FROM GEM_LOTS
WHERE id = 4122263;
dbms_output.put_line('Value exception select ' || TO_CHAR(v1));
END;
Value before 21.34
Value EXCEPTION after -1
Value EXCEPTION SELECT 21.34
If anyone has suggestions, I would appreciate it.
Thanks

Yes I did find a solution. We copied the Headstart packages and modified the code of the get_row function. The new version of the function is to always do a fetch in the database using the tapi slct. Here is the function
function get_row
( p_same_record in boolean
, p_id in number
return cg$age_assignations.cg$row_type
-- Purpose Return row identified by Primary Key parameters
-- Usage From get_column_value functions
is
l_row cg$age_assignations.cg$row_type;
l_tbl_index number(10);
begin
l_row.id := p_id;
-- select row from database using TAPI procedure
-- slct procedure will handle non-existing row
cg$age_assignations.slct(l_row);
g_cached_row := l_row;
return l_row;
end get_row;
Since the get_yyy_value functions are not used by the capi itself, there is no risk involed by doing this. As for database performance, there is no difference since the last row fetched is still in memory when doing a second get_yyy_value on the same record, it's the same as using the global variables.
If you need more info, I can have the developper zip the packages he had to copy and modify and send them to you. Just reply to this message and give me you e-mail.

Similar Messages

  • MessageChoice does not return correct value

    Hi
    I am problem with MessgeChoiceBean's improver beharior
    For the first time it retunrs blank and subsequently In one page if I select Yes, it returns No.
    In another page it does not return any thing for the first two selections. And I reciev flip values.
    I ran VO outside, VO is returning correct values.
    MessageChoice attributes and associated PPR:
    Data Type: Varchar2
    Initial Value: N
    Pick List view Definition: oracle.apps.xxx.docs.common.lov.server.YesNoVO
    Pick List View Instance: YesNoVO3
    Pick List Display Attribute: Meaning
    Pick List Value AttributeL LookupCode
    ActionType: firePartialAction
    Event: handleNewLocationFlagChange
    Parameter Name: newLocationFlag
    Parameter Value: ${oa.CustomerInfoVO1.NewShipToLocationFlag}
    ProcessParameterForm Code:
    if ("handleNewLocationFlagChange".equals(event))
    String newLocationFlag = pageContext.getParameter("newLocationFlag");
    Serializable[] parameters = { ""+newLocationFlag};
    Class[] paramTypes = { String.class};
    am.invokeMethod("handleNewLocationFlagChange", parameters, paramTypes);
    VO definition:
    select LOOKUP_CODE,MEANING
    FROM ONLINE_DOCS_LOOKUPS
    WHERE ONLINE_DOCUMENT_CODE = 'ALL'
    AND LOOKUP_TYPE = 'YESNO'
    ORDER BY ATTRIBUTE1
    View output:
    LOOKUP_CODE     MEANING
    N     No
    Y     Yes
    I have quite a bit number of columns to change render property.
    Any help will be appreciated.
    Thanks
    Prasad

    Your question is not clear, are you saying the values in the messageChoiceBean is not displayed properly. As far as I can see from the definition the poplist picks the values from a lookup(Yes, No) values and has a PPR action associated with it. Did you check what this method handleNewLocationFlagChange is doing in the AM ?

  • NSV w/RT FIFO Read does not return correct value

    I have a cRIO which is hosting a NSV w/ RT FIFO enabled.  I can observe its value in the DSM.
    I have a LabVIEW exe that reads this NSV with a SV node on the diagram.  This read value is incorrect.
    If a run the same vi from the development environment then the correct value is read.  If I remove the RT FIFO option then 
    the exe version will work correctly.  According to the NI SV white paper, each reader of a NSV w RT FIFO recieves its own
    client side buffer so there should not be any interference.  It should be mentioned that I am also creating a SV reference to this same NSV on the cRIO
    for read only use.

    Hello,
    Have you tried using a Network Published shared variable to communicate between the host and target? This architecture would use a Network Published Shared Variable in a normal priority loop to pass data to a Single Process RT FIFO enabled shared variable on the target to move data to the time critical loop. Is the cRIO that you are accessing the only one present on the network? Also,. if you slow down your loop speeds, do you get correct values?
    -Zach
    Certified LabVIEW Developer

  • Last() not returning correct value within for-each-group

    I've found inconsistent results between JDeveloper and SOA Suite using the xslt 2.0 for-each-group construct.
    <xsl:for-each-group select="Po/PoLine" group-by="itemId">
    <xsl:if test="position()=1">
    <GroupCount>
    <xsl:value-of select="last()"/>
    </GroupCount>
    </xsl:if>
    </xsl:for-each-group>
    What I expect is the function last() to give me the number of groups which is the unique number of itemIds.
    In JDeveloper 10.1.3.4, testing this construct gives me what I expect.
    At run-time (deployed to 10.1.3.3 SOA Suite), the value returned is the total number of records, not the number of groups.
    For example, given the following XML
    <Po>
    <PoLine>
    &lt;itemId&gt;<strong>001</strong>&lt;/itemId&gt;
    &lt;description&gt;Hammer&lt;/description&gt;
    &lt;quantity&gt;10&lt;/quantity&gt;
    &lt;/PoLine&gt;
    &lt;PoLine&gt;
    &lt;itemId&gt;<strong>001</strong>&lt;/itemId&gt;
    &lt;description&gt;Hammer&lt;/description&gt;
    &lt;quantity&gt;10&lt;/quantity&gt;
    &lt;/PoLine&gt;
    &lt;PoLine&gt;
    &lt;itemId&gt;<strong>002</strong>&lt;/itemId&gt;
    &lt;description&gt;Nail&lt;/description&gt;
    &lt;quantity&gt;10&lt;/quantity&gt;
    &lt;/PoLine&gt;
    &lt;/Po&gt;
    Grouping by <strong>itemId</strong>, last() should return 2 as there are two groups (001 and 002). JDeveloper does this.
    When deployed to SOA Suite, last() returns 3.
    Any ideas?

    Hi,
    if JDeveloper is doing the right thing then this issue should be reported to the SOA Suite forum or BPEL BPEL , what do you think ?
    Frank

  • [E2007] [EWS] [PS] $PR_Folder_path not returning correct value

    Apologies if this is something obvious but I'm trying to get the full folder path from an EWS Powershell script. I call the PR_Folder_Path extended property but it always returns: {MapiType: String Tag: 26293 }
    The code is:
    Function SearchFolder( $FolderId )
    # Bind to the folder and show which one we are processing
    $folder = [Microsoft.Exchange.WebServices.Data.Folder]::Bind($service,$FolderId)
    $PR_Folder_Path = new-object Microsoft.Exchange.WebServices.Data.ExtendedPropertyDefinition(26293, [Microsoft.Exchange.WebServices.Data.MapiPropertyType]::String)
    # Search the folder for any matching items
    $pageSize = 500 # We will get details for up to 500 items at a time
    $offset = 0
    $moreItems = $true
    # Perform the search and display the results
    while ($moreItems)
    $searchFilter = New-Object Microsoft.Exchange.WebServices.Data.SearchFilter+IsEqualTo([Microsoft.Exchange.WebServices.Data.ItemSchema]::ItemClass, $MessageClass)
    $view = New-Object Microsoft.Exchange.WebServices.Data.ItemView($pageSize, $offset, [Microsoft.Exchange.WebServices.Data.OffsetBasePoint]::Beginning)
    $view.PropertySet = New-Object Microsoft.Exchange.WebServices.Data.PropertySet([Microsoft.Exchange.WebServices.Data.BasePropertySet]::IdOnly, [Microsoft.Exchange.WebServices.Data.ItemSchema]::ItemClass, [Microsoft.Exchange.WebServices.Data.ItemSchema]::Subject, [Microsoft.Exchange.WebServices.Data.ItemSchema]::DateTimeCreated)
    $view.Traversal = [Microsoft.Exchange.WebServices.Data.ItemTraversal]::Shallow
    $results = $service.FindItems( $FolderId, $searchFilter, $view )
    $lastRow = $ws.cells.Range("A1048576").End($xlup).row
    $lastRow++
    Write-Host $pr_folder_path " - " $folder.displayname " - " $folder.folderclass " - " $folder.totalcount " - " $results.totalcount " - " $folder.unreadcount
    $cells.item($lastrow,1)=$folder.displayname
    $cells.item($lastrow,2)=$folder.folderclass
    $cells.item($lastrow,3)=$folder.totalcount
    $cells.item($lastrow,4)=$results.totalcount
    $cells.item($lastrow,5)=$folder.unreadcount
    $moreItems = $results.MoreAvailable
    $offset += $pageSize
    # Now search subfolders
    $view = New-Object Microsoft.Exchange.WebServices.Data.FolderView(500)
    ForEach ($subFolder in $folder.FindFolders($view)) {
    SearchFolder $subFolder.Id
    Note: some of the code comes from the following script -
    http://blogs.msdn.com/b/emeamsgdev/archive/2013/06/25/powershell-search-mailbox-for-items-of-a-particular-message-class-itemclass.aspx

    Hi,
    for performing your task you need to declare the property before and requests it when you bind to the folder.
    Sample code is in C#, up to you to convert it in powershell...
    var folder = Microsoft.Exchange.WebServices.Data.Folder.Bind(service, folderId, new PropertySet(BasePropertySet.FirstClassProperties, PR_Folder_Path));
    string folderPath;
    folder.TryGetProperty(PR_Folder_Path, out folderPath);
    Regards,
    Désiré GOVIN Refresh IT Solutions

  • Date function is not returning correct value

    I have used the following code to display only the value for last seven days. it works fine in homepage(www.dealfindit.com)  but in other page like category(www.dealfindit.com and click MP3 )
    SELECT title, merchant, image, price, price_price, dollar_sign, click_here, listprice_text, dealexpire_text, added_text, to_shop, price_note, description, link_product, shipping_info, tax_info, other_info, deal_expire, list_price, category_items, buying_instruction, DATE_FORMAT(date_created, '%m/%d/%Y %l:%i %p') AS 'date_created_alias',DATE_FORMAT(date_created,'%W %M %d %Y') AS 'date_only'
    FROM mylist
    WHERE date_created > SUBDATE(NOW(), 7)
    ORDER BY date_created DESC
    code for category page
    ======================
    SELECT title, merchant, image, price, price_price, dollar_sign, click_here, listprice_text, dealexpire_text, added_text, to_shop, price_note, description, link_product, shipping_info, tax_info, other_info, deal_expire, list_price, category_items, sub_category, buying_instruction, DATE_FORMAT(date_created, '%m/%d/%Y %l:%i %p') AS 'date_created_alias',DATE_FORMAT(date_created,'%W %M %d %Y') AS 'date_only'
    FROM mylist
    WHERE date_created > SUBDATE(NOW(), 7) AND title LIKE '%colname%' OR sub_category  LIKE '%colname%' OR category_items LIKE '%colname%'
    ORDER BY date_created DESC

    When combining AND with OR's in your where clause, be careful  of order of operations. In your case, you probably want to add parenthesis:
    WHERE date_created > SUBDATE(NOW(), 7) AND (title LIKE '%colname%' OR sub_category  LIKE '%colname%' OR category_items LIKE '%colname%')

  • Fsbtodb macro in ufs_fs.h does not return correct disk address

    I'm using fsbtodb to translate the file inode block address to file system block address.
    What I've observed is fsbtodb returns corretct disk address for all the files if file system size < 1 TB.
    But, if ufs file system size is greater than 1 TB then for some files, the macro fsbtodb does not return correct value, it returns -ve value
    Is this a known issue and is this been resolved in new versions
    Thanks in advance,
    dhd

    returns corretct disk address for all the files if file system size < 1 TB.and
    if ufs file system size is greater than 1 TB then for some files, the macro fsbtodb does not return correct value, it returns -ve valueI seem to (very) vaguely recall that you shouldn't be surprised at this example of a functional filesize limitation.
    Solaris 9 was first shipped in May 2002 and though it was the first release of that OS to have extended file attributes I do not think the developers had intended the OS to use raw filesystems larger than 1TB natively.
    That operating environment is just too old to do exactly as you hope.
    Perhaps others can describe this at greater length.

  • Pl/sql package for use with workflow will not return a value

    hi all,
    just trying to intercept a requisition being turned into an order if it uses a certain cost code. so i have amended the workflow and created a package to check what cost centre a requisition is using. how over the workflow stops on the function that calls the package witha a status of complete as if the package is not returning any values.
    the package is as below:
    CREATE OR REPLACE PACKAGE APPS.xxhccWFcapitalcheck AS
    procedure XXHCC_CHECK_CAPITAL(itemtype in varchar2,
    itemkey in varchar2,
    actid in number,
    funcmode in varchar2,
    resultout out NOCOPY vARCHAR2);
    END xxhccWFcapitalcheck;
    CREATE OR REPLACE PACKAGE BODY APPS.xxhccWFcapitalcheck AS
    procedure XXHCC_CHECK_CAPITAL(itemtype in varchar2,
    itemkey in varchar2,
    actid in number,
    funcmode in varchar2,
    resultout out NOCOPY varchar2 ) is
    x_progress varchar2(100);
    x_resultout varchar2(30);
    l_doc_mgr_return_val VARCHAR2(1);
    l_doc_string varchar2(200);
    l_preparer_user_name varchar2(100);
    doc_manager_exception exception;
    p_test varchar2(100);
    l_req_id varchar2(30);
    CURSOR p_line_id IS
    SELECT
    codes.segment2 cost_center
    FROM
    po_requisition_headers_all headers,
    po_requisition_lines_all lines,
    po_req_distributions_all dist,
    gl_code_combinations_v codes
    WHERE
    headers.requisition_header_id = lines.requisition_header_id
    AND
    lines.requisition_line_id = dist.requisition_line_id
    AND
    dist.code_combination_id = codes.code_combination_id
    AND
    headers.segment1 = l_req_id;
    line_rec p_line_id%rowtype;
    BEGIN
    -- Do nothing in cancel or timeout mode
    --if (funcmode <> wf_engine.eng_run) then
    -- resultout := wf_engine.eng_null;
    -- return;
    -- end if;
    l_req_id := wf_engine.GetItemAttrNumber (itemtype => itemtype,
    itemkey => itemkey,
    aname => 'DOCUMENT_NUMBER');
    --FOR line_rec in p_line_id
    ---loop
    open p_line_id;
    fetch p_line_id into l_doc_string;
    close p_line_id;
    IF p_line_id= 'Q9DEF'
    dbms_output.put_line p_line_id;
    Then resultout := 'COMPLETE:F';
    return;
    p_test := 'USE DIFFERENT CODE';
    ELSE
    resultout := 'COMPLETE:T';
    return;
    END IF;
    END LOOP;
    end;
    END xxhccWFcapitalcheck;
    any help would be great!

    Hi Community,  first of all, english is not my native language and im not sure to use the correct terms for PowerCenter - so if im wrong please help me correct and make clear what we need. We have a kind of 3-steps ToDo. First step: Load data from an external source into a "local" datastore (its an oracle db on a server in our "hands")Second step: Check data against several verifications, this is done with a PL/SQL Package. The PL/SQL Package shall be called with an Interfacename who is set in the First PowerCenter Mapping. Our current thoghts are to do this via a stored procedure, which runs as "Target Post Load" and gets a variable "Interface Name".Is that possible? Im not quite sure about it. About the last part its even more unclear how we can solve it:Third part should be switch back to PowerCenter now - and the package (or to be correct a function in the package) should return a value for "okay everything fine => workflow continue" or "something happened => workflow is stopped" Im not sure how i can handle this. I hope my explanations are good enough so you can provide some help?!If there are any questions please ask!  Thank you alot, best regards, Christian

  • LOV does not return the value (2)

    PPR in general does not work correctly if invalid HTML is generated. One example of an invalid HTML is having an opening <TD> tag immediately following another opening <TD> tag.
    After checking everything else, if LOV still does not return the value, test whether it's not a problem with the invalid HTML by placing the messageLovInput outside of the complicated layout nestings you may have. If it works outside of the layout nestings, look for the possible problems in the layout nestings.

    Hi RamKumar,
    Thanks for your reply.. I have already done that but no luck :(
    Regards,
    Hemanth J

  • UTL File not return any values in .CSV oracle plsql hrms

    Hello experts,
    We want to extract employee details from Core hrms with output as .csv file :
    i have created below package for utl but not return any values in csv file pls help me on this.:::
    CREATE OR REPLACE PACKAGE BODY APPS."XXPER_PAYROLL_XIR_PKG"
    AS
    procedure payroll_main (
    in_from_date IN date,
    in_to_date IN date,
    p_errbuf OUT VARCHAR2,
    p_retcode OUT NUMBER
    ) is
    cursor c_person is
    SELECT distinct ppf.person_id
    FROM per_person_types ppt,
    pay_payrolls_f pp,
    per_person_type_usages_f pptu,
    per_all_people_f ppf,
    per_all_assignments_f ppa
    WHERE ppf.person_id = pptu.person_id
    AND pptu.person_type_id = ppt.person_type_id
    AND ppt.user_person_type in ('Employee', 'Ex-employee' ,'Intern')
    AND ppf.person_id = ppa.person_id
    AND ppa.assignment_type = 'E'
    AND ppa.primary_flag = 'Y'
    AND ppa.payroll_id = pp.payroll_id
    -- and nvl(ppa.ass_attribute10, 'N') = 'Y' -- this is in Production
    AND pp.payroll_name = 'Calendar Payroll'
    AND trunc( ppf.last_update_date) between in_from_date and in_to_date
    AND trunc( ppa.last_update_date) between in_from_date and in_to_date
    AND trunc( ppt.last_update_date) between in_from_date and in_to_date
    AND trunc( pptu.last_update_date) between in_from_date and in_to_date
    AND trunc(sysdate) between ppf.effective_start_date and ppf.effective_end_date
    AND trunc(sysdate) between ppa.effective_start_date and ppa.effective_end_date
    AND trunc(sysdate) between ppf.effective_start_date and ppf.effective_end_date
    AND trunc(sysdate) between pptu.effective_start_date and pptu.effective_end_date
    AND ppf.employee_number <> 'NONE';
    v_person_id number;
    v_dom_eff_dt date;
    io_err_flag varchar2(1);
    io_err_desc varchar2(2000);
    io_record_update boolean;
    BEGIN
    dbms_output.put_line('in_from_date-' || in_from_date);
    dbms_output.put_line('in_to_date-' || in_to_date );
    open c_person;
    loop
    fetch c_person into v_person_id;
    exit when c_person%NOTFOUND;
    get_person_information( v_person_id ,
    in_from_date ,
    in_to_date ,
    io_err_flag ,
    io_err_desc );
    dbms_output.put_line('Per_id-' || v_person_id || ': ' || 'Payroll_main' || sqlcode || sqlerrm );
    end loop;
    close c_person;
    end payroll_main;
    PROCEDURE get_person_information(in_person_id IN number,
    in_from_date IN date,
    in_to_date IN date,
    io_err_flag IN OUT varchar2,
    io_err_desc IN OUT varchar2) is
    --v_service_date        DATE;
    v_data_file UTL_FILE.FILE_TYPE;
    v_record VARCHAR2(1000);
    v_header VARCHAR2(1000);
    v_record_mail VARCHAR2(1000);
    v_file_name VARCHAR2(100);
    v_file_name_mail VARCHAR2(100);
    v_ser_name VARCHAR2(50);
    v_dir VARCHAR2(100) :='XX_XIR_HR_PAY';
    v_con_req_id NUMBER;
    v_user_id NUMBER;
    v_resp_id NUMBER;
    v_resp_appl_id NUMBER;
    p_request_id NUMBER;
    P_status VARCHAR2(100);
    cursor c1 is
    SELECT ppf.person_id per_id,
    ppf.employee_number emp_num,
    ppf.first_name f_name,
    ppf.last_name l_name,
    ppf.national_identifier nat_id,
    ppf.date_of_birth dat_birth,
    ppf.sex sex_g,
    -- TO_DATE(ppf.attribute1,'DD-MON-YYYY') att_date,
    ppt.user_person_type per_type,
    ppf.email_address email_id,
    ppf.last_update_date last_upd_date
    FROM per_person_type_usages_f pptu,
    per_person_types ppt,
    per_people_f ppf
    WHERE ppf.person_id = in_person_id
    AND ppf.person_id = pptu.person_id
    AND pptu.person_type_id = ppt.person_type_id
    and trunc(ppf.last_update_date) between in_from_date and in_to_date
    and trunc( pptu.last_update_date) between in_from_date and in_to_date
    AND trunc( ppt.last_update_date) between in_from_date and in_to_date
    AND trunc(sysdate) between ppf.effective_start_date and ppf.effective_end_date
    AND trunc(sysdate) between pptu.effective_start_date and pptu.effective_end_date
    AND ppt.user_person_type in ('Employee', 'Ex-employee' ,'Intern')
    and ppt.system_person_type in ('EX_EMP', 'EMP') ;
    cursor c2 is
    SELECT substr(pa.address_line1, 1, 60) address_line1,
    substr(pa.address_line2, 1, 60) address_line2,
    pa.town_or_city city,
    pa.region_2,
    pa.postal_code,
    pa.region_1,
    pa.country,
    pa.date_from,
    nvl(pa.date_to, to_date('12/31/4712', 'mm/dd/yyyy')),
    pa.creation_date,
    pa.last_update_date
    FROM per_addresses pa
    WHERE pa.person_id = in_person_id
    AND pa.last_update_date between in_from_date and in_to_date
    AND trunc(sysdate) between date_from and nvl(date_to, to_date('12/31/4712', 'mm/dd/yyyy'))
    AND pa.primary_flag = 'Y';
    cursor c3 is
    SELECT pp.phone_number pnum
    FROM per_phones pp
    WHERE pp.parent_id = in_person_id
    AND pp.last_update_date between in_from_date and in_to_date
    AND trunc(sysdate) between date_from and nvl(date_to, to_date('12/31/4712', 'mm/dd/yyyy'))
    AND phone_type = 'H1';
    cursor c4 is
    SELECT ppos.period_of_service_id,
    ppos.date_start start_date,
    ppos.adjusted_svc_date,
    ppos.actual_termination_date,
    TO_DATE(ppos.attribute1,'yyyy/mm/dd hh24:mi:ss') last_day
    FROM per_periods_of_service ppos
    WHERE ppos.person_id = in_person_id
    AND ppos.last_update_date between in_from_date and in_to_date
    AND ppos.date_start = ( select max(date_start)
    from per_periods_of_service
    where person_id = in_person_id
    and trunc(date_start) <= trunc(sysdate) );
    Begin
    dbms_output.put_line('Directory:'||v_dir);
    BEGIN
    v_header := 'Employee Number'||CHR(9)
    ||'Fore Name'||CHR(9)
    ||'Sur Name'||CHR(9)
    ||'PPS'||CHR(9)
    ||'Date of birth'||CHR(9)
    ||'Gender'||CHR(9)
    ||'Person Type'||CHR(9)
    ||'Email Address'||CHR(9)
    ||'Last Update Date'||CHR(9)
    ||'Address1'||CHR(9)
    ||'Address2'||CHR(9)
    ||'Phone_Number'||CHR(9)
    ||'Start Date'||CHR(9)
    ||'Last Day';
    v_file_name :='XIR_DATA.xls';
    dbms_output.put_line('Excel_file_name:'||v_file_name);
    v_data_file :=UTL_FILE.FOPEN(v_dir,v_file_name, 'W');
    UTL_FILE.PUT_LINE(v_data_file,v_header);
    FOR i IN c1 LOOP
    FOR j IN c2 LOOP
    FOR k IN c3 LOOP
    FOR m IN c4 LOOP
    dbms_output.put_line(' excel file loop ');
    v_record:=i.emp_num||CHR(9)
    ||i.f_name||CHR(9)
    ||i.l_name||CHR(9)
    ||i.nat_id||CHR(9)
    ||i.dat_birth||CHR(9)
    ||i.sex_g||CHR(9)
    ||i.per_type||CHR(9)
    ||i.email_id||CHR(9)
    ||i.last_upd_date||CHR(9)
    || j.address_line1||CHR(9)
    ||j.address_line2||CHR(9)
    ||k.pnum||CHR(9)
    ||m.start_date||CHR(9)
    ||m.last_day;
    UTL_FILE.PUT_LINE(v_data_file,v_record);
    END LOOP;
    END LOOP;
    END LOOP;
    END LOOP;
    UTL_FILE.FCLOSE(v_data_file);
    dbms_output.put_line(' close excel file');
    EXCEPTION
    WHEN OTHERS THEN
    dbms_output.put_line('unable to create data excel file in proc1'||SUBSTR(SQLERRM,1,25));
    END;
    end get_person_information;
    END xxper_payroll_xir_pkg;
    EE Number     Forename     Surname     Dept     effective Start Date_dept     Start Date     Leave Date     effective Start Date_leave_Dt     Date of Birth     Address1     
    Thanks
    Edited by: 981527 on Feb 12, 2013 5:59 AM
    Edited by: 981527 on Feb 12, 2013 6:05 AM

    Did you make sure that the queries are returning values in the first place? From the last few lines, it looks like you have the header written to the file. Is that correct?
    -Karthik

  • LOV not returning a value

    I'm pretty new to Oracle Forms and have a problem where a LOV is not returning a value unless a bad/invalid value is entered in the form. If the field is null and I choose help/list the LOV appears but the selected value does not then populate the field. If I enter invalid data, when I try to leave the field the LOV appears and I can then successfully select a value and the field is populated correctly. I have the field set to "Validate from list". Any suggestions?
    Bob

    Yes. I did populate return value. What is odd is that the LOV works if I enter an invalid value. Because of the validate from list the LOV reappears and then when a value is selected it populates the field. I just will not work when the field is empty.

  • T-SQL: SET Statement Using a Case Statement is not returning a value

    SQL VER:  2008
    Please see the attached screenshot from SSMS.  The Set statement  below is not returned a value or may be returning a zero value.  The AllocPercent field is set to zero in code preceeding this Update Statement:
    AllocPercent
    =
    CASE
    WHEN AllocBase
    IS
    NULL
    OR AllocBase
    = 0
    THEN 0
    ELSE PM_Input/AllocBase
    END
    As you can see by the screen shot from the Select Statement that is displaying the results after the Update Statement is completed, the value of AllocPercent is = 0 even though all the values necessary for it to compute a value > 0 are present in the
    table.  Incidentally, the values in both the AllocBase and PM_Input fields are the same before the Update Statement is ran, as shown in the Select ran after the Update Statement.
    I have ran this type of code several times with never a problem.  This seems really simple, but I just can't seem to get it to compute. 
    Any help would be greatly appreciated.
    Regards,
    bob sutor
    Bob Sutor

    Yep--This statement is running in a Stored Procedure and inside its own block statement.
    I did get a response that suggested I change the SET statement as follows, that worked:
    AllocPercent
    = CASE WHEN AllocBase IS NULL OR AllocBase = 0 THEN 0.00 ELSE cast(PM_Input*1.0/AllocBase*1.0
     as decimal(6,2)) END
    Your response did get me thinking which was great!  I appreciate your help.
    Regards,
    ...bob sutor
    Bob Sutor

  • Standar ws ProjectByPartyQueryResponse_In is not returning any values

    Hi gurus,
      I'm trying to use the standar webservice ProjectByPartyQueryResponse_In in our landscape in order to get all the projects related to the person responsible for the project but the web service is not returning any values.
    When I execute the service -using soapui- with the following values (or any other value for that matters):
    <PartyID>20000143</PartyID>
    <PartyRoleCode>ZA</PartyRoleCode>
    The web service always returns :
           <Log>
                <BusinessDocumentProcessingResultCode>5</BusinessDocumentProcessingResultCode>
                <MaximumLogItemSeverityCode>3</MaximumLogItemSeverityCode>
                <Item>
                   <TypeID>002(ECC_SE_COMMON)</TypeID>
                   <SeverityCode>3</SeverityCode>
                   <Note>No records returned for ZA 0020000143</Note>
                </Item>
             </Log>
    The party Id exists and also de party role code and there is at least one project that has that party with that role. I'm sure because I use other web service to find a project by id and in the result the project has the <Party> section with those values.
    I was looking for solutions, notes, threads in forums with no success, then i decided to debug the webservice and I did find the following line in the webservice code.
      SELECT objnr INTO TABLE it_data FROM ihpa
      WHERE  parvw = role_code AND
             parnr = party_id AND
             obtyp = 'PDN'.
    when that line executes the select always returns 0 values, then I look in the table IHPA using the SE16 without any filter and I found that my records exists!! but the select does not get it. I was wondering why the select is not working and then I filter the data in the SE16 using the same values that the query does
    for example:
    PARVW= ZA
    PARNR = 20000143
    OBTYP = PDN
    And I was surprised when the SE16 did not found any value even I was seeing in the previous screen with no filters!!!! And I supouse thats why the webservice is not working. I started making filters one by one, for example firts filtering just de PARVW = ZA and works, but when I filter just the PARNR =  20000143 the SE16 can't find any value, just when I put an * at the end of the number the SE16 returns all the values expected, Im guessing that the fields in the database has blanks at the end but this is a standar table and a standar program.
    Have any of you had the same problem? is there anything that I can do? does anyone knows if this is an unkown bug? becaus I could'n find any note on the marketplace.
    Any help would be appreciated.
    Gustavo Balboa

    Hi!
      The problem were solved but not using the Badi, because the badi only let you change the value of the var party_id and that var is declared as PARNR (of type numeric with length 10), and no mater wat you do the two 00 can´t be removed.
      We solved the problem with an enhancement point in the code at the method "party_get_data", look at the beginin and at the end. We just change the type of var used for party_id.. now we use a CHAR one insted the numeric used by the original code.
    And we repeat the select...
    Thank you very much for the help.
    METHOD party_get_data.
    """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""$"$SE:(1) Class CL_PRS_PROJECTPRJPARTYQR, Method PARTY_GET_DATA, Start                                                                                A
    $$-Start: (1)----
    $$
    ENHANCEMENT 1  ZPARTY_GET_DATA.    "active version
    DATA : WA_PARNR TYPE I_PARNR.
    DATA : WA_CHPAR(10) TYPE C.
    ENDENHANCEMENT.
    $$-End:   (1)----
    $$
      DATA :  temp_object_number TYPE ihpa-objnr,
              field1 TYPE char50,
              field2 TYPE char50,
              field_role TYPE char50,
              field_party TYPE char50,
              st_object_number TYPE TABLE OF bapiprexp.
      DATA : it_data TYPE TABLE OF st_data,
             wa_data LIKE LINE OF it_data,
             itab TYPE TABLE OF st_data,
             wa LIKE LINE OF itab,
             wa_project_details LIKE LINE OF project_details,
             null.
    Select Object number based on input Party and Role
      SELECT objnr INTO TABLE it_data FROM ihpa
      WHERE  parvw = role_code AND
             parnr = party_id AND
             obtyp = 'PDN'.
    Select Project ID based on input Object number
      LOOP AT it_data INTO wa_data.
        SELECT pspid post1 FROM proj INTO CORRESPONDING FIELDS OF wa_data
        WHERE  objnr = wa_data-pspid.                         "#EC CI_NOFIELD
        ENDSELECT.
        MOVE-CORRESPONDING wa_data TO wa.
        APPEND wa TO itab.
      ENDLOOP.
      IF sy-subrc <> 0.
        field_role = cl_wd_utilities=>get_otr_text_by_alias( 'PLM-SE_PRS_XI_PROXY/ROLE_CODE' ) .
        field_party = cl_wd_utilities=>get_otr_text_by_alias( 'PLM-SE_PRS_XI_PROXY/PARTY_ID' ) .
        CONCATENATE  field_role role_code_external INTO field1.
        CONCATENATE  field_party party_id INTO field2.
        MESSAGE e002(ecc_se_common) WITH field1 field2 INTO null.
        CALL FUNCTION 'PS_BAPI_MESSAGE_APPEND'
          TABLES
            return = party_return.
      ELSE.
        MESSAGE s082(ops_se_prs) INTO null.
        CALL FUNCTION 'PS_BAPI_MESSAGE_APPEND'
          TABLES
            return = party_return.
      ENDIF.
      LOOP AT itab INTO wa.
        MOVE-CORRESPONDING wa TO wa_project_details.
        APPEND wa_project_details TO project_details.
      ENDLOOP.
    """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""$"$SE:(2) Class CL_PRS_PROJECTPRJPARTYQR, Method PARTY_GET_DATA, End                                                                                A
    $$-Start: (2)----
    $$
    ENHANCEMENT 2  ZPARTY_GET_DATA.    "active version
      WA_CHPAR = party_id.
      SHIFT WA_CHPAR BY 2 PLACES.
      CLEAR party_return.
      REFRESH party_return.
      SELECT objnr INTO TABLE it_data FROM ihpa
      WHERE  parvw = role_code AND
             parnr = WA_CHPAR AND
             obtyp = 'PDN'.
    Select Project ID based on input Object number
      LOOP AT it_data INTO wa_data.
        SELECT pspid post1 FROM proj INTO CORRESPONDING FIELDS OF wa_data
        WHERE  objnr = wa_data-pspid.                         "#EC CI_NOFIELD
        ENDSELECT.
        MOVE-CORRESPONDING wa_data TO wa.
        APPEND wa TO itab.
      ENDLOOP.
      IF sy-subrc <> 0.
        field_role = cl_wd_utilities=>get_otr_text_by_alias( 'PLM-SE_PRS_XI_PROXY/ROLE_CODE' ) .
        field_party = cl_wd_utilities=>get_otr_text_by_alias( 'PLM-SE_PRS_XI_PROXY/PARTY_ID' ) .
        CONCATENATE  field_role role_code_external INTO field1.
        CONCATENATE  field_party party_id INTO field2.
        MESSAGE e002(ecc_se_common) WITH field1 field2 INTO null.
        CALL FUNCTION 'PS_BAPI_MESSAGE_APPEND'
          TABLES
            return = party_return.
      ELSE.
        MESSAGE s082(ops_se_prs) INTO null.
        CALL FUNCTION 'PS_BAPI_MESSAGE_APPEND'
          TABLES
            return = party_return.
      ENDIF.
      LOOP AT itab INTO wa.
        MOVE-CORRESPONDING wa TO wa_project_details.
        APPEND wa_project_details TO project_details.
      ENDLOOP.
    ENDENHANCEMENT.
    $$-End:   (2)----
    $$
    ENDMETHOD.

  • XMLTABLE function not returning any values if xml has attribute "xmlns"

    Hi,
    XMLTABLE function not returning any values if xml has attribute "xmlns". Is there way to get the values if xml has attribute as "xmlns".
    create table xmltest (id number(2), xml xmltype);
    insert into xmltest values(1,
    '<?xml version="1.0"?>
    <emps>
    <emp empno="1" deptno="10" ename="John" salary="21000"/>
    <emp empno="2" deptno="10" ename="Jack" salary="310000"/>
    <emp empno="3" deptno="20" ename="Jill" salary="100001"/>
    </emps>');
    insert into xmltest values(2,
    '<?xml version="1.0"?>
    <emps xmlns="http://emp.com">
    <emp empno="1" deptno="10" ename="John" salary="21000"/>
    <emp empno="2" deptno="10" ename="Jack" salary="310000"/>
    <emp empno="3" deptno="20" ename="Jill" salary="100001"/>
    </emps>');
    commit;
    SELECT a.*
    FROM xmltest,
    XMLTABLE (
    'for $i in /emps/emp
    return $i'
    PASSING xml
    COLUMNS empno NUMBER (2) PATH '@empno',
    deptno NUMBER (3) PATH '@deptno',
    ename VARCHAR2 (10) PATH '@ename',
    salary NUMBER (10) PATH '@salary') a
    WHERE id = 1;
    The above query returning results but below query is not returning any results because of xmlns attribute.
    SELECT a.*
    FROM xmltest,
    XMLTABLE (
    'for $i in /emps/emp
    return $i'
    PASSING xml
    COLUMNS empno NUMBER (2) PATH '@empno',
    deptno NUMBER (3) PATH '@deptno',
    ename VARCHAR2 (10) PATH '@ename',
    salary NUMBER (10) PATH '@salary') a
    WHERE id = 1;
    how to get rid out of this problem.
    Thanks,
    -Mani

    Added below one in xmltable, its working now.
    XmlNamespaces(DEFAULT 'http://emp.com')

  • Parameter not returning all values

    I have a crystal report built off an oracle DB.  For one parameter it is not returning all values.  I can display data or the entire table it shows me all values, but when i build a parameter it only shows me through August.  It is a date/time field.

    check the following thread
    [Dynamic Parameter only showing 1000 records when Crystal report is run.;
    regards,
    Raghavendra.G

Maybe you are looking for

  • /usr/local/bin vs /usr/bin and Kazehakase vs Firefox

    When you install an application to /usr/bin  will it be more faster than installed on /usr/local/bin? I have Firefox installed in /usr/bin and Kazehakase installed to /usr/local/bin. And it seems that Firefox is faster than Kazehakase. Why? Last edit

  • Safari crashes alot - usually when opening iPhoto or Preview

    this is the error (the last one) - it happens daily Process: Safari [169] Path: /Applications/Safari.app/Contents/MacOS/Safari Identifier: com.apple.Safari Version: 5.0 (6533.16) Build Info: WebBrowser-75331600~5 Code Type: X86-64 (Native) Parent Pro

  • Iphoto won't load an gives me a message box that states that it is being updated, but there are no updates available

    The new update for iphoto has locked my app up and I now can't access iphoto.  I've restarted and turned off and rebooted, but the software is still locked up with the error message that it is updating.

  • IPad not showing in iTunes

    Hi, When I got my iPad I only had OSX 10.4 on my MacBookPro, so I authorised it on my work Mac which has 10.5. Now I have upgraded my MBP to 10.5.8 and want to put some pics and music on my iPad but it's not appearing in Itunes (9.1.1). I know the Ma

  • Word 07 to PDF read a landscape horizotonally?

    I made a word documentas a landscape page format and when I print it to a PDF it prints out with everything flipped a 90 degrees (you have to rotate the page) in order to read it. Is there anyway to not have to rotate the page and still have it in la