Transformation in SAP BI 7.0 routine

Hi together,
if got the following problem I don't understand.
I've got a transformation between 2 DSO's.
Some characteristics in the target-ods are filled with routines.
The code for one of the characteristics:
Global Part of the routine:
$$ begin of 2nd part global - insert your code only below this line  *
data:
      lt_konto_kontotyp type table of zifs_ktn_ktntyp,
      ls_konto_kontotyp type zifs_ktn_ktntyp,
select * from zifs_ktn_ktntyp into table lt_konto_kontotyp.
$$ end of 2nd part global - insert your code only before this line   *
Now I expected to use the filled table lt_konto_kontotyp in the routine implementation
with the code:
class lcl_transform implementation.
  method compute_zifcm013.
  IMPORTING
    request     type rsrequest
    datapackid  type rsdatapid
   EXPORTING
     RESULT type tys_TG_1-/BIC/ZIFCM013
    data:
      monitor_rec    type rsmonitor.
$$ 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.
read table lt_konto_kontotyp into  ls_konto_kontotyp
with key kontotyp = '03'.
     result = ls_konto_kontotyp-konto.
$$ end of routine - insert your code only before this line         -
  endmethod.            
My problem is lt_konto_kontotyp isn't filled with data, the select in the global
part is not achieved?
Is there an error in reasoning?
King regards
Lars

Hi,
Just move the select satement in the Start routine under Class implementation
and while populating the data in the field routine make a read on the internal table with the keyfield fetching.
Just populate the data into a worka area for the keyfield combination and then move the corresponding fiedls to the the RESULT
in the field routine
Start routine changes:
CLASS lcl_transform IMPLEMENTATION.
Method
SELECT statement here
ENDMETHOD
Field routine changes.
READ TABLE <your internal table> INTo <work area>
WITH KEY <your conditions based on key field>
RESULT = <work area>-<your field>

Similar Messages

  • Is it possible to chose hierarchy-node in Transformation in SAP BW

    Hi there.
    Is it possible to chose hierarchy-node in Transformation in SAP BW.
    To calculate keyfigures and/or characteristics.
    We are in 7.0.
    Best Regards
    Ingrid

    Hi,
    It can  be possible if you go with routine...
    While updating the data from source to target (here you can lookup the Hierarchy table with transaction data(source) then Based on the hierarchy Node Id you can stamp the hierarchy value in the transaction ).
    I don't have system to give sample code but it can be achievable with ABAP help....
    Regards,
    Satya

  • Create XML transformation in SAP R/3 4.7

    Hi Experts,
    Kindly let me know the transaction for creating xml transformation in sap r/3 4.7, if there is any.
    Though i could not find anything through tstc or se93.
    Is there any other way of creating xml transformation in r/3 4.7. There is a tcode STRANS in ecc6.0 but not in 4.7.
    Also, please help me resolving this issue of converting abap data to xml file: -
    is the following xml structure possible with transformation or by any other method.
    <Process_Order>
         <item>
                   <PO Number> PO123334 </PO Number>
                   <Header_mat> Mat123 </Header_mat>
                   <BOM>
                          <PDLabels>
                                  <PDLabel>
                                         <PCode>P123456</PCode>
                                         <Batch>123ABC</Batch>
                                         <Quantity>6000</Quantity>
                                         <PDDCode>1234567890</PDDCode>
                                 </PDLabel>
                                 <PDLabel>
                                        <PCode>P234567</PCode>       
                                        <Batch>567DEF</Batch>
                                        <Quantity>6000</Quantity>
                                        <PDDCode></PDDCode>
                                 </PDLabel>
                        </PDLabels>
                       <PDCartons>
                                <PDCarton>
                                       <PCode>P556677</PCode>
                                       <Batch>589GFT</Batch>
                                       <Quantity>1200</Quantity>
                                       <PDDCode></PDDCode>
                                </PDCarton>
                      </PDCartons>
                 </BOM>
        </item>
         <item>
                   <PO Number> PO123334 </PO Number>
                   <Header_mat> Mat123 </Header_mat>
                   <BOM>
                          <PDLabels>
                                  <PDLabel>
                                         <PCode>P123456</PCode>
                                         <Batch>123ABC</Batch>
                                         <Quantity>6000</Quantity>
                                         <PDDCode>1234567890</PDDCode>
                                 </PDLabel>
                                 <PDLabel>
                                        <PCode>P234567</PCode>       
                                        <Batch>567DEF</Batch>
                                        <Quantity>6000</Quantity>
                                        <PDDCode></PDDCode>
                                 </PDLabel>
                        </PDLabels>
                       <PDCartons>
                                <PDCarton>
                                       <PCode>P556677</PCode>
                                       <Batch>589GFT</Batch>
                                       <Quantity>1200</Quantity>
                                       <PDDCode></PDDCode>
                                </PDCarton>
                      </PDCartons>
                 </BOM>
        </item>
    </Process_Order>
    What i mean to ask is, is the hierarchy to this structural level is attainable using either transfomation or any other alternative.
    Thanks a lot in advance !
    Shreya

    oops the message structure has gone bad ........
    What i meant was : --
    <Process_Order>
      <item>
                   <PO Number> PO123334 </PO Number>
                   <Header_mat> Mat123 </Header_mat>
                   <BOM>
                          <PDLabels>
                                  <PDLabel>
                                         <PCode>P123456</PCode>
                                         <Batch>123ABC</Batch>
                                         <Quantity>6000</Quantity>
                                         <PDDCode>1234567890</PDDCode>
                                 </PDLabel>
                                 <PDLabel>
                                        <PCode>P234567</PCode>       
                                        <Batch>567DEF</Batch>
                                        <Quantity>6000</Quantity>
                                        <PDDCode></PDDCode>
                                 </PDLabel>
                        </PDLabels>
                       <PDCartons>
                                <PDCarton>
                                       <PCode>P556677</PCode>
                                       <Batch>589GFT</Batch>
                                       <Quantity>1200</Quantity>
                                       <PDDCode></PDDCode>
                                </PDCarton>
                      </PDCartons>
                 </BOM>
        </item>
    </Process_Order>

  • Transformation in sap bw 7.0

    i am learning sap bw. i would like to know full details on the topic  transformation in sab bw 7.0
    Please search the forum before posting a thread.
    Edited by: Pravender on Jul 8, 2010 10:57 AM

    Hi,
    Just move the select satement in the Start routine under Class implementation
    and while populating the data in the field routine make a read on the internal table with the keyfield fetching.
    Just populate the data into a worka area for the keyfield combination and then move the corresponding fiedls to the the RESULT
    in the field routine
    Start routine changes:
    CLASS lcl_transform IMPLEMENTATION.
    Method
    SELECT statement here
    ENDMETHOD
    Field routine changes.
    READ TABLE <your internal table> INTo <work area>
    WITH KEY <your conditions based on key field>
    RESULT = <work area>-<your field>

  • Short Dump while creating transformation in SAP Trial 7.01

    Hi All,
    I'm getting this dump when I try to create transformation(BI 7) in Trial Version 7.01 software which I downloaded from SDN. Below is the dump error.
    "Make sure that the OCXs ICDataFlow.ocx and wdbdadpt.ocx auf are
    installed on your computer. You can find notes on installing and
    checking the BW Frontend by searching for SAP Notes with the
    following key words:
    Version, sapservX, Setup, Patch, Installation, Frontend, BW,
    sapbexc.xla, checktool, wdtaocx, wdtaocx.ocx
    If the front end is installed correctly but the error still occurs,
    contact SAP."
    I tried some notes but they didn't help. Few other threads said to install the latest patches. I have oss user id but market place allows downloads of latest patches only through Solution Manager. How do I install Sol Man in trial software. This is what Download Basket says:
    "All corrective software packages, for SAP NetWeaver 7.0 and SAP Business Suite 2005 and beyond that are delivered after April 2nd, 2007 will ONLY be available via SAP Solution Manager's Maintenance Optimizer. Find more details  here . "
    Any other solution if anyone knows then please share. Points will be assigned.
    Regards,
    Sujit.

    Hi,
    The problem was with the sap gui version. I installed the trial version on my office computer and my office computer had the latest gui. The sap gui that comes with the trial version has this problem. Check if they have a new trial version now. Hope this helps you.
    Regards,
    Sujit.

  • Transformation on SAP InfoObject

    Hi Experts,
    I have made a transformation on 0calmonth.
    As I want to create a dtp for this transformation I get the message that the Source 0CALMONTH (TYPE IOBJA) is not activ.
    (The infoobject is active; if I try to activate again, system says that it is already active).
    The same happens if I try to put dtps on other sap-delivered info-objects.
    I have found some notes that state that problems with infoobjects in d-version would be corrected with support package 8, but we are currently on support package 18.
    Does anybody know how can upload data from delivered info-objects (without creating my own one)?
    Thanks,
    Markus

    Hi Marcus
    Are you sure that you want a DTP on 0calmonth.
    As per my understanding, we can have attributes only for masterdata and we cannot use 0calmonth as dataprovider.
    To create a DTP , the target cannot be an infobject.
    Please correct me if I am wrong....
    Cheers
    Chanda

  • How to pass tables data from SAP script to the routine.

    Hi,
    I have standard program RPCTEAL0_01 which calls a SAP script form(Custom) to print the form.
    Now I have to add some additional functionality to change the values in the form. Since it is custom form I can add ROUTINE and then pass the values to the custom program to modify the variables.
    My concern here, I would like to pass the tables like RT,CRT to the custom program via form.
    Is this possible?  RT and CRT filled by standard progam.
    Regarsd
    Eswar
    <MOVED BY MODERATOR TO THE CORRECT FORUM>
    Edited by: Alvaro Tejada Galindo on Jan 20, 2009 9:06 AM

    Hi, The suggested option is not working.
    Actually I am using the below code in SCRIPT
    /:   PERFORM CAL_2008 IN PROGRAM ZHR_TEST1
    /:   USING &PER_NO&
    /:   CHANGING &W12&
    /:   ENDPERFORM
    and calling form in ZHR_TEST1. But this will pass only variables. Now my requirement is to pass tables also.

  • SAP Basis basics and routine

    I currently work as a business consultant on SAP systems for a number of clients and I wanted to share some pointers.
    Tracking and troubleshooting, then vice versa; This is a general rule of thumb to follow never do one without the other.
    First Identify the problem or request and make an action plan you will use to get the result. Documenting and generalizing processes.
    Protection of customer data and routine backups are key to ensuring that you have a failsafe.
    create a list of task and map out your day before you even look at tickets or request so that you can efficiently fill the gaps with tickets you create from issues that you find on your on. it's best to look for issues rather than to wait for them.
    Identify, Rectify, and Simplify.  

    Hi,
    Please repost as blog or document not as discussion. Thanks for sharing your points.
    Thanks & Regards,
    Nagarajan

  • 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

  • Data Integrator "where" in query transform vs SAP table column date

    I have the following problem:
    I am using a query transform to grab data from a SAP table and have a "where" that looks like this that works:
    ZMM_STOMOS_HIST.ZPOST_DATE = to_date(to_char(sysdate(), 'YYYYMMDD'), 'YYYYMMDD')
    BUT it runs for a very long time and I have just realised that when I look at the sql statement via display optimized sql that the "where" statement does not show - which makes sense because it seems to return the entire table rows to DI before it starts to filter them on the "where".
    this is even though the pure SAP date is stored as YYYYMMDD type date and in DI we say take it to our BO table as type date u2013 the sql server database made it datetime. And when I validate the sql transform I get this warning.
    [Query:Query_1]
    BODI-1110411: Conversion warning <Warning: Expression <to_date(to_char(sysdate(), 'YYYYMMDD'), 'YYYYMMDD')> of type <DATETIME> will be converted to type <DATE>.> for expression <ZMM_STOMOS_HIST.ZPOST_DATE = to_date(to_char( sysdate( ),'YYYYMMDD'),'YYYYMMDD')
    >.
    I can get other "where" conditions to show in the optimized sql on the same table - no problem.
    e.g.
    SELECT ZSERIAL , ZUMOVETYP , ZUORIGIN , ZUDESTN , ZUTRDATT , ZUTRTIMM , ZUVENDER , ZUBOXSA1 , ZUBOXSA2
    FROM ZMM_STOMOS_HIST
    WHERE ZUMOVETYP = 'RBX'
    How do I get this particular where clause to appear in the optimized sql statement ? I suspect it has something to do with the formatting and have tried many formats but no go.

    Thank you so much .... I had to use a variable / paramter of type varchar(8) and the value as YYYYMMDD
    e.g. my script
    $today = to_char(sysdate(),'YYYYMMDD');
    print('date is : [$today]');
    This has resulted in a huge resource and most of all time saving.
    I still dont understand why DI cant just figure this out in a normal where like it does with other datatypes but right now it works so I am happy.

  • SAP BW UPDATE RULE  ROUTINE

    Data is coming from one cube to another cube.
    How to restrict the data in update rule by using routine , which is not require in to another Cube.
    Thanks,
    Asit

    Hi Asit,
    You are on which system BW 3.5 or BW 7.0?
    If you are on BW 7.0, there are various way of doing this.
    1> Using DTP: If you have definite filter criteria while loading data from Infocube 1 and Infocube 2, you can use it in DTP.
    for eg. while doing data loads, exclude records where material group is blank. While creating DTP, you can specify required filter criteria.
    2> using start routine: You can use start routine as well to exclude all those records which you don't want to load to target infocube.
    For eg. Delete all records from source package where case ids are blank.
    use below statement to code it:
    Delete source_package where <fieldname> = <some values>.
    Regards,
    Nilima

  • Delete Generated programs in transformations in SAP BI

    Hi Experts,
    I am facing an issue while deleting an old include program which was no more used in the transformation.
    While deleting the include program its still showing that its used in the generated program.
    But the transformation was deleted long back.
    Now could some one help me in deleting the generated program and the include.
    Thanks in advance.

    Hi,
    You need to deactivate the Function group and Function Module and delete the include program.
    Regards,
    Suman

  • Restore deleted transformation in sap bw

    a transformation from extractor to billing DSO has been accidentally deleted.
    the deleted one is captured in a Transport request which is not yet released.
    is there a way by which it can be restored...
    i mean rollback the deleted operation and restore the transformation again.

    Hi,
    If this transformation has been transported to other systems earlier, then one way of doing this is to ask your basis team to import back the transport request which got it moved to other system. I have done this in past and this can solve your problem provided it had been transported earlier.
    Thanks,
    Arminder Singh

  • How best to transform a SAP end user to a consultant ???

    After working as a SAP SD consultant,I realized a need for training SAP aspirants.But,focused only on a few SAP end users locally in Hyd, as the jargon
    and concepts were best suited for end users who work on live data ! Today with 10+ yrs SAP recruiting experience,  I wish to address this national demand (in India firstly) by locating near the end users community / location ( North India).
    I am open to  valuable suggestions / inputs related to training content ex: ASAP methodology ?
    Regards.
    DESH

    Hi Desh,
    There are lot of documents available in SAP Service Marketplace if you have S user id.  If you have already done a certification or working for implementation partner then you get this S user id to login into SAP Service Marketplace.
    SAP ASAP methodology comes with SAP Solution Manager, so you can check through SAP Solution Manager this ASAP methodology.
    In India, All CMMI level companies have their own delivery methodologies as per my knowledge, so 90% of the time they won't adopt SAP ASAP methodology... Either they go with Client methodology or sell their own implementation or support methodologies or different framework.
    At the outset, it is not mandatory to have this but if you have knowlege in delivery methodology framework like Waterfall, Scrum, Agile that would be added advantage.
    Regards
    GGOPII

  • Thread for routines scenarios-

    Hello guys,
    We are a couple of BI starters without project experience. We read some documents about where to use ABAP in BI  and how to use.We want to implement them in our sandbox but donot know anything about how the requirement will be.
    So we thought of starting a thread here so that people who have got project experience will post in this thread ,where they have used ABAP in their projects or which client requirement made you use ABAP.
    I am sure many of BI starters will like to learn from this thread.
    Thanks,
    Rgds,
    S

    Hi,
    Scenario 1: Reporting Level
    There is Material which is having Manufature Date and Expiry Date.My client wants the no.of Daya between Manufature Date and Expiry Date.So for this we have created customer exit variable and written a code to clacute the no.of.Days.Code written in CMOD ( ABAP Code) in BI.
    Scenario 2:  Start Routine
    Trnaformation Level
    Program Name:      Start Routine of Update Rule 2LIS_04_P_MATNR                    
    Data Declaration
      DATA:i_ZPPLANT_ATT
             like /BI0/PPLANT occurs 0
               with header line,
           i_ZPSALESORG_ATT
             like /BI0/PSALESORG occurs 0
               with header line.
    Remove content of DataSet
      refresh: i_ZPPLANT_ATT,
               i_ZPSALESORG_ATT.
    Selection of Data Package Attributes
      SELECT PLANT SALESORG OBJVERS
        FROM /BI0/PPLANT
      INTO CORRESPONDING FIELDS OF
        TABLE i_ZPPLANT_ATT.
      SELECT SALESORG COMP_CODE OBJVERS
        FROM /BI0/PSALESORG
      INTO CORRESPONDING FIELDS OF
        TABLE i_ZPSALESORG_ATT.
      LOOP AT DATA_PACKAGE.
        CLEAR i_ZPPLANT_ATT.
        CLEAR i_ZPSALESORG_ATT.
      Retrieval of Company Code using Plant Attributes
        READ TABLE i_ZPPLANT_ATT WITH KEY
                   PLANT = DATA_PACKAGE-PLANT
                   OBJVERS = 'A'.
        READ TABLE i_ZPSALESORG_ATT WITH KEY
                   SALESORG = i_ZPPLANT_ATT-SALESORG
                   OBJVERS = 'A'.
        DATA_PACKAGE-COMP_CODE = i_ZPSALESORG_ATT-COMP_CODE.
        DATA_PACKAGE-/BIC/ZCMPSCRAP = DATA_PACKAGE-/BIC/ZCMPSCRAP / 100.
        Modify DATA_PACKAGE TRANSPORTING
            /BIC/ZCMPSCRAP
            COMP_CODE.
      ENDLOOP.
    if abort is not equal zero, the update process will be canceled
    ABORT = 0.
    Threads for Routines:
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/609eea32-455e-2c10-c08a-c23adf8c934e?QuickLink=index&overridelayout=true
    Transformation in SAP BI 7.0 routine
    Regards
    Ram.
    Edited by: Ramakanth Deepak Gandepalli on Dec 28, 2009 6:20 AM

Maybe you are looking for

  • Syncing photos from Adobe Bridge?

    I have hunted across the web and haven't even found a page that discusses the question, let alone answers it: Is it possible to sync photos TO an iPod from Adobe Bridge? I suspect the answer is no (or at least, not directly). Ideally, what I would li

  • Word 2007 to PDF conversion

    Hi, when I save a MS Word 2K7 document to PDF, it opens in PDF with a yellow background. Has anyone else experienced this, or know what the problem/solution is? thx.

  • How to add multiple images to panel

    Hi, i am trying to add more than 1 image to a panel, but i cant work out how. have the following code, but it means i have to create a new panel each time. i only want to use 1 panel, and add images to this one panel. the images are transparent and i

  • I have Mavericks but no iBooks

    I am using 10.9.4 but there is no iBooks. Where can I download it?

  • Convert Calendertype to Date

    Hi How can I convert a calender type to date type: Date retiredate = wdContext.currentResult_RetireRequestGetElement().getRetireDate() <-----type calender //Notification date                          Date notifDate = retiredate;