Multiple POST-MAPPING Processes Code Generation BUG

We are testing OWB 10gR2, and we were very happy to see that there is option to include more than one postmapping operator.
The idea is to create mapping with two post-mapping operators and that:
- one procedure is executed in case of 'Post-Mapping Process Run Condition' = ON ERROR
- and other procedure in case of 'Post-Mapping Process Run Condition' = ON SUCCESS.
But, after implementation of this case, we were dissapointed. We discover that neither procedure is executed.. ?!?!
After analyzing generated code in 'finalize' method there is code like this:
IF NOT get_abort THEN
IF get_abort THEN
     BEGIN
As you can see this condition will never bee true ?!?
Doe's anyone have same problem?

1) If you have somehow got multiple post-mappings working, I would consider that to be buggy behaviour that you cannot depend on for future releases or upgrades. As such, building a solution that depends on this has risk.
2) You could always build a user-defined custom transformation that takes a list of tables to truncate and does so. Something like (untested, uncompiled, seat-of-the-pants written right here example to get you started):
create or replace procedure trunc_tables(tablist varchar2)
is
local_tablist varchar2(2000) := tablist;
this_Table varchar2(30);
nextindex number := 1;
begin
nextindex := instr(local_tablist,',');
while nextindex != 0 loop
this_table := substr(local_tablist,1,nextindex-1);
execute immediate 'truncate table '||this_Table;
local_tablist := substr(local_tablist,nextindex+1);
nextindex := instr(local_tablist,',');
end loop;
-- if no trailing semicolon there is still one table left
if length(local_tablist) > 0 then
execute immediate 'truncate table '||local_tablist;
end if;
end;
You could then reference this in your post-mapping procedure with a call to trunc_Tables('table1,table2,table3'), and could re-use this code across all mapping that need it.
Of course, if you have a lot of mapping-specific stuff to do then you might need to build custom transformations for each mapping that need to do different things as part of their post-process.
Mike

Similar Messages

  • Post-mapping process error

    I have built all of my process in v9.0.2.62.3 except for once the row is loaded into my staging table, I want to delete this row from the source. I was trying to use the post-mapping process to call a procedure that would perform the deletion. However, I can not get the post-mapping process to work.
    The manual states to add a post-mapping process operator to a mapping:
    Drop a Post-Mapping Process operator onto the Mapping Editor canvas.
    Select the appropriate procedure from the selection list. This were I select a procedure called drop_ind with one input parameter, v_ind_id, of type number.
    Connect the output attribute of a source operator to the INOUTGRP1 of the Post-Mapping Process operator.
    This is where things start to go wrong with the manual. There is no INOUTGRP1, but only an INPUTS. If I try and attach the target column to the INPUTS, I get an API8009 cannot add attributes to POSTMAPPING INPUTS error. So I attach my target column directly to the input parameter
    Rename the operator:
    This goes well enough.
    Then I try and validate, and I get the following message wehn I try to generate the mapping :
    Code cannot be generated.
    Specify another operating mode or see validation messages for details.
    When I validate I get :VLD-2451 Illegal connection to POSTMAPPING. details = Illegal connection to POSTMAPPING.
    Obviously, I am doing something wrong, but what?

    Matthew,
    First a question, what are you trying to add to the post mapping process? The ID of the single row that is processed?
    In that case, you will have to rethink the strategy. What happens in a post map process (and the rest of the map) is the following:
    1) execute any pre mapping processes
    2) execute the main body of the mapping (this is you diagram excluding pre and post mapping processes)
    3) execute the post mapping process
    This means that the post mapping process will be run whenever the rest of the mapping is complete.
    So to do what you want, you can use the post mapping process but you would add a marker to every inserted record and then in the post map procedure delete all the ones that have this marker in the target from the source.
    In that case you would need any parameters from your map into the procedure and you should be all set.
    Hope this helps,
    Jean-Pierre

  • Code generation bug in C++ 5.0

    The enclosed test program generates incorrect code
    with C++ 5.0 when -g is not used.
    The problem showed up in our production code
    and concerns any reference counted smart pointer
    implementation.
    The test program is specifically written to demonstrate
    the problem and diagnose a reference miscount.
    With any optimization at all (without -g, and/or with
    any level of -O including no -O) it generates
    incorrect results. With -g the results are correct.
    gcc compiles this correctly with any optimizations
    selected.
    // main.cc
    // test program to demonstrate code generation bug in
    // Sun WorkShop Compilers C++ 5.0
    // bug exhibited as of 27th April 2001
    // relevant patches applied:
    // 107289-05 Packages: SPROcc
    // 107390-12 Packages: SPROtl7x, SPROsclx, SPROtll7x, SPROcplx, SPROlgcx
    // 107311-12 Packages: SPROscl, SPROtll7, SPROtlbn7, SPROcpl, SPROgc, SPROlgc
    // 107357-11 Packages: SPROlang
    // correct behaviour with CC -g:
    // CC -g main.cc -o main; ./main
    // incorrect behaviour with CC (no -g):
    // CC main.cc -o main; ./main
    #include <stdio.h>
    class O {
    public:
    inline O() : m_refCount(0) { };
    inline void ref() { m_refCount++; }
    inline void deref() { m_refCount--; }
    inline int refCount() { return(m_refCount); }
    private:
    int m_refCount;
    class R {
    public:
    inline R() : m_object(0) { };
    inline R(const R &r) : m_object(r.m_object) { if (m_object) m_object->ref(); }
    inline R(O *o) : m_object(o) { if (o) o->ref(); };
    inline ~R() { if (m_object) m_object->deref(); }
    inline R &operator =(const R &r) {
    if (this == &r) return(*this);
    O *o = m_object;
    if (m_object = r.m_object) m_object->ref();
    if (o) o->deref();
    return(*this);
    inline R &operator =(O *n) {
    if (m_object == n) return(*this);
    O *o = m_object;
    if (m_object = n) n->ref();
    if (o) o->deref();
    return(*this);
    inline operator O *() const { return(m_object); }
    inline O *operator ->() const { return(m_object); }
    private:
    O *m_object;
    class B {
    public:
    inline B(const R &r) : m_ref(r) { };
    inline const R &ref() { return(m_ref); }
    private:
    R m_ref;
    R buggy(int notnull, B &b)
    return(notnull ? b.ref() : 0); // BUG HERE
    int main()
    O o;
    R r(&o);
    B b(r);
    int i;
    for (i = 0; i < 20; i++) {
    R s;
    s = buggy(!0, b);
    printf("refCount: %d (should be 2)\n", o.refCount());

    How do I file a bug report for this and get
    a bug ID assigned?

  • Post Mapping Process Execution

    Hi,
    I have a post mapping process for a mapping.
    The post mapping process gets executed even when the mapping results in an error.
    I wanted to know is there any parameter that needs to be set so that post mapping process would be executed only on successful execution of mapping.
    The parameter "Post Mapping Process Run Condition" is set to On Success.
    Also my Mapping performs Set based Operation
    Thanx in advance,
    Sourabh

    Hello Kishan,
    The only way to archieve this currently is to create a super-procedure that calls all your stored procedures in sequence, and use the super-procedure with the post mapping operator.
    Regards, Hans Henrik

  • Code Generation Bug in Forms 10g

    We're hitting this goofy bug in Forms 10g (also occurs in 9i) code generation of the On-xxx triggers. I have an "obj" package that declares an index-by array type that's used by multiple packages, including a "qry" package and "dml" package (in good ol' Steven Feuerstein tradition). The On-xxx triggers pass this type into packaged procedures that perform the Insert, Update, Delete and Lock required by Forms. These DML routines are in the "dml" package.
    When we look at the generated trigger code, we see that the index-by array type is incorrectly referenced as dml.obj.idx. That is, since the On-xxx trigger is calling DML routines in the "dml" package, it's improperly qualifying the reference with the dml package name. The On-xxx trigger code gets regenerated every time we do Compile Module. We tried doing Compile All, which doesn't regenerate the On-xxx triggers; but neither does it produce an fmx file.
    Is this a known bug, and is there a workaround? I can't move the index-by array type declaration to the dml package because it's used by multiple packages. If I fix it in one place, I break it in another. I can't have multiple declarations of this type in multiple packages either, because I'm passing it around between the packages, and they're not type-compatible at that point.

    It looks like the Forms Wizard is the real culprit. When we looked at the Property Palette for each On-xxx trigger, where the target procedure is specified, along with the parameters, is where the malformed dml.obj.ref code appears. Once we edited those entries, the On-xxx triggers generated correctly.

  • Code generation bug in Sun Studio 12

    Hi,
    The following program prints `Failure' when compiled with -xO4 where nothing should be printed (when compiled with no optimization or -xO2). It looks to me that the first comparison `buggy_routine' against 0x80 is returning True where it should return False.
    #include <stdlib.h>
    #include <stdio.h>
    typedef unsigned long long int      EIF_NATURAL_64;
    typedef unsigned char   EIF_BOOLEAN;
    typedef int EIF_INTEGER_32;
    typedef char * EIF_REFERENCE;
    char s[] = "9223372036854775808";
    void buggy_routine (EIF_REFERENCE Current, EIF_NATURAL_64 arg1)
        EIF_NATURAL_64 tu8_1;
        tu8_1 = (EIF_NATURAL_64) ((EIF_INTEGER_32) 128L);
        if ((EIF_BOOLEAN) (arg1 <= tu8_1)) {
        } else {
            if ((EIF_BOOLEAN) (arg1 <= ((EIF_NATURAL_64)  9223372036854775808ull ))) {
            } else {
                  printf("Failure\n");
    int main (int argc, char ** argv, char **envp ) {
        EIF_NATURAL_64 loc2 = (EIF_NATURAL_64) 0;
        loc2 = (EIF_NATURAL_64) atoll(s);
        buggy_routine ("s", loc2);
    }To reproduce:
    cc -xO4 bug.c -o bug ; ./bug
    It fails on both 32 and 64-bit code generation for x86. I haven't tried on Sparc as I need to install Sun Studio 12. Is this a known issue? Is there an easy workaround?
    I tried with Sun Studio 11 and it worked just fine there.
    Regards,
    Manu
    PS: I've tried with both version (the first is the one from the default installation) and the second after I noticed there were some patches available:
    cc: Sun C 5.9 SunOS_i386 Patch 124868-01 2007/07/12
    cc: Sun C 5.9 SunOS_i386 Patch 124868-02 2007/11/27

    An issue filed at bugs.sun.com does not go directly into the bug database. It is evaluated, and if it turns out the report is actually a bug not previously reported, goes into the database. You get a notification and chance to reply after the report is evaluated.
    In this case, I picked up your report myself, and filed the bug. The bug ID is 6654314, and will be visible at bugs.sun.com in a day or two.

  • Code generation bug

    Hi,
    I have the following version of `cc':
    cc: Sun C 5.7 Patch 117837-05 2005/07/19
    Here is the file `bug.c':
    #include <stdlib.h>
    #include <stdio.h>
    void my_buggy_routine (char * Current, int arg1) {
    int loc1 =-arg1;
    if ((unsigned char)(loc1 == ((int) 0x80000000L))) {
    loc1 = -(loc1 / ((int)10L));
    printf ("Value is %d.\n", loc1);
    int main (int argc, char ** argv, char **envp ) {
    if (argc > 1) {
    my_buggy_routine (NULL, atoi (argv[1]));
    If you perform the following command line:
    cc -xO2 bug.c -o bug ; bug -2147483648
    You expect to get:
    Value is 214748364
    However you get:
    Value is -214748364
    If you remove the optimization when compiling then everything works fine.
    I've noticed that if I change the line:
    if ((unsigned char)(loc1 == ((int) 0x80000000L))) {
    by
    if (loc1 == ((int) 0x80000000L)) {
    then it works fine.
    Is it a known bug?
    Regards,
    Manu

    I forgot to say that it was on Solaris 10 for x86 running on a AMD64. Both 32bits and 64bits version of the program exhibit the problem.
    I've tried on Solaris Sparc with:
    cc: Sun C 5.7 2005/01/07
    and it works fine.
    Regards,
    Manu

  • Problems with pre-mapping process in owb 9i

    Hi,
    I was trying to use the pre-mapping process operator in owb 9i. Problem is that the manual does not specify how the inputs need to be connected to this operator.
    Following is what I went through -
    I created a mapping table operator and a mapping dimension operator and connected these two. Then i created a pre-mapping process operator selecting the LTRIM function. Further I connected one of the table attributes to this pre-mapping operator as input and connected the output of this pre-mapping operator to the appropriate dimension operator attribute.
    On performing Validate, following error message was flashed -
    VLD-2451 : Illegal connection to pre-mapping process operator
    I am trying to learn how to use OWB 9i from the manual. So my interpretation of the use of the pre-mapping process operator may be wrong.
    In any case kindly help,
    Thanks,
    Saju

    Hi,
    Essentially the pre (and post) mapping processes are executed before and after the mapping logic. These are separate procedures in the generated package and are "stand alone" from the main package procedure holding the actual mapping diagram.
    If you want to use LTRIM, there are 2 supported ways:
    1) use an expression, this means you feed the column you want to do the expression on into the expression operator, open the code editor and select from the transformations (or type ltrim......) and then link the result to the target object
    2) use a transformation operator, choose ltrim from the Oracle library and connect the operator as I stated in use case 1
    We do not encourage you to use a filter to do transformations, it is better to use the operators that are intended for transformations.
    Thanks,
    Jean-Pierre

  • Post mapping for Reject records!!

    hi
    I would like to capture all the rejected records when I am loading the fact table. I know I can get this information from WB_RT_ERRORS and WB_RT_ERROR_SOURCES. But, what I would like to do is to have Post mapping process which and the action set to "on error", I would like to capture all the reject records into a flat file. Is there a way I can identify reject in the post mapping process other than referring to WB_RT_ERRORS and WB_RT_ERROR_SOURCES in runtime.Because this is what client is requesting for , Any help on this would be greatly appreciated.
    Please mark me directly also since I do not get emails sometimes through the distribution list.
    Thanks in Anticipation,
    Balaji

    Reposting the response from M.Van Der Wiel:
    2 comments:
    - Ideally, you would explicitly capture the errors, and insert those into a separate table. This would enable you to run the mapping in set-based mode (traditionally this means: no error logging) for optimal performance, and you still get the errors. This does mean you would have
    to explicitly design what may go wrong, so you should know what your data looks like. Your flat file could then be created out of the explicit error records, which is probably a bit easier (and faster) than to go from the WB_RT_ERRORS.
    - The mapping errors out once the maximum number of errors is reached (as passed at runtime; is defaulted by the configuration setting). Anything in between 0 and the maximum number of errors will result in a status warning.
    To do what you want to do, you could indeed use the post mapping process, but perhaps you want to design a separate mapping to write the errors to a file, and use a process flow (with conditional sequencing) to run the second mapping (only if the first one fails or results in a warning). This may be a nicer solution than to write the code manually and implement it as a standalone post-mapping process.
    Finally, notice that WB_RT_ERRORS and the like are not tables you should directly query (they will change in the future). Rather you should use the ALL_RT_<something> views to access the same information. Going forward, as the customer desires to migrate to a later release, it is
    more likely that their customizations still work.
    Thanks,
    Mark.
    PS.
    Another possiblity - if the errors violate a key constraint - would be to configure the mapping target with the constraints parameter set to false and redirect the error records to a error table (this can be done in the mapping configuration - sources and targets section). This configuration will disable the constraints during the load and re-enable them after the load, putting the offending records in the error table. You can then download the records from the error table into a flat file in a separate mapping or in a post-mapping process.
    Regards:
    Igor

  • POST MAPPING TO ACCESS RUN TIME  REPO

    Hi all,
    In my mapping , I have a post mapping process wherein, I want to identify the execution status of the mapping wherein the mapping name is passed as a parameter to the following query
    SELECT
    C.RTA_STATUS,     C.RTA_SELECT
    FROM ALL_RT_AUDIT_MAP_RUNS A ,WB_RT_AUDIT C
    WHERE A.MAP_NAME=v_mapping_name
    AND A.MAP_RUN_ID = (SELECT MAX (B.MAP_RUN_ID) FROM ALL_RT_AUDIT_MAP_RUNS B WHERE B.MAP_NAME=v_mapping_name) and A.EXECUTION_AUDIT_ID = C.RTE_ID
    But I am not able to get the result in to my variables..This is very urgent can anybody please help me..
    Thanks in Advance.
    Thanks & Regards
    Azgar

    Sumana, the post-map process will run no matter what, so you can just test the current status to determine what to do.
    For example, I have a standard post-mapping procedure that logs execution details to an audit schema that centralizes collection of execution stats for all processes run in our warehouse. It goes something like this:
    procedure finalize (p_process_id in number,
    p_process_name in varchar2)
    is
    l_status varchar2(20);
    l_numread number := 0;
    l_numInserted number := 0;
    l_numUpdated number := 0;
    l_numMerged number := 0;
    l_owb_audit_id number := 0;
    l_owb_status number := 0;
    sqlStmt varchar2(2000) :=
    'begin '||
    ' :1 := '||p_process_name||'.get_selected; '||
    ' :2 := '||p_process_name||'.get_inserted; '||
    ' :3 := '||p_process_name||'.get_updated; '||
    ' :4 := '||p_process_name||'.get_merged; '||
    ' :5 := '||p_process_name||'.get_runtime_audit_id; '||
    ' :6 := '||p_process_name||'.get_status; '||
    ' end;';
    begin
    -- we use dynamic SQL to return required audit field values.
    -- This allows us to alter which values we need at a later date
    -- without impacting the deployed mappings.
    -- M.B.
    execute immediate sqlStmt
    using out l_numread, out l_numInserted, out l_numUpdated,
    out l_numMerged, out l_owb_audit_id, out l_owb_status;
    -- map OWB status values to our internal codes.
    if l_owb_status = 2 then
    l_status := 'ERROR';
    elsif l_owb_status = 1 then
    l_status := 'WARNING';
    else
    l_status := 'SUCCESS';
    end if;
    -- and end the process in the audit tables
    erscntl_audit_log_pkg.process_end(p_process_id,
    1,
    l_status,
    null,
    l_numRead,
    null,
    l_numInserted,
    l_numUpdated,
    l_numMerged,
    null,
    null,
    null,
    null,
    null,
    null,
    null,
    l_owb_audit_id);
    end;
    You can see where I am translating the status for my purposes, but you could use this to test the status instead.
    the process_name input variable is established by a standard constant in our mappings which is set with a value of get_model_name so that a change to a mapping name is automatically updated internally in the call to the pre- and post-mapping procedures;
    Cheers,
    Mike

  • Problems with pre-mapping process operator in owb 9i

    Hi,
    I was trying to use the pre-mapping process operator in owb 9i. Problem is that the manual does not specify how the inputs need to be connected to this operator.
    Following is what I went through -
    I created a mapping table operator and a mapping dimension operator and connected these two. Then i created a pre-mapping process operator selecting the LTRIM function. Further I connected one of the table attributes to this pre-mapping operator as input and connected the output of this pre-mapping operator to the appropriate dimension operator attribute.
    On performing Validate, following error message was flashed -
    VLD-2451 : Illegal connection to pre-mapping process operator
    I am trying to learn how to use OWB 9i from the manual. So my interpretation of the use of the pre-mapping process operator may be wrong.
    In any case kindly help,
    Thanks,
    Saju

    Pre-mapping process is use to perform some operations preceding to mapping operation itself.
    For example, if your mapping is designed to incrementally append data to table for the definite time interval (witch is a parameter of the map operation) you might want to perform the table data cleanup for that period. That will allow for reload data number of time.
    In this case you have to define the procedure witch perform cleanup and than include the call to that procedure as a pre-mapping process.
    Other examples of pre- and post mapping process is disabling referential integrity before loading and re-enabling them after loading.
    Anyway, OWB documentation has clear definition for pre- and post-mapping processes.

  • Problem using pre-mapping process operator in owb 9i

    Hi,
    I was trying to use the pre-mapping process operator in owb 9i. Problem is that the manual does not specify how the inputs need to be connected to this operator. Following is what I went through -
    I created a mapping table operator and a mapping dimension operator and connected these two. Then i created a pre-mapping process operator selecting the LTRIM function. Further I connected one of the table attributes to this pre-mapping operator as input and connected the output of this pre-mapping operator to the appropriate dimension operator attribute. On performing Validate, following error message was flashed -
    VLD-2451 : Illegal connection to pre-mapping process operator
    I am trying to learn how to use OWB 9i from the manual. So my interpretation of the use of the pre-mapping process operator may be wrong.
    In any case kindly help,
    Thanks
    Saju

    Pre-mapping process is use to perform some operations preceding to mapping operation itself.
    For example, if your mapping is designed to incrementally append data to table for the definite time interval (witch is a parameter of the map operation) you might want to perform the table data cleanup for that period. That will allow for reload data number of time.
    In this case you have to define the procedure witch perform cleanup and than include the call to that procedure as a pre-mapping process.
    Other examples of pre- and post mapping process is disabling referential integrity before loading and re-enabling them after loading.
    Anyway, OWB documentation has clear definition for pre- and post-mapping processes.

  • T-code to close multiple posting periods in mm

    Is there is any t-code to close multiple posting periods in mm?
    Regards,
    Surendra babu.

    Dear Surendra,
    Open & Close Posting Periods
    FI posting periods:
    IMG->Financial Accounting->Financial Accouting Global Settings->Document->Posting Periods->Open and close posting periods.
    OB52
    MM posting periods:
    Logistics->Materials management->Material master->Other->Close period
    MMPV (to open current period)
    Logistics->Materials management->Material master->Other->Post to prev.period
    MMRV (shows what is open)
    Also check OB52 for type M
    Reward Me If Helpful

  • Use ABAP code in "Decision Between Multiple Alernativesu201D in process chain

    Hi, does anybody know if it is possible to include ABAP code in formula definition when using u201CDecision Between Multiple Alernativesu201D in process chain.
    I wanted to read a specific parameter from one table in order to choose the next step in the process chain.
    If it is not possible, do you any workaround?
    Best regards,
    João Arvanas

    Hey.  You could create your own custom formula which you would code.  Then that formula is reuseable in the formula builder.  That should get you where you need to be.
    Here is a document on how to implement the custom formulas:
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/f095592f-42f7-2a10-6ab1-c836a559b48f?quicklink=index&overridelayout=true
    Hope this helps.
    Thanks

  • IdocType, Message Type & Process code for Payroll Posting

    Hi Gurus,
    In My Project, the SAP HCM is Maintained as a separate instance and rest such as FI/CO resides in ECC ERP. Now We need to Interface the HCM Instance with ECC ERP, where FI/CO resides to post Payroll Results. Hence I am writing a Technical Specs for ALE interface between SAP HCM and ECC ERP. I came to know that a standard ALE is existing for this purpose and I hereby need its Idoc type, Message Type and Process code for the same.
    Thanks in advance.
    Regards
    Vinoth Kumar.R

    Guys
    I could not use above message type/idoc type as they are not released in SAP.
      So i am again back to where i have come from. I am trying to use DESADV01 and Mess Type DESADV.
    Regards
    Srikanth M

Maybe you are looking for