Conditional mapping in the transformation file

Hi
Can anyone tell me if it is possible to perform more complex mapping when loading transactional data? I have 2 requirements:
1. When the Profit Centre is invalid, set it to a default value of "9999".  Where an invalid Profit Centre is a Profit Centre that does not exist as a valid dimension member.
2. When the Profit Centre is null, then set it to a default value based on the Entity value.
    For example:
    When the Profit Centre is null and the Entity = 100, set the profit centre to 1000.
    When the Profit Centre is null and the Entity = 200, set the profit centre to 2038. etc
Ideally I would like to define the mapping rules in either transformation or conversion files.
Regards, Sharon

What I can think right now is
Case 1:
If you're with BPC 7.0 NW, there is no option to accept not existing member and store it with a default value(Correct me if I'm wrong).
But you can enable VALIDATERECORDS=YES in the transformation file to output the rejected records with wrong dimension member into a file. Since we need all the rejected records and keep processing the current import, set MAXREJECTCOUNT=-1.
Next do additional task in your import package to rename all the rejected Profit Center with the default value (9999) and do re-import again.
Limitation: this will work only if you want to do fix on 1 dimension  in this case the Profit Center. If you need to do fix on multiple dimension, this would not work because the rejected records could be caused by any dimension. So you're lucky in your case.
If you're with BPC 7.5 NW, use DM BADI to do what you want.
Case 2:
You can use IF in your mapping section, for example:
ProfitCenter=*IF(ProfitCenter = *str(),*IF(Entity=100,*str(1000),...),ProfitCenter)
Halomoan

Similar Messages

  • How to use the transformation file

    Hello there!
    This message is to ask a question that maybe it could be familiar to you. I want to load data using a .txt file and a transformation file using the import package. Suppose  that the structure of my txt file is:
    Entity,Category,Time,Account1,Account2,Account3
    Ent1,Actual,2010.JAN,289.23,32.43,123.34
    Ent1,Actual,2010.JAN,289.23,32.43,123.34
    Ent1,Actual,2010.JAN,289.23,32.43,123.34
    How could I load this values using a transformation? I know that there exists an option named *MVAL(), but if I use the following syntax in mapping section it doesnu2019t work:
    Account=*MVAL(4:6)
    I read something about accountval, does some boddy knows how to use it?
    Thanks in advance
    regards

    Hi,
    If you are using MVAL statement, then you need to maintain a conversion file also. Its compulsory. Please make sure that you have maintained a conversion file.
    If you are on 7.5 MS, then the statement will work. Please refer to the MVAL statement in the mapping section of the below link
    http://help.sap.com/saphelp_bpc75/helpdata/en/a2/e722bc58404335ada8592cdc8feaca/content.htm
    However, in 7.0 MS, the MVAL works only if the multiple key figures are corresponding to the time dimension. In your case, they correspond to the account dimension. You need to create separate transformation file for each of the key figures and then upload the flat file separately using each of the transformation files.
    Hope this helps.

  • How can i fix a member for a dimension in the transformation file?

    Hello everybody,
    anyone knows how can I fix a dimension member using the *mapping section of the transformation file in a data upload, I´m trying to fix the member for the Category dimension, I´ve tried an instruction like:
    *MAPPING
    *CATEGORY=ACTUAL
    but it doesnt work, any idea?
    thanks!

    The easiest way is to use the folloowing in the Transformation file:
    Category = *newcol(Actual)
    Hope this jelps.

  • Error validating the transformation file

    Hi All,
    We have a Sales Application for which we are loading the data through flat file. The data file has been created and uploaded using UJFS. The transformation file is giving error while validating saying that conversion files do not  exist. We have maintained the conversion files for each of the dimensions in BPC except the ones that have to loaded with a constant. Any help on the folllowing error log: The conversion files exist in the company folder. Please advise
    [Start validating transformation file]
    Validating transformation file format
    Validating options...
    Validation on options was successful.
    Validating mappings...
    Validation on mappings was successful.
    Validating conversions...
    The conversion file does not exist.  (ZTIME.XLS)
    The conversion file does not exist.  (ZACCOUNT.XLS)
    The conversion file does not exist.  (ZPRODUCT.XLS)
    The conversion file does not exist.  (CHANNEL.XLS)
    The conversion file does not exist.  (ZENTITY.XLS)
    Validation on conversions was successful.
    Creating the transformation xml file. Please wait ...
    Transformation xml file saved successfully.
    Connecting to server ...
    Begin validate transformation file with data file...
    [Start test transformation file]
    Validate has successfully completed
    [The list of conversion file]
    Conversion file: DataManager\ConversionFiles\ZTIME.XLS!CONVERSION
    Conversion file: DataManager\ConversionFiles\ZACCOUNT.XLS!CONVERSION
    Conversion file: DataManager\ConversionFiles\ZPRODUCT.XLS!CONVERSION
    Conversion file: DataManager\ConversionFiles\CHANNEL.XLS!CONVERSION
    Conversion file: DataManager\ConversionFiles\ZENTITY.XLS!CONVERSION
    Task name CONVERT:
    XML file (...BUDGET\SALES\DATAMANAGER\CONVERSIONFILES\ZTIME.CDM) is empty or is not found
    Cannot find document/directory
    Error: Validate with data file failed
    Thanks,
    Santosh

    Hi Santosh,
    I am sure you would done it correctly. However, just to be on the safer side, lets revisit all the steps.
    From BPC excel, we create a new conversion. Check the name of the worksheet (not the workbook). By default, it will be Conversion. You can change it to something else also. Lets say, we change it to Account. So, the sheet's name is Account. We validate and save the conversion as myconversion.xls. This will create another file named myconversion.cdm. Check the location properly while saving the conversion file. The location would be
    HTTP://server_name/appset/application/DataManager/ConversionFiles.
    Save it under company folder.
    Go to the server, where BPC has been installed. Go to the folder
    \Webfolders\appset\application\DataManager\ConversionFiles
    Check whether the conversion file is present or not. We should have both "myconversion.xls" and "myconversion.cdm".
    Create a new transformation file. Under the *CONVERSION section, We define the conversion file to be used. The format would be
    Dimension_Name=conversion_file_name.xls!sheet name
    In our example, it would be myconversion.xls!account. (check the use of the conversion file name and the sheet name).
    Save and validate the transformation file. Mostly, the issue is around the conversion file name and the sheet name. Check all the steps.
    Hope this helps.

  • SAP data extraction mapping, where the JCO files need to be copied?

    Hi All,
    I have the following environment.
    OWB client: Windows7
    OWB server: Linux x86_64
    SAP Server: Windows Server 2003
    I need to create OWB mapping to extract data from SAP to Oracle target.
    Please let me know what are the JCO files required and where do i need to copy them?
    Do i need to copy them on both the owb client and server or is it enough to copy them on the client machine alone?
    Thanks and Regards,
    Pnreddy.

    OWB client isn't supported on Windows 64-bit, just wanted to let you know since you mentioned Windows 7..
    For the windows you will require 3 files sapjcorfc.dll, librfc32.dll and sapjco.jar. You can get them from the SAP install cd or download them from http://service.sap.com/connectors for your SAP version. You will need to have a SAPnet account to do that.
    You can place the files sapjcorfc.dll and sapjco.jar in OWB_HOME\owb\lib\int, and librfc32.dll in OWB_HOME\owb\bin and also set the PATH to reference this directories.
    For linux you will need librfcccm.so, libsapjcorfc.so and sapjco.jar. Also set the LD_LIBRARY_PATH to reference these files locations.
    If you are only extracting metadata from SAP then you need it only on the OWB client but if you plan to execute ABAP programs on the SAP system you will need to set it up on the server side.

  • Random Number in the Transformation File

    Hi All,
    I need to send a random number while mapping from one xsd to other in the xsl file . The random number should be alpha numeric with 5 chartacters. I tried using generate-guid() but it generates 32 characters. How do u i shrink this to 5 characters and still get a random value?
    Thanks
    MJ

    Just to add,
    the above mentioned function does not generate integers. For that u need to truncate the output of random to integer as below
    SELECT TRUNC(dbms_random.value(10000, 99999)) FROM dual;
    Edited by: Marius J on Sep 15, 2009 1:33 AM

  • Xalan XSLT processor expands DTD in the transformed file

    Hi All,
    We are using Weblogic Server 8.1 for our app. Weblogic uses the XALAN parser/transformer internally... When we try to transform an xml to html, the transformer adds the DOCTYPE element with the dtd expanded... It also adds the xml declaration at the top eventhough we specified 'omit-xml-declaration="yes" ' in the xsl:output. Has anyone encountered this issue with Xalan. Please let me know.
    Thanks,
    Srini

    One thing is sure. Whatever the classes you are going to use, need to be imported in your Jsp.
    There is no need for different import statements. You can write in a single import statement (comma separated).
    So, forget about the import statements and do your coding, finally you can look at the code and decide what classes (packages) you need to import.
    I think you need to import
    org.xml.sax.*;
    org.xml.sax.helpers.*;
    import javax.xml.parsers.*;
    Hope this helps.

  • SRM 7.0 pricing conditions mapping to the backend system

    Experts,
      I am new to SRM & working in SRM 7.0.  I have a serious problem in distributing the pricing conditions.
      I need to distribute/map the pricing conditions in SRM 7.0 to the backend ECC system.  I need step by step procedure for the same.  Plz help me.

    Hi,
      with the help of SDN, i have done the mapping part of pricing conditions as below.
      field-symbols:
        <ls_be_item>      type BBPS_CTR_ITEM,
        <ls_be_cond>      type BBPBAPICONDCT,
        <ls_be_cond_bapi> type BBPBAPICONDIT.
      loop at ct_be_items assigning <ls_be_item>.
        if <ls_be_cond>-COND_TYPE = '0100'.
          <ls_be_cond>-COND_TYPE = 'PB00'.
        elseif <ls_be_cond>-COND_TYPE = '01CT'.
          <ls_be_cond>-COND_TYPE = 'PBXX'.
        elseif <ls_be_cond>-COND_TYPE = '01RA'.
          <ls_be_cond>-COND_TYPE = 'RB00'.
        elseif <ls_be_cond>-COND_TYPE = '01RP'.
          <ls_be_cond>-COND_TYPE = '01RP'.
        ENDIF.
        if <ls_be_cond_bapi>-COND_TYPE = '0100'.
          <ls_be_cond_bapi>-COND_TYPE = 'PB00'.
        elseif <ls_be_cond_bapi>-COND_TYPE = '01CT'.
          <ls_be_cond_bapi>-COND_TYPE = 'PBXX'.
        elseif <ls_be_cond_bapi>-COND_TYPE = '01RA'.
          <ls_be_cond_bapi>-COND_TYPE = 'RB00'.
        elseif <ls_be_cond_bapi>-COND_TYPE = '01RP'.
          <ls_be_cond_bapi>-COND_TYPE = '01RP'.
        ENDIF.
      endloop.
    But the problem is, when i put the external break point in the above code, its not getting triggered.  Can any plz tell me how to debug the code.

  • BPC:  Conditional Formulas in Transformation Files, Possible?

    Hi All,
    I have an issue where I have a standard conversion file for the Account dimension, however for certain accounts the account is also dependent on the Entity ID.  Rather than writing several conversion files to maintain for each entity I am wondering if the following is possible:
    Is it possible to write some sort of conditional formatting in the transformation file such as:
    If (stringAccount)= "XXX" then (stringAccount) + (stringEntity) and go pick up conversion file A, else (stringAccount) and pick up conversion file B
    Conversion File A would have Entity/Account combo as the External account, and the Internal account would be the account for that specific Entity.  (I actually have this stored as a property on each entity but currently its assumed that some sort of dynamic EVPRO/property defintion will not function in a conversion file.)
    Conversion File B would be my standard conversion file.
    I am thinking that I this might be possible but need assitance in the syntax for the transformation file.
    Any help is greatly appreciated!
    Brian Tyson
    Edited by: Brian Tyson on Aug 12, 2008 9:48 AM

    I think I have figured out how I am going to do this, my co-worker suggested the solution is more simple than I was making it out to be:
    my transformation file will be:
    Account= Accountstring + Entitystring
    then int he conversion file i will have the following:
    1001*              1001
    1002*              1002
    1003EntityA     1013
    1003EntityB     1023
    1003EntityC     1033
    1004*               1004
    Only thing is that I will have to hardcode, rather than using the property...

  • Need Help Regarding Nested IF condition in Transformation File.

    Hi,
    In BI Cube I am having 2 Currency Type values 00 and 10.
    And for some GL Accounts Cost Centres are Empty. So for these Empty 0COSTCENTER I am inserting a String CC_NONE.
    My requirement is to load Data into BPC by validating 2 Conditions for 0COSTCENTER,
    C1. Where 0CURTYPE (Currency Type) = 10 only.  *IF(0CURTYPE=*STR(10) THEN
    C2. Check where 0COSTCENTER are Empty.          *IF(*STR(CC_)+0COMP_CODE+0COSTCENTER = *STR(CC_)+0COMP_CODE
           then load the string CC_NONE.                            THEN *STR(CC_NONE);
           else load 0COSTCENTER's                                  *STR(CC_)+0COMP_CODE+0COSTCENTER))
    So entire code will be as below to load 0CostCenter into BPC
    COST_CENTER=*IF(0CURTYPE=*STR(10) THEN *IF(*STR(CC_)+0COMP_CODE+0COSTCENTER = *STR(CC_)+0COMP_CODE THEN *STR(CC_NONE); *STR(CC_)+0COMP_CODE+0COSTCENTER))
    For this, while validating the Transformation File I am getting error as,
    Command Error: STR(PC_NONE
    If there is any possibility let me know.
    Thank you,
    Hemanth

    Hi Hemanth,
    But why not to combine both checks like:
    COST_CENTER=*IF(0CURTYPE+*STR(CC_)+0COMP_CODE+0COSTCENTER = *STR(10CC_)+0COMP_CODE THEN *STR(CC_NONE); 0CURTYPE=10 THEN *STR(CC_)+0COMP_CODE+0COSTCENTER)
    Vadim

  • Mapping in Transformation file for loading infoprovider

    Mapping in transformation file for load from infoprovider:
    The requirement is : if Account of BW starts with 70XXXXXXX then use char1 if Account of BW starts with 12XXXXXXX then use char2 in BPC dimension 2.
    So, in the transformation file for a load from an infoprovider we want for a dimension to use the data from a certain BW characteristic based on the characteristic Account.
    For example if the account start with 70 then use for a certain bpc-dimension u201Cdetailu201D the characteristic of 0COUNRTY  should be used, if account start with 2 the char X should be used etc..
    Following in the transformation works but the issue is that we have to specify all the accounts individually (+100 accounts in the statement which is not feasible):
    BPC_detail = *IF (BWACCOUNT = str(70000010) then 0COUNTRY;str(NO_DETAIL))
    Where BPC_detail is the dimension in BPC and BWACCOUNT is the characteristic in BW.
    Following statement does not work: there is also no documentation available how to do this:
    BPC_detail = *IF (BWACCOUNT(1:2) = str(70) then 0COUNTRY;str(NO_DETAIL))
    Is there a solution/statement that fulfills this requirement for the load of an infoprovider?
    ( so similar to what you can do with the load of a flat file like for example:  Entity=IF(col(1,1:1)=U then SEntity;*col(1,1:1)=Z then *col(1,3:6); *STR(ERR)) )
    Rgds

    Hi,
    Install process chain /CPMB/LOAD_INFOPROV_UI from BI Content as follows:
    1.Enter Tcode RSA1
    2. In the left navigation bar, click 'BI content'
    3. Select process chain and double click "Select Objects".
    4. Select the process chain /CPMB/LOAD_INFOPROV_UI.
    5. Click 'Transfer Selections' button.
    6. On the right pane, install objects from BI Content.
    7. Enter Tcode SE38.
    8. Input program name ujs_activate_content and click to run.
    9. Only select option 'Update DM Default Instructions'.
    10. Execute program.
    Hope it helps..
    Regards,
    Raju

  • Issue with the /CPMB/EXPORT_TD_TO_FILE transformation file.

    Good evening to all,
    We have to export data from a cube to a text file. To do this we have create in the BPC (NW 7.5 SP 09) a package with the process chain /CPMB/EXPORT_TD_TO_FILE but when we execute the package, we get an error. We think that the error is generated by the transformation file. In the chainu2019s log we can see that the process didnu2019t finish successful, the Appl Source and the clear BPC tables variants are in red and we get this error u201CJob or process BPCAPPS waiting for eventu201D.
    Can anybody help us?
    our transformation file is like this:
    *OPTIONS
    FORMAT = DELIMITED
    HEADER = YES
    DELIMITER = ,
    AMOUNTDECIMALPOINT = .
    SKIP = 0
    SKIPIF =
    VALIDATERECORDS=YES
    CREDITPOSITIVE=YES
    MAXREJECTCOUNT=
    ROUNDAMOUNT=
    *MAPPING
    DIMENSION_1=/CPMB/NAMEDIMENSION_1
    DIMENSION_2=/CPMB/NAMEDIMENSION_2
    DIMENSION_3=/CPMB/NAMEDIMENSION_3
    DIMENSION_4=/CPMB/NAMEDIMENSION_4
    DIMENSION_5=/CPMB/NAMEDIMENSION_5
    Amount=/CPMB/SDATA
    *CONVERSION
    Is this the proper use of the TF in this case?
    The complete error log:
    /CPMB/MODIFY completado en 0 segundos
    /CPMB/APPL_TD_SOURCE completado en 2 segundos
    /CPMB/CLEAR completado en 0 segundos
    MEASURES=PERIODIC
    TRANSFORMATION= DATAMANAGERTRANSFORMATIONFILESTF_EXTRACCION_PLANO.xls
    FILE= DATAMANAGERDATAFILESprueba1.txt
    ADDITIONINFO= Sí
    (Selección de miembros)
    CONCEPTO_FI:
    FUENTE:
    GRUPOCAME:
    MONEDA:
    SOCIEDAD:
    TIEMPO: 2011.ENE
    VERSION: 
    Nom.tarea TRANSACTION DATA SOURCE
    Error de sentencia MDX: Valor CONTCORMOL                      /CPMB/T5DDIW
    Aplicación: FINANZAS status de paquete: ERROR
    Thanks in advance,
    Best regards

    Hi. Thanks for the reply.
    We still working on the issue. For a test we run the package without TF but we get the same error. We can find out the variant BPC Appl Source(APPL_TD_SOURCE) is the variant that generates the issue.
    When we ran the package the package didn't finish and it get the status get the status active but when we ran the package in an other application the package ends with an error.
    The variant log error was:
    RSPROCESS 4ENFI7BF1OI7M7E5GKHXIT5IL is unknown
    Here is the log in english.
    /CPMB/MODIFY complete in 0 seconds
    /CPMB/APPL_TD_SOURCE complete en 5 seconds
    /CPMB/CLEAR complete en 0 seconds
    [Selection]
    MEASURES=PERIODIC
    TRANSFORMATION= DATAMANAGER\TRANSFORMATIONFILES\TF_EXTRACCION_PLANO2.xls
    FILE= DATAMANAGER\DATAFILES\EXAMPLES\prueba_ETD.txt
    ADDITIONINFO= Yes
    (Members selection)
    CONCEPTO_FI:
    SOURCE:
    GRUPOCAME:
    CURRENCY:
    SOCIETY:
    TIME: 2011.JAN,2011.FEB,2011.MAR,2011.APR,2011.MAY,2011.JUN,2011.JUL,2011.AGO,2011.SEP,2011.OCT,2011.NOV,2011.DEC
    VERSION: 
    [Messages]
    Task name TRANSACTION DATA SOURCE
    Sentence error MDX: Value CONTCORMOL                      /CPMB/T5DDIW
    Application: FINANZAS Package status: ERROR
    Thanks for your help, best regards.

  • XSLT Issue : Without the target file mapping is happening

    Hi,
    In one of my composite, which is a provider abcs transforms source to target, where in the transformation file, source and target are mentioned as usual, both are pointing to MDS locations.
    Source file is physically present in the MDS, but the target file is not present but still the transformation happening.
    The flow is like below.
    ProviderABCS -> Adapter service which will write the file.
    Some time the file is created with data and some time only the file is created without data.
    My question is how come there is no exception caught ? If i keep the target schema or wsdl file in MDS will this issue get resolved ?
    Thanks,
    Vijay

    When i try to open the xslt file with designer view its complaining that the target file is missing, but when i deploy, iam able to deploy and run with some instances.
    Still investigating.. wll update you.. soon. In the mean time if any body have any other idea.. plz update the thread.
    Thanks,
    Vijay

  • How to calculate length of the string in transformation file

    Hello all
    I have tried a number of ways and I am not able to calculate the length of the incoming field in transformation file for my data load. Here is the issue.
    I have an incoming string of length 10 and I need to use it to update multiple dimensions which will need first 2, 4 ,6 , 8 characters respectively.
    Now in transformation file ID=ID(1:2) works perfect. However, the BW InfoObject will have multiple values as shown below:
    ID
    Description
    AB
    Business
    ABCD
    Business Organization
    ABCDEF
    Business Line
    ABCDEFGH
    Product Family
    ABCDEFGHIJ
    Product Line
    ABCDEFGHIJKL
    Brand
    I want to update my dimension for Business Organization. I need to update only the records where the length of the incoming string is 4. If I do ID(1:4), I will get the duplicate records and will see the ID less than 4 characters in rejected records. The latter is not such a big issue but the former one is as I need to fetch the right description as well. The formula should check the length and then only pass the record else a dummy value.
    A formula to achieve this in the transformation file is what I am looking for.
    Regards
    Gajendra

    Thanks Vadim for the quick response!
    I am also trying something similar and really appreciate your input here. However, I am not sure if the conversion is really happening.
    Here is what I have done:
    But the strings <> 4 in length are still passing through.

  • Different formats of the flat file for the same target

    In our deployment, we use plugin code to extract the csv files in the required format. The customers are on same version of datamart, but they are on different versions of source database - from 3.x to 4.5 depending on which version of application they are using. In 4.0, we introduced a new column email in the user table in the source database. Accordingly, plugin will add the field in the csv file. But not all the customers will get the upgraded version of plugin at the same time. So ETL code needs to decide which data flow to process depending on the format of the csv file to load data to the same target table. I made the email field in the target table nullable but it still expects the same format of the csv file with delimiter for null value.
    Need help to achieve this. Can I read the structure of the flat file in DS or get the count of delimiters so that I can use a conditional to use different data flow based on the format of the flat files.
    Can I make the email column in the flat file optional?
    Thanks much in advance.

    You can add an email column that maps to null in a query transform for the source that does not contain this column. 
    Or else you can define two different file formats that map to the same file.  One with the column and one without

Maybe you are looking for