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

Similar Messages

  • 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

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

  • Add serial number in the report file name when using batch process model

        I would like to append a string containing the current UUT serial number to the base name of the report file. For example, uut_report.html becomes uut_report[SN000001].html. This setting is not available if I use NI BatchModel.seq as my process model.
    Thanks!
    Jacky

    duplicate post
    Ask your question only once.

  • How to sort random number without the used of order by

    Hi ,
    how should 5 random number be sorted without the use of order by in PLSQL
    eg.
    id amount
    1 2
    2 9
    3 3
    4 5
    5 7
    Edited by: sake1 on 1-dec-2010 8:16

    I used Altavista and found one example, how does it look?
    DECLARE
      /* there is no built array in oracle, you must declare
      your own */
      TYPE Numarray IS TABLE OF NUMBER INDEX BY BINARY_INTEGER;
      /* the array of numbers - using assoc array because I can start
      with zero like traditional arrays */
      Nums Numarray;
      n NUMBER := 0;
      Temp NUMBER;
    BEGIN
      /* load up the array, put 20 random values in the array,
      in array indicies 0 to 19 */
      FOR i IN 0 .. 19
       LOOP
        Nums(i) :=  Round(Dbms_Random.Value(1, 1000));
      END LOOP;
      /* get the array size */
      n :=  Nums.Count();
      /* display the unsorted values - loop through the whole array and
      print out the values */
      Dbms_Output.Put_Line('unsorted:');
      FOR i IN Nums.First .. Nums.Last LOOP
        Dbms_Output.Put_Line(Nums(i));
      END LOOP;
      /* bubble sort - using two loops, compare each value with the one
      after it
      if the one after the current one is smaller , then
      switch their locations in the array, this is just like standard
      bubble sorts
      in other languages. The only real diff is the syntax.
      FOR i IN 0 .. n - 1 LOOP
        FOR j IN 0 .. n - (i + 1) - 1 LOOP
          IF (Nums(j) > Nums(j + 1)) THEN
            Temp := Nums(j);
            Nums(j) :=  Nums(j + 1);
            Nums(j + 1) :=  Temp;
          END IF;
        END LOOP;
      END LOOP;
      /* display the values sorted */
      Dbms_Output.Put_Line('sorted');
      FOR i IN Nums.First .. Nums.Last LOOP
        Dbms_Output.Put_Line(Chr(9) || Nums(i));
      END LOOP;
    END;
    unsorted:
    155
    909
    795
    977
    942
    214
    105
    269
    283
    820
    108
    594
    784
    921
    856
    736
    802
    457
    951
    411
    sorted
         105
         108
         155
         214
         269
         283
         411
         457
         594
         736
         784
         795
         802
         820
         856
         909
         921
         942
         951
         977
    */In the code the first comment is wrong actually i think, that one:
    "there is no built array in oracle, you must declare your own"
    I remember there were some system collection-types, if i'm not mixing with something, i remember there was some kind of such but they were un-documented ones, so we can juridically say that the comment in the code was still correct.

  • Muse crashes randomly when using the place file/image function. And is slow!

    Hi guys,
    I am using a MacBook Pro Retina i7 with 8GB ram. I installed the trail version of Adobe Muse and I am really liking the product so far, except that it crashes a lot, randomly, when I sometimes use the place file or place image function. (Command-D) Muse is also slow. I have little apps running, plenty of free space etc but Muse is sluggish, lags and crashes a lot.
    Is there a known reason for this? This is preventing me from considering to buy the program.
    Please help,
    Regards,
    Riaan

    Thank you for that.
    I will give it a try. Two things I noticed, I do have column view on, but sorted by type and then secondly I am placing images from my Google Drive and DropBox folder..
    Will report back once I have had a chance to test it again.

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

  • How to find dynamically the current line number in the source file

    Is there a mechanism like __LINE__ and __FILE__ macro in C to get dynamically
    the current line number and file name of a source file?

    Don't know - but others have asked too. Have you searched the forum? For example:
    http://forum.java.sun.com/thread.jsp?forum=31&thread=210496

  • Store a reference PO number in the ORDR file

    We are creating Sales orders based on purchase orders that are sent via EDI x12 850 documents.  I need to store the purchase order number somewhere in the sales order document (ORDR table).  Where should I store the PO Number, so that I can return it on Invoices?  Do I need to create a user defined field?
    Thanks,
    Nancy Walk
    [email protected]

    Hello.
    I think that user field is the best way to do that.
    Other way is that You can export documents to XML and then import if You want.
    Hope it helps
    Regards
    Kamil Wydra

  • Netweaver not showing line number in the error file.

    Hi All,
    I am working on SAP NetWeaver 2.
    I am having a serious problem in here.
    What is happening is, In my code there is a Null pointer exception occurring frequently.
    In my log file I can see the file in which it is occurring but I cannot see the line no in which the nullpointer exception is coming.
    Is there any setting in netweaver which i should turn on to see the line no in which the error is happening.
    Thanks in Advance,
    Manny

    Hi Sam,
    Title means workflow title coming in the inbox or mail subject ?
    Anyways both the issues can be fixed in the WF itself.
    If you want to change the mail subject check your mail step and provide proper variable.
    for the workitem text you can change it form the task.
    Regards
    Bikas

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

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

  • Can Aperture Read the camera's sequential number metedata when naming files

    Before I started using Aperture I would use this naming convention in Bridge to batch rename files and It works great because it avoids duplicate file names and the files are in sequential order
    my last name(Blake)YYYYMMDDfour digit NON RESETTING sequential number, generated by my Nikon D2X. I don't have any duplicate file names unless I shoot more that 9999 images in one day.
    Has anybody found the option to use the camera's generated sequence number in Aperture's file naming scheme. I sure can't. I know that you can set a four digit sequence but that sequence doesn't start where the sequence leaves off in the previous import.
    Thanks
    John
    G4 Powerbook   Mac OS X (10.4.8)  

    I have two workarounds
    1. Rename the files in bridge after like I have always done and then import the folder as an Aperture project without changing the file names. I use photo mechanic to download the files from the card.
    2. Go to the library smart folders to see what was the last project I imported and check the four digit sequence before the file name extension. Set the sequential counter in Aperture to start at the next sequential number where the last file left off.
    I have to use the four digit sequence instead of using the date and Time sequence. It is very convenient for my clients to give me the four digit sequence when telling me what images they want prints from,etc. Avoids any confusion.
    I did request this feature of using the camera's generated file name in Apple's feedback link for future inhancements.
    thanks for your responses
    John
    G4 Powerbook   Mac OS X (10.4.8)  
    G4 Powerbook   Mac OS X (10.4.8)  

Maybe you are looking for

  • Attachments not received in Mail app

    I received a couple of email where the attachment is not received in the Mail app.  It doesn't show up anywhere. The attachment is received on my iPad, iPhone, and iPod with no problems.  Also, I have another message where the html images are not dis

  • Advance payment in the context of WBS code

    Hi all. How can i do the report "balance of Advance payments in the context of WBS code" ???

  • Split document or delete pages

    Hello! I would like to split some (thousend) pdfs at page 5. Finally I would like to have 2 pdf-documents: 1) page 1-4 and 2) page 5- last page (variable). If its not possible with a function like "splitting".. maybe it is possible to delete pages 5

  • Deactivate Portal server node from Web dispatcher, but still keep online

    We want to deactivate a Portal server node from the Web dispatcher. We also need to connect directly to the specific node.  We configured the Server Node using  Config Tool --> Server_ID####### --> Debug --> Debuggable --> Restricted Load Balancing.

  • Transactional iView ask for authentication

    Hi all, I'm working in Portal 7.3, I've defined a System typed "SAP_R3" and set the values for Connector, User Management and ITS properties. For user management I've configured SSO with the ECC system. Testing connection for this system works fine f