ExtractValue not returning the data after dbms_xmlschema.CopyEvolve

Hi ,
I am facing the problem while selecting the value from the XMLTYPE table using extractValue.
Here address field is newly added to schema and evolved . But unable to get the address field value .
My procedures are like this
SQL> declare
2 res boolean;
3 xmlschema xmltype := xmltype(
4 '<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xdb="http://xmlns.oracle.com/xdb">
5 <xsd:complexType name="t_person" xdb:SQLType="PERSONDT_T">
6 <xsd:sequence>
7 <xsd:element name="persondetails" type="persondetailsType"/>
8 <xsd:element name="companyinfo" type="companyinfoType"/>
9 <xsd:element name="salaryinfo" type="salaryinfoType"/>
10 </xsd:sequence>
11 </xsd:complexType>
12 <xsd:complexType name="persondetailsType" xdb:SQLType="PERSONDETAILS_T">
13 <xsd:sequence>
14 <xsd:element name="personname" type="xsd:string" />
15 <xsd:element name="personexperience" type="xsd:decimal" />
16 </xsd:sequence>
17 </xsd:complexType>
18 <xsd:complexType name="companyinfoType" xdb:SQLType="COMPANYINFO_T">
19 <xsd:sequence>
20 <xsd:element name="companystartdate" type="xsd:date" />
21 <xsd:element name="companystandard" type="xsd:decimal" />
22 </xsd:sequence>
23 </xsd:complexType>
24 <xsd:complexType name="salaryinfoType" xdb:SQLType="SALARYINFO_T">
25 <xsd:sequence>
26 <xsd:element name="salary" type="xsd:decimal" />
27 <xsd:element name="paymonth" type="xsd:string" />
28 </xsd:sequence>
29 </xsd:complexType>
30 <xsd:element name="person" type="t_person" />
31 </xsd:schema>');
32 begin
33 if (dbms_xdb.existsResource('/public/personDetails.xsd')) then
34 dbms_xdb.deleteResource('/public/personDetails.xsd');
35 end if;
36 res := dbms_xdb.createResource('/public/personDetails.xsd',xmlschema);
37 end;
38 /
PL/SQL procedure successfully completed.
SQL> begin
2 dbms_xmlschema.registerSchema ('www.PersonInfoUrl.com',xdburitype('/public/personDetails.xsd'),TRUE,TRUE,FALSE,TRUE);
3 end;
4 /
PL/SQL procedure successfully completed.
SQL> CREATE TABLE PERSON_COMP_TABLE
2 (empId VARCHAR2(100) CONSTRAINT pk_PERSONCOMP PRIMARY KEY
3 ,comments VARCHAR2(20)
4 ,joindate DATE
5 ,personjoininfo xmltype)
6 XMLTYPE COLUMN personjoininfo XMLSCHEMA "www.PersonInfoUrl.com" element "person"
7 /
Table created.
SQL> insert into PERSON_COMP_TABLE (empId ,comments ,joindate ,personjoininfo )
2 values ('2006NEW312','RDDEPT','15-jan-2006',
3 sys.XMLType.createXML(
4 '<?xml version="1.0" encoding="UTF-8"?>
5 <person xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="www.PersonInfoUrl.com">
6 <persondetails>
7 <personname>Robert </personname>
8 <personexperience>4.5</personexperience>
9 </persondetails>
10 <companyinfo>
11 <companystartdate>2004-07-24</companystartdate>
12 <companystandard>3.9</companystandard>
13 </companyinfo>
14 <salaryinfo>
15 <salary>2444.3</salary>
16 <paymonth> june </paymonth>
17 </salaryinfo>
18 </person>'))
19 /
1 row created.
SQL> select count(*) from PERSON_COMP_TABLE;
COUNT(*)
1
SQL> declare
xmlschema xmltype := xdburitype('/public/personDetails.xsd').getXML();
res boolean;
begin
select insertChildXML(
xmlschema,
'/xsd:schema/xsd:complexType[@name="companyinfo"]/xsd:sequence',
'xsd:element',
xmltype('<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="address" type="xsd:string"
'xmlns:xsd="http://www.w3.org/2001/XMLSchema"'
into xmlSchema
from dual;
if (dbms_xdb.existsResource('/public/personDetails.xsd')) then
dbms_xdb.deleteResource('/public/personDetails.xsd');
end if;
res := dbms_xdb.createResource('/public/newpersonDetails.xsd',xmlschema);
end;
PL/SQL procedure successfully completed.
Elapsed: 00:00:00.74
SQL> commit;
Commit complete.
Elapsed: 00:00:00.56
SQL> begin
dbms_xmlschema.CopyEvolve
xdb$string_list_t('www.PersonInfoUrl.com'),
XMLSequenceType(xdburitype('/public/newpersonDetails.xsd').getXML()),
null
end;
PL/SQL procedure successfully completed.
Elapsed: 00:00:08.49
SQL> commit;
Commit complete.
Elapsed: 00:00:00.52
SQL> select count(*) from PERSON_COMP_TABLE;
COUNT(*)
1
SQL> insert into PERSON_COMP_TABLE (empId ,comments ,joindate ,personjoininfo )
values ('1234PTR','DTSDDEPT','12-jan-2006',
sys.XMLType.createXML(
'<?xml version="1.0" encoding="UTF-8"?>
<person xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="www.PersonInfoUrl.com">
<persondetails>
<personname>Julie </personname>
<personexperience>3.5</personexperience>
</persondetails>
<companyinfo>
<companystartdate>2005-11-21</companystartdate>
<companystandard>3.9</companystandard>
<address>santaclara</address>
</companyinfo>
<salaryinfo>
<salary>2444.3</salary>
<paymonth> june </paymonth>
</salaryinfo>
</person>'))
1 row created.
SQL> select count(*) from PERSON_COMP_TABLE;
COUNT(*)
2
SQL> SELECT empid, extractValue(personjoininfo,'/person/companyinfo/address') FROM PERSON_COMP_TABLE
2 /
empid
E
1234PTR
Here "address " is not returned. it has return the value "santaclara".
How to solve this ?. Please advise
Thanks
Govinda

After chasing down couple of silly mistakes I was able to get your example to work
SQL> call dbms_xmlschema.deleteSchema ('www.PersonInfoUrl.com',4)
  2  /
Call completed.
SQL> declare
  2    res boolean;
  3    xmlschema xmltype := xmltype(
  4  '<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xdb="http://xmlns.oracle.com/xdb">
  5     <xsd:complexType name="t_person" xdb:SQLType="PERSONDT_T">
  6             <xsd:sequence>
  7                     <xsd:element name="persondetails" type="persondetailsType"/>
  8                     <xsd:element name="companyinfo" type="companyinfoType"/>
  9                     <xsd:element name="salaryinfo" type="salaryinfoType"/>
10             </xsd:sequence>
11     </xsd:complexType>
12     <xsd:complexType name="persondetailsType" xdb:SQLType="PERSONDETAILS_T">
13             <xsd:sequence>
14                     <xsd:element name="personname" type="xsd:string"/>
15                     <xsd:element name="personexperience" type="xsd:decimal"/>
16             </xsd:sequence>
17     </xsd:complexType>
18     <xsd:complexType name="companyinfoType" xdb:SQLType="COMPANYINFO_T">
19             <xsd:sequence>
20                     <xsd:element name="companystartdate" type="xsd:date"/>
21                     <xsd:element name="companystandard" type="xsd:decimal"/>
22             </xsd:sequence>
23     </xsd:complexType>
24     <xsd:complexType name="salaryinfoType" xdb:SQLType="SALARYINFO_T">
25             <xsd:sequence>
26                     <xsd:element name="salary" type="xsd:decimal"/>
27                     <xsd:element name="paymonth" type="xsd:string"/>
28             </xsd:sequence>
29     </xsd:complexType>
30     <xsd:element name="person" type="t_person"/>
31  </xsd:schema>');
32  begin
33    if (dbms_xdb.existsResource('/public/personDetails.xsd')) then
34      dbms_xdb.deleteResource('/public/personDetails.xsd');
35    end if;
36    res := dbms_xdb.createResource('/public/personDetails.xsd',xmlschema);
37  end;
38  /
PL/SQL procedure successfully completed.
SQL> begin
  2    dbms_xmlschema.registerSchema ('www.PersonInfoUrl.com',xdburitype('/public/personDetails.xsd'),TRUE,TRUE,FALSE,TRUE);
  3  end;
  4  /
PL/SQL procedure successfully completed.
SQL> DROP TABLE PERSON_COMP_TABLE
  2  /
Table dropped.
SQL> CREATE TABLE PERSON_COMP_TABLE
  2  (
  3    empId VARCHAR2(100) CONSTRAINT pk_PERSONCOMP PRIMARY KEY
  4    ,comments VARCHAR2(20)
  5    ,joindate DATE
  6    ,personjoininfo xmltype
  7  )
  8  XMLTYPE COLUMN personjoininfo XMLSCHEMA "www.PersonInfoUrl.com" element "person"
  9  /
Table created.
SQL> insert into PERSON_COMP_TABLE (empId ,comments ,joindate ,personjoininfo )
  2  values ('2006NEW312','RDDEPT','15-jan-2006',
  3  XMLType(
  4  '<?xml version="1.0" encoding="UTF-8"?>
  5  <person xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="www.PersonInfoUrl.com">
  6     <persondetails>
  7             <personname>Robert </personname>
  8             <personexperience>4.5</personexperience>
  9     </persondetails>
10     <companyinfo>
11             <companystartdate>2004-07-24</companystartdate>
12             <companystandard>3.9</companystandard>
13     </companyinfo>
14     <salaryinfo>
15             <salary>2444.3</salary>
16             <paymonth> june </paymonth>
17     </salaryinfo>
18  </person>'))
19  /
1 row created.
SQL> select count(*) from PERSON_COMP_TABLE
  2  /
  COUNT(*)
         1
SQL> declare
  2    xmlschema xmltype := xdburitype('/public/personDetails.xsd').getXML();
  3    res boolean;
  4  begin
  5    select insertChildXML
  6           (
  7             xmlschema,
  8             '/xsd:schema/xsd:complexType[@name="companyinfoType"]/xsd:sequence',
  9             'xsd:element',
10             xmltype('<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="address" type="xsd:string"/>'),
11             'xmlns:xsd="http://www.w3.org/2001/XMLSchema"'
12           )
13      into xmlSchema
14      from dual;
15
16    if (dbms_xdb.existsResource('/public/newPersonDetails.xsd')) then
17      dbms_xdb.deleteResource('/public/newPersonDetails.xsd');
18    end if;
19
20    res := dbms_xdb.createResource('/public/newPersonDetails.xsd',xmlschema);
21  end;
22  /
PL/SQL procedure successfully completed.
SQL> commit
  2  /
Commit complete.
SQL> begin
  2    dbms_xmlschema.CopyEvolve
  3    (
  4       xdb$string_list_t('www.PersonInfoUrl.com'),
  5       XMLSequenceType(xdburitype('/public/newPersonDetails.xsd').getXML()),
  6       null
  7     );
  8  end;
  9  /
PL/SQL procedure successfully completed.
SQL> select count(*) from PERSON_COMP_TABLE
  2  /
  COUNT(*)
         1
SQL> insert into PERSON_COMP_TABLE (empId ,comments ,joindate ,personjoininfo )
  2  values ('1234PTR','DTSDDEPT','12-jan-2006',
  3  XMLType(
  4  '<?xml version="1.0" encoding="UTF-8"?>
  5  <person xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="www.PersonInfoUrl.com">
  6     <persondetails>
  7             <personname>Julie </personname>
  8             <personexperience>3.5</personexperience>
  9     </persondetails>
10     <companyinfo>
11             <companystartdate>2005-11-21</companystartdate>
12             <companystandard>3.9</companystandard>
13             <address>santaclara</address>
14     </companyinfo>
15     <salaryinfo>
16             <salary>2444.3</salary>
17             <paymonth> june </paymonth>
18     </salaryinfo>
19  </person>'))
20  /
1 row created.
SQL> commit
  2  /
Commit complete.
SQL> select count(*) from PERSON_COMP_TABLE
  2  /
  COUNT(*)
         2
SQL> SELECT empid, extractValue(personjoininfo,'/person/companyinfo/address') FROM PERSON_COMP_TABLE
  2  /
EMPID
EXTRACTVALUE(PERSONJOININFO,'/PERSON/COMPANYINFO/ADDRESS')
2006NEW312
1234PTR
santaclara
SQL>The mistakes included the XPath used to insert the new element into the XML Schema
You had
'/xsd:schema/xsd:complexType[@name="companyinfo"]/xsd:sequence',
where as the correct XPath is
'/xsd:schema/xsd:complexType[@name="companyinfoType"]/xsd:sequence',
and then you had
if (dbms_xdb.existsResource('/public/personDetails.xsd')) then
dbms_xdb.deleteResource('/public/personDetails.xsd');
end if;
res := dbms_xdb.createResource('/public/newpersonDetails.xsd',xmlschema);
end;
which means that once the document newpersonDetails.xsd had been created once a subsequent execution of the testcase would fail as the document would already exist.
I'm also a little confused... Your testcase implies that you were able to insert the second document, but the number of rows in the table is still shown as 1 after the insert apparently succeeded. Since you did not correctly update the XML Schema before the calling copyEvolve I do not understand how your output shows that the second insert succeeded.

Similar Messages

  • BAPI not returning the data

    Hi,
    I have developed the BAPI which gets the data from few tables and puts them in one structure. But when I am running I am not getting the output. When I am debugging the same the structure is getting populated but it is not getting returned. Please let me know what could be the issue.
    Regards,
    Ashutosh

    Dear Aushutosh ,
                              Please check whether You have created structure of table in which you are taking values
        Do as Such
    Create Structure
    through se11
    Data Type : zname .
    having field which you required
    such as
    name1
    waers
    klimk
    skfor
    cskfor
    Then assign this Structure to your RFC i.e BAPi
    in TAbles Tab
    such as
    Result   like zname .
    and then you use your code
    to append data in  result table
    whit proper import parameter and Export parameter if any .
    Regards
    Deepak .

  • Problem with QAAWS - not returned the data when passed param

    I am working with QAAWS which has input parameter MONTH
    I used the MS SQL, in the universe this field described as
    DATEPART(MONTH,ARS_Test.dbo.RG1088.PERIOD)
    or
    CONVERT(char,month(ARS_Test.dbo.RG1088.PERIOD))
    where field ARS_Test.dbo.RG1088.PERIOD is type DateTime.
    When I build the QAAWS-connection in the Query As A Web Service and I set promt value of  parameter MONTH = 4 and query returned 10 records.
    I saved this connection
    After that I created DataConnection QAAWS in Xcelsius where set reference in the  input parameter Month to cell where is value '4'.
    I run preview mode and refresh DataConnection - as a result I can't get any data from QAAWS.
    Please, help, me
    Thanks,
    Vladimir

    Hi Benni,
    Thanks for the reply,
    In the system object , i went to the "User Administration" option, then i found following entry's
    User Administration Host Name 
    User Administration Path 
    User Administration Protocol - Select -httphttps
    These above entry's are not sure what i need to enter.
    In the "User Management" option , i found the following entry's
    Authentication Ticket Type - SAP Logon Ticket
                                            - SAP Assertion Ticket
    Logon Method - >      -SAPLOGONTICKET
                                   -UIDPWX509CERT
    User Mapping Fields  >
    User Mapping Type    > user
                                      admin
                                      admin,user
    Can u tell me what u want to me change in the above options
    is that above options u are discussed about or sth else.? can u please elabrate your explanation.
    Regards
    Vijay

  • EXTRACTVALUE not returning any data

    Hi,
    While executing the below, I am getting no data. Please can you help spot the error.
    The xml is as below:
    <Promos xmlns:Promons="http://www.some-site.com"
    xmlns="http://www.some-site.com">
    <total>1</total>
    <Promo>
    <Line>12</Line>
    <Num>IO2R1RC</Num>
    </Promo>
    </Promos>
    The query is as below:
    SELECT EXTRACTVALUE (VALUE (promos), '//total') total,
    EXTRACTVALUE (VALUE (promos), '//line') line
    FROM TABLE
    (XMLSEQUENCE
    (EXTRACT
    (XMLTYPE
    ('<Promos xmlns:Promons="http://www.some-site.com" xmlns="http://www.some-site.com"><total>1</total><Promo><Line>12</Line><Num>IO2R1RC</Num></Promo></Promos>'
    '//Promos/total'
    ) promos

    Hi,
    I see two issues here.
    1) You have to declare all namespaces you're going to use in XPath/XQuery expressions (that's a very common gotcha).
    2) You've got some XPath wrong.
    See below example, assuming "v_xmldoc" is an XMLType variable holding your XML data :
    SELECT EXTRACTVALUE(v_xmldoc, '/Promos/total', 'xmlns="http://www.some-site.com"') as total
         , EXTRACTVALUE(VALUE(promos), '/Promo/Line', 'xmlns="http://www.some-site.com"') as line
         , EXTRACTVALUE(VALUE(promos), '/Promo/Num', 'xmlns="http://www.some-site.com"') as num
    FROM TABLE(
           XMLSEQUENCE(
             EXTRACT(
               v_xmldoc
             , '/Promos/Promo'
             , 'xmlns="http://www.some-site.com"'
         ) promos
    ;That example also assumes that Promo elements may occur multiple times.
    Consequently, you need to break the collection into separate records, then access a specific element of a given record with EXTRACTVALUE.
    Hope that helps.
    Some posting tips as well :
    - please always give your database version (select * from v$version), it'll help people here suggesting adequate solutions. For instance, if you're on 10.2 or above, you could use XMLTable instead.
    - when pasting code snippets or tagged content, always use tags to enclose your text, it'll preserve formatting.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Search term 'CompanyID = 0' does not return the data I need.

    Hi all,
    I have implemented an integration to get data of Contact from Eloqua by SOAP APIs.
    In my test data, some contacts have company information whose ID is 0 and some ID is 1. When using searchTerm 'CompanyID = 1', I could get the records whose Company ID is 1. But when using 'CompanyID = 0', 0 record(s) would be returned.
    Is there anything special for the value 0?
    Any suggestions?
    Thanks,
    Biao

    Hi Dharmesh,
    I tried other IDs greater than 0 and all work well.
    My block issue now is that, I could find some Contacts with CompanyID 0 but there is no filter to select them out.
    Any suggestions?
    Thanks,
    Biao

  • How to know if the data model qry is not returning any data

    Hi
    If my report doesn't have data (meaning if the data model qry doesn't retreive any data), I wan't to show this text: "There is no data returned."
    My question is how would I know that the qry is not returning any data. I know I can create a text field, and write a trigger on it, to set it True or False depending on the fact that data is being returned or not.
    Thanks
    Shalu

    Hi,
    In Data Model create a summary column for function=count on one of your columns.
    Then for BeforeReport trigger you can write
    function BeforeReport return boolean is
    begin
    if :CS_RPT_NODATA > 0 then
    return (TRUE);
    end if;
    SRW.MESSAGE(300,'There is no data');
    return (FALSE);
    end;
    Regards, Gicu

  • Iam not getting the data on screen after using the user exit zxpadu01

    Dear Freinds
                As per my requirement when the user enters value Ansal  it should get defaulted to Amount field (bet01 ) based on the wage type
    i have written calculation ( q0008-bet01 = ansal/100) before it getting defaulted to bet01, i found that value is not getting default  on the screen for bet01 once i enter value for Ansal , please any body correct my code
    in   ZXPADU02 i have written the code as  below :
    data : wa_p0008 like p0008,
            i0008 like p0008,
           l_v_ANSAL type ANSAL_15,
           l_v_amount type PAD_AMT7S.
    CASE innnn-infty.
    when '0008'.
    CALL METHOD cl_hr_pnnnn_type_cast=>prelp_to_pnnnn
    EXPORTING
    prelp = innnn
    IMPORTING
    pnnnn = wa_p0008.   -- HERE I GOT ALL THE DATA EXCEPT BET01
    if wa_p0008-lga01 = 'MFPY'.
    l_v_ansal =  wa_p0008-ansal.
    l_v_amount = l_v_ansal / 100.
    move l_v_amount to wa_p0008-bet01.
    CALL METHOD cl_hr_pnnnn_type_cast=>pnnnn_to_prelp
    EXPORTING
    pnnnn = wa_p0008  --- HERE I CAN SEE EVEN THE BET01 IS FILLED
    IMPORTING
    prelp = innnn.         --- HERE I CAN SEE LGART BUT NOT AMOUNT VALUE
    endif.
    when others.
    endcase.
    IN ZXPADU01 I HAVE WRITTEN AS BELOW:
    data : wa_p0008 like p0008,
            i0008 like p0008,
           l_v_ANSAL type ANSAL_15,
           l_v_amount type PAD_AMT7S.
    CASE innnn-infty.
    when '0008'.
    MOVE-CORRESPONDING  innnn to wa_p0008.
    CALL METHOD cl_hr_pnnnn_type_cast=>prelp_to_pnnnn
    EXPORTING
    prelp = innnn
    IMPORTING
    pnnnn = wa_p0008.
    if wa_p0008-lga01 = 'MFPY'.
    l_v_ansal =  wa_p0008-ansal.
    l_v_amount = l_v_ansal / 100.
    move l_v_amount to wa_p0008-bet01.
    CALL METHOD cl_hr_pnnnn_type_cast=>pnnnn_to_prelp
    EXPORTING
    pnnnn = wa_p0008   --- I CAN SEE ONLY WHEN I COME AGAIN
    IMPORTING
    prelp = innnn.
    endif.
    when others.
    endcase.
    Now my problem is as follows :
                   i have entered the value for Ansal (ex: p0008-Ansal = 1000) ..........and i say enter then i should found the calculated value for the ansal through my coding
    and it should  display in bet01 as 10 ( q0008-bet01 =  p0008-ansal /100)
    but i dont find the value 10 being displayed for the field bet01 on the screen  when
    user enters Ansal  as 1000 .........even then i have saved it to test the scenario......
    now i came in displayed mode (pa20 ) for the infotype 008 for the same personnel no for the same  dates .....where i created the record........i found that the value
    bet01 is there i.e i can see  the value bet01 as 10 ( my requiremnt here matching)
    but when the user say enter during the time of creation of the record the value
    bet01 is not getting defaulted with 10 .........why iam not able to understand
    PLEASE ANY BODY HELP ME IN THIS REGARD 
    regards
    shanti.

    Hi Pranesh,
                   i have used the logic which you hav given as below
    in ZXPADU02
      FIELD-SYMBOLS <fs>  TYPE ANY.
    ASSIGN ('(MP000800)Q0008-betrg') TO <fs>.
    if <fs> is assigned.
    <fs> = l_v_amount .  ---  amount as (ansal /100 i.e 1000/100 = 10) 10
    endif.
    still iam not getting the data for the field bet01
    this is the coding i am using
    data : wa_p0008 like p0008,
            i0008 like p0008,
           l_v_ANSAL type ANSAL_15,
           l_v_amount type PAD_AMT7S.
      FIELD-SYMBOLS <fs>  TYPE ANY.
    CASE innnn-infty.
    when '0008'.
    MOVE-CORRESPONDING  innnn to wa_p0008.
    CALL METHOD cl_hr_pnnnn_type_cast=>prelp_to_pnnnn
    EXPORTING
    prelp = innnn
    IMPORTING
    pnnnn = wa_p0008.
    if wa_p0008-lga01 = 'MFPY'.
    l_v_ansal =  wa_p0008-ansal.
    l_v_amount = l_v_ansal / 100.
    move l_v_amount to wa_p0008-bet01.
    ASSIGN ('(MP000800)Q0008-betrg') TO <fs>.
    if <fs> is assigned.
    <fs> = l_v_amount .
    endif.
    CALL METHOD cl_hr_pnnnn_type_cast=>pnnnn_to_prelp
    EXPORTING
    pnnnn = wa_p0008
    IMPORTING
    prelp = innnn.
    endif.
    when others.
    endcase.
    please help me as iam still not getting (value in bet 01) when i press enter once i enter value in ansal feild.
    regards
    shanti.

  • Not showing the Data in VC application

    Hi I have developed the application in VC.
    It is showing the data some times , it is not showing the data. Can u please let me know what is the problem.
    when i checked using the Test Data service . It is showing the data. Then i have developed step by step, in between the time i use to run the application , it was showing the data. finally i have assigned to some role and user id. then also it is showing the data.
    Next day after i run the application , it is not  showing the data. displaying the message .
    "No Data Found".
    But when i run  the BAPI at the back end R/3 it is giving the data properly.
    Can u tell me what might be the problem
    REgards
    Vijay

    Hi Krishna,
    check the logs in the NWA. It seems that your connection is broken down sometimes, maybe a timeout. How many records does your data service return?
    Check it with external debugging of the BAPI, when you can reconstruct the error.
    Best Regards,
    Marcel

  • ExecuteWithParams is not returning the rows from cache

    Hi,
    We have two VO's based on same entity ,whenever new row is inserted in one VO and we do executeWithParams on another VO ,It is not returning the rows which are uncommitted.
    I replaced the executeWithParams with a custom method in AM in which I am executing the query after applying the view criteria and setting query mode.Its returning rows which are uncommitted.
    Jdev Version which I am using is 11.1.1.7.0
    ExecuteWithParams used to work with uncommitted data in 11.1.1.6.0 .
    Do we need to raise a bug on framework or Am I missing something?
    Edited by: sharavnkumar_malla on Oct 18, 2012 1:02 AM

    Still the same answer, even after you updated the question. We (the public) don't have 11.1.1.7, know nothing about 11.1.1.7, and cannot help you with 11.1.1.7. Questions about internal builds belong on internal forums.

  • Binocular search for Cost Center is not returning any data

    Hi Gurus,
    When clicking on the SRM-Shooping Cart-Cost Assignment- Account Assignment Overview- Cost center Binocular search icon,  it is not returning any data.  However,  when drilling down in the Account Assignment Overview, you will see another Binocular search icon for Cost Center which is working fine.
    Any idea of how you troubleshoot it.
    Thanks in advace for your help.
    HA

    Not sure about the cost assignment drill down, but after we applied SP13 to SRM server 550 the binoculars for cost center stopped working. the following note corrected this.
    Note 1259735 - Search help of generic account does not work
    If it has never worked, then probably need to setup a RFC dialog user for the F4 search help, Multiple threads on here around the dialog user for F4 with details on configuration and use.
    JF

  • Custom reports in R12 not returning any data

    I'm seeing an issue of custom reports in R12 not returning any data. So far what I've been able to dig into is that the report query itself is referring to APPS synonyms that are secured under MOAC. What I am able to do is run the query in SQL Developer after having run mo_global.set_policy_context and I receive the data I'm looking for. This is not the case when running the report through the concurrent programs request.
    Secondly, I've also configured the concurrent program request to run as single operating unit mode. This aided in fixing any issues with LOVs on the parameter form. However, still no results from the report itself. I've also searched around quite extensively and added a P_CONC_PROGRAM_ID user parameter in reports developer, as well as adding SRW.USER_EXIT('FND SRWINIT') to the before report trigger and SRW.USER_EXIT('FND SRWEXIT') to the after report trigger as well. No luck. I've also tried running mo_global.set_policy_context on the before report trigger and no such luck.
    Has anyone seen similar issues with this and could shed some light? At this point, the workaround I would see is to just change the query to use respective all tables and match up against the orgid, but I'd rather not do that.

    I am facing exactly the same issue with 2 of my custom Reports in R12.1.3. We did our level best to find out the issue. It was always a hit and trial fix.
    But the following were our observations and workarounds
    0) The reports Conc Prog were in MOAC - Single mode. Both the reports had SRW INIT, EXIT and P_CONC_REQUEST_ID
    1) The reports which caused the issues[NO data fetched for MOAC] had multiple Queries in the data model and one Query fetches data and the 2nd one doesnt. Both the queries when run from SQL developer after setting the org gave results.
    Workaround for Report1
    a) We deleted the data link connecting the 2 columns in both the queries and added a bind variable instead in the 2nd /child query to refer to the column in the parent query and linked the 2 groups.
    Workaround for Report 2
    a) In report 2 the queries were not linked to each other. Only one query used to return results and the 2nd one returned 0 rows. The workaround was to use the "where" conditions as lexical parameters after having set the value for the same in before report trigger.
    Both the work around looks illogical. Still It worked..!
    Thanks
    Biju Radhakrishnan

  • BC4J - ViewObject not returning latest data

    BC4J - ViewObject not returning latest data. Some kind of EO/VO Cache Latency Issue.
    I have an edit page that presents a drop-down list which is suppose to display * un-assigned * messages, but does not. The drop-down list is using an <jbo:InputSelect> tag that gets values from a ViewObject (UnAssignedMessageView ) which issues the query listed below. Note, the ViewObject is not based on an Entity Object.
    (Query in UnAssignedMessageView)
    select      message.message_desc_short, message.message_id
    from     fmm.message
    where      message.message_id not in (select cardmessage.message_id from fmm.card_message)
    and message.message_id != 0     
    (from the edit.jsp)
    <jbo:ApplicationModule id="am" configname="com.maxmcbyte.fmm.model.ModelModule.ModelModuleLocal" releasemode="Reserved" />
    <jbo:DataSource id="ds" appid="am" viewobject="CardMessageView1" />           <<****** The VO where the inserts/updates are recorded.
    <jbo:DataSource id="ds2" appid="am" viewobject="MessageUnAssignedView" />     <<****** The VO for the unassigned message drop-down-list.
    The problem is at step 3.
    Starting with 3 Unassigned Messages.
    Step 1: enter new record AND select a MESSAGE_ID from the drop-down list.
    Step 2: commit the transaction.
    Step 3: enter another record AND select a MESSAGE_ID from the drop-down list.     <<****** the list should now be displaying 2 unassigned messages but is displaying 3.
    Note, if I check the database after step 3 using the same query as in the UnAssignedMessageView I get the correct result. I guess I'm not understanding how BC4J ViewObject Caching is working. It is strange that even after I commit the record that the cache is not updated.
    I have read the docs and will have to re-read them again * but * it would be REAL NICE to see an illustration of "A DAY IN THE LIFETIME OF DATA IN BC4J" for dummies like me.
    Can anyone tell me what I'm missing here AND what specifically needs to be done?
    Thanks All,
    Bill G...

    Well, I figured it out * BUT * this is the sort of thing that I'll bet stumps a lot of new users * AND * should be posted to a "Gotch-Ya" list.
    I'd still like to see an illustration of "A DAY IN THE LIFE OF DATA IN BC4J"
    Bill G...
    <jbo:ApplicationModule id="am" configname="com.maxmcbyte.fmm.model.ModelModule.ModelModuleLocal" releasemode="Reserved" />
    <jbo:DataSource id="ds1" appid="am" viewobject="CardMessageView1" />
    <jbo:DataSource id="ds2" appid="am" viewobject="MessageUnAssignedView" />
    <%-- adding this did the trick --%>
    <%
    ViewObject view2 = ds2.getRowSet().getViewObject();
    view2.executeQuery();
    view2.first();
    %>

  • " Can not interpret the data in file " error while uploading the data in DB

    Dear All ,
    After running the below report I am getting the " Can not interpret the data in file " error.
    Need to upload the data in DB through excel or .txt file.
    Kindly advise to resolve the issue.
    REPORT  ZTEST_4.
    data : it like ZPRINT_LOC occurs 0 with header line,
    FILETABLE type table of FILE_TABLE,
    wa_filetable like line of filetable,
    wa_filename type string,
    rc type i.
    CALL METHOD CL_GUI_FRONTEND_SERVICES=>FILE_OPEN_DIALOG
    CHANGING
    FILE_TABLE = filetable
    RC = rc.
    IF SY-SUBRC = 0.
    read table filetable into wa_filetable index 1.
    move wa_filetable-FILENAME to wa_filename.
    Else.
    Write: / 'HI'.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    start-of-selection.
    CALL FUNCTION 'GUI_UPLOAD'
    EXPORTING
    FILENAME = wa_filename
    FILETYPE = 'ASC'
    HAS_FIELD_SEPARATOR = 'X'
    TABLES
    DATA_TAB = it.
    IF SY-SUBRC = 0.
    Write: / 'HI'.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    insert ZPRINT_LOC from table it.
    if sy-subrc = 0.
    commit work.
    else.
    rollback work.
    endif.
    Regards
    Machindra Patade
    Edited by: Machindra Patade on Apr 9, 2010 1:34 PM

    Dear dedeepya reddy,
    Not able to upload the excel but have sucess to upload the .csv file to db through the below code. Thanks for your advise.
    REPORT  ZTEST_3.
             internal table declaration
    DATA: itab TYPE STANDARD TABLE OF ZPRINT_LOC,
          wa LIKE LINE OF itab,
          wa1 like line of itab.
                       variable  declaration
    DATA: v_excel_string(2000) TYPE c,
           v_file LIKE v_excel_string VALUE    'C:\Documents and Settings\devadm\Desktop\test.csv',  " name of the file
            delimiter TYPE c VALUE ' '.         " delimiter with default value space
         read the file from the application server
      OPEN DATASET v_file FOR INPUT IN TEXT MODE ENCODING DEFAULT.
    IF sy-subrc NE 0.
    write:/ 'error opening file'.
      ELSE.
        WHILE ( sy-subrc EQ 0 ).
          READ DATASET v_file INTO wa.
          IF NOT wa IS INITIAL.
            append wa TO itab.
          ENDIF.
          CLEAR wa.
        ENDWHILE.
      ENDIF.
    CLOSE DATASET v_file.
    EXEC SQL.
         TRUNCATE TABLE "ZPRINT_LOC"
    ENDEXEC.
    *------display the data from the internal table
    LOOP AT itab into wa1.
    WRITE:/ wa1-mandt,wa1-zloc_code,wa1-zloc_desc,wa1-zloc,wa1-zstate.
    ENDLOOP.
    insert ZPRINT_LOC from table itab.

  • Fire Fox sent not all the data in text form. Reached only piece of information. Where can I find the cache of sent text?

    Fire Fox sent not all the data in text form. Reached only piece of information. Where can I find the cache sent the text?
    For example, I posted an article on a news site, but found that only a small part of my article was posted.

    I'm not sure whether Firefox saved that information. There is a chance that it is in the session history file, especially if you haven't closed that tab yet. To check that:
    Open your currently active Firefox settings folder (AKA your Firefox profile folder) using
    Help > Troubleshooting Information > "Show Folder" button
    Find all files starting with the name sessionstore and copy them to a safe working location (e.g., your documents folder). In order to read a .js file, it is useful to rename it to a .txt file. Or you could drag it to Wordpad or your favorite word processing software.
    The script will look somewhat like gibberish, but if you search for a word in your article that doesn't normally appear in web pages, you may be able to find your data.
    Any luck?
    For the future, you might want to consider this add-on, although I don't know how long it saves data after you submit a form: [https://addons.mozilla.org/en-US/firefox/addon/lazarus-form-recovery/].

  • Error: 'BP category 1 does not fit the data in category 2'

    Hi,
                i have written a program to create a contact person and the code for it is pasted below...when i run this program i get nothing but this message in the status bar 'BP category 1 does not fit the data in category 2'...can someone tell me wht the error means and y it is coming.
    thanks:)
    pushpa
    *table for storing the line by line records in the excel file
    TYPES: BEGIN OF TTAB,
            REC(1000) TYPE C,
           END OF TTAB.
    DATA ITAB TYPE TABLE OF TTAB WITH HEADER LINE.
    *variable for storing the name of the excel file to be uploaded
    DATA UP_FILE TYPE STRING.
    *data to be uploaded
    TYPES: BEGIN OF TDAT,
            FLD1 TYPE BAPIBUS1006_CENTRAL_ORGAN-NAME1,
            FLD2 TYPE BAPIBUS1006_ADDRESS-STREET,
            FLD3 TYPE BAPIBUS1006_ADDRESS-CITY,
            FLD4 TYPE BAPIBUS1006_ADDRESS-REGION,
            FLD5 TYPE BAPIBUS1006_ADDRESS-POSTL_COD1,
            FLD6 TYPE BAPIBUS1006_ADDRESS-COUNTRY,
            FLD7 TYPE BAPIBUS1006_CENTRAL-PARTNEREXTERNAL,
           END OF TDAT.
    DATA IDAT TYPE TABLE OF TDAT WITH HEADER LINE.
    DATA: BUSINESSPARTNER TYPE BAPIBUS1006_HEAD-BPARTNER,
          CENTRALDATA TYPE BAPIBUS1006_CENTRAL,
          ORGANIZATION TYPE BAPIBUS1006_CENTRAL_ORGAN,
          ADDRESS TYPE BAPIBUS1006_ADDRESS,
          BAPIRETURN LIKE BAPIRET2 OCCURS 0 WITH HEADER LINE.
    PARAMETERS P_FILE TYPE LOCALFILE.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE.
      CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
        EXPORTING
          STATIC    = 'X'
        CHANGING
          FILE_NAME = P_FILE.
    START-OF-SELECTION.
      UP_FILE = P_FILE.
      CALL FUNCTION 'GUI_UPLOAD'
        EXPORTING
          FILENAME                = UP_FILE
        TABLES
          DATA_TAB                = ITAB
        EXCEPTIONS
          FILE_OPEN_ERROR         = 1
          FILE_READ_ERROR         = 2
          NO_BATCH                = 3
          GUI_REFUSE_FILETRANSFER = 4
          INVALID_TYPE            = 5
          NO_AUTHORITY            = 6
          UNKNOWN_ERROR           = 7
          BAD_DATA_FORMAT         = 8
          HEADER_NOT_ALLOWED      = 9
          SEPARATOR_NOT_ALLOWED   = 10
          HEADER_TOO_LONG         = 11
          UNKNOWN_DP_ERROR        = 12
          ACCESS_DENIED           = 13
          DP_OUT_OF_MEMORY        = 14
          DISK_FULL               = 15
          DP_TIMEOUT              = 16
          OTHERS                  = 17.
    *writing out the contents of the internal table itab
      LOOP AT ITAB.
        WRITE:/ ITAB-REC.
        CLEAR IDAT.
        SPLIT ITAB-REC AT CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB
                    INTO IDAT-FLD1 IDAT-FLD2 IDAT-FLD3 IDAT-FLD4 IDAT-FLD5 IDAT-FLD6 IDAT-FLD7.
        APPEND IDAT.
      ENDLOOP.
      LOOP AT IDAT.
        MOVE: IDAT-FLD1 TO ORGANIZATION-NAME1,
              IDAT-FLD2 TO ADDRESS-STREET,
              IDAT-FLD3 TO ADDRESS-CITY,
              IDAT-FLD4 TO ADDRESS-REGION,
              IDAT-FLD5 TO ADDRESS-POSTL_COD1,
              IDAT-FLD6 TO ADDRESS-COUNTRY,
              IDAT-FLD7 TO CENTRALDATA-PARTNEREXTERNAL,
              '0001' TO CENTRALDATA-PARTNERTYPE.
        CALL FUNCTION 'BAPI_BUPA_CREATE_FROM_DATA'
          EXPORTING
            PARTNERCATEGORY         = '1'
            CENTRALDATA             = CENTRALDATA
            CENTRALDATAORGANIZATION = ORGANIZATION
            ADDRESSDATA             = ADDRESS
          IMPORTING
            BUSINESSPARTNER         = BUSINESSPARTNER
          TABLES
            RETURN                  = BAPIRETURN.
        IF BAPIRETURN IS NOT INITIAL.
          READ TABLE BAPIRETURN INDEX 1.
          MESSAGE
            ID BAPIRETURN-ID
            TYPE BAPIRETURN-TYPE
            NUMBER BAPIRETURN-NUMBER
            WITH BAPIRETURN-MESSAGE_V1
            BAPIRETURN-MESSAGE_V2
            BAPIRETURN-MESSAGE_V3
            BAPIRETURN-MESSAGE_V4.
          EXIT.
        ENDIF.
        REFRESH BAPIRETURN.
        CLEAR BAPIRETURN.
        CALL FUNCTION 'BAPI_BUPA_ROLE_ADD'
          EXPORTING
          BUSINESSPARTNER = BUSINESSPARTNER
          BUSINESSPARTNERROLE = 'BUP001'
          DIFFERENTIATIONTYPEVALUE =
          TABLES
          RETURN = BAPIRETURN.
        IF BAPIRETURN IS NOT INITIAL.
          READ TABLE BAPIRETURN INDEX 1.
          MESSAGE
            ID BAPIRETURN-ID
            TYPE BAPIRETURN-TYPE
            NUMBER BAPIRETURN-NUMBER
            WITH BAPIRETURN-MESSAGE_V1
            BAPIRETURN-MESSAGE_V2
            BAPIRETURN-MESSAGE_V3
            BAPIRETURN-MESSAGE_V4.
          EXIT.
        ENDIF.
        CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
        WRITE:/ 'Business Partner ID:', BUSINESSPARTNER.
      ENDLOOP.

    Hi Pushpa,
             you can use following code to create relationships using BAPI. In this Business partner is organisatin. contact persion paramenter is person. other information related to relationship details
    CALL FUNCTION 'BAPI_BUPR_CONTP_CREATE'
        EXPORTING
          BUSINESSPARTNER           = SEARCH_PARTNER
          CONTACTPERSON             = CONTACT_SAP
      VALIDFROMDATE             = '00010101'
      VALIDUNTILDATE            = '99991231'
      DEFAULTRELATIONSHIP       =
      ADDRESSGUID               =
          CENTRALDATA             = WA_CENTRAL_DATA
          ADDRESSDATA             = WA_ADDR_DATA
          TABLES
        BAPIADTEL                 = I_TEL_DATA
        BAPIADFAX                 = I_FAX_DATA
      BAPIADTTX                 =
      BAPIADTLX                 =
        BAPIADSMTP                = I_EMAIL_DATA
      BAPIADRML                 =
      BAPIADX400                =
      BAPIADRFC                 =
      BAPIADPRT                 =
      BAPIADSSF                 =
      BAPIADURI                 =
      BAPIADPAG                 =
      BAPIAD_REM                =
      BAPICOMREM                =
         RETURN                    = I_RETURN
    hope this will help you
    Siva

Maybe you are looking for