Coding in transformation routine

Hi,
As per the design there will be two DSO in the data transformtion layer. One is right optimized DSO (for correct data) and another with a ERROR DSO which will contain the erronious records.
In the transformation routine if the check fails the record needs to go to the error dso and a messge need to be updated in the monitor.
Please let me know how to code this. Whether to do this by raising any exception and setting the return code.. or any other mechanism is there.
thanks,
Jugal.

As per the reqirement there are two DSO, One is for the correct data and the other one for the error records, which will be send to business later for reconcilation. In the record master data attribute will also be there. For certain condition we need to update/ insert record into master data table as well. I found some function modules to update the master data.
1  RSBCTSRM_UPDATE_MASTER_DATA
2  RSDMD_WRITE_ATTRIBUTES_TEXTS (this is working fine).
Question 2: Let me know is there any way to update the error DSO from error stack through configuration or through coding.
Edited by: jugal behera on Feb 5, 2008 11:50 PM

Similar Messages

  • Transformation routine problem - changing 2 infoobjects in 1 routine

    Dear all,
    i have coded a transformation routine which gets data from 4 infoobjects and writes into 1 infoobject.
    routine is like that:
    startdate-starttime-enddate-endtime
    routine  converts data into :  time difference / 0calmonth
    however i need to update also 0calmonth with that routine? how can i do that?
    when i define a rule, i guess it always update only one infoobject?
    thanks in advance.

    Hi John,
    sure you can. It is the same procedure as in update rules, but a start routine will only work if all your required fields are contained in the communication structure and so in the infosource. Otherwise you need to stay with the second routine.
    regards
    Siggi

  • Calling a function module from within a transformation routine

    I created a routine within a transformation and experience the following weird behavior now:
    When I call a function module within that routine, the load fails with the following error message:
    Exceptions in Substep: Rules
    When I click on the button next to this text, it point me to my function module call.
    What I do not understand is, that the following two scenarios work fine:
    - Having the same function call (with fake values) in a plain ABAP program works beautilfully
    - If I copy the content of my function module directly into my transformation routine, everything works fine as well
    I am now wondering whether the routine does not "see" the function module I am calling. The module resides in a different package. Is that a problem? Do I have to include something first?
    Here is the code that calls my FM (
    CALL FUNCTION 'Z_CA_CONVERT_US_COST'
         EXPORTING
            PSOURCEVAL                      = SOURCE_FIELDS-/BIC/USFRZMFC
            PSOURCEUOM                      = SOURCE_FIELDS-BASE_UOM
            PUSITM                          = SOURCE_FIELDS-/BIC/USITM
            PTARGETUOM                      = PRODUCTION_UOM
         IMPORTING
            PTARGETVAL                = RESULT
         EXCEPTIONS
           CONVERSION_NOT_MAINTAINED = 1
           PARTNO_NOT_FOUND          = 2
           OTHERS                    = 3.
    Thanks a lot for your help. Points will be assigned.
    Dennis

    Good catch, BI Learner. This was exactly it: when assigning the values from SOURCEFIELDS directly to the import/export parameters, you have to make sure that the types are EXACTLY the same, otherwise it will not work (the routine stops with an error when calling the FM, but there is no dump).
    Therefore, to solve my problem, I created the declarations precisely as expected by the FM and assigned the values to these fields:
    DATA:
          SOURCEVAL TYPE  /BIC/OIINVQTY,
          SOURCEUOM TYPE  /BIC/OIUSUOM,
          USITM TYPE  /BIC/OIUSITM,
          TARGETUOM TYPE  /BIC/OIUSUOM,
          CONVERTED_COST TYPE  /BIC/OIINVQTY.
    DATA PRODUCTION_UOM TYPE /BIC/OIUSUOM.
    " get the Production UOM
        SELECT SINGLE I~/BIC/USPRDUOM
          FROM /BIC/PUSITM AS I
          INTO PRODUCTION_UOM
          WHERE I~/BIC/USITM = SOURCE_FIELDS-/BIC/USITM AND I~OBJVERS = 'A'.
        IF ( SY-SUBRC = 4 ). " no records found
          "RAISE PARTNO_NOT_FOUND.
          RAISE EXCEPTION TYPE CX_RSROUT_SKIP_RECORD.
        ENDIF.
    " load the parameters
        SOURCEVAL = SOURCE_FIELDS-/BIC/USFRZMFC.
        SOURCEUOM = SOURCE_FIELDS-BASE_UOM.
        USITM = SOURCE_FIELDS-/BIC/USITM.
    " then you can call the FM
        CALL FUNCTION 'Z_CA_CONVERT_US_COST'
          EXPORTING
            PSOURCEVAL                = SOURCEVAL
            PSOURCEUOM                = SOURCEUOM
            PUSITM                    = USITM
            PTARGETUOM                = PRODUCTION_UOM
          IMPORTING
            PTARGETVAL                = CONVERTED_COST
          EXCEPTIONS
            CONVERSION_NOT_MAINTAINED = 1
            PARTNO_NOT_FOUND          = 2
            OTHERS                    = 3.
    " ... [do the rest]
    Thanks for your help,
    Dennis

  • Error in Transformation Routine

    Hi all,
    I have  written a code in transformation routine. I have debugged the code. The code which I have written is working fine. The value in 'Result' is correct and till here the code executes without any error. After that , system throws an error which I cannot understand as this is the system generated code.
    I wanted to paste the error analysis here but i dont have any option to copy from there. Message class is "RSBK". Number is 299
    Any ideas?
    Regards,
    Aisha Ishrat
    ICI Pakistan Ltd.

    Hi AI,
       As I told you earlier ... jsut copy and paste the code I sent you in the end routine ... if the end routine contains your data then we are sure that the transformations have worked fine ... if it does not contain any data then we are sure something has gone wrong during the transformation.... you cannot find the problem until you are sure where it is happening.... lets work on this and get it out of our way... I am waiting for your response.
      Another point if anything has gone wrong while doing the transformations for location then the end routine will not have location info ... this is why I suggest you to put the code above in the end routine and debug ... this will give you a fair idea as to what has happened and where the problem arises.... Hope this helps.
    best regards,
    Kazmi

  • Help in transformation routine

    I have to put an indicator for delivery block in transformation routine.
    Logic: if headed delivery block 'LIFSK' is not blank, result is 'X'.
    Here is my code which is not working:
    IF SOURCE_FIELDS-LIFSK NE ''.
          RESULT = 'X'.
        ENDIF.
    But this code is not doing anything. I tired using 'test' function in transformation, it gives abap dump.
    What is the problem. Code is in right place in transformation routine.
    A similar code for item level block is working:
    More details:
    $$ begin of routine - insert your code only below this line        -
        ... "insert your code here
    *--  fill table "MONITOR" with values of structure "MONITOR_REC"
    *-   to make monitor entries
        ... "to cancel the update process
       raise exception type CX_RSROUT_ABORT.
        ... "to skip a record
       raise exception type CX_RSROUT_SKIP_RECORD.
        ... "to clear target fields
       raise exception type CX_RSROUT_SKIP_VAL.
        IF SOURCE_FIELDS-ZZ_LIFSP ne ''.
          RESULT = 'X'.
        endif.
    $$ end of routine - insert your code only before this line         -
      ENDMETHOD.                    "compute_ZDELIBLK
    Thanks
    Jeff
    Edited by: Jeff Edwards on Aug 17, 2008 10:34 PM

    No luck.
    Error analysis
        The following checkpoint group was used: "No checkpoint group specified"
        If in the ASSERT statement the addition FIELDS was used, you can find
        the content of the first 8 specified fields in the following overview:
        " (not used) "
        " (not used) "
        " (not used) "
        " (not used) "
        " (not used) "
        " (not used) "
        " (not used) "
        " (not used) "
    ST22 / ABAP Editor :
    *-- Get field name from source field with extern posit.
      READ TABLE i_t_seg_source ASSIGNING <ls_s_seg_source>
        WITH KEY segid = i_segid.
      ASSERT sy-subrc = 0.
      IF sy-subrc = 0.
        READ TABLE <ls_s_seg_source>-t_field ASSIGNING <ls_s_field>
          WITH KEY position = l_posit_source_ex.
    > ASSERT sy-subrc = 0.
      ENDIF.
    *--  r_s_parameter-param_id has to be set out side due to type inheritance of RuleStepMapping
      CONCATENATE '<' <ls_s_seg>-y__nm '>' INTO
      c_s_connector-s__nm.
      c_s_connector-f__nm = <ls_s_field>-fieldname.
    ENDMETHOD.

  • Target value in transformation routine

    Hi
    How can I get the value of target field, which is already present, in the transformation routine?
    For Example, I have a transformation between ODS DS1 and ODS DS2. DS1 has fields DS1_F1, DS1_F2 and DS2 has fields DS2_F1, DS2_F2. Now I have written a transformation routine for target field DS2_F1 with input DS1_F1. In this routine, I want to get the value of DS2_F1, which is already present, before the result is being updated. How can I get it?
    Thanks & Regards
    Tejo

    Hi,
    Use end routine concept here .
    Regards,
    Anil Kumar Sharma .P

  • Table Declaration in Transformation Routine

    Hi all,
    I have declared a table in transformation routine as follows :
    DATA : BEGIN OF VACATIONS OCCURS 0,
           DATE TYPE D,
           END OF VACATIONS.
    System is giving following error on this :
    ' E:Tables with headers are no longer supported in the OO context.'
    What should I do now?
    Regards,
    Aisha Ishrat
    ICI Pakistan Ltd.

    Hi Al,
       Let me explain here ... because you are doing what is being told to do without actually understanding your purpose. Let me take a scenario. You want to read a database table for sales orders populate it into the internal table. Then you wnat to loop at the internal table you populated and print the output. For this what you need is an internal table where your data will be stored - simply put its a 2 dimentional array. so your data once put into the internal table would look like:
    Sales_Order  Sold_To_Party
    1                        1
    2                        3
    3                        5
    4                        1
    Now what you do is read it - which means you are going to read one line at a time, which means a structure not an internal table, which was the purpose of the header line. but since header lines are not supported you need a different work area (structure). So that when you read the first line your structure contains as follows:
    1                       1
    When you read the second line your structure or work area contains the second line:
    2                        3
    so on.....
    From the explaination above you must be clear that you need an internal table to store data temporarily and a structure to manipulate a single record. Now the cod would look like:
    DATA: it_vbak type table of VBAK.
    DATA: wa_vbak type vbak.
    Notice above that one is using a "table" while declaring and the other is not.
    Select * from VBAK into table it_vbak.
    loop at it_vbak into wa_vbak.
    note above that you are looping at the internal table and populating one record
    into the work area.
       write:/ wa_vbak-vbeln.
    endloop.
    Hope this helps. Ask if you have any more concerns.
    Best regards,
    Kazmi

  • CX_SY_NO_HANDLER triggered when call FM in Transformation Routine in BI

    Hi,
    Currently we are encountering an error whereby the Exception 'CX_SY_NO_HANDLER' will be triggered whenever we call a Function Module inside a Transformation Routine in BI.
    Previously, this FM was a Custom FM, but even after changing to a standard FM this error still happens.
    The process does not even enter into the FM, but immediately jumps to a 'Try - Catch' block of standard SAP, with the message "an exception (CX_SY_NO_HANDLER) occured".
    Hence, we need to confirm:
    does SAP/BI allow calling an FM inside a Transformation Routine?
    if yes to above, how do we avoid encountering this error when calling a FM inside a Transformation Routine.
    Your help is very much appreciated.
    Thanks you.

    Yes, you can call a FM from function module.
    Make sure your import and export parameters are of same type as defined in FM when passing values to FM from transformation.
    For example:
    in function module
    xyz type i.
    transformation
    abc type char.
    CALL FUNCTION 'dsjfh'
    EXPORT
    xyz = abc.
    Regards,
    San!

  • Retreiving old version of a change in transformation routine

    Hello Experts,
    I had made a change in a transformation routine 2 months ago.
    Due to some reasons, i want to revert the change i did in the routine.
    When i try to get the last version of the generated program, i cannot find any old version.
    Is it possible to get an old version of such a generated program?
    Thanks,
    Nitish.

    If you don't transported to target clients.. you can compare and make the adjustments in dev
    or
    SE03 - Search for Objects in Requests/Tasks - enter TRFN  - Transformation ID - select Modifiable plus released and execute .. you will see the request numbers .. expand them and try to identify the req which was transported/modified 2months ago .. and copy object type ROUT and GOTO SE16 - enter Rouitne ID  in RSAABAP and exe...
    This way you can find

  • How to know infopackage request ID in transformation routine ?

    Hi All,
    I'm looking for the ABAP code to know the infopackage request ID in transformation start or end routine
    I can see this ID when I clic on "manage" on a PSA (looks like for instance REQU_D706H24SFFUIGNKMQMPPAIJLM)
    I need it in transformation routine
    Thanks for your help
    Sebastien Lepeltier

    Sorry Sat but again with the code :
    field-symbols: <l_requnr> type any.
    data: l_requnr_fieldnm type string value 'l_requnr'.
    assign (l_requnr_fieldnm) to <l_requnr>.
    I have this error message in debug mode : Field symbol <L_REQUNR> is not yet assigned
    Thanks Joe for the answer but in
    IMPORTING
    request TYPE rsrequest
    datapackid TYPE rsdatapid
    request and datapackid are filled with information of the current DTP not infopackage source
    Sebastien

  • Test for Permitted Characters in Transformation Routine

    Hello,
    Background: There is a data quality issue when loading 3rd party data to BW, which cannot be solved at source. Therefore, initial transformation rules when loading to data warehouse level DSO, should identify and deal with error values.
    Possible Solution: Test validity of value within transformation routine via a custom function module.
    Execution: Function module would require to check lowercase character handling of target InfoObject (RSDCHABAS-LOWERCASE) and scan source value against permitted character set (RSKC).
    Questions: How can the permitted list of characters be returned within transformation routine? Is there an available delivered function module to handle accessing permitted character set?
    I would appreciate any answers to the above questions or alternative suggestions to the above strategy.
    Thanks -
    Brendan.

    There is a function module "RSKC_ALLOWED_CHAR_GET". Use SE37 to check it out.

  • REGEX statement not working in transformation routine?

    hi,
    I need to include the REGEX ABAP key word in transformation routine for one of the fields--
    FIND all OCCURRENCEs OF REGEX
    But when i include this statement it says:
    E: statement "REGEX" is not defined.check your spelling--
    but same statement when i copy in SE38 ABAP editor it works very fine--
    May i know what is the reason?
    i had tried with all possible single quotes before posting here

    Is that the entire statement?  It looks like it is interpeting REGEX as a variable.  It should look something like this:
    FIND all OCCURRENCEs OF REGEX '(\b\S+\b)(-?)' IN g_result

  • Create Multiple records in transformation routine

    Hi,
    Could anyone let me know how to do creation of multiple records (from one source record) in BI 7.0 transformation routine, E.g.
    Source record
    Cost Center   Period 01       Period 02
           1234          $30                $50
    --> (After transformation)
    Period    Cost center    Total cost
    01              1234             $30
    02              1234             $50
    Many thanks,
    Alvin

    The problem was with the following code segment:
    tmp_curr_rec_id := get_block_property( :system.current_block, current_record );
    set_record_property( tmp_curr_rec_id, :system.current_block, status, new_status );
    After omitting these two lines, the code worked properly.
    Thansk for all whoe replied.
    Regards,
    Tamas

  • Problem to call a easy function in a transformation routine

    Hi,
    I wanted to convert a string ("12") to an integer (12) in my transformation routine.
    Here the code:
    DATA: vaca_number TYPE i.
        CALL FUNCTION u2019conversion_exit_alpha_outputu2019
          EXPORTING
            input  = source_fields-vaca
          IMPORTING
            output = vaca_number.
        IF source_fields-smocker CS 'Y'.
          result = vaca_number * 120.
        ELSEIF source_fields-smocker CS 'N'.
          result = vaca_number * 240.
        ELSE.
          monitor_rec-msgid = 'ZMESSAGE'.
          monitor_rec-msgty = 'E'.
          monitor_rec-msgno = '001'.
          monitor_rec-msgv1 = 'ERROR SMOCKER UNKNOWN FOR PPS'.
          monitor_rec-msgv2 = source_fields-smocker.
          APPEND monitor_rec TO monitor.
          RAISE EXCEPTION TYPE cx_rsrout_abort.
        ENDIF.
    When i check, i have the following error:
    E:"RS_C_ICON_VERSION-" expected, not "#CONVERSION_"
    Have you an idea ?
    Thanks for your help.
    Rodolphe.

    That's one problem.  But if you look at the interface for the FM, it requires a character value.  The following, using an integer, will dump.  Try it and see.  The only way to make it work is to define i_2 as a character, not integer.
    PROGRAM zz_temp.
    DATA:
      c_1  TYPE c VALUE '1',
      i_2  TYPE i.
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
      EXPORTING
        input  = c_1
      IMPORTING
        output = i_2.

  • How can I call a Method in a Transformation Routine

    Hello Experts,
    How can I call a Method in a Transformation Routine ??
    THNXX

    Hi,
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/6090a621-c170-2910-c1ab-d9203321ee19?quicklink=index&overridelayout=true
    It will be help full .
    Regards,

Maybe you are looking for

  • Pricing Procedure Condition Type EK02

    Dear, Gurus I have an MTO scenario. All is working I mean from the production order the cost is coming to my sales order in condition type EK02. But that is making all other condition types as inactive. current pricing schema Pr00 Price it is manual.

  • Report developement Requirement.

    Dear Experts, I want know detaily about the reoprting in materials management. a) What is the difference between Script, Forms and Report. b) What is ABAP query, which functional consultant can use. Is it permanent report which can be used by users f

  • Can't download free trial Photoshop

    Hi For some reason I am not able to download the free trial version of PS. All I get is a Window informing me about the three steps I have to take to be able to download. When I use the retry option I get a page telling me that the page can not be di

  • ABAP Certification Documents

    Hi, Can any one send me the latest ABAP Certification Study Materials and other related documents please.. My email id is [email protected] Thanks in Advance! Janani

  • HT201318 How do you cancel your icloud storage upgrade?

    I upgraded my iCloud storage and don't think I needed to. Can't work our how to canel it. I purchased it in Canada whici is where my account is registered. Help!