Update Routine

Hi community,
                      Iam working on Procurement, Here my issue is I have standard Info cubes and they are getting data directly from standard Infosources(According to data flow) . But I want to create DSO between Infocube and Infosources. I have standard DSOs for this infosources which loads data into the cube.
                      By using this DSOs I want to create Update Rules between Info cube and DSO. When I am creating update rules I have all keyfigure which are mapping to routines. In the Routine when I copy routine from Info source and paste it here " I AM GETTING PROCESS KEY IS NOT DEFINED IN COMMUNICATION STRUCTURE" .
                      I have knowledge about process key and this is existing in info source but not in DSO, please tell me how to solve this problem........ to map fields in update rules between Info Cube and DSO....
Regds
Dave.

Dave
Have you checked this previous thread
https://forums.sdn.sap.com/click.jspa?searchID=1161413&messageID=1148365
Thanks
Sat

Similar Messages

  • Urgent help required to write the code in  update routine

    Hi all,
    i want to calculate open purchase order qty in update routine
    formula is
    open purchase order qty = scl qty - rec qty
    where schd line date is less then or equal to 90 days from the current date.
    I have written one code : but its giving error that comm_structure is not defined in abap dictionary,can any body help to write appropriate routine. this calculation i am making for MM, and data source and cube are 2lis_02_scl and cube is zc_pur01 ( made by coping the 0pur_c01), data source scl has all fields required in the foumula...here is my code
    DATA:  COMM_STRUCTURE LIKE  /BIC/CS2LIS_02_SCL.
    DATA: SCL_QTY LIKE COMM_STRUCTURE-/BIC/ZK_SCLQTY.
    DATA:      GR_QTY LIKE COMM_STRUCTURE -/BIC/ZK_GRQTY.
    DATA: SCL_DATE.
    SCL_DATE = SY-DATUM + 90.
    SELECT COMM_STRUCTURE -/BIC/ ZK_SCLQTY COMM_STRUCTURE -/BIC/ ZK_GRQTY FROM
    /BIC/CS2LIS_02_SCL INTO   SCL_QTY     GR_QTY  
    WHERE
    COMM_STRUCTURE -/0SCHED_DATE LE SCL_DATE.
    IF SYSUBRC  = 0
    RESULT = SCL_QTY - GR_QTY.
    ELSE = NOVALUE.
    ENDIF.
    Can any body help me soon its very urgent.
    thanks

    Hi Anupam,
    I am not a very good ABAP Programmer, but found some things to notify u inyour code..
    DATA: COMM_STRUCTURE LIKE /BIC/CS2LIS_02_SCL,
          SCL_QTY LIKE COMM_STRUCTURE-/BIC/ZK_SCLQTY,
          GR_QTY LIKE COMM_STRUCTURE -/BIC/ZK_GRQTY.
    DATA  SCL_DATE LIKE SY-DATUM.
    SCL_DATE = SY-DATUM + 90.
    SELECT COMM_STRUCTURE -/BIC/ ZK_SCLQTY COMM_STRUCTURE -/BIC/ ZK_GRQTY FROM
    /BIC/CS2LIS_02_SCL INTO SCL_QTY GR_QTY
    WHERE
    COMM_STRUCTURE -/0SCHED_DATE LE SCL_DATE.
    IF SYSUBRC = 0
    RESULT = SCL_QTY - GR_QTY.
    ELSE.
    What should be the return value if you dont have to    calculate the result."
    ENDIF.
    try it.. and see..
    regards,
    kishore.

  • Update Routine & Start Routine in BI 7.0

    Hi Experts,
    We have recently upgraded from BI 7.0 , I am confused about where to write start routine & update routine in transformations of BI 7.0?
    Please mention any pointers?
    Thanks.
    Sharat.

    Hi
    When you open the start routine you will see a routines info which gives you help on this.
    A summary would be:
    Update routine in transformation.
    RESULT = source_field-material.
    Basically you can acess the value of the record by using source_field.
    Start routine.
    The data comes in the form of an internal table with name SOURCE_PACKAGE.
    You can access the values by looping into a work area.
    LOOP AT SOURCE_PACKAGE assigning <source_fields>.
    ENDLOOP.
    End routine(This is a new feature in BI 7.0 where you can modify data when transformations are complete and before data is updated to info-providers)
    The data comes in the form of an internal table with name RESULT_PACKAGE.
    You can access the values by looping into a work area.
    LOOP AT RESULT_PACKAGE assigning <result_fields>.
    ENDLOOP.
    Hope this helps you to understand the basics of the abap used in the transformations .
    Regards
    Samarpita

  • Update Routine to populate 0VENDOR from either of the 2 data source fields

    Hi,
    I have a requirement to write an update routine for 0VENDOR based on the below logic :
    Create routines to populated BW Info Object u201CVendoru201D (0VENDOR) based on the following logic:
    IF field u201CVendoru201D (ITM_VENDOR_ID) is populated from data source 0BBP_SC_TD_1, THEN populate 0VENDOR with that value
    ELSE IF u201CPreferred Vendoru201D (ITM_PROPVEN_ID) is populated from data source 0BBP_SC_TD_1, THEN populate 0VENDOR with that value
    ELSE IF neither u201CVendoru201D (ITM_VENDOR_ID) or u201CPreferred Vendoru201D (ITM_PROPVEN_ID) are populated from data source 0BBP_SC_TD_1, then 0VENDOR = NULL
    Can anyone help me in converting this logic into ABAP routine.
    Thanks,
    Suchitra

    Hi Suchitra,
    In the Transfer Rules ... You will be mapping each field then the mapping field click on the button with Triangle then you can see the which type you want.
    Then select the routine and select the datasource fields (don't forget to select the both fields VENDOR and PROPITM)...
    Then give a name to routine ...
    and in the code just change the COMM_STRUCTURE to TRANSFER_STRUCTURE.
    Then you can get this .... done..
    Regards,
    Ravi Kanth

  • Update routine to populate value for field ZDOCCATG(Document category)

    Hi Experts,
       I need to populate  data for field ZDOCCATG(Document Category) based on the value of the below  two fields,
    1. 0deb_cre_lc(Debit / credit Amount)
    2. 0ac_doc_typ(Belegart)
    The logic is as follows:
    if 0deb_cre_lc > '0'.
         if 0ac_doc_typ == 'dz'.
          ZDOCCATG = Disputes.
         else
      ZDOCCATG = Invoices.
       end If.
    else
    if 0ac_doc_typ < '0'.
    ZDOCCATG = Credits.
    end if.
    I need to write the update routine to get the values assigned for Document category based on these two fields. When i open the routine for the field ZDOCCATG, i can see the below screen:
    PROGRAM UPDATE_ROUTINE.
    $$ begin of global - insert your declaration only below this line  -
    TABLES: ...
    DATA:   ...
    $$ end of global - insert your declaration only before this line   -
    FORM compute_data_field
      TABLES   MONITOR STRUCTURE RSMONITOR "user defined monitoring
      USING    COMM_STRUCTURE LIKE /BIC/CS80FIAR_O03 - (Communication structure)
               RECORD_NO LIKE SY-TABIX
               RECORD_ALL LIKE SY-TABIX
               SOURCE_SYSTEM LIKE RSUPDSIMULH-LOGSYS
      CHANGING RESULT LIKE /BIC/AZOARFSCM00-/BIC/ZDOCCATG
               RETURNCODE LIKE SY-SUBRC "Do not use!
               ABORT LIKE SY-SUBRC. "set ABORT <> 0 to cancel update
    $$ begin of routine - insert your code only below this line        -
    fill the internal table "MONITOR", to make monitor entries
    result value of the routine
      RESULT = .
    if abort is not equal zero, the update process will be canceled
      ABORT = 0.
    $$ end of routine - insert your code only before this line         -
    ENDFORM.
    Please let me know the code to be inserted (based on the logic mentioned above) in the above screen . Thanks
    Regards,
    Kavitha Jagannath

    Hi Kavitha,
          Supposing the technical name of fields is /bic/0deb_cre_lc and /bic/0ac_doc_typ use the code below at the marked position.
    PROGRAM UPDATE_ROUTINE.
    $$ begin of global - insert your declaration only below this line -
    TABLES: ...
    DATA: ...
    $$ end of global - insert your declaration only before this line -
    FORM compute_data_field
    TABLES MONITOR STRUCTURE RSMONITOR "user defined monitoring
    USING COMM_STRUCTURE LIKE /BIC/CS80FIAR_O03 - (Communication structure)
    RECORD_NO LIKE SY-TABIX
    RECORD_ALL LIKE SY-TABIX
    SOURCE_SYSTEM LIKE RSUPDSIMULH-LOGSYS
    CHANGING RESULT LIKE /BIC/AZOARFSCM00-/BIC/ZDOCCATG
    RETURNCODE LIKE SY-SUBRC "Do not use!
    ABORT LIKE SY-SUBRC. "set ABORT <> 0 to cancel update
    $$ begin of routine - insert your code only below this line -
    fill the internal table "MONITOR", to make monitor entries
    result value of the routine                 
    <----- Paste the code below as shown here --->
    if comm_structure-/bic/0deb_cre_lc > 0.
      if comm_structure-/bic/0ac_doc_typ == 'DZ'.
       result = 'DISPUTES'.
      else
       result = 'INVOICES'.
      endIf.
    elseif comm_structure-/bic/0deb_cre_lc < 0.
      result = 'CREDITS'.
    end if.
    <----
    >
    if abort is not equal zero, the update process will be canceled
    ABORT = 0.
    $$ end of routine - insert your code only before this line -
    ENDFORM.
    Regards:
    Jitendra
    Edited by: Jitendra Gupta on Oct 15, 2009 3:05 PM

  • New field to be filled by update routine

    Deltas are running, and added a new char to the cube and written update routine to fill the new char. How should i fill this new value for history. I don't want to reshedule the job from r/3. Will i be able to do from reconstruction (i doubt since our PSA Data is deleted every week). there is no ods between. What are options available.
    Kunal

    Hi Kunal,
       If data is available in BW then you can write some coding(routine) to fill the data for history data you have to loop back(CUBE to CUBE) to CUBE.
    Have a look:
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/f421c86c-0801-0010-e88c-a07ccdc69601
       Provide some more details. Which character, is available as attribute of any object...etc..
    Hope it Helps
    Srini

  • Update routine - Performance Tuning

    Hi,
    To increase the performance, I have deleted some records in the data_package but these changes are not reflecting in the ALV output. We are getting old data only.
    If we toutch the standard ALV program it is a problem for other update routinies. Please tell me the solution.
    Thanks,
    Suresh Kashimalla

    Please be more specific, and elaborate on your issue. What are you referring to with ALV (ABAP List Viewer?). In which respect? Are you on SAP NetWeaver 2004s?
      Cheers
        SAP NetWeaver BI Organisation

  • Update routine for 0proc_unit conversion

    Hi all,
    My infoobject 0OPR_ACTWRK uses 0PROC_UNIT for units. It holds data in days and in hours. When I load it to a cube, I want to convert all values to working hours.
    I figured out that I have to use an update routine in my update rules. A lot of forum threads about unit conversion mention the function module UNIT_CONVERSION_SIMPLE. Can I use this function for my problem? Or should I use a different function module?
    This will be my first ABAP code, so can anyone help me and tell me what I have to fill in exactle in the routine format below?
    $$ begin of routine - insert your code only below this line        -
    fill the internal table "MONITOR", to make monitor entries
    result value of the routine
      RESULT = .
    result value of the unit
      UNIT = .
    if the returncode is not equal zero, the result will not be updated
      RETURNCODE = 0.
    if abort is not equal zero, the update process will be canceled
      ABORT = 0.
    $$ end of routine - insert your code only before this line         -
    Thanks in advance!
    Regards, Pieter

    Dear Pieter,
    I am not infront of the system..
    the following surely will give error.. :).. so post back here.. so that me or someone else will reply you..
    So let us start witht he following coding in the 'Start routine'.
    LOOP AT DATA_PACKAGE.
    IF DATA_PACKAGE-UNIT= 'DAY'.
       DATA_PACKAGE-opr_pldwrk = DATA_PACKAGE-opr_pldwrk * 8.
    ELSE.
    Do nothing.
    ENDIF.
    MODIFY DATA_PACKAGE.
    ENDLOOP.
    Regards,
    Hari
    Message was edited by: Hari Kiran Y
    Message was edited by: Hari Kiran Y

  • Update Routine ABAP question

    Hi,
    I am updating data between two ODS objects using some update routines. I would like to write the following routine (in pseudo code):
    ++++++++++++++++++++++++++++++++++++++++++++++++++++
    Check if the characteristic i am updating is not null
    IF COMM_STRUCTURE-field1 = 'value1'     AND
             COMM_STRUCTURE-field2 = 'value2'.
    RESULT COMM_STRUCTURE-field3.
    ELSE.
    Don't update anything
    END IF
    +++++++++++++++++++++++++++++++++++++++++++++++++++
    My questions:
    1. How i tell the routine not to update anything (as specified in the pseudo code)?
    2. How i can check that the characteristic i woul like to update is not null?
    3. What is the preferred debug method in case i do not use the PSA?
    BR,
    Xibi

    Thanks Siggi for your prompt and helpful answer. There are however some fundamental things which are not fully clear to me (BTW, where i can find some good documentation on ABAP for BW??):
    > Hi,
    >
    > 1. How i tell the routine not to update anything (as
    > specified in the pseudo code)?
    >
    > set the returncode to a value <> 0.
    I wrote the following:
    returncode = 1.
    Consequently the updated failed. Maybe i am doing something wrong but my intention is not to have the whole thing fail, but rather skip the update for some records.
    > 2. How i can check that the characteristic i woul
    > like to update is not null?
    >
    > if not comm_structure-<fieldname> is initial.
    The problem is that the characteristic i am trying to update is not contained in the source ODS but only in the target one. Will "if not comm_structure-<fieldname> is initial" still work in this case?
    >
    > 3. What is the preferred debug method in case i do
    > not use the PSA?
    >
    > Without psa, you need to add a endless loop:
    > statics: st_flag type c value '0'.
    >
    > while st_flag = '0'.
    > break-point.
    > endwhile.
    >
    >
    > Hope this helps!
    >
    > regards
    >
    > Siggi

  • Update routine infinite loop

    Hello Experts,
    For loading ODS2 we are making a lookup on ODS1 for 0material based on
    purchaing document number, item line item.
    Is there any mistake in the start routine or update routine.
    Because the load goes in infinite loop. I think update routine should be changed.
    Any suggestions are appreciated
    Start routine:
    data: begin of itab occurs 0,
            pur_doc like /BIC/AZODS100-OI_EBELN,
            item like /BIC/AZODS100-OI_EBELP,
            material like /BIC/AZODS100-material,
          end of itab.
    clear itab.
    select OI_EBELN OI_EBELP MAT_PLANT from /BIC/AZODS100
             into table itab.
    Update routine for 0material
    loop at itab where pur_doc = COMM_STRUCTURE-OI_EBELN
                       and item = COMM_STRUCTURE-OI_EBELP.
           RESULT = itab-matplant.
    endloop.

    Hi,
    this takes a long time, because with each record of your data packaged it is doing the loop and scanning each row of the internal table. Use the following instead.
    Start routine:
    types: begin of t_itab,
    pur_doc like /BIC/AZODS100-OI_EBELN,
    item like /BIC/AZODS100-OI_EBELP,
    material like /BIC/AZODS100-material,
    end of t_itab.
    data: itab type hashed table of t_itab with unique key pur_doc item.
    select OI_EBELN OI_EBELP MAT_PLANT from /BIC/AZODS100
    into table itab order by oi_ebeln oi_ebelp mat_plant.
    I hope these fields are the key of the ods object.
    Update routine for 0material
    data: wa_itab type t_itab.
    read table itab into wa_itab with table key pur_doc = COMM_STRUCTURE-OI_EBELN
    item = COMM_STRUCTURE-OI_EBELP.
    if sy-subrc = 0.
    RESULT = wa_itab-matplant.
    else.
    clear result.
    endif.
    Hope this helps
    regards
    Siggi

  • Update Routine - ABAP code

    Hi,
    I am trying to write an update routine to calculate and populate fields in my ODS infoprovider.
    one of the key figure field in my update rules is 'No. of Days'. Based on the 'No. of Days' range, I want to send a key figure(Infoobject:Due amount) value to another infoobject(Bucket1, Bucket2, Bucket3 ect.)in my ODS infoprovider. For example, let's say,
    IF NO. OF DAYS = >0 AND <=30
       THEN TAKE THE DUE AMOUNT PUT IN BUCKET1
    ENDIF.
    ELSE IF
       NO. OF DAYS = >31 AND <=60
       THEN TAKE THE DUE AMOUNT PUT IN BUCKET2
    ENDIF.
    ELSE IF
       NO. OF DAYS = >61 AND <=90
       THEN TAKE THE DUE AMOUNT PUT IN BUCKET3
    ENDIF.
    I think, I know the data flow logic but I don't know how to code in ABAP language. If someone can give me some psuedo like ABAP code, I would appreciate your help with points.

    Hi Roa,
    I would do this in the start routine of the update rule.
    Here is a sample on how do this. You could use a case statement for this code also.
    Loop at Data_Packet.
    IF NO. OF DAYS = >0 AND <=30
    Data_Packet-BUCKET1 = DUE AMOUNT
    ELSEIF
    NO. OF DAYS = >31 AND <=60
    Data_Packet-BUCKET2 = DUE AMOUNT
    ENDIF.
    ELSEIF
    NO. OF DAYS = >61 AND <=90
    Data_Packet-BUCKET3 = DUE AMOUNT
    ENDIF.
    modify data_packet.
    endlloop.
    Cheers! Bill

  • Which is better transfer routine or update routine???

    HI ALL,
    I have read some documents, but I didnt get the real concept.
    Can any one explain in detail as to how do we decide where to write the code i.e a start routine or transfer routine or update routine...and which one is better  for a given scenario..
    with example?

    My scenario is like this:
    master data InfoObject for e.g. Z_MATERIAL1 with 10 fields as attributes. It has two Source Systems feeding it; SAP and a flat file from a system called Product Catalog (PCAT).
    The PCAT data is generally more reliable, hence, if a material XYZ comes from PCAT then PCAT is the owner of the material. SAP should not be able to update five critical fields of that material if PCAT owns the material.
    For e.g. the below values comes from PCAT and Master data is updated.
    PCAT
    Material Group Type Price Curr Unit Prod Desc. Lang Class
    XYZ      ABC   BRU  10.00 USD  PC  Inh   To    EN   001
    When the data comes from SAP R/3, it should not update anything other than the last 4 fields.
    SAP
    Material Group Type Price Curr Unit Prod Desc. Lang Class
    XYZ      ABC    BRU 20.00 USD  BOX  In   The    DE   003
    Finally the data in the Master Data Object should be as below.
    Material Group Type Price Curr Unit Prod Desc. Lang Class
    XYZ      ABC   BRU 10.00  USD  PC  In    The    DE   003
    where do i write the code...i have written this in start routine of transfer rules...i want to know the performance issues...

  • Error in the update routine

    Dear All,
    Facing the following error while writing an update routine.Please provide the solution
    *E:The type of the database table and work area (or internal table)*
    *"WA_/BIC/AO_FIMTD00" are not Unicode convertible. convertible.*
    Routine:
    data : wa_/BIC/AO_FIMTD00 type  /BIC/AO_FIMTD00.
      data : prev(6) type N.
      Prev =  COMM_STRUCTURE-fiscper - 1.
      select single * from /BIC/AO_APOORD00 into wa_/BIC/AO_FIMTD00
      where COMP_CODE = COMM_STRUCTURE-COMP_CODE
        and PROFIT_CTR = COMM_STRUCTURE-PROFIT_CTR
        and SEGMENT = COMM_STRUCTURE-SEGMENT
        and SEM_POSIT = COMM_STRUCTURE-SEM_POSIT
        and VTYPE = COMM_STRUCTURE-VTYPE
        and FISCPER  = prev.
      if sy-subrc = 0.
        RESULT = COMM_STRUCTURE-/BIC/K_AMOUNT - wa_/BIC/AO_FIMTD00-/BIC/K_AMOUNT.
      endif.
    Thanks & Regards

    Please close the thread , Once your problem is solved.
    Thanks
    Mayank

  • Return tables in Update routines

    Hi,
    Can anyone send me some documents on the use of return tables in Update Routines?
    email id: [email protected]
    Thanks in advance,
    RP

    Hi Ram,
    <b>Table as a return</b>                                                                               
    In general, routines in the update rules have only one return code.                                                                               
    If you select this field, the corresponding key figure routine no longer
        has a return code (defined in RESULT), rather a return table (defined in
        RESULT_TABLE). In this case you can create as many key figure values    
        from the data record as you wish. You can find the calculated           
        characteristic values in the structure ICUBE_VALUES.                                                                               
    <b>Activities</b>                                                                               
    If you change these values accordingly, then you fill the field for the 
        relevant key figure and use this to fill RESULT_TABLE.                                                                               
    Regards
    Happy Tony
    <b>Points == Thanks</b>

  • Infostructure update routine : debug problem

    Hi All,
    We have created three update routines for three corresponding infostructures. But I am not able to debug this routine. I tried to put a hard breakpoint also, but it was of no use. The Infostructure logs the changes in the sales order.
    How can I get the list of objects that are accessible in these routines?
    How can I view the values of MCVBAP and MCVBAK(communication structures) that are used in the update routines?
    How can I debug such routines?
    From where does these structures, MCVBAK and MCVBAP, get value? Are these runtime values? How much time does it take normally take for the infostructure to be updated? or is it updated immediately when the sales Order is saved?
    Thanks,
    Jiten

    Hello,
    some hopefully helpful answers:
    - the MCVBAK / MCVBAP are structures, that are built from the orderdata in the function MCV_STATISTICS_ORDER. There are two exits EXIT_SAPLMCS1_001 (header Data) and EXIT_SAPLMCS1_002 (position data) where you could fill additional user fields in these structures. Additional fields you could define in the structures MCVBAKUSR or MCVABPUSR.
    - the time that it takes to get an infostructure updates depends on it's customizing of updating (transaction OM01). the possibilities are: no update, update in V1-posting, update in V2-posting, update in batch.
    - Helpful are folling transactions: MC30 ( shows the update logs, you have to set the parameter MCL = 'X' in your userdate, see OSS - Note 77427) , MCVR (simulation of update).
    Regards Wolfgang

  • How to identify transfer and update routines are applied to my ods/ cubes?

    hi all,
    how to identify transfer nor update routines are been applied to my ods/ cube?
    regds
    hari

    You need to go through the update Rule and Transfer Rule mapping and if you see any routine then there is a routine. Only manual process and also that is not too bad to go through them.
    thanks.
    Wond

Maybe you are looking for

  • Payment Terms (60 days net from invoice date, payment 10 th or 20 th of th)

    Hi I need to work on the below req. 60 days net from invoice date, payment 10th or 20th of the month. Regards Prasad

  • Priority of LMS in HP-UX

    Dear all, I want to know what should be normally the priority of GCS's LMSn in HP-UX? From RAC FAQs on metalink, it says: LMS processes should be running in RT by default since 10.2, so there's NO need to renice them, or otherwise mess with them. On

  • Database Link.  Problem in Forms. Baffled!

    Hoping someone can help. I'm working on a system that has a form on it with a problem. Although there is a currently compiled and working version of this form available, I cannot get it to compile. The situation is this. There are 2 databases, MINX a

  • Top of video cut off

    I have just loaded iMovie for iPhone 4 & have built a few projects. ALL of the video is resized to smaller & by doing so, the video is cut off at the top. Any ideas??? (the original clips are full size, nothing cut off)

  • SQL SERVER 2014 Error :40

    ""A network-related or instance-specification error occured while establishing a connection to SQL Server "" Windows Firewall is on ! what should i do , or change to connect , please help , please