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.

Similar Messages

  • Transformation Routine for checking condition only once

    Hello,
    I would like to perform he calculations based on certain criteria which goes like this...
          LOOP AT ITab WHERE EMPno  = ITAB Empno AND
                            ATYPE = ITAB-stype .
            IF ITAB-LTYP = '1000'.
              CHECK ITab-ABEGIN GE YR_BEGDT AND ITab-ABEGIN LE YR_ENDDT.
              CHECK FLAG_ST <> 1.
              ITAB-PENDING_ST = ITAB-PENDING_ST + ( ( ITab-BAL / 825 ) * 100 ).
            ELSEIF ITAB-STPE = '2000'.
              CHECK FLAG_SL <> 1.
              ITAB-PENDING_SL = ITAB-PENDING_ST + ( ( ITab-BAL  / 825 ) * 100 ).
              ENDLOOP.
          IF ITAB-stype  = '1000'.
            FLAG_ST = 1.
          ENDIF.
          IF ITAB-stype  = '2000'.
            FLAG_SL = 1.
          ENDIF.
          MODIFY ITAB.
    How to implement this logic in Transformation roles ... as this flag checks only once.... to perform the calculation.
    Thanks
        ENDLOOP.

    Hi there,
    You must be aware of start and end routine in a transformation.
    Assumin that you would like to modify the code before sending it to individual( field wise transormation) transformation , you can write your code in start routine tab of the transformations.
    Code written in Start routine in a transformation can manipulate the data data package wise..
    say for eg if u need to fill the values in indivual routine  then u can save all  the values in an internal table ( say for eg ur itab) in the start routine and this data is available for u in the transformation routines.. so anything written in start rotuine shall work as global modification for the transformation routines.
    Similarly code written in end rotuine shall work for chunk of data which is modified individually in transformation routine.
    you ca go thr this link for more clarification
    http://www.sdn.sap.com/irj/scn/index;jsessionid=(J2EE3417700)ID2067718350DB10090875593766856688End?rid=/library/uuid/609eea32-455e-2c10-c08a-c23adf8c934e&overridelayout=true
    http://help.sap.com/saphelp_nw04/helpdata/en/4f/a9ea964a86b04dbe4df20af6e598cf/frameset.htm
    Regards,
    kk

  • 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.

  • Transformation routine: delete 4 first characters..

    Hi dear experts,
    i need a transformation routine which deletes the first 4 characters from a field type CHAR.
    Exemple: "VKIA1000000000" -> "1000000000"
    do you know how it should look like?
    thanks for your time!
    j.

    Hi,
    You can try this in you routine:
          Select single FieldXXX from /bic/aABC00 into t_Field
          where
          KEYFIELD = e_t_result-KEYFIELD. (condition)
          SHIFT t_Field LEFT DELETING LEADING space.
          if t_Field is NOT INITIAL.
            E_T_RESULT-/bic/XXX = t_Field+4(10).
         else.
            E_T_RESULT-/bic/ycrtime = 0.
          endif.
    Rgs,
    I.R.K

  • Transformation routine for Infoobject lookup

    Hey guys,
    I am aware of Update rule routines but never done Transformation routine before. I didnt get any related post for my req.
    My requirement is on WBS element I have some attributes which is coming from std WBS Attr extractor but I have one custom attribute infooject which I want to populate through an Infoobject which is also a master data Infoprovider. For this I have to write a Tranfer rule routine.
    Please note these are transfer rules in BW 3.5 not BI 7. Please provide exact code. Appreciate your help.
    Thanks.
    BMW M///

    Declaration of Types table for your master data object in the declaration area....
    Replace your attributes in place of plant, GSRCSYS and CALMONTH
        TYPES: BEGIN OF TY_WBS,
                     /BIC/GPLANT TYPE /BIC/OIGPLANT,
                     /BIC/GSRCSYS TYPE /BIC/OIGSRCSYS,
                     CALMONTH TYPE /BI0/OICALMONTH,
               END OF TY_WBS.
        DATA: IT_WBS TYPE TABLE OF TY_WBS,
                    WA_WBS TYPE TY_WBS.
    /BIC/AWBS = your master data table name
    SELECT * FROM /BIC/AWBS INTO WA_WBS
        WHERE OBJVERS = 'A'.
    THen in the transformation Routine on field level use the below code to populate the value
    "  /BIC/GPLANT = L_SOURCE_PACKAGE-/BIC/GPLANT.
       substitute your objects here to query the master data object to get values.
    READ TABLE IT_WBS INTO WA_WBS WITH KEY
          /BIC/GPLANT = L_SOURCE_PACKAGE-/BIC/GPLANT.
    RESULT = WA_WBS-Your object name.
    Hope this will help you...

  • Transformation routine used for GR as at posting date (0GR_VAL_PD KF)

    HI all,
              I have problem in 2lis_02_scl transformation Routine where i am not getting corect data for GR as at posting date (0GR_Val_pd) KF.
    Can anyone tell me what routine shall i try to use.
    Thanks n Regards,
    Gaurav Sekhri

    HI Gaurav,
    The code which you have given does not specify the desired result which you want. Also one more thing you have written a code as follows:
    IF ( SOURCE_FIELDS-PROCESSKEY = '002' or  "WE-Wert
    SOURCE_FIELDS-PROCESSKEY = '012' or
    SOURCE_FIELDS-PROCESSKEY = '022' )
    AND SOURCE_FIELDS-BWAPPLNM EQ 'MM'.
    RESULT = SOURCE_FIELDS-CPPVLC.
    endif.
    What is the above condition does not satisfy. you need to specify a RESULT if the above condition is not met like.
    IF ( SOURCE_FIELDS-PROCESSKEY = '002' or "WE-Wert
    SOURCE_FIELDS-PROCESSKEY = '012' or
    SOURCE_FIELDS-PROCESSKEY = '022' )
    AND SOURCE_FIELDS-BWAPPLNM EQ 'MM'.
    RESULT = SOURCE_FIELDS-CPPVLC.
    ELSE.
    REULT  = " Your desired result if condition is not met".
    endif.
    Hope it helps.
    Regards,
    Satyam

  • Non permitted characters-data loading

    In our system, we have a data issue where many records present in the entry level tables (Extraction Layer) have non-permitted characters in text fields.
    we introduced a routine to filter these - but already existing ones will bring problems during the init.
    for this we need a very tricky abap.
    we have a FM to replace wrong characters.
    So now I want to loop a whole databasetable and use the FM against a certain table field
    We did something like that  with abap already. But the biggest issue is that the tables consist of several million records - so we run into memory problems.
    can you please provide a suggestion on how to handle this?
    Your help will be appriciated

    hi  USER1249,
    what about to use standard BW functionality - permitted characters - TA RSKC.
    Via this you can maintain a set of permitted characters which will not be rejected by BW while loading.
    BR
    m./

  • Error in Open Hub Transformation Routine

    Hi,
    I created an Open Hub Destination which has 67 fields.
    In the transformation, i am using 'routine' for one of the transformation rule.
    In the routine, the target field type is not defined automatically and I am not able to change it. When i save the routine, it gives me error: E:The field string "_TY_S_TG_1" contains no fields.
    Please help.
    Thanks,
    CH
    CLASS routine DEFINITION.
      PUBLIC SECTION.
        TYPES:
          BEGIN OF tys_SC_1,
         InfoObject: 0MATERIAL Product.
            MATERIAL           TYPE /BI0/OIMATERIAL,
          END   OF tys_SC_1.
        TYPES:
          <b><i>BEGIN OF tys_TG_1,
         Field: TXTLG.
          END   OF tys_TG_1.</i></b> 
          PRIVATE SECTION.
        TYPE-POOLS: rsd, rstr.

    Hi,
    In the transformation, have you connected that rule to any target field of your destination? If not, then do that and then try to create the routine.
    Regards,
    Vaibhav

  • 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

  • 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

Maybe you are looking for

  • Firefox 36.0.4 on dell venue 8 3830 does not work

    App opens but will not navigate to any website the progress bar quickly moves to about 25% and stays there. I tried uninstalling and reinstalling the app.

  • Web Page(s) not rendering after 10.3.1 update

    Since the 10.3.1 update on my Z10, there are several "responsive" web page(s) I visit that no longer render properly on my Z10. I have tried about 6 different browsers on my desktops and laptops, and all still render target pages properly. Before 10.

  • Sec Vulnerability? mdworker- Component boundaries mismatch- bufferoverflow?

    Hi All, Maybe I'm overreacting, but if this console log is not suspicious I'm not sure what is: 8/5/08 1:44:09 PM mdworker[23849] Component boundaries mismatch (VCALENDAR VEVENT) 8/5/08 1:44:09 PM mdworker[23849] Cal not a CoreCalendar <<< [M] <CoreE

  • Isight camera with skype

    I want to use skype. I see my family on their pc but they cannot see me. I have a MacBook with built in camera. I assume it is isight but it does not show up on the search. Skype says it should work. Are there some settings I need to use? I chat want

  • ICal on .mac start page

    Okay, this confuses me: - you can create a group and for that group select a (published) iCal calendar to display in the small calender view on the group page. then, why isn't it possible to do the same on my .mac "root" homepage?? Am I missing somet