Using Record Statistics for session/Interface inside of package

Oracle DB / ODI.
I have a package starting with Interface.
In the second step I want to know how many records was inserted/updated by first interface. Let say those numbers will be used on second interface.
How can I do that? Is there any way to get access this info inside of the package?
Something similar to SQL%ROWCOUNT in ODI?

try this in refresh variable
select to_number(<%=odiRef.getPrevStepLog("INSERT_COUNT")%>)+to_number(<%=odiRef.getPrevStepLog("UPDATE_COUNT")%>) from dual

Similar Messages

  • How can I use a variable for an interface log and error fle

    I want to use a variable for the interface's log and error file so that when I migrate from Dev to QA to Prod I don't have to do a lot of editing.
    Specifically on the "flow" tab for the "target", I want a variable to be the first part of the path for the log (\\sundev1\fnd1-hypd1) and join this with the rest (\update\log\logfile.log) within the LOG_FILE_NAME field.
    Thank you!

    Hi,
    It is quite simple....
    just use the <%=odiRef.getSchemaName("D")%> before the file name and configure both path in the topology linked to each context.

  • How to use record type for inserting data into a table

    I've read through the web the following tip:
    "When working with a large number of columns, using variables of type RECORD is a better approach. With this approach, you do not have to list anything in the INSERT statement, because you are inserting a variable into the table that is defined as a row from the same table."
    I usually define a variable as
    r_mytable     mytable%ROWTYPE;
    and inside my procedure I'll set the fields I need as
    r_mytable.field1 := 1;
    r_mytable.field3 := 7;
    and then I perform the insert as
    insert into mytable
    (field1,
    field3)
    values
    (r_mytable.field1,
    r_mytable.field3);
    According to the tip I've copied above, how can I use the TYPE RECORD of pl/sql for achieving the same result but perhaps in a smarter way?
    Thanks in advance!

    Hi,
    Are you looking for this?
    SQL> create table table1 (id number, descr varchar2(30));
    Table created
    SQL>
    SQL> DECLARE
      2   my_rec table1%rowtype;
      3  BEGIN
      4   my_rec.id := 1;
      5   my_rec.descr := 'TEST';
      6   insert into table1 values my_rec;
      7  END;
      8  /
    PL/SQL procedure successfully completed
    SQL> select * from table1;
       ID DESCR
        1 TESTWorks with UPDATE too :
    SQL> DECLARE
      2   my_rec table1%rowtype;
      3  BEGIN
      4   my_rec.id := 2;
      5   my_rec.descr := 'TEST2';
      6   update table1 set row = my_rec where id = 1;
      7  END;
      8  /
    PL/SQL procedure successfully completed
    SQL> select * from table1;
       ID DESCR
        2 TEST2

  • Problem in using AWS model for PI interface

    Hi
    We want to consume XI inbound interface for a 3rd party web service in web dynpro via AWS model; we can create the model class from the wsdl file imported from PI interface; but facing some issue in configuring the logical destination as we don't have any wsdl url from PI which we can use in the dynamic proxy configuration.
    Thanks in advance.
    Sudip

    Hi Sudip
      Can you please tell me how did you resolve this issue? We are running into the exact same problem.
    Thanks
    Preet

  • Always use URL Rewriting for session tracking?

    All you JSP guru:
    I am working on a JSP project that requires session tracking. I have successfully implements session tracking with both cookies or URL rewriting. I know that with the HttpSession object, it will always try to use cookie first, if that's disabled, then it'll automatically switch to URL rewriting. However, is there a way to force the HttpSession object to ALWAYS use URL rewriting instead of cookies? I have searched for an answer for a long time and haven't been able to found a solution. Is it possible at all? Thank you very much.

    i was going to say that WebSphere always uses URL rewriting if you enable it at all, but someone beat me to it (indirectly) :-)
    however, that seemed to me to be a violation of the spec, which seemed to imply the behaviour you're describing (only use URL rewriting if cookies are not supported on the current client)
    here's a response someone else made on a websphere newsgroup to a statement in that regard:
    I believe you are technically correct. However from my
    experience, I think the spec if flawed in this area since
    there is no reliable way of determining whether the
    client browser supports cookies. The authority on
    cookies (www.cookiecentral.com) says:
    "To properly detect if a cookie is being accepted via
    the server, the cookie needs to be set on one HTTP
    request and read back in another. This cannot be
    accomplished within 1 request."
    This is asking too much of a servlet engine
    implementation. Even if it did submit a request for this
    purpose, the user could refuse the cookie. So
    then technically the browser supports cookies, but the
    servlet engine infers it doesn't. So if the servlet engine
    infers the browser does not support cookies and so
    encodes the URL, it is again out of spec because the
    browser really does support cookies. By doing it
    however encoding is configured makes things simpler,
    robust, consistent and avoids the flaw.
    My opinion.so, mostly i'm just rambling, but if you're using websphere, you should get the behaviour your boss wants. if you're using something else, i suppose there's a chance it'll "violate" the spec in this same, potentially helpful way.
    btw, i remember somebody else complaining that URL rewriting is less secure than cookies, but i kinda think they're about equal. it seems like either could be intercepted by a sniffer and then used to spoof. but i'm no expert in that stuff...

  • How to use one variable for 2 datatype inside class

    Dear all
    i have create 2 class GDI and OGL need use use in M_VIEW as per condition
    in the class M_VIEW (example below)
    #define M_FLAG 1
    class GDI {public: int z;};
    class OGL{public: double z;};
    // in class M_VIEWi need to use GDI or OGL as per user condition
    class M_VIEW{
    public:
    #if (M_FLAG == 1)
    GID UseThis;
    #else
    OGL UseThis;
    #endif
    this is work but it always it take OGL. of if i change condition it take GDI only. but i need to use it runtime as per user choice.
    how to switch GDI to OGL, and OGL to GDI on runtime ;
    is that possible to change M_FLAG  value on run time or is there any other way to achieve it.
    i have try with polymorphism also. switch is ok but all function does not work with dll. when call function on mouse move or some other event it take base class virtual function. it doesn't goes to derived class function. don't know why?
    base class function like this and does not have any variable. all function are virtual.
    virtual void MoveLine(POINT pt1, POINT pt2){};
    virtual void DrawLine(POINT pt1, POINT pt2){};
    please help.
    Thanks in Advance.

    Well, #define, and #if are compile time only constructs.  Technically they are processed before you program is compiled (that is why they are called preprocessor directives).  If you need to support both flavors at runtime you will need a different
    approach.
    Inheritance/polymorphism could be a good approach here, but I don't really understand what you are trying to do well enough to say for sure.  Based on guesses about what you want, here are some thoughts.
    class GDI {public: int z;};
    class OGL{public: double z;};
    class M_VIEW_BASE {
    virtual void MoveLine(POINT pt1, POINT pt2) = 0;
    virtual void DrawLine(POINT pt1, POINT pt2) = 0;
    class M_VIEW_GDI {
    GDI UseThis;
    void MoveLine(POINT pt1, POINT pt2) override {}
    void DrawLine(POINT pt1, POINT pt2) override {}
    class M_VIEW_OGL {
    OGL UseThis;
    void MoveLine(POINT pt1, POINT pt2) override {}
    void DrawLine(POINT pt1, POINT pt2) override {}
    std::unique_ptr<M_VIEW_BASE> drawBase;
    enum DrawMode { DrawGdi, DrawOgl };
    extern "C" __declspec(dllexport) void Init(DrawMode whichMode) {
    if (drawMode == DragGdi) {
    drawBase.reset(new M_VIEW_GDI);
    } else if (drawMode == DrawOgl) {
    drawBase.reset(new M_VIEW_OGL);
    } else {
    throw std::runtime_exception("whoops");
    extern "C" __declspec(dllexport) void MoveLine(POINT pt1, POINT pt2) {
    drawBase->MoveLine(pt1, pt2);
    extern "C" __declspec(dllexport) void DrawLine(POINT pt1, POINT pt2) {
    drawBase->DrawLine(pt1, pt2);

  • How to use lz4 compression for RAW file inside DNG ?

    I know DNG supports zip compression. However, I want to use lz4 compression, as I am saving the file in realtime, and I cannot see any zip library matching the performance of lz4 for 16-bit RAW.
    In my case this is 12-bit data with 4 bits set to zero.

    Is there a study that compared the encoding speeds of the 3 algorithms available for RAW files ?
    LZW, Packbits, Deflate.
    I think Lossless JPEG can also work with 1 plane setting.
    Also, looking at the dng_validate code, and the calls to relevant libraries, I see that the code seems to deal only with byte boundaries.
    Are any of these algorithms optimized for 10,12,14-bit RAW data ?
    I am trying to encode 203 MBps of data. Intel IPP would be an option, but its obviously nicer if DNG SDK can provide whats needed for free with some tweaking.

  • Dynamic Name for Yellow Interface Table

    Hi All,
    Can anybody guide me how to use dynamic name for Yellow Interface Target Table.
    Eg: T_SESSIONID.
    I tried
    1)Refreshing the SESSIONID in a Variable V1 and using T_#V1 directly
    2) Refreshing the T_#V1 in a Variable V2 and using #V2
    But its not creating properly.
    Please guide.

    You want to create dynamic target table name right?
    You can refresh a variable like #GET_SESSION
    #GET_SESSION= SELECT <%=odiRef.getSession("SESS_NAME")%> FROM DUAL
    My tmp table name like TMP_#GET_SESSION
    then in your package refresh #GET_SESSION variable and you can use it.
    I hope this can be helpful
    Thanks

  • Possible? Using External Definitions for data type/message type definitions

    Hi all,
    i want to use external definitons in my own data type definitions. Is that possible? And if yes, how?
    I imported many definitions via a mass import. Now I also want to use these definitions for further interfaces (than the imported ones). The most convenient would be of course to just use them as a custom created type. Can I somehow "convert" an external definition to a data type/message type?
    KR
    Felix

    Hello Felix,
          The External defination which you has been imported that cant use in DT and MT but yeah you can use this in Service interface.
    you cant modify that External defination if you want to do that then 1st of all modify it and then reimport it as an another external defination.
    and creating service interface with this ED you can use it in your message mapping .
    i hope this will help to you to clear your doubt.
    Monica

  • Bind variable inside a package

    Can we declare a bind variable inside a package specification?
    CREATE OR REPLACE PACKAGE GET_EMPLOYEEDETAILS
    IS
    PROCEDURE GET_FIRSTNAME(E_ID IN EMPLOYEES.EMPLOYEE_ID%TYPE, F_NAME OUT EMPLOYEES.FIRST_NAME%TYPE);
    VARIABLE O VARCHAR2(20);
    END GET_EMPLOYEEDETAILS ;
    CREATE OR REPLACE PACKAGE BODY GET_EMPLOYEEDETAILS
    IS
    PROCEDURE GET_FIRSTNAME(E_ID IN EMPLOYEES.EMPLOYEE_ID%TYPE, F_NAME OUT EMPLOYEES.FIRST_NAME%TYPE)
    IS
    BEGIN
    SELECT FIRST_NAME INTO F_NAME FROM EMPLOYEES WHERE EMPLOYEE_ID = E_ID;
    DBMS_OUTPUT.PUT_LINE(F_NAME);
    END;
    END GET_EMPLOYEEDETAILS;
    Output:
    ERROR at line 4: PLS-00103: Encountered the symbol "VARCHAR2" when expecting one of the following:
      := . ( @ % ; not null range default character
    The symbol ":=" was substituted for "VARCHAR2" to continue.
    2. IS
    3. PROCEDURE GET_FIRSTNAME(E_ID IN EMPLOYEES.EMPLOYEE_ID%TYPE, F_NAME OUT EMPLOYEES.FIRST_NAME%TYPE);
    4. VARIABLE O VARCHAR2(20);
    5. END GET_EMPLOYEEDETAILS ;
    6. /
    or is there any alternative for bind variables inside an package
    Thanks in advance
    Message was edited by: 1009739

    The "VARIABLE O VARCHAR2(20);" syntax is the way SQLPlus declared bind variables - it is specific to the client. Because PL/SQL packages and procedures are server code that continue past sessions, its only access to the client environment is what the client gives it - it can't go and create a bind variable in the client.
    PL/SQL procedures, functions and packages run from lots of environments, so they cannot access bind variables inside their body - you have to pass any external variables as parameters.
    Anonymous PL/SQL blocks can access bind variables.
    You can declare package public global variables - just leave out that "VARIABLE". E.g.
    CREATE OR REPLACE PACKAGE GET_EMPLOYEEDETAILS
    IS
    PROCEDURE GET_FIRSTNAME(E_ID IN EMP.EMPNO%TYPE, F_NAME OUT EMP.ENAME%TYPE);
    O VARCHAR2(20);
    END GET_EMPLOYEEDETAILS ;
    For local variables in your procedure, just put them between the IS and BEGIN. Using them in SQL inside the PL/SQL automatically uses them as a bind variable.
    create or replace PROCEDURE GET_FIRSTNAME(E_ID IN EMP.EMPNO%TYPE, F_NAME OUT EMP.ENAME%TYPE)
    IS
      O VARCHAR2(20);
      O2 VARCHAR2(21);
    BEGIN
      O := 'FR%';
    SELECT ENAME INTO F_NAME FROM EMP WHERE EMPNO = E_ID and ENAME like O;
    O2 := F_NAME || '2';
    DBMS_OUTPUT.PUT_LINE(F_NAME);
    END;
    O is bound in the query.
    To access bind variables from anonymous PL/SQL, first declare them in the calling environment. In SQL Plus that's
    VARIABLE O VARCHAR2(20);
    In Pro*C it's
    EXEC SQL BEGIN DECLARE SECTION;
      char[21] O
    EXEC SQL END DECLARE SECTION;
    Then reference it in anonymous PL/SQL with a colon as prefix:
    BEGIN
    SELECT FIRST_NAME INTO :O FROM EMPLOYEES WHERE EMPLOYEE_ID = E_ID;
    END;
    This only works for anonymous blocks (starting with BEGIN or DECLARE). As I said, PL/SQL procedures, functions and packages cannot see bind variables from the calling environment

  • Using same Idoc type & Message type for 2 Interfaces

    Hi all,
    we have 2 interfaces which uses same Idoc type, message type & Partner No.Only Process code is going to different according to the posting logic.
    How can we differentiate both while posting idocs to not mess up each other .
    Regards

    Hi all,
    Say example:
    Interface 1 is invoice coming from legacy system to SAP and i have to use AAA.BBB Idoc
    Interfaces 2 is accrual coming from legacy system to SAP and i have to use AAA.BBB Idoc
    So i am creating partner No with LS_LEGACY and with 2 inbound entries one for each.
    Even though i am using the same Idoc types but inside those the process codes are different because they are different in posting logic.
    Issue:
    From XI perspective i can't differentiate them saying like Invoice interface should execute the entry in the partner profile with invoice process code and accrual interface with accrual process code.
    My Idea is to design like this...
    Using the  Message Code option, While creating partner profile give the MESCODE and  in Mapping provide the same MESCODE.
    So that even thought i am using the same partner No with same message type & basis types for 2 scenarios, the right interface will trigger the right process code based on the MESCODE mentioned in mapping by carrying the control record values
    Please let me know ur views
    Regards

  • Using J-meter for testing PI interfaces

    Hi all,
    I am planning to use j-meter for performance testing of PI interfaces. The concerned interfaces have an abap proxy to trigger the message at the sender SAP system. The receiver end is a database.
    Need information on how to use/configure the j-meter for this scenario. Also, using j-meter can we send message payload to integration engine directly or is it sent to through adapter engine only?
    Any kind of help is appreciated.
    Thanks,
    Amit

    Thanks for the response Ajay.
    I have configured the j-meter to send http request to inegration engine of PI.
    The request xml that I am sending is as follows:
    <SOAP:Envelope  xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/"> 
    <SOAP:Header>
    <SOAP:Main xmlns:SAP="http://sap.com/xi/XI/Message/30"
    versionMajor="003" versionMinor="000" SOAP:mustUnderstand="1">
    </SOAP:Main>
    </SOAP:Header> 
         <SOAP:Body>
              <ns1:UnitOfMeasure xmlns:ns1="urn:sapappl:mdm:cp:eame:masterdata:uom:620"> 
                   <Record>
                        <FinishedMaterialCode>000000000000000233</FinishedMaterialCode>
                        <BaseUOM>KG</BaseUOM>
                        <AlternateUOM>GEB</AlternateUOM>
                        <UnitsInAlternateUOM>100</UnitsInAlternateUOM>
                        <UnitsInBaseUOM>2268</UnitsInBaseUOM>
                        <Active_Deleted></Active_Deleted>
                   </Record>
              </ns1:UnitOfMeasure>
         </SOAP:Body>
    </SOAP:Envelope>
    I am getting the following response from the XI:
    <SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
    <SOAP:Header>
    </SOAP:Header>
    <SOAP:Body>
    <SOAP:Fault xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/"><faultcode>SOAP:Client</faultcode><faultstring>Error during parsing of SOAP header</faultstring><faultactor>http://sap.com/xi/XI/Message/30</faultactor><detail><SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1"><SAP:Category>XIProtocol</SAP:Category><SAP:Code area="PARSER"/><SAP:P1/><SAP:P2/><SAP:P3/><SAP:P4/><SAP:AdditionalText/><SAP:ApplicationFaultMessage namespace=""/><SAP:Stack>System error in parser
    </SAP:Stack></SAP:Error></detail></SOAP:Fault>
    </SOAP:Body>
    </SOAP:Envelope>
    Any pointers as to why PI is not able to parse the request header?
    Thanks,
    Amit

  • ASA9.1 how to use route-lookup instead of "NAT-lookup" for egress interface on non-identity NAT

    Hi,
    I have an ASA firewall with three interfaces, inside, outside and Link.
    I have a situation where I need the ASA to perform the following nat rules:
    from "Inside" to "Link" - any source to destination 192.168.51.0/24 - translate source to 10.0.0.19
    from "inside" to "outside" - any source to any destination - translate source to "interface" (internet navigation)
    from "inside" to "outside" any source to 192.168.51.0/24 - translete source to 10.0.0.17
    This is what I am trying to get working:
    nat (any,TEF) source dynamic any 130.130.0.19_nat destination static obj_192.168.51.0 obj_192.168.51.0
    nat (any,outside) source dynamic any 130.130.0.17_nat destination static obj_192.168.51.0 obj_192.168.51.0
    The problem is that the "outside" route to 192.168.51.0 is an alternative route over a VPN tunnel. I'm using sla monitor, so when the "Link" interface is out, the route table changes the network 192.168.51.0/24 to be reachable over the outside interface. but ASA is using the NAT rule to perform "egress interface lookup" instead of route-lookup.
    I know about the command route-lookup on the NAT configuration, but I need to translate the source address and when I try to use the route-lookup command I get an error message:
    ERROR: Option route-lookup is only allowed for static identity case
    Anybody has some suggestion?
    Thanks

    Hi Julio,
    Thank you for the reply.
    It didn't work either.
    Here are the options I get when I use the specific interfaces (using "source dynamic"):
    configure mode commands/options:
      description  Specify NAT rule description
      inactive     Disable a NAT rule
      net-to-net   Net to net mapping of IPv4 to IPv6
      service      NAT service parameters
    If I try to use source static:
     nat (inside,TEF) source static inside_nat 130.130.0.19_nat destination static obj_192.168.51.0 obj_192.168.51.0 route-lookup
    ERROR: Option route-lookup is only allowed for static identity case

  • Which Event Classes i should use for finding good indexs and statistics for queries in SP.

    Dear all,
    I am trying to use pro filer to create a trace,so that it can be used as workload in
    "Database Engine Tuning Advisor" for optimization of one stored procedure.
    Please tel me about the Event classes which i  should use in trace.
    The stored proc contains three insert queries which insert data into a table variable,
    Finally a select query is used on same table variable with one union of the same table variable, to generate a sequence for records based on certain condition of few columns.
    There are three cases where i am using the above structure of the SP, so there are three SPS out of three , i will chose one based on their performance.
    1) There is only one table with three inserts which gets  into a table variable with a final sequence creation block.
    2) There are 15 tables with 45 inserts , which gets into a tabel variable with a final
    sequence creation block.
    3)
    There are 3 tables with 9 inserts , which gets into a table variable with a final
    sequence creation block.
    In all the above case number of record will be around 5 lacks.
    Purpose is optimization of queries in SP
    like which Event Classes i should use for finding good indexs and statistics for queries in SP.
    yours sincerely

    "Database Engine Tuning Advisor" for optimization of one stored procedure.
    Please tel me about the Event classes which i  should use in trace.
    You can use the "Tuning" template to capture the workload to a trace file that can be used by the DETA.  See
    http://technet.microsoft.com/en-us/library/ms190957(v=sql.105).aspx
    If you are capturing the workload of a production server, I suggest you not do that directly from Profiler as that can impact server performance.  Instead, start/stop the Profiler Tuning template against a test server and then script the trace
    definition (File-->Export-->Script Trace Definition).  You can then customize the script (e.g. file name) and run the script against the prod server to capture the workload to the specified file.  Stop and remove the trace after the workload
    is captured with sp_trace_setstatus:
    DECLARE @TraceID int = <trace id returned by the trace create script>
    EXEC sp_trace_setstatus @TraceID, 0; --stop trace
    EXEC sp_trace_setstatus @TraceID, 2; --remove trace definition
    Dan Guzman, SQL Server MVP, http://www.dbdelta.com

  • How to overcome view changes in bdc session method  using recording ?

    how to overcome view changes in bdc session method  using recording ?
    ex-for mm01 in recording if i selected views basic data1 and basic data2.
    i seheduleded for background for after 3 days .
    if any body changes views by selecting other views also.
    how to overcome this with out programming ?
    is there any settings ?

    Hi,
    I am attaching few threads.Hope these will help you.
    If there are any error records in session, all those error records will get poulated in log .SM35 and after the session is completed , u can see error records which can be corrected and reprocessed again
    We have the structures BDCLD and BDCLM, which will capture the log details inthe session. Firstly, sesssion should be processed. After that log will be created. Then caputure the information into an internal table using BDCLM and BDCLD.
    and refer the link.
    error correction in bdc session
    regards
    Madhu

Maybe you are looking for

  • How do i make an image pause in a flash movie clip

    Please can someone help me. I am trying to find out how to pause or stop an image in a basic flash movie clip,  after it has entered from one side and before it exits the other side. I have been trying to work it out myself for three days but no joy.

  • IPad Facebook issues with Safari

    Upgraded our iPad2 to 5.0.1 and when we now access Facebook via Safari, the video in Facebook now loads over the text. According to a Genius Bar guy at our local Apple store, this is a Facebook issue. I don't want to use the new Facebook app as it's

  • Settlement rule - Internal orders

    Hi all Where do I define an automatic settlement rule for settlement of an internal order to a GL account?  I do not find any strategy sequences that would settle to a GL account.... I know that I can use those strategy sequences for cost centers, WB

  • Add a new tab in an existing  Tab Page Group

    Hi All, I have already added a tab in the existing Tab Page Group, the tab is appearing on the screen along with the rest of the standard tabs but i am unable to get the field group under the customized tab page. For that we have created a Zstructure

  • Will there be a 802.11n enabler for my core duo MBP in the future????

    I bought this mbp for 2400. and you are telling me i cant even take advantage of the 802.11n when it comes out. Does anyone have NEWS on whether the core duos will have support for the 802.11n.