InfoCube Updation using Routine

Hi All,
I need help in writing abap code.
The Scenario is on MM module which is as Follows.
We have 4 ODS for PURCHASE ORDER, PURCHASE REQUISITION, GOODS RECEIPT & Invoice.
PO ODS has 2 Key Fields i.e PO No., & PO Line Item No.
PR ODS has 2 key fields i'e, PR No., & PR Line Item No.
GR ODS has 2 Key Fields i.e GR No., & GR Line Item No.
Inv ODS has 2 key fields i'e, Inv No., & INV Line Item No
When i was trying to load this data to a ODS which has all above 8 key fields.
the PO data coming in one line next line PR then next line GR and then next line invoice.
But i want the whole data in one line which should be based on PO NO. & PO Line Item No.

Hi Jaideep,
To give an example...
I have an PO with quantity = 100 and date = current date
Now according to the logic, after execution of BAPI my quantity shld be updated to 50 and date to current date + transit time
I pass values to POSCHEDULE and POSCHEDULEX
POSCHEDULEX-PO_ITEM = ORIG_STO-PO_ITEM.
POSCHEDULEX-SCHED_LINE = ORIG_STO-SERIAL_NO.
POSCHEDULEX-PO_ITEMX = 'X'.
POSCHEDULEX-SCHED_LINEX = 'X'.
POSCHEDULEX-QUANTITY = 'X'.
POSCHEDULEX-DELIVERY_DATE  = 'X'.
Corresponding to this values are passed to POSCHEDULE.
When I run the STO for the first time... the qty is updated to 50, but the date remains unchanged.
When I run the STO for 2nd time, the date is updated as there is no change in quantity.
General observation......If there is change in quantity then date is not changed only quantity is changed.
Rgds,
Chaitrali.

Similar Messages

  • 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

  • No Message: InfoCube Update Completed

    BW Gurus,
    I trying to load Data from PSA to the Cube Using DTP...during the data load, for certain data package the data load is keep on going and there is no error message as such and its still yellow status and under the "Updating to InfoCube ZXX_XX" node ,after the "Write to fact Table tasks "..
    There is a message saying "No Message: InfoCube Update Completed" could anyone help what is the cause for this issue and also fix ? is it a problem with the amount of data load ?
    Thanks,
    Raman

    I got below error in the ST22 dump....
    "Database error text........: "ORA-00060: deadlock detected while waiting for
    resource"
    Internal call code.........: "[RSQL/INSR//BIC/FZXX_C02 ]"
    I was searching for OSS notes associated with following keywords and note able to find any notes related my support pack level we are in SP13 (SAPKW70013)
    "DBIF_RSQL_SQL_ERROR" "CX_SY_OPEN_SQL_DB" "WRITE_ICFACT"
    Any help will be greatly appreciated...
    Thanks,
    Raman

  • Update rule/routine for 0PUR_C04

    hi experts,
    can someone give the update rule/routine for uploading 0ORDER_VAL(effective order value) into the cube 0PUR_C04 and the calculations for it?
    and also some explantion on how this effective purchase order value 0ORDER_VAL is calculated*??
    thanks

    Hi Surya,
    If you are using standard content for 0PUR_C04, you can get the update rule in standard update rules, which you can see in Business content on Metadata repository. For standard content four data source used to fill cube. Purchasing Group (2LIS_02_S011 ), Purchasing Data (2LIS_02_HDR), Pur.Data  (2LIS_02_SCL) and Purchasing Data (2LIS_02_ITM). The mapping for different update rules are done as:
    2LIS_02_S011: Direct Mapping
    2LIS_02_HDR: No Update
    2LIS_02_SCL: Routine (mm_convert_effwr)
    fill the internal table "MONITOR", to make monitor ent *ries
    IF ( COMM_STRUCTURE-PROCESSKEY = '001' or "Bestellu *ng
    COMM_STRUCTURE-PROCESSKEY = '011' or
    COMM_STRUCTURE-PROCESSKEY = '021' or
    COMM_STRUCTURE-PROCESSKEY = '004' or "LP
    COMM_STRUCTURE-PROCESSKEY = '014' or
    COMM_STRUCTURE-PROCESSKEY = '024' )
    AND COMM_STRUCTURE-BWAPPLNM EQ 'MM'
    AND COMM_STRUCTURE-ORDER_VAL <> 0.
    perFORM LOC_CURR_CONVERT
    USING COMM_STRUCTURE-ORDER_VAL
    COMM_STRUCTURE-DOC_DATE
    COMM_STRUCTURE-ORDER_CURR
    COMM_STRUCTURE-LOC_CURRCY
    COMM_STRUCTURE-EXCHG_RATE
    CHANGING RESULT.
    if the returncode is not equal zero, the result will not be updated
    RETURNCODE = 0.
    else.
    RETURNCODE = 4.
    endif.
    if abort is not equal zero, the update process will be canceled
    ABORT = 0.
    2LIS_02_ITM: No Update
    Hope this will give you some lead.
    Regards,
    Kams

  • Update Rule Routine Problem

    Hi
    i have wriiten a update rule routine.
    in that routine i am fetching comp code ,GL Acct. from SKB1 table and match those records wth Data Package records.
    Data Package has both Open and Closed items. so i need to match the Comp Code and GL Account which i have fetched from SKB1 with Data Package Comp Code and GL account which records will be matched they will go to Target ODS otherwise Delete from Data Package.
    But data is not coming properly in Target ODS.
    i have debug the routine and found , there are 10 records(Comp Code + GL Acct.) has been fetched from SKB1
    and Data Package has Total 416 Records. Only 20 Records has been gone to Target ODS while I have seen the 216 Comp Code and GL Account combination has been successfully matched with 10 Records of SKB1
    Below is the code in Start routine.
    Note: Data Package has Multiple Records for a Combination of Company Code and GL Account which is present in SKB1.
    How can i resolve this problem.
    ********Logic to Fetch Open items GL Account**************
    *Fetch data from SKB1*********
    SELECT /BIC/ZMCFBUKRS
           /BIC/ZMCFSAKNR
           FROM /BIC/AZOCFSKB100
           INTO TABLE TB_ZOCFSKB1
           FOR ALL ENTRIES IN DATA_PACKAGE
           WHERE /BIC/ZMCFBUKRS = DATA_PACKAGE-COMP_CODE
           AND  /BIC/ZMCFSAKNR = DATA_PACKAGE-GL_ACCOUNT
           AND /BIC/ZMCFXOPVW = 'X'.
    ***Fetch records from FI GL Data Package which match with
    ***internal table TB_ZOCFSKB1
    LOOP AT DATA_PACKAGE INTO WA_DATA_PACKAGE.
    READ TABLE TB_ZOCFSKB1 INTO WA_TB_ZOCFSKB1 WITH KEY
    /BIC/ZMCFBUKRS = WA_DATA_PACKAGE-COMP_CODE
    /BIC/ZMCFSAKNR = WA_DATA_PACKAGE-GL_ACCOUNT
    binary search.
          IF sy-subrc ne 0.
            DELETE TABLE DATA_PACKAGE FROM WA_DATA_PACKAGE.
          ENDIF.
    ***Clear Work Area****************
          CLEAR WA_TB_ZOCFSKB1.
          CLEAR WA_DATA_PACKAGE.
        ENDLOOP.
    ***Refresh internal table*********
       REFRESH TB_ZOCFSKB1.
      ENDIF.
    if abort is not equal zero, the update process will be canceled
      ABORT = 0.
    Edited by: AtulMohan Mishra on Feb 9, 2011 11:22 AM

    Hi,
    It is very important that you SORT the internal table before you do a READ with Binary Search.
    SORT TB_ZOCFSKB1 BY /BIC/ZMCFBUKRS /BIC/ZMCFSAKNR.
    You are sure to miss results unless you do.

  • If you are attempting to update using a Mac or PC with which you do not normally sync

    what happens when "If you are attempting to update using a Mac or PC with which you do not normally sync", & they say in step 2 or 3 in order not to loose your stuff "If you are updating your iOS device on a computer with which you do not normally sync , or if you disconnect your device before the sync process is complete, you may notice that some media content that was previously on your device is no longer there. You can restore this content by syncing with the Mac or PC with which you normally sync."
    now what if the pc that was originally used to sync my ipod , has corrupt or  bad systems files that are causing it from working correctly...? when i plug it in to the o.g. operating sysytems (win xp) it doesnt ever recognize or discover the ipod through itunes.  the pc will pop up the "cameras been plugged in, what would you like to do...?" but nothing thru itunes.  now if i reboot & run the windows 7 operating system w/itunes that has backed my ipod before & synced a few times as well, but not the o.g. op system used from the beginning (the very initial set up done on the ipod) it works fine, but DOES give me the warning "updating to 5.0 willdelete some of your apps & media, including ...  ....will only preserve contacts, calenders," ....etc.
    MY HUGE CONCERN IS if i do hit update & go through w/it, & not having been able to sync it to the one normally used to sync my ipod, will that back up i made be able to restore my game seetings, GAME SAVES, & data achievement type information....?
    please, i'm very hesitant to go through w/it, so if you can please help me out here & let me know asap.....i canimagine you're all busy busy, so  i thank you for your time here w/this
    thank you
    mike z
    [email protected]

    Not that hard. One the computer you are using do the following:
    - Transfer iTunes purchases.
    iTunes Store: Transferring purchases from your iOS device or iPod to a computer
    - Transfer other music using a third-party program like one of those discussed here.
    Copy music
    - If you have synced photos you need a paid program like TouchCopy or PhoneView
    - When all the media in on the computer, connect the iPod to the computer and make a backup by right clicking on the iPod under Devices in iTunes and select Back Up
    - Restore the iPod from that backup.
    That computer is now your syncing computer. Note that the iPod backup that iTunes makes does not included synced media like apps or music.

  • My husband bought an iPad 2.  I have a Mac.  ITunes is in my name but I have turned sharing on.  When we updated to OS5 we lost all the free apps that he downloaded in his user name.  Is there no way to update using my iTunes without losing his software.

    My husband bought an iPad 2.  I have a Mac.  ITunes is in my name but I have turned sharing on.  When we updated to OS5 we lost all the free apps that he downloaded in his user name.  Is there no way to update using my iTunes without losing his software.  He is frustrated using the iPad because he never knows whether to use his user name or my user name.

    Apps are only tied to one account... You can set up two iTunes accounts on your computer, however, and let his iPad sync to his account. If he has never backed up his apps to a computer, however, he will have to redownload all the apps. Afterwards, he can backup to iCloud instead of your computer.
    http://support.apple.com/kb/ht1495

  • How can I script Adobe Reader updates using vbScript, PowerShell or C#?

    I would like to script Adobe Reader updates using vbScript, PowerShell or C#, are there any Adobe API calls I use to do this.  There are several different version that I support and auto update is not an option. I do updates at a specific time of the month. I would like to write a script that would download and install the update for the currently installed version of Adobe Reader (32 or 64 bit) for the version of the OS (32 or 64bit). I can detect the OS version and the Adobe version.  I can download updates but I do not want to hard code anything

    Sabian is correct.
    Most admins download the updates from the ftp site and push via AIP, GPO, SCCM, or some other method whenever it makes sense for them.
    Ben

  • How to access Infocube content using an ABAP program

    Hi,
       I am trying to access infocube contents using a ABAP program in BW.
       It is easy to access ODS content as we have NEW DATA or ACTIVE DATA
       tables. Is there any way we can access Infocube content.
       I tried using the FACT table but it has only Keyfigure data.
    thanks
    arshad.

    Hi,
    I would suggest to use a transactionnal cube, even if you do not use BPS to feed it.
    Then, you create a layout in transaction BPS0 (~ similar to a query), and you can access the cube content by simply using the SAP function <b>API_SEMBPS_GETDATA</b>.
    This is easy and fast.
    Regards,

  • Why data in PSA doesn't  change when update rule routine is modified?

    Hello guys,
    why data in PSA is not changed after I modifiied the update rule routine. I created a infopackage which is only to PSA, but it shows me any change. If I changed this infopackage to the one which is assigned to "PSA firstly, and then to Infoobject", then I saw the changes in infoobject, but in PSA, still nothing changed.
    I can't figure out the reason. Any hint is welcome!
    Thanks in advance.
    Regards,
    Liying

    HI..
    1) PSA data is like of source system data
    2)Update rules are how you update your keyfigures to Data Tragets.
    Since you have put upto PSA that is the first data staging in BW so there wont be any change of the data even if you write routines at update rules.
    Hope it is clear
    Reg
    Ram

  • Document Flow not updated using BAPI_GOODSMVT_CREATE

    Hi Experts,
    I am using BAPI_GOODSMVT_CREATE for doing PGR of an inbound delivery.
    Material Document(mblnr) is getting populated but Document Flow of that inbound delivery is not getting updated.Its status is Open.
    Can anyone knows how Document Flow can be updated using BAPI_GOODSMVT_CREATE??
    Regards,
    Puja.

    Hello Puja,
    Goto transaction SPRO, Go to Logistics Execution - Shipping - Basic shipping Functions - Configure Clobal Shipping Data, In this put a tick on Document Flow Update.
    Also refer to the below OSS note.
    http://service.sap.com/sap/support/notes/199703
    Regards,
    Thanga

  • Base price calculation in sales order using Routines.

    Dear all,
    I have a requirement related to usage of routine in pricing procedure. The requirement is as given below.
    A base price for a material is entered in the contract manually using a customized condition record.Later a sales order will be raised with reference to contract. now we need to bring the price entered in the contract to sales order after some calculations done using a customized "Z TABLE"
    We are trying to use routines to trigger to calculate the base price in the sales order.
    Please suggest what type of routine to be used in such cases(ex formula,pricing etc)
    Also please go through the below mentioned example for better understanding.
    Contract price : Quantity 3: base price 10,000 per day Total : 30,000 perday
    ZTABLE : number of days per month will be maintained in the table based on the working days.
    Sale Order : Quantity 1 : Month working days 23 total 2,30,000 (We need to calculate this total and display as base price in sales order)
    Please suggest how to address this using routines.

    Dear Mudigonda,
    As per your scenario you are creating sales order with reference to the contract and here in contract you are maintaining the manual price . that means the same manual price has to copy to sales order level then as per the calculation rule it will multiply with your Z table value .
    For this requirement you can make some changes in copy control from contract to sales order, here at item category level you have to change pricing type to 'B' so that what ever your manual price value will populate to sales order level after that due to calculation rule value will change .
    Regards,,
    C.B Reddy.

  • Insert & Update using Writeback in a single Report

    Hi,
    Here is requirement:
    In the single report where the user has to do the Insert & update using the writeback functionality.
    below is the XMl:
    <?xml version="1.0" encoding="utf-8" ?>
    <WebMessageTables xmlns:sawm="com.siebel.analytics.web/message/v1">
    <WebMessageTable lang="en-us" system="WriteBack" table="Messages">
    <WebMessage name="SUBMITBUTTON">
    <XML>
    <writeBack connectionPool="CSDK">
    <insert>INSERT INTO HSCRTARGETLOOKUP(SLA_TYPE,TARGET_AVAILABILITY,TARGET_MTTR) VALUES ('@{c0}', @{c1}, @{c2})</insert>
    <update>UPDATE HSCRTARGETLOOKUP SET TARGET_AVAILABILITY = @{c1}, TARGET_MTTR = @{c2} WHERE SLA_TYPE = '@{c0}'</update>
    </writeBack>
    </XML>
    </WebMessage>
    </WebMessageTable>
    </WebMessageTables>
    Can you please let us know whether both insert & update will work at the same time using a single report.
    Thanks in Advance
    Siva

    Hi,
    Insert & update is working with the Single xml file:
    here it is how i have done:
    in the 1st criteria i have taken three columns and made union with the 3 dummy columns.
    in the 1st dummy column: CASE WHEN 1= 0 THEN HSCRTARGETLOOKUP.SLA_TYPE ELSE NULL END
    2nd dummy column: CAST('' AS INT)
    3rd dummy column: CAST('' AS INT)
    below is the single XML file which is working for both insert & update
    <?xml version="1.0" encoding="utf-8" ?>
    <WebMessageTables xmlns:sawm="com.siebel.analytics.web/message/v1">
    <WebMessageTable lang="en-us" system="WriteBack" table="Messages">
    <WebMessage name="STATES">
    <XML>
    <writeBack connectionPool="XXXX">
    <insert>INSERT INTO HSCRTARGETLOOKUP(SLA_TYPE,TARGET_AVAILABILITY,TARGET_MTTR) VALUES ('@{c0}', @{c1}, @{c2})</insert>
    <update></update>
    <update>UPDATE HSCRTARGETLOOKUP SET TARGET_AVAILABILITY = @{c1}, TARGET_MTTR = @{c2} WHERE SLA_TYPE = '@{c0}'</update>
    </writeBack>
    </XML>
    </WebMessage>
    </WebMessageTable>
    </WebMessageTables>
    Hope it works for you also.

  • Has anyone tried to update using the direct download file of 4.2.1?

    My internet connection isn't the fastest at home so I downloaded the update file at my office using the following link :
    http://appldnld.apple.com/iPad/061-9857.20101122.VGthy/iPad1,14.2.1_8C148Restore.ipsw
    Any tips on how to proceed with doing the update using this file? I know you have to Option-Click the Update or Restore button, and then browse to the update file, but I was wondering if there is anything else I should do first.

    Thanks to both of you - I was running 4.2 on my iPad, and the download link at daw.apple.com for the 4.2.1 GM was taken down after it shipped - so I was bummed...
    Found your post with the direct download link - boom! Happy camper...
    Aaron

  • Iphoto 9.5 won't import photos from iPhoto 7.5.  Library will not update using the iPhoto library upgraded application.

    iphoto 9.5 won't import photos from iPhoto 7.5.  Library will not update using the iPhoto library upgrader application.  Repeatedly says it can't locate photos even when told to cancel.  I think the photos in question are in Nikon RAW format.

    iPhoto 9.5 immediately tries to "upgrade" my library using the upgrader.
    iPhoto 9.5 asks you to run the upgrader to prepare the library for 9.5. It then will update the library to its format.
    You need to do the following:
    1 - go to your Applications/Utilities folder and double click on the iPhoto Library Upgrader 1.1 application. 
    2 - select Choose Library, navigate to your iPhoto library, select it and let the upgrader do its thing.
    3 - launch iPhoto 9.5 to open and finish the conversion of the library.
    OT

Maybe you are looking for

  • Safari Quit Unexpectedly after Lion OSX update

    I installed Lion OSX on my iMac and was happily working on this morning within Safari for email. Tried to open iTunes and it wouldn't and was then notified that there were 5 system updates which I installed. After that I can no longer get Safari to o

  • ORA-01555: snapshot too old

    Hi, We have audit component, one responsibility of which is to archive audit messages from Oracle database. The component fails on a simple select statement (provided below) that retrieves number of records to be archived based on age parameter: SELE

  • I have lost the automatic date/time stamp

    I have lost the automatic date/time stamp when a form is submitted on my response page.  How do I make it start doing it again?  The column just appears blank now with new submissions.

  • "Hand me down" iPad

    ....how do I clear all of previous owners stuff???

  • Need help on netprice of material

    hi, how to get <u><i><b>netprice(not standerd price)</b></i></u>.please tell fm name(remote enabled). regards Guru