Using user hold data function in FB65

Dear Guru's
In FB65, I input amount, gl account, amount in doc currency, calculate tax tax box and tax type. Then I select Hold data function. When I exit FB65 and re-enter again, all saved data is available except for the calculate tax tick box and tax type.
Is there anyway to get this hold as well?
Regards
Shakeer

Hi,
This is standared functionality when you process final account document from Hold Doc user should Select Tax & Process the same.
Clear Information about Hold Doc
"With Hold Document, data which has been entered can be saved temporarily in order to continue the entries at a later time. Documents held by the system do not have to be complete. No account balances are updated and the data of the
document is not available for evaluation. No document number is assigned. The person making the entries is asked to name the document after selecting the Hold Document function. The document can be found under this name at a later time."
Regards
Viswa

Similar Messages

  • How can I use User-Defined Aggregate Functions in Timesten 11? such as ODCI

    Hi
    we are using Timesten 11 version and as per the documentation, it doesn't support User-Defined Aggregate Functions.
    So we are looking for alternatives to do it. Could you please provide your expert voice on this.
    Thanks a lot.
    As the following:
    create or replace type strcat_type as object (
    cat_string varchar2(32767),
    static function ODCIAggregateInitialize(cs_ctx In Out strcat_type) return number,
    member function ODCIAggregateIterate(self In Out strcat_type,value in varchar2) return number,
    member function ODCIAggregateMerge(self In Out strcat_type,ctx2 In Out strcat_type) return number,
    member function ODCIAggregateTerminate(self In Out strcat_type,returnValue Out varchar2,flags in number) return
    number
    How can I use User-Defined Aggregate Functions in Timesten 11? such as ODCIAggregateInitialize ?

    Dear user6258915,
    You absolutely right, TimesTen doesnt support object types (http://docs.oracle.com/cd/E13085_01/doc/timesten.1121/e13076/plsqldiffs.htm) and User-Defined Aggregate Functions.
    Is it crucial for your application? Could you rewrite this functionality by using standart SQL or PL/SQL?
    Best regards,
    Gennady

  • How to use User entered dates in intreval

    Hi,
    User will enter date range in variable
    As per my requirment i want to use no of days between those 2 user entered dates in my calculaction
    How can i achieve this at report level.
    Thanks

    Hi
    Create a variable with intreval.
    There is a function module which calculates the no of days between the days
    Go to SE38 and ZXRSRU01 Program
    Write the Code like this (Not exact code)  you can modify
    WHEN "ZZZZZ"(Before that create a formula variable to get the number of days between the days and use the tech name of the formula variable here)
    read ..the lower limit and the upper limit of the caldaz variable
    FROMDATE = L_S_RANGE-low
    TODATE = L_S_RANGE-HIGH
    Then call the function module
    Search for the function module by using days in SE37
    Then pass the from and to Date to the function module it will retun the number of days
    update that to table e_T_Range
    You can proceed with this
    Regards
    M.A

  • Decode variant data w/o using 'Variant To Data' function.

    I need to decode variant data w/o having foreknowledge of the type used to create it. That is, I'm using the 'Flattened String To Variant' function which gives me the info I need, but it's all contained within one indicator. I need some way to break this info down into its constituent elements.
    For instance, let's say I have the flattened data and type descriptor from a cluster with two elements, a boolean and a string, but not the structure itself. Passing this flattened data and/or the type descriptor into a function, I would get a 2D array (or the like) as output containing the name of the boolean (its label), its value, and the name of the string and its corresponding value.
    There must be a way to
    do this, and I suspect it's been done already, but I can't find any reference to it.
    I have attached a file named Test.vi which demostrates this problem.
    Remember, even though I know the name of the control, I won't know the type, so I cannot use the 'Variant To Data' function to deference these values. I can make ready use of DLLs, CINs, or LabVIEW code for the solution.
    Thanks ahead of time for any help! Greg
    Attachments:
    Test.vi ‏26 KB

    You might be able to take advantage of the Variant to Flattened String VI from the Advanced>>Data Manipulation>>Variants pallette. This VI converts a Variant to a flattened data string and a type descriptor. The type descriptor is explained in ap note 154. You might be able to create a VI that would parse data from the flattened data string using the type descriptor. You might have to represent each piece of data as a flattened string to work around the data flow issues in LabVIEW.

  • Using user defined text functions to generate strings on button.

    I am new to java programming and am facing a problem.. It would be great if you could help me resolving it..
    The problem is:
    Is it possible to use user defined functions to generate the string on a button(button name)?
    If it is possible please educate me on it..
    Thanks..

    Yes its possible. What you ask is so vague that it can be interpreted in so many ways there are plenty correct answers
    public void userDefinedFunction(String aString)
    yourButton.setText(aString);
    }

  • Using user-defined data types in Forms 6i

    When I use the following code in Oracle Forms 6i
    PROCEDURE test IS
    prcl prcl_ty;
    BEGIN
    prcl := prcl.setParcel('xxx-xx-xxxx');
    END;
    I get 'Error 801'. However the above does work in SQL editor. The online help says PL/SQL8 client-side program units cannot support Oracle 8 object-related functionality and I suspect this is the reason I get the error from Forms. Is there a work-around for this.
    The TYPE is defined as:
    CREATE OR REPLACE
    TYPE PRCL_TY AS OBJECT
    (parcel VARCHAR2(11),
    MEMBER FUNCTION getBook RETURN VARCHAR2,
    MEMBER FUNCTION getMap RETURN VARCHAR2,
    MEMBER FUNCTION getItem RETURN VARCHAR2,
    MEMBER FUNCTION getItem_NS RETURN VARCHAR2,
    MEMBER FUNCTION getSplit      RETURN VARCHAR2,
    MEMBER FUNCTION find RETURN VARCHAR2,
    MEMBER FUNCTION find (yr in VARCHAR2) RETURN VARCHAR2,
    MEMBER FUNCTION isValid RETURN BOOLEAN,
    MEMBER FUNCTION toString                     RETURN VARCHAR2,
    MEMBER FUNCTION toString (par IN VARCHAR2) RETURN VARCHAR2,
    STATIC FUNCTION setParcel (istr IN VARCHAR2 DEFAULT '000-00-000A') RETURN prcl_ty) -- to be used as a constructor
    NOT FINAL
    CREATE OR REPLACE
    TYPE BODY PRCL_TY AS
    MEMBER FUNCTION getBook RETURN VARCHAR2 IS
    BEGIN
    return substr(self.parcel,1,3);
    END;
    MEMBER FUNCTION getMap RETURN VARCHAR2 IS
    BEGIN
    return substr(self.parcel,4,2);
    END;
    MEMBER FUNCTION getItem RETURN VARCHAR2 IS
    BEGIN
    return substr(self.parcel,6);
    END;
    MEMBER FUNCTION getItem_NS RETURN VARCHAR2 IS
    BEGIN
    return substr(self.parcel,6,3);
    END;
    MEMBER FUNCTION getSplit RETURN VARCHAR2 IS
    BEGIN
    return substr(self.parcel,9,1);
    END;
    MEMBER FUNCTION find RETURN VARCHAR2 IS
    found varchar2(1);
    BEGIN
    begin
    select 'x'
         into found
         from casrp
         where cp_book_num = self.getBook
         and cp_map_num = self.getMap
         and cp_item_num = self.getItem
              and rownum = 1;
         return 'CASRP';
         exception
         when NO_DATA_FOUND then
         begin
    select 'x'
         into found
         from pro_prop
         where pp_book_num = self.getBook
         and pp_map_num = self.getMap
         and pp_item_num = self.getItem
              and rownum = 1
              and NOT EXISTS (select 'x'
                                  from cncl_prcl
                                  where cr_book_num = self.getBook
                                  and cr_book_num = self.getMap
                                       and cr_book_num = self.getItem
                                       and rownum = 1);
         return 'PRO_PROP';
         exception
         when NO_DATA_FOUND then
              return '';
         end;
    end;
    END;
    MEMBER FUNCTION find (yr IN VARCHAR2) RETURN VARCHAR2 IS
    found varchar2(1);
    BEGIN
    begin
    select 'x'
         into found
         from casrp
         where cp_book_num = self.getBook
         and cp_map_num = self.getMap
         and cp_item_num = self.getItem
              and cp_tax_yr = yr
              and rownum = 1;
         return 'CASRP';
         exception
         when NO_DATA_FOUND then
         begin
    select 'x'
         into found
         from pro_prop
         where pp_book_num = self.getBook
         and pp_map_num = self.getMap
         and pp_item_num = self.getItem
              and pp_tax_yr = yr
              and rownum = 1
              and NOT EXISTS (select 'x'
                                  from cncl_prcl
                                  where cr_book_num = self.getBook
                                  and cr_book_num = self.getMap
                                       and cr_book_num = self.getItem
                                       and cr_tax_yr = yr
                                       and rownum = 1);
         return 'PRO_PROP';
         exception
         when NO_DATA_FOUND then
              return '';
         end;
    end;
    END;
    MEMBER FUNCTION isValid RETURN BOOLEAN IS
    i number;
    BEGIN
    for i in 1..8 loop
         if substr(parcel,i,1) not between '0' and '9' then
         return FALSE;
         end if;
         end loop;
         if nvl(substr(parcel,9,1),'#') not between 'A' and 'Z' and
         nvl(substr(parcel,9,1),'#') != '#' then
         return FALSE;
         end if;
         return TRUE;
    END;
    MEMBER FUNCTION toString RETURN VARCHAR2 IS
    BEGIN
    return self.toString('-');
    END;
    MEMBER FUNCTION toString (par IN VARCHAR2) RETURN VARCHAR2 IS
    BEGIN
    return self.getBook||par|| self.getMap||par|| self.getItem;
    END;
    STATIC FUNCTION setParcel (istr IN VARCHAR2 DEFAULT '000-00-000A') RETURN prcl_ty IS
    len number;
    pos number;
         lastch varchar2(1);
    temp varchar2(30);
    invalid_format exception;
         pragma exception_init(invalid_format,-9001);
    BEGIN
    temp := upper(istr);
    -- Find 1st occurance of '-'. If not in correct postion, pad book num with zeros.
         pos := instr(temp,'-',1,1);
    if pos > 0 then
         if pos != 4 then
    temp := lpad(substr(temp,1,pos-1),3,'0')||substr(temp,pos);
         end if;
    -- Find 2nd occurance of '-'. If not in correct postion, pad map num with zeros.
         pos := instr(temp,'-',1,2);
         if pos != 7 then
    temp := substr(temp,1,4)||lpad(substr(temp,5,1),2,'0')||substr(temp,pos);
         end if;
         -- Pad item num
         len := length(temp);
         lastch := substr(temp,len);
         temp := substr(temp,1,7)||lpad(substr(temp,8,len-1),3,'0');
         if lastch between 'A' and 'Z' then
              temp := temp||lastch;
         end if;
    end if;
    temp := replace(temp,'-','');
         if prcl_ty(temp).isValid then
    return (prcl_ty(temp));
         else
         raise invalid_format;
         end if;
    END;
    END;
    Rich Hall
    [email protected]

    You are correct in your assumptions. Client side PLSQL does not support user defined types like the one you are trying to use.
    There are no workarounds I am afraid.

  • Using User Defined Global Functions

    Hi,
    I am implementing Error Handling in a package. The logic goes like this:
    If the call to the first interface fails, KO will call the error proc using which error message is extracted, written to a file and an email notification is sent.
    The code given below is written in the procedure.
    OdiOutFile -FILE=E:\OraHome_2\oracledi\demo\Assignmnt\ErrorLog.log
    ErrMesg:'<%=odiRef.getPrevStepLog("MESSAGE")%>'
    Now i need to implement this using a global function which can be used across interfaces to implement error handling.
    i want to club the code used above with sending an email notification.
    Can anyone pls guide me if i my approach is correct and how this approach can be implemented using Global Function?
    Thanks.
    Edited by: RitikaS on Dec 18, 2009 2:19 AM

    Hi Ritika,
    Can i suggest a method?
    Build a package, define your interface flow, from the KO (failure) of every interface call OdiSendMail.
    In the OdiSendMail define all the parameters like Mail Server,From, To, Subject and in the message body paste the below code,
    Previous step <%=odiRef.getPrevStepLog("STEP_NAME")%> with session number <%=odiRef.getPrevStepLog("SESS_NO")%> failed with the error message
    *<%=odiRef.getPrevStepLog("MESSAGE")%> .*
    Please look into the operator for more details.
    So what ODI will do is, it will send a notification to the recipient with the error message ,interface name and session number.
    Sample :
    Previous step INT_LOAD_AGE with session number 1822124 failed with the error message
    17002 : null : java.sql.SQLException: Io exception: The Network Adapter could not establish the connection
    java.sql.SQLException: Io exception: The Network Adapter could not establish the connection
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:162)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:274)
         at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:328)
         at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:361)
         at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:151)
         at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32)
         at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:595)
         at com.sunopsis.sql.SnpsConnection.u(SnpsConnection.java)
         at com.sunopsis.sql.SnpsConnection.c(SnpsConnection.java)
         at com.sunopsis.sql.i.run(i.java)
    Please look into the operator for more details.
    Makes sense?
    http://img259.imageshack.us/img259/1704/screenshot003.jpg
    P.S: Please do close your threads accordingly assigning points (Helpful/Correct) to make experts to help you eagerly.
    Thanks,
    Guru

  • Using the due date function in Smart Folders

    Hi
    I'm experimenting with my smart folders and I saw there is an option for "due date".
    Does this mean I can create a folder with files that need to be processed by a certain date?
    How do I add a due date to a file?
    This would be useful for me, for instance, in following up invoices. I could set a 30 day date on them and then they would show up in my smart folder when they should be paid.
    iJemz

    It's not very simple, unless there is a third-party program out there that might set them.
    The dates in the MDItem attributes are stored as binary plists.
    You would have to create an xml plist with the date, like this:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <array>
              <date>2013-07-28T05:03:59Z</date>
    </array>
    </plist>
    Then, you would convert it to a binary plist using
    plutil -convert binary1 path/to/xml.plist
    Then, you would load it into the extended attribute using
    xattr -wx com.apple.metadata:kMDItemDueDate "`xxd -p /path/to/binary.plist`" /path/to/file/to/set/dueDate
    This could likely be all wrapped in shell script or automator service, but I don't know how to due that.

  • Using trim and date function in control file

    I want to load "?30/12/2005 22:13?" into the table table1 and remove the "?" characters.
    LOAD DATA
    INTO TABLE TABLE1
    FIELDS TERMINATED BY ","
    (ORDER_DATE "TRIM('?', 'MM/DD/YYYY HH24:MI')"
    What's wrong with the above statement ?
    thanks.

    in addition, can i specify the starting row from the text file to load the data ?
    e.g. i only want to load from the 10th row Use SKIP 9 for that
    http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96652/ch04.htm#1004940
    and to eliminate the last 2 rows of the text file.There is no command for that, but if these rows can be identified through some pattern you could use conditional loading and exclude these rows
    http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96652/ch05.htm#1005658

  • Function of HOLD DATA in the settings for creation of a new screen.

    Hi,
    Since i'm new to ABAP and still learning my way through, i would really appreciate if somebody can help me out with the exact functioning of selecting the check box 'HOLD DATA' under the settings option while creation of a new screen.
    Thanks for any help extended.

    Take simple scenario of SE38. The Screen for the transaction has the Flag "HOLD DATA" as Ticked.
    Now enter some program name on the field and Click - Utilities-> User Profile -> Hold data.
    Now come out of the transaction, go back to the same transaction. The name of the Program that you entered earlier will appear on the input field.
    So if the screen doesn't have "Hold Data" set the functions of HOLD data, SET DATA, DELETE data will not work.
    Also try using SET DATA For the Program input field.
    SAP Help :
    If you activate this option, the following functions are supported for the screen at runtime:
    System -> User profile -> Hold data
    -> Set data
    -> Delete data
    The Hold data function allows you to hold onto any entries you have made on the screen. When the screen is next processed (even in a different mode), the system then automatically redisplays the data in the input fields.
    If the option is not activated, these functions are ineffective at screen runtime.

  • User defined xquery function with index enabled

    If I use user defined xquery function, can the index be applied within the function?
    trados.xsd
    <?xml version="1.0" encoding="UTF-8"?>
    <!-- edited with XMLSpy v2005 rel. 3 U (http://www.altova.com) by () -->
    <schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:xdb="http://xmlns.oracle.com/xdb" xmlns:tns="http://ecoit.hp.com/ecg/repository/trados" targetNamespace="http://ecoit.hp.com/ecg/repository/trados" elementFormDefault="qualified">
         <complexType name="entry">
              <sequence>
                   <element name="base" type="string"/>
                   <element name="translation" maxOccurs="unbounded">
                        <complexType>
                             <simpleContent>
                                  <extension base="string">
                                       <attribute name="lang"/>
                                  </extension>
                             </simpleContent>
                        </complexType>
                   </element>
              </sequence>
              <attribute name="xpath" type="string" use="required" xdb:SQLName="XPATH"/>
              <attribute name="locator" type="string" use="required"/>
         </complexType>
         <simpleType name="languages">
              <list itemType="string"/>
         </simpleType>
         <element name="trados" xdb:defaultTable="ECG_REP_TRADOS_TAB" xdb:tableProps="VARRAY XMLDATA.ENTRY STORE AS TABLE ECG_REP_TRADOS_ENTRY_TAB ((PRIMARY KEY (NESTED_TABLE_ID, SYS_NC_ARRAY_INDEX$)) ORGANIZATION INDEX OVERFLOW)">
              <complexType>
                   <sequence>
                        <element name="entry" type="tns:entry" minOccurs="0" maxOccurs="unbounded" xdb:SQLName="ENTRY"/>
                   </sequence>
                   <attribute name="cid" type="string"/>
                   <attribute name="path" type="string"/>
                   <attribute name="lang" type="string"/>
                   <attribute name="langs" type="tns:languages"/>
                   <attribute name="oldversion" type="string"/>
              </complexType>
         </element>
    </schema>
    CREATE INDEX ECG_REP_ENTRY_XPATH_IDX ON ECG_REP_TRADOS_ENTRY_TAB ("XPATH", "NESTED_TABLE_ID")
    eco_category.xsd
    <?xml version="1.0" encoding="UTF-8"?>
    <!-- edited with XMLSpy v2008 (http://www.altova.com) by Jan-Erik Pedersen (HEWLETT PACKARD) -->
    <!--W3C Schema generated by XMLSpy v2007 (http://www.altova.com) by Scott Dismukes (Hewlett Packard)-->
    <schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:xdb="http://xmlns.oracle.com/xdb" xmlns:tns="http://ecoit.hp.com/ecg/repository/eco/category" xmlns:cns="http://ecoit.hp.com/ecg/repository/types" targetNamespace="http://ecoit.hp.com/ecg/repository/eco/category" elementFormDefault="qualified">
         <import namespace="http://ecoit.hp.com/ecg/repository/types" schemaLocation="../types.xsd"/>
         <complexType name="productFamilies">
              <sequence>
                   <element name="productFamily" type="tns:productFamily" minOccurs="0" maxOccurs="unbounded"/>
                   <element name="product" type="tns:product" minOccurs="0" maxOccurs="unbounded"/>
              </sequence>
              <attribute name="lang" use="required" xdb:SQLName="LANG">
                   <simpleType>
                        <restriction base="string">
                             <length value="5"/>
                        </restriction>
                   </simpleType>
              </attribute>
              <attribute name="version" use="required" xdb:SQLName="VERSION">
                   <simpleType>
                        <restriction base="string">
                             <maxLength value="100"/>
                        </restriction>
                   </simpleType>
              </attribute>
         </complexType>
         <complexType name="productCategory">
              <sequence>
                   <element name="label" type="cns:label"/>
                   <element name="productCategory" type="tns:productCategory" minOccurs="0" maxOccurs="unbounded" xdb:defaultTable="ECG_REP_ECO_CATALOG_PC_TAB"/>
                   <element name="product" type="tns:product" minOccurs="0" maxOccurs="unbounded"/>
              </sequence>
              <attribute name="id" type="cns:id" use="required"/>
         </complexType>
         <complexType name="productCategories">
              <sequence>
                   <element name="productCategory" type="tns:productCategory" minOccurs="0" maxOccurs="unbounded"/>
              </sequence>
         </complexType>
         <complexType name="column">
              <sequence>
                   <element name="label" type="cns:label"/>
              </sequence>
              <attribute name="id" type="cns:id" use="required"/>
         </complexType>
         <complexType name="product">
              <sequence>
                   <element name="label" type="cns:label"/>
                   <element name="column" type="tns:column" minOccurs="0" maxOccurs="unbounded"/>
              </sequence>
              <attribute name="id" type="cns:id" use="required"/>
         </complexType>
         <complexType name="productFamily">
              <sequence>
                   <element name="label" type="cns:label"/>
                   <element name="image" type="cns:image" minOccurs="0" maxOccurs="unbounded"/>
                   <element name="link" type="cns:link" minOccurs="0" maxOccurs="unbounded"/>
                   <element name="column" type="tns:column" minOccurs="0" maxOccurs="unbounded"/>
                   <element name="productCategories" type="tns:productCategories" minOccurs="0" maxOccurs="unbounded"/>
              </sequence>
              <attribute name="id" type="cns:id" use="required"/>
         </complexType>
         <element name="productFamilies" type="tns:productFamilies" xdb:defaultTable="ECG_REP_ECO_CATALOG_TAB"/>
    </schema>
    xquery
    xquery version "1.0";
    declare namespace typ = "http://ecoit.hp.com/ecg/repository/types";
    declare namespace c = "http://ecoit.hp.com/ecg/repository/eco/category";
    declare namespace t = "http://ecoit.hp.com/ecg/repository/trados";
    declare variable $c := $res/c:productFamilies;
    declare function local:pc($pc as element(c:productCategory), $x as xs:string) as element()
         <c:productCategory id="{$pc/@id}">
              <c:label>{data($es/t:entry[@xpath eq concat($x, "/label")]/t:translation)}</c:label>
              for $p in $pc/c:product
              return local:p($p, concat($x, "/product/[@id=", $p/@id, "]"))
              for $pcc in $pc/c:productCategory
              return local:pc($pcc, concat($x, "/productCategory[@id=", $pcc/@id, "]"))
         </c:productCategory>
    declare function local:p($p as element(c:product), $x as xs:string) as element()
         <c:product id="{$p/@id}">
              <c:label>{string($es/t:entry[@xpath eq concat($x, "/label")]/t:translation)}</c:label>
              for $col in $p/c:column
              return
              <c:column id="{$col/@id}">
                   <c:label>
                        let $e := $es/t:entry[@xpath eq concat($x, "/column[@id=", $col/@id, "]/label")]
                        return
                        if(exists($e)) then string($e/t:translation)
                        else $col/c:label/text()
                   </c:label>
              </c:column>
         </c:product>
    <c:productFamiles xsi:schemaLocation="http://ecoit.hp.com/ecg/repository/eco/category http://ecoit.hp.com/ecg/repository/eco/category.xsd http://ecoit.hp.com/ecg/repository/types http://ecoit.hp.com/ecg/repository/types.xsd" lang="{$lang/lang/text()}" version="{$c/@version}">
         for $pf in $c/c:productFamily
         let $x := concat("/productFamily[@id=", $pf/@id, "]")
         return
         <c:productFamily id="{$pf/@id}">
    (:xpath index can not be applied within function:)
              <c:label>{data($es/t:entry[@xpath eq concat($x, "/label")]/t:translation)}</c:label>
              for $img in $pf/c:image
              return $img
              for $link in $pf/c:link
              return $link
              for $col in $pf/c:column
              return
              <c:column id="{$col/@id}">
                   <c:label>{data($es/t:entry[@xpath eq concat($x, "/column[@id=", $col/@id, "]/label")]/t:translation)}</c:label>
              </c:column>
              for $pcs in $pf/c:productCategories
              return
              <c:productCategories>
                   for $pc in $pcs/c:productCategory
                   return local:pc($pc, concat($x, "/productCategories/productCategory[@id=", $pc/@id, "]"))
              </c:productCategories>
         </c:productFamily>
         for $p in $c/c:product
         return local:p($p, concat("/product[@id=", $p/@id, "]"))
    </c:productFamiles>
    Message was edited by:
    John Lee

    John
    Am i missing a bit of the Xquery
    In 11.1,0.6.0 I get
    Elapsed: 00:00:00.04
    SQL> set echo on
    SQL> spool testcase.log
    SQL> --
    SQL> connect sys/ as sysdba
    Enter password:
    Connected.
    SQL> set define on
    SQL> set timing on
    SQL> --
    SQL> define USERNAME = HPECO
    SQL> --
    SQL> def PASSWORD = HPECO
    SQL> --
    SQL> def USER_TABLESPACE = USERS
    SQL> --
    SQL> def TEMP_TABLESPACE = TEMP
    SQL> --
    SQL> drop user &USERNAME cascade
      2  /
    old   1: drop user &USERNAME cascade
    new   1: drop user HPECO cascade
    User dropped.
    Elapsed: 00:00:18.12
    SQL> grant create any directory, drop any directory, connect, resource, alter session, create view to &USERNAME identified by &PASSW
    ORD
      2  /
    old   1: grant create any directory, drop any directory, connect, resource, alter session, create view to &USERNAME identified by &P
    ASSWORD
    new   1: grant create any directory, drop any directory, connect, resource, alter session, create view to HPECO identified by HPECO
    Grant succeeded.
    Elapsed: 00:00:00.03
    SQL> alter user &USERNAME default tablespace &USER_TABLESPACE temporary tablespace &TEMP_TABLESPACE
      2  /
    old   1: alter user &USERNAME default tablespace &USER_TABLESPACE temporary tablespace &TEMP_TABLESPACE
    new   1: alter user HPECO default tablespace USERS temporary tablespace TEMP
    User altered.
    Elapsed: 00:00:00.00
    SQL> connect &USERNAME/&PASSWORD
    Connected.
    SQL> --
    SQL> alter session set events ='19027 trace name context forever, level 0x800'
      2  /
    Session altered.
    Elapsed: 00:00:00.00
    SQL> --
    SQL> declare
      2    xmlschema xmltype := XMLTYPE(
      3  '<?xml version="1.0" encoding="UTF-8"?>
      4  <!-- edited with XMLSpy v2008 (http://www.altova.com) by Jan-Erik Pedersen (HEWLETT PACKARD) -->
      5  <schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:xdb="http://xmlns.oracle.com/xdb" xmlns:tns="http://ecoit.hp.com/ecg/rep
    ository/types" targetNamespace="http://ecoit.hp.com/ecg/repository/types" elementFormDefault="qualified">
      6     <complexType name="item">
      7             <simpleContent>
      8                     <extension base="tns:content">
      9                             <attribute name="id" type="tns:id" use="required"/>
    10                     </extension>
    11             </simpleContent>
    12     </complexType>
    13     <complexType name="items">
    14             <sequence>
    15                     <element name="item" type="tns:item" maxOccurs="unbounded"/>
    16             </sequence>
    17             <attribute name="id" type="tns:id" use="required"/>
    18     </complexType>
    19     <complexType name="mappings">
    20             <sequence>
    21                     <element name="item" type="tns:item" minOccurs="0" maxOccurs="unbounded"/>
    22                     <element name="items" type="tns:items" minOccurs="0" maxOccurs="unbounded"/>
    23             </sequence>
    24     </complexType>
    25     <complexType name="local">
    26             <sequence>
    27                     <element name="common">
    28                             <complexType>
    29                                     <sequence>
    30                                             <element name="texts" type="tns:mappings"/>
    31                                             <element name="images" type="tns:mappings" minOccurs="0"/>
    32                                     </sequence>
    33                             </complexType>
    34                     </element>
    35                     <element name="section" minOccurs="0" maxOccurs="unbounded">
    36                             <complexType>
    37                                     <sequence>
    38                                             <element name="texts" type="tns:mappings"/>
    39                                             <element name="images" type="tns:mappings" minOccurs="0"/>
    40                                     </sequence>
    41                                     <attribute name="id" use="required">
    42                                             <simpleType>
    43                                                     <restriction base="string">
    44                                                             <maxLength value="32"/>
    45                                                     </restriction>
    46                                             </simpleType>
    47                                     </attribute>
    48                             </complexType>
    49                     </element>
    50             </sequence>
    51             <attribute name="lang" use="required" xdb:SQLName="LANG">
    52                     <simpleType>
    53                             <restriction base="string">
    54                                     <length value="5"/>
    55                             </restriction>
    56                     </simpleType>
    57             </attribute>
    58     </complexType>
    59     <complexType name="link">
    60             <sequence>
    61                     <element name="url" type="tns:url"/>
    62                     <element name="label" type="tns:label"/>
    63                     <element name="image" type="tns:image" minOccurs="0"/>
    64             </sequence>
    65             <attribute name="id" type="tns:id"/>
    66     </complexType>
    67     <complexType name="image">
    68             <sequence>
    69                     <element name="url" type="string"/>
    70                     <element name="label" type="tns:label" minOccurs="0"/>
    71             </sequence>
    72             <attribute name="id" type="tns:id" use="optional"/>
    73     </complexType>
    74     <simpleType name="id">
    75             <restriction base="string">
    76                     <maxLength value="100"/>
    77             </restriction>
    78     </simpleType>
    79     <simpleType name="label">
    80             <restriction base="string">
    81                     <maxLength value="200"/>
    82             </restriction>
    83     </simpleType>
    84     <simpleType name="content">
    85             <restriction base="string">
    86                     <maxLength value="4000"/>
    87             </restriction>
    88     </simpleType>
    89     <simpleType name="url">
    90             <restriction base="string">
    91                     <maxLength value="256"/>
    92             </restriction>
    93     </simpleType>
    94  </schema>');
    95  begin
    96    dbms_xmlschema.registerSchema
    97    (
    98        schemaurl => 'http://ecoit.hp.com/ecg/repository/types.xsd'
    99       ,schemadoc => xmlschema
    100       ,local     => TRUE
    101       ,genBean   => false
    102       ,genTypes  => TRUE
    103       ,genTables => TRUE
    104       ,ENABLEHIERARCHY => DBMS_XMLSCHEMA.ENABLE_HIERARCHY_NONE
    105    );
    106  end;
    107  /
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:01.35
    SQL>
    SQL> declare
      2    xmlschema xmltype := XMLTYPE(
      3  '<?xml version="1.0" encoding="UTF-8"?>
      4  <!-- edited with XMLSpy v2005 rel. 3 U (http://www.altova.com) by  () -->
      5  <schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:xdb="http://xmlns.oracle.com/xdb" xmlns:tns="http://ecoit.hp.com/ecg/rep
    ository/trados" targetNamespace="http://ecoit.hp.com/ecg/repository/trados" elementFormDefault="qualified">
      6     <complexType name="entry">
      7             <sequence>
      8                     <element name="base" type="string"/>
      9                     <element name="translation" maxOccurs="unbounded">
    10                             <complexType>
    11                                     <simpleContent>
    12                                             <extension base="string">
    13                                                     <attribute name="lang"/>
    14                                             </extension>
    15                                     </simpleContent>
    16                             </complexType>
    17                     </element>
    18             </sequence>
    19             <attribute name="xpath" type="string" use="required" xdb:SQLName="XPATH"/>
    20             <attribute name="locator" type="string" use="required"/>
    21     </complexType>
    22     <simpleType name="languages">
    23             <list itemType="string"/>
    24     </simpleType>
    25     <element name="trados" xdb:defaultTable="ECG_REP_TRADOS_TAB" xdb:tableProps="VARRAY XMLDATA.ENTRY STORE AS TABLE ECG_REP_TRA
    DOS_ENTRY_TAB ((PRIMARY KEY (NESTED_TABLE_ID, SYS_NC_ARRAY_INDEX$)) ORGANIZATION INDEX OVERFLOW)">
    26             <complexType>
    27                     <sequence>
    28                             <element name="entry" type="tns:entry" minOccurs="0" maxOccurs="unbounded" xdb:SQLName="ENTRY"/>
    29                     </sequence>
    30                     <attribute name="cid" type="string"/>
    31                     <attribute name="path" type="string"/>
    32                     <attribute name="lang" type="string"/>
    33                     <attribute name="langs" type="tns:languages"/>
    34                     <attribute name="oldversion" type="string"/>
    35             </complexType>
    36     </element>
    37  </schema>');
    38  begin
    39    dbms_xmlschema.registerSchema
    40    (
    41        schemaurl => 'http://ecoit.hp.com/ecg/repository/trados.xsd'
    42       ,schemadoc => xmlschema
    43       ,local     => TRUE
    44       ,genBean   => false
    45       ,genTypes  => TRUE
    46       ,genTables => TRUE
    47       ,ENABLEHIERARCHY => DBMS_XMLSCHEMA.ENABLE_HIERARCHY_NONE
    48    );
    49  end;
    50  /
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:00.68
    SQL> declare
      2    xmlschema xmltype := XMLTYPE(
      3  '<?xml version="1.0" encoding="UTF-8"?>
      4  <!-- edited with XMLSpy v2008 (http://www.altova.com) by Jan-Erik Pedersen (HEWLETT PACKARD) -->
      5  <!--W3C Schema generated by XMLSpy v2007 (http://www.altova.com) by Scott Dismukes (Hewlett Packard)-->
      6  <schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:xdb="http://xmlns.oracle.com/xdb" xmlns:tns="http://ecoit.hp.com/ecg/rep
    ository/eco/category" xmlns:cns="http://ecoit.hp.com/ecg/repository/types" targetNamespace="http://ecoit.hp.com/ecg/repository/eco/c
    ategory" elementFormDefault="qualified">
      7     <import namespace="http://ecoit.hp.com/ecg/repository/types" schemaLocation="http://ecoit.hp.com/ecg/repository/types.xsd"/>
      8     <complexType name="productFamilies">
      9             <sequence>
    10                     <element name="productFamily" type="tns:productFamily" minOccurs="0" maxOccurs="unbounded"/>
    11                     <element name="product" type="tns:product" minOccurs="0" maxOccurs="unbounded"/>
    12             </sequence>
    13             <attribute name="lang" use="required" xdb:SQLName="LANG">
    14                     <simpleType>
    15                             <restriction base="string">
    16                                     <length value="5"/>
    17                             </restriction>
    18                     </simpleType>
    19             </attribute>
    20             <attribute name="version" use="required" xdb:SQLName="VERSION">
    21                     <simpleType>
    22                             <restriction base="string">
    23                                     <maxLength value="100"/>
    24                             </restriction>
    25                     </simpleType>
    26             </attribute>
    27     </complexType>
    28     <complexType name="productCategory">
    29             <sequence>
    30                     <element name="label" type="cns:label"/>
    31                     <element name="productCategory" type="tns:productCategory" minOccurs="0" maxOccurs="unbounded" xdb:defaultTa
    ble="ECG_REP_ECO_CATALOG_PC_TAB"/>
    32                     <element name="product" type="tns:product" minOccurs="0" maxOccurs="unbounded"/>
    33             </sequence>
    34             <attribute name="id" type="cns:id" use="required"/>
    35     </complexType>
    36     <complexType name="productCategories">
    37             <sequence>
    38                     <element name="productCategory" type="tns:productCategory" minOccurs="0" maxOccurs="unbounded"/>
    39             </sequence>
    40     </complexType>
    41     <complexType name="column">
    42             <sequence>
    43                     <element name="label" type="cns:label"/>
    44             </sequence>
    45             <attribute name="id" type="cns:id" use="required"/>
    46     </complexType>
    47     <complexType name="product">
    48             <sequence>
    49                     <element name="label" type="cns:label"/>
    50                     <element name="column" type="tns:column" minOccurs="0" maxOccurs="unbounded"/>
    51             </sequence>
    52             <attribute name="id" type="cns:id" use="required"/>
    53     </complexType>
    54     <complexType name="productFamily">
    55             <sequence>
    56                     <element name="label" type="cns:label"/>
    57                     <element name="image" type="cns:image" minOccurs="0" maxOccurs="unbounded"/>
    58                     <element name="link" type="cns:link" minOccurs="0" maxOccurs="unbounded"/>
    59                     <element name="column" type="tns:column" minOccurs="0" maxOccurs="unbounded"/>
    60                     <element name="productCategories" type="tns:productCategories" minOccurs="0" maxOccurs="unbounded"/>
    61             </sequence>
    62             <attribute name="id" type="cns:id" use="required"/>
    63     </complexType>
    64     <element name="productFamilies" type="tns:productFamilies" xdb:defaultTable="ECG_REP_ECO_CATALOG_TAB"/>
    65  </schema>
    66  ');
    67  begin
    68    dbms_xmlschema.registerSchema
    69    (
    70        schemaurl => 'http://ecoit.hp.com/ecg/repository/eco/category.xsd'
    71       ,schemadoc => xmlschema
    72       ,local     => TRUE
    73       ,genBean   => false
    74       ,genTypes  => TRUE
    75       ,genTables => TRUE
    76       ,ENABLEHIERARCHY => DBMS_XMLSCHEMA.ENABLE_HIERARCHY_NONE
    77    );
    78  end;
    79  /
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:01.65
    SQL> CREATE INDEX ECG_REP_ENTRY_XPATH_IDX ON ECG_REP_TRADOS_ENTRY_TAB ("XPATH", "NESTED_TABLE_ID")
      2  /
    Index created.
    Elapsed: 00:00:00.01
    SQL> set pages 0 lines 160
    SQL> set long 10000
    SQL> --
    SQL> set autotrace on explain
    SQL> --
    SQL> xquery
      2  xquery version "1.0";
      3
      4  declare namespace typ = "http://ecoit.hp.com/ecg/repository/types";
      5  declare namespace c = "http://ecoit.hp.com/ecg/repository/eco/category";
      6  declare namespace t = "http://ecoit.hp.com/ecg/repository/trados";
      7
      8  declare variable $c := $res/c:productFamilies;
      9
    10  declare function local:pc($pc as element(c:productCategory), $x as xs:string) as element() {
    11     <c:productCategory id="{$pc/@id}">
    12     {
    13             <c:label>{data($es/t:entry[@xpath eq concat($x, "/label")]/t:translation)}</c:label>
    14             ,
    15             for $p in $pc/c:product
    16             return local:p($p, concat($x, "/product/[@id=", $p/@id, "]"))
    17             ,
    18             for $pcc in $pc/c:productCategory
    19             return local:pc($pcc, concat($x, "/productCategory[@id=", $pcc/@id, "]"))
    20     }
    21     </c:productCategory>
    22  };
    23
    24  declare function local:p($p as element(c:product), $x as xs:string) as element() {
    25     <c:product id="{$p/@id}">
    26     {
    27             <c:label>{string($es/t:entry[@xpath eq concat($x, "/label")]/t:translation)}</c:label>
    28             ,
    29             for $col in $p/c:column
    30             return
    31             <c:column id="{$col/@id}">
    32                     <c:label>
    33                     {
    34                             let $e := $es/t:entry[@xpath eq concat($x, "/column[@id=", $col/@id, "]/label")]
    35                             return
    36                             if(exists($e)) then string($e/t:translation)
    37                             else $col/c:label/text()
    38                     }
    39                     </c:label>
    40             </c:column>
    41     }
    42     </c:product>
    43  };
    44
    45  <c:productFamiles xsi:schemaLocation="http://ecoit.hp.com/ecg/repository/eco/category http://ecoit.hp.com/ecg/repository/eco/ca
    tegory.xsd  http://ecoit.hp.com/ecg/repository/types  http://ecoit.hp.com/ecg/repository/types.xsd" lang="{$lang/lang/text()}" versi
    on="{$c/@version}"> {
    46     for $pf in $c/c:productFamily
    47     let $x := concat("/productFamily[@id=", $pf/@id, "]")
    48     return
    49     <c:productFamily id="{$pf/@id}">
    50     {
    51             (:xpath index can not be applied within function:)
    52             <c:label>{data($es/t:entry[@xpath eq concat($x, "/label")]/t:translation)}</c:label>
    53             ,
    54             for $img in $pf/c:image
    55             return $img
    56             ,
    57             for $link in $pf/c:link
    58             return $link
    59             ,
    60             for $col in $pf/c:column
    61             return
    62             <c:column id="{$col/@id}">
    63                     <c:label>{data($es/t:entry[@xpath eq concat($x, "/column[@id=", $col/@id, "]/label")]/t:translation)}</c:lab
    el>
    64             </c:column>
    65             ,
    66             for $pcs in $pf/c:productCategories
    67             return
    68             <c:productCategories>
    69             {
    70                     for $pc in $pcs/c:productCategory
    71                     return local:pc($pc, concat($x, "/productCategories/productCategory[@id=", $pc/@id, "]"))
    72             }
    73             </c:productCategories>
    74     }
    75     </c:productFamily>
    76     ,
    77     for $p in $c/c:product
    78     return local:p($p, concat("/product[@id=", $p/@id, "]")) } </c:productFamiles>
    79  /
    ERROR:
    ORA-19228: XPST0008 - undeclared identifier: prefix 'res' local-name ''
    Elapsed: 00:00:00.01
    SQL>

  • Convert the date into user default date formate

    I am wrinting a bdc and i want to convert the date into user default date farmate ..please suggust the functiom module should i use...

    actually by using dats or d type you can get the user specific date itself.
    but if u have different dates format that need to be converted to the user specific date then you can follow below procedure
    1. retrieve the user format from usr01
        SELECT SINGLE datfm
          INTO w_datfm
          FROM usr01
         WHERE bname EQ sy-uname.
    pass w_datfm to the below FM (4th import parameter)
    2. create Z - FM and retrieve the user secific date
    FUNCTION ZFXX_USER_SPECIFIC_DATE.
    ""Local Interface:
    *"  IMPORTING
    *"     VALUE(IW_DAY) TYPE  CHAR2
    *"     VALUE(IW_MONTH) TYPE  CHAR2
    *"     VALUE(IW_YEAR) TYPE  CHAR4
    *"     VALUE(IW_DATFM) TYPE  USR01-DATFM
    *"  EXPORTING
    *"     VALUE(EW_USER_DATE) TYPE  CHAR0008
    *1  DD.MM.YYYY
    *2  MM/DD/YYYY
    *3  MM-DD-YYYY
    *4  YYYY.MM.DD
    *5  YYYY/MM/DD
    *6  YYYY-MM-DD
    CASE iw_datfm.
      when '1'.
        concatenate iw_day iw_month iw_year
               into ew_user_date.
      when '2'.
        concatenate iw_month iw_day iw_year
               into ew_user_date.
      when '3'.
        concatenate iw_month iw_day iw_year
               into ew_user_date.
      when '4'.
        concatenate iw_year iw_month iw_day
               into ew_user_date.
      when '5'.
        concatenate iw_year iw_month iw_day
               into ew_user_date.
      when '6'.
        concatenate iw_year iw_month iw_day
               into ew_user_date.
      when others.
        clear ew_user_date.
    endcase.
    ENDFUNCTION.

  • Imbed Date Function????

    Hi,
    I am having trouble with a date function in Oracle Administrator. How do I make max_date a condition (for a case statement)? I am trying to return a value (a ranking) for the most recent ranking date.
    Ie:
    Case
    When Date = Max --I know you can use a Max(date) function but 
    and (another condition) --how do you make that a condition within case
    Then (return value) -- statement?
    Else 0
    End
    Is this a case where I have to import an Oracle Function? Or can I get around this by using a pre-existing function?

    Multiple posting
    Date Function - Holiday?

  • NOERR  In Data Functions

    Hi,
    Where exactly we will use NOERR( ) in Data Functions.
    Thanks

    Hi,
    NOERR(<Expression>)
    Is 0 if the calculation of <Expression> leads to an arithmetical error. Otherwise, the result is the value of the expression. It is used to avoid error messages or so that you can continue to calculate a defined result.
    Check this:
    http://help.sap.com/saphelp_nw04/helpdata/en/03/17f13a2f160f28e10000000a114084/content.htm
    Hope this helps.
    Rgs,
    I.R.K

  • User profile - hold data, set data & delete data

    Hello friends,
    In menu, system - user profile we have sub selections for Hold data, set data, Delete data.
    What is the function of these selection items?
    Thanks

    Use Hold data to keep data values that you have entered in fields in an application for the duration of a user session. When you call up the application again, you can overwrite these values.
    Once you set data, you can no longer overwrite these values and have to use delete data if you want to enter different values.

Maybe you are looking for

  • Triggering SRM PO output to windows spool

    Hi, I have a customer requirement to output the SRM PO to the user windows default printer. Customer do not want to configure printers through SPAD transaction... Customer do not want to display PO in PDF and then to print it to windows printer. Cust

  • IE Active Content + Dynamically Loaded Swfs...any help?

    Hi, I've recently become aware of the whole IE active content problem and I followed the tutorial at http://activecontent.blogspot.com/ to adjust my html files accordingly. However I have one site located at: http://www.mrdodson.com/SavannahSucks/Sav

  • /SAPAPO/MAT1 customizing

    Hi all, Maybe someone can help me tackle this problem, as I'm not very familiar with SAP APO. I'm trying to have an authority check on the initial screen of /SAPAPO/MAT1 depending on what "Location" is filled. However, I can't seem to find any user e

  • Has anyone updated an app via the store only to have the app stay in Update Available status?

    Uupdated the app called ChordProBuddy and the update remains in the ready to update status on my App Store Dock Icon and in the update  window of the App Store. It will not go away after the download is completed. Any Suggestions? RL

  • Cache issue in Reports using Parameters

    Hi, I have a Report which uses multiple Regions to show conditionally based on the Parameters selected. e.g. PARAM1, PARAM2, PARAM3 (1)PARAM1,null,null - Selected : Shows Region : 1,2,3 (2)PARAM1, PARAM2, null- Selected : Shows Region : 1,4,5,6 (3)PA