Infoobject routine problem in transformation using BI 7.0 datasource

Hi expert,
We have the business senario:need to look up data from Active data of DSO: /BIC/AZIN_O0100 into infoobject ZN1 in DSO:AAA through the link ZNR. We have the code, but after DTP, there are blank value in infoobject ZN1 in the content of DSO:AAA. Anyone can guide us why we get the blank in the value.
DSO:AAA
ZNR;ZN1
Source field
ZNR;
Active data  /BIC/AZIN_O0100
/BIC/ZNR;/BIC/ZN1
Code in routine of infoobject ZN1 in transformation (BI 7.0 datasource)
    DATA: IT_ZN1 TYPE  /BIC/AZIN_O0100-/BIC/ZN1.
    SELECT /BIC/ZN1 INTO IT_ZN1 FROM  /BIC/AZIN_O0100
     WHERE /BIC/ZNR = SOURCE_FIELDS-ZNR.
    ENDSELECT.
    RESULT = IT_ZN1.

Hi ,
Please split this code in start routine and transformation routine.
DSO:AAA
ZNR;ZN1
Source field
ZNR;
Start Routine
Active data /BIC/AZIN_O0100
/BIC/ZNR;/BIC/ZN1
DATA: IT_ZN1 TYPE /BIC/AZIN_O0100-/BIC/ZN1.
SELECT /BIC/ZN1 FROM /BIC/AZIN_O0100 INTO IT_ZN1
FOR ALL ENTRIES IN SOURCE_PACKAGE
WHERE /BIC/ZNR = <SOURCE_FIELDS>-ZNR.
Transformation Routine
READ TABLE IT_ZN1 with key
/BIC/ZNR = <SOURCE_FIELDS>-ZNR BINARY SEARCH.
IF sy-subrc = 0.
RESULT = IT_ZN1 - FIELDNAME.
Hope this answres you.
-Vikram
RESULT = IT_ZN1.

Similar Messages

  • Routine problem in transformation

    Hi sdners
                   following is the secenrio, i had a doubt in that. i have to create a transformation routine for the field cost performance index= budegt cost of work performed * percentage of work complete/ direct effort + direct expences. these for infoobject loaded by flat file. so how to do write the code, weather i have to map all calcultion field in traget field. please guide me how to write the code.
    hari

    Hi Hari,
    I am assuming you have the fields budegt cost of work performed, percentage of work complete/ direct effort and direct expences in the data source.
    Now when you enter into routine, scroll up. There you will find CLASS lcl_transform DEFINITION.
      PUBLIC SECTION. Under that  you will see TYPES: BEGIN OF tys_SC_1,
    Under that you will find the the technical names of all fields that you have mapped i.e budegt cost of work performed, percentage of work complete/ direct effort and direct expences. You will have to use it in result.
    Now what you have to do is scroll down again and then go to :
    Start of code *************
    CLASS lcl_transform IMPLEMENTATION.
      METHOD compute_ZPYENTDT.
      DATA:
          MONITOR_REC    TYPE rsmonitor.
    Skip all these, keep them as it is:
    $$ 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.
    RESULT = Technical name of budegt cost of work performed * technical name of percentage of work complete/ direct effort + technical name of direct expences.
    End of Code **************
    Hope this helps.
    Thanks,
    Rahul

  • Problems during Transformation using Xalan

    Hi,
    i'm using Xalan 2.6.0 to transform xml and xsl into HTML.
    This works fine but i get errors during Transformation but the HTML File is build.
    The Error is:
    [Error] version.xsl:9:80: Element type "xsl:stylesheet" must be declared.
    [Error] version.xsl:11:33: Element type "xsl:include" must be declared.
    [Error] version.xsl:20:3: Element type "xsl:output" must be declared.
    [Error] version.xsl:21:25: Element type "xsl:template" must be declared.
    [Error] version.xsl:22:7: Element type "html" must be declared.
    [Error] version.xsl:23:34: Element type "xsl:call-template" must be declared.
    [Error] version.xsl:24:79: Element type "xsl:with-param" must be declared.
    [Error] version.xsl:26:7: Element type "body" must be declared.
    [Error] version.xsl:27:83: Element type "table" must be declared.
    [Error] version.xsl:28:7: Element type "tr" must be declared.
    [Error] version.xsl:29:34: Element type "th" must be declared.
    [Error] version.xsl:32:64: Element type "table" must be declared.
    [Error] version.xsl:33:7: Element type "tr" must be declared.
    . and so on
    The header of the XSL File looks like:
    <?xml version="1.0" encoding="iso-8859-1"?>
    <!DOCTYPE xsl:stylesheet [
    <!ENTITY amp "&#038;">
    <!ENTITY nbsp "&#160;">
    <!ENTITY uuml "&#252;">
    <!ENTITY Auml "&#196;">
    ]>
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
    <xsl:include href="global.xsl"/>
    <!-- Template f�r root Element-->
    <xsl:output
    method="html"
    doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN"
    encoding="ISO-8859-1"
    version="4.01"
    indent="yes"
    />
    <xsl:template match="/">
    Can somebody help me with this problem ?
    Thanks.
    Jens

    When I remove the DOCTYPE it works but is this a Xalan Problem or is the using of a doctype declaration in a XSL Document generally forbidden ?
    Because without Doctype i cant use characters such as "�", "�", and so on.

  • 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

  • Problem with READ Statement in the field routine of the Transformation

    Hi,
    I have problem with read statement with binary search in the field routine of the transformation.
    read statement is working well when i was checked in the debugging mode, it's not working properly for the bulk load in the background. below are the steps i have implemented in my requirement.
    1. I selected the record from the lookuo DSO into one internal table for all entried in source_packeage.
    2.i have read same internal table in the field routine for each source_package entry and i am setting the flag for that field .
    Code in the start routine
    select source accno end_dt acctp from zcam_o11
    into table it_zcam
    for all entries in source_package
    where source = source_package-source
         and accno = source_package-accno.
    if sy-subrc = 0.
    delete it_zcam where acctp <> 3.
    delete it_zcam where end_dt initial.
    sort it_zcam by surce accno.
    endif.
    field routine code:
    read table it_zcam with key source = source_package-source
                                                 accno  = source_package-accno
                                                 binary search
                                                 transportin no fields.
    if sy-subrc = 0.
    RESULT  = 'Y'.
    else.
    RESULT = 'N'.
    endif.
    this piece of code exist in the other model there its working fine.when comes to my code it's not working properly, but when i debug the transformation it's working fine for those accno.
    the problem is when i do full load the code is not working properly and populating the wrong value in the RESULT field.
    this field i am using in the report filter.
    please let me know if anybody has the soluton or reason for this strage behaviour.
    thanks,
    Rahim.

    i suppose the below is not the actual code. active table of dso would be /bic/azcam_o1100...
    1. is the key of zcam_o11 source and accno ?
    2. you need to get the sortout of if endif (see code below)
    select source accno end_dt acctp from zcam_o11
    into table it_zcam
    for all entries in source_package
    where source = source_package-source
    and accno = source_package-accno.
    if sy-subrc = 0.
    delete it_zcam where acctp 3.
    delete it_zcam where end_dt initial.
    endif.
    sort it_zcam by surce accno.
    field routine code:
    read table it_zcam with key source = source_package-source
    accno = source_package-accno
    binary search
    transportin no fields.
    if sy-subrc = 0.
    RESULT = 'Y'.
    else.
    RESULT = 'N'.
    endif.

  • Problems with transformation; infoobject not updated in DSO.

    Hi all,
    We are having some problems with one of our transformations between PSA and DSO.
    Suddenly some of the fields are not filled in the DSO. The mapping for field Sales order number worked fine, and then I added an infoObject in the DSO to hold the info for Sales order item. I also replaced the infoobject that was supposed to hold the sales order number. After this, none of the two fields has any data in DSO. I checked the PSA, and the data is available here. I tested the rule in ‘Rule details’ and for sales order number it gives the correct result, but for sales order item it gives a runtime error; assertion failed. I checked on SAP Notes, and found 929934. But the corrections are already added in our system.
    Has anyone got any ideas on what to do?
    BR,
    Linda

    Hi,
    There are a number of problems in Transformation when either a source field or target field is changed.
    This can lead to inconsistent transformation.
    You can raise a message to SAP or best thing is if possible delete the Transformation and create a new one.
    Regards,
    Nitin

  • Problem in transforming xml to html using xsl

    Hi everybody ,
    I am creating a xml in memory and i want to transform using xsl into an html.
    I want to embed some html code also in the data node.But when I get the html it simply writes as it is. I tried to make it cdata section but it did not worked. Pls help.
    crypticashu
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.parsers.ParserConfigurationException;
    import javax.xml.transform.dom.DOMSource;
    import org.w3c.dom.*;
    import javax.xml.transform.*;
    import javax.xml.transform.stream.*;
    public class mytemp {
         public static void main(String args[])
         DocumentBuilder builder = null;
         Document document = null;
         DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
         try
         builder = factory.newDocumentBuilder();
         document = builder.newDocument();
         catch (ParserConfigurationException e)
         e.printStackTrace();
         Element root = (Element) document.createElement("REPORT");
         document.appendChild(root);
         Node child = document.createElement("DATA");
         CDATASection data = document.createCDATASection("<b>Hello World </b>");
         child.appendChild(data);
         root.appendChild(child);
         document.getDocumentElement().normalize();
         DOMSource domsource = new DOMSource(document);
              TransformerFactory tfactory = TransformerFactory.newInstance();
              File f = new File("c:/mytemp/report.xsl");
              StreamSource xsl = new StreamSource(f);
              File html = new File("c:/myhtml.html");
              try
                   Templates templates = tfactory.newTemplates(xsl);
                   Transformer transformer = templates.newTransformer();
                   transformer.transform(domsource, new StreamResult(html));
              catch(Exception e)
                   e.printStackTrace();
         }

    want to embed some html code also in the data node.But when I get the html it simply writes as it is.That statement contradicts:
    In real application i will be getting data containg html tags.I want the parser to read that data as simple text. Both cannot be true. You either want the HTML to not be parsed or you want the transformer to deal with it. Which one?
    - Saish

  • Question for inverse routine in the transformation for a virtual infocube

    Hello,
    I have a virtual infocube with it transformation and i want to know if there is a way to know in the inverse routine or in the start routine if in the query the user is selecting a filter value.
    When the user want to select one value for a characteristic the transformation is executed in order to obtain the infoprovider values. In this moment the inverse routine is executed and i want to know if there is a way to identify when the user is making a drilldown or a filter.
    In the start routine of the transformation i have an abap code with a very expensive time of execution to obtain some key figures values but i dont want that this abap code will be executed when the system executed the transformation to obtain the values for one characteristic in order to make a filter.
    Thanks in advance for your help. 
    Best regards.
    Ignacio

    Hi Ashish,
    Your document is very useful, in fact I used it to write my abap code, now Iu2019m getting the values of the query selection conditions, but what I need is after the report is showed in the first time.
    When data in report is showed, user has the possibility to filter values for one characteristic. If the characteristic has the option for filter value selection during query execution equal to u201COnly Values in infoprovideru201D , the inverse routine is executed to obtain the values that are contained in the infoprovider and then the system show all the possible values. What I need is to identify this event, because in this case I donu2019t want to make some calculations in the transformation that are very expensive in time.
    Thanks a lot for your information.
    Best regards
    Ignacio

  • XML transformation using XSLT and Resin 2.1.11

    I have the following problem:
    I'm using a servlet to transform the xml files in my web-app to html. The servlet caches the ones transformed results. For each request it checks if there exists a cached result and if the result is based on the most actual xml file version (checking the "lastModified" method of java.io.File that represents the requested file).
    This servlet works fine and without any errors.
    My web-app also has some other servlets that use the xml transformation to generate a fragment of html code (the menu structure of my "normal" servlets is defined in one xml file for all other files and servlets).
    After invoking these servlets (those that use the xml transformation to create their menu) the first described servlet (transformation of requested xml files) is not working "fine" any longer. All it results is the generated header and footer of the page (hard-coded in the XSL file). The complete content is lost.
    Any ideas how to solve this problem?
    Thanks in advance,
    Thof

    1. The cache:
    The Hashtable is a field of my servlet called XMLTransformerServlet. The cache is not removed or deleted and none of its items is removed or deleted.
    As I said: Caching works fine, wonderful, perfectly...
    That's definitively not the problem.
    2. Thread safety:
    I've made all my servlet methods thread safe (just checked this...)
    3. About the "anonymous" other servlet type that uses xml transformations:
    Some of my servlets use a (thread safe) method to generate a fragment of html code that will show a simple menu structure. Therefore my web-app uses a file called menu.xml - by that way there's only one menu to maintain what makes sure that all my pages get the same menu structure (finally also the xsl file I'm using for "normal" xml transformation imports/includes and interprets this menu.xml).
    The (thread safe) method has transforms the menu.xml file using a special xsl file (menu.xsl) and outputs the result to a StringWriter. From this StringWriter I obtain the code-fragment that will be returned by the method.
    Before I saw the class StringWriter the first time I've used a temporary file to output the transformation result. Next I red in the file and returned its content.
    Finally - this method is working fine and it's always returning the expected data.
    4. The problem:
    Sorry for repeating this all the time...
    What I'm processing:
    &#160;- requesting some xml files -> XMLTransformerServlet is invoked and works fine:
    &#160;&#160;&#160;-> doGet checks the resource (if resource doesn't exist HTTP404 will be responded)
    &#160;&#160;&#160;-> doGet checks the caching state for this resource
    &#160;&#160;&#160;&#160;&#160;&#160;a) resource is in cache and no newer version of the File exists -> return cached element
    &#160;&#160;&#160;&#160;&#160;&#160;b) resource is in cache but a newer version exists in the file system -> recache and return newly cached element
    &#160;&#160;&#160;&#160;&#160;&#160;c) resource is not in cache -> cache the resource and return the newly cached element
    &#160;- requesting one of the other servlets (those that use xml transformation for menu generation)
    &#160;&#160;&#160;-> servlets invoked work fine
    &#160;- requesting a xml file:
    &#160;&#160;&#160;a) current version in cache -> return cached element
    &#160;&#160;&#160;b) no current version in cache -> transform the xml file and cache it
    This last transformation of the requested xml file fails.
    It is not failing in the sense of "throwing an exception"... it seems to work 100% fine and results a String that could be responded to the browser.
    But stupidly it is not working fine...
    Maybe (as you wrote) this is a bug (maybe in Resins xml transformation api).
    Just thought someone else might have made a similar experience...

  • Xslt transformation using SAP BC 47

    Hi,
    I'm trying to do a transformation using the sap transformation package in the SAP BC ( rel 47 )
    I'm transforming an IDOC into a cXML order for example...
    The transformed xml contains some rather odd characters...
    Even a very simple xslt has these odd characters...
    directly after the DOCTYPE
    I'm using MapForce to create the xslt..
    Has anyone else experienced these issues?
    <?xml version="1.0" encoding="utf-8"?>
    <!DOCTYPE cXML SYSTEM "....."[
      ]>
    <cXML payloadID="2005081645000002780916170000000000004039" timestamp="2005-08-16T09:16:17+0.00">
      <Header>
        <From>

    Hi,
    according to:
    >
    Michal_Krawczyk_PIXI wrote:
    > as per:
    > http://help.sap.com/saphelp_470/helpdata/EN/84/2e4d3ce624b800e10000000a114084/frameset.htm
    > "The href attribute no longer applies in this case."
    it appears the include element only works with the repository.... I tried
    <xsl:include sap:name="<Name_of_the_Transformation_in_Repository>"/>
    and it works.
    However this would mean, all includes i have to make have to be imported to the repository. If that's really the case, it'll be a huge problem, because the xsl-files i want to include are outside of my reference
    Regards, Lukas

  • Simulate update in Transformation using a single record

    In an update rule, it was possible from the monitor to simulate the update of an infoProvider.  During the simulation, you could choose to select only certain records of the PSA for simulation. This was very useful if you wanted to simulate only a single problematic record.
    In a transformation using a DTP, I can find out how to add the breakpoints and debut a start routine in a transformation, but I cannot find a way to do that simulation using only a single record from the PSA.
    The only option I can find is to create a DTP that has a filter that restricts the PSA down to a single record, but this is time consuming as you first have to find a way to filter the PSA to select a unique record.
    I have tried to use the ENTER DATA PACKAGE when setting the breakpoints, but this does not seem to allow this to happen.
    Is there a similar function in the DTP that allows you to simulate the update on a single selectable record?

    Hi Kevin,
    this function is not available from the transformation, yet check the DTP, where you can set the processing to serial. You can then change breakpoints at the processing steps of the DTP, and will also be asked to enter for which package you want to simulate the DTP or use the expert mode [next to processing mode] (I hope this is correct since I couldn't verify it in the system due to time constraints).
    Please search also the forum, since the topic simulation of DTP was already a topic here.
      Cheers
         SAP NetWeaver BI Organisation

  • Found a problem with transforming Clip Groups

    When you select a Clip Group in CS6, the "Edit Clipping Path" button is automatically highlighted in the Control Panel. However, if you accept that and try to transform a Clip Group's Clipping Path, the contents get transformed too. If you click on the "Edit Clipping Path" button again, it still happens. The only way around it is to click the "Edit Contents" button and then click the "Edit Clipping Path" again. Just saying.

    I'm also having this problem. It used to be in CS5, if you just clicked the "edit clipping path" button (never mind that it is selected by default!!) that would work.
    But now, in CS6, yes, you have to click "edit contents" and then "edit clipping path" again.
    Adobe, this seems like a bug. Can you fix it?
    I use clipping paths constantly and this is slowing me down.

  • How do you identify the Logical system in start routine of a transformation

    My scenario is this.  I have five r3 systems that I am extracting from.   In the start routine of the transformation from the r3 data source to my data store I  am going to delete data and I need to know the source system id.    How do I identify the logical system or source system id in the transformation.  Is there a system field that contains this information.    I do not want to hard code the source system id in the routine.

    hi
    have a lool at tables rsreqdone and rsbkrequest with a join you should be able to determine the source.
    regards
    Boujema
    How to give points: Mark your thread as a question while creating it. In the answers you get, you can assign the points by clicking on the stars to the left. You also get a point yourself for rewarding (one per thread).
    Edited by: Boujema Bouhazama on May 9, 2008 12:04 AM

  • I am unable to view google ads running alongside and under videos on YouTube. This is only a problem when I use Firefox. If I use another browser, I can see the ads. I do not have adlock as it does not appear in my plug-ins/add ons. Please help..

    I have been using Firefox for about two years. For about a month now I have been unable to view any Google advertisements that run on YouTube pages alongside and under videos. This is important for my business. I would like to stay with Firefox, but this is only a problem when I use Firefox and is not a problem with Internet Explorer or Google Chrome as I checked. I tried uninstalling Firefox and all plugs ins and add ons and then reinstalling it. This did not work. Firefox seems to be blocking the Google codes that enable the ads to run on the pages. I look forward to your help. Thank you.

    CS2 is very old and reached its "end of life" a while back.  So probably won't run on modern operating systems.  If you can still run it, you'll need to uninstall what you have and re-install with the download link below to activate it.
    Error: Activation Server Unavailable | CS2, Acrobat 7, Audition 3
    Nancy O.

  • Hi can anybody help please. I am having terrible problems trying to use my Nikon D7100 to tether. I have downloaded the latest Lightroom updates and also checked my firmware which is also the latest avaiable and still Lightroom wont detect my camera!

    Hi can anybody help please. I am having terrible problems trying to use my Nikon D7100 to tether. I have downloaded the latest Lightroom updates and also checked my firmware which is also the latest avaiable and still Lightroom wont detect my camera!. When I use a friends Canon camera it works every time!

    Hi Keith thanks for your reply I have Lightroom 5.7.1 64 bit and my Nikon's firmware is version 1.02

Maybe you are looking for

  • Is there a way to remove/smooth unnecessary keyframe created with the Audio Mixer write keyframe feature

    In After Effects,  there is a smoother tool (panel)  which removes a lot of in-between keyframes you don't need.  Is there a similar tool (script) in Premiere?  It would make it a lot easier to make point adjustments if you could get rid of the 20 ex

  • Change the size of a blank file

    I created an invite on a blank file that is 5x7.   I want to change the size to 8x10, yet I cannot find where to change the size in PSE 8.   I have too many layers to start over.  Is there a way to copy all the layers and paste them into a new file? 

  • Plugging in iPod deletes my mac's Documents

    I have a 5th generation iPod classic and a 2006 black macbook running Leopard. I am in college and thus don't live at home, but my iPod's library is synced to the iTunes library of my home computer, which is a PC. I forgot my charger when I last came

  • How to print a DVD label

    Is there an app nternal to the wireless officejet that helps print DVD labels?

  • Mac Crashing three times one day

    My Mac has been crashing for no apparent reason today.  Cursor freezes then black screen and reboots itself.  Last one was just spinning wheel of death.  At the time this happened: 1 was moving mouse across desktop - no application loaded. 2.  Browsi