Table Updation through Workflow

Hi All,
          I have a scenario in my project in which a workflow is to be triggered when an entry is made in a table.
Now this workflow has to read some data from some tables and then update some other tables.
My doubt is it possible through workflows to update the tables? If yes is it advisable.Also how will the
updation happen? Should methods for updation will be written in BO methods? Or should a task be called
which does the same.
Please suggest,
Saket.

Hi Saket,
Yes it is possible!
To trigger workflow from table updates you can use table level events. Refer to
Re: WorkFlow when Data is changed in Table or program
Also you can update a table from a workflow. To do this, create an Activity step in workflow. In this, you can call a BO method. This BO method would store the code to update the database table required.
Just take care of the bindings between the method -> task -> workflow container.
Hope this helps!
Regards,
Saumya

Similar Messages

  • Table updation through Visual Basic

    We are not able to update employee master table which has 73 columns. The problem is it is not allowing to update after certain number of columns say 50 columns. This is occuring only thru VB and not in SQL (i.e thru instert syntax).
    Can anyone tell what is the solution?

    Hi Saket,
    Yes it is possible!
    To trigger workflow from table updates you can use table level events. Refer to
    Re: WorkFlow when Data is changed in Table or program
    Also you can update a table from a workflow. To do this, create an Activity step in workflow. In this, you can call a BO method. This BO method would store the code to update the database table required.
    Just take care of the bindings between the method -> task -> workflow container.
    Hope this helps!
    Regards,
    Saumya

  • Table update from workflow

    Hi,
      I have a requirement to start workflow when table entry or modification is made. And in one has to authorize for the data. then only data should be saved in data base. if manager rejects data should not be saved in data base.
      What i have done till now is i have generated a table maintainence and created and new (using business objects )event to raise. (writing a FORM). So when ever we create new table entries event is raised. And i am using this event to trigger my workflow.
      I have two problems
      first one. this event is only getting trigged if i make entry to table through se11 and create new entries option. if i am using a program to update the table then event is not getting trigged. Is there way i can make this event to trigger even if i insert  data to this table from any where?
    Second problem
         i want to complete my workflow. based on manager decision only database should be commited or rolled back.
      if any one needs further details regarding problem reply.
    Thanks in advance
    Mohan

    Hi,
    I also think you should use a temporary table where you store the data you want to insert into the database before the approval is done. You create the maintenance view on this temp table and start the workflow from there. Once manager approves the new entry / change, workflow automatically updates the permanent table and deletes the record from the temp one.
    You can use the change documents, maintenance view event routines or maintenance view screen logic to trigger the WF. But I`m not aware of any tools to capture a database change done by a direct update, so if you also have programs directly updating the database table, you have to trigger the workflow start event explicitely in those as well.
    Regards,
    Krisz

  • MVKE table updation through MM17 mass maintainence.

    Hi Experts,
    I need some input regarding mass maintenance of material.
    The input field 'Product Hierarchy' is present in 'Basic data' (MARA-PRADHA) and in 'Sales View' (MVKE-PRODH).
    As per standard SAP if I do changes through MM02 in Basic data, the field automatically updates in Sales View.
    But if I propose changes in the field MARA-PRAHDA (i.e.product hierarchy) through MM17, it is only updating MARA-PRADHA and not in MVKE-PRODH.
    Every user does not have the authorisation to use MM02, hence we are using MM17.
    Is there any another method to update both the fields other than MM02.
    Kindly suggest.
    Warm Regards
    Tushar

    Friend
    MARA and MVKE are two differnt feilds.
    When you are using MM17 and maintaining values for feild in table  MARA - PRADHA means you are limiting (Mass maintianing )to that table and feild only. Hence you will have to select MVKE - PRADHA as well while maintaing through MM17
    Where as MM02 or MM01 with SAP Standard setting has a warning message to check Prod.hieracrchy in Sales view while maintining first in Basic view.
    Reward if useful
    Regards
    SE

  • PDF upload through Workflow

    Hi All,
    case 1:
    is there any possibility to upload a pdf to an intranet through workflow?
    Case 2:
    when we upload a data in the excel or pdf, corresponding table should be get updated through workflow!
    pointers to this will be highly appreciated.
    Regards,
    Dinesh

    Hi,
    In a background activity step you do it. And if the path has to be given by the user then identify the path in a background step and
    send that to a method where you want to upload.
    If you want to go ahead using portal, the link that process through a Webdynpro application and upload it.
    Hope this would help to solve your issue.
    Regards
    Narin

  • Facing problem while updating IInfotype 0009-bank details through workflow

    Dear SAP Gurus,
    I am facing a problem while updating Infotype 0009 through workflow which is integrdated with portal.
    Scenario:
    Employee logins to portal and changes his/her bank details like payee name, bank key, account number, postal code and city of bank, bank name etc.
    Once he submits the request, my workflow is triggered through SAP_WAPI_START_WORKFLOW which is called from portal and goes through various approval steps and finally reaches the step where the container elements are finally to be updated in IT0009.
    Field bank account number (BANKN), which is part of table PA0009 are easily updates using the FM HR_INFOTYPE_OPERATION by first enqueuing the employee number and after the update dequeuing it.
    However fields like payee name (EMFTX) bank key (BANKL) , bank name(BANKA -structure BNKA_BF-this is automatically fetched based on bank key) and postal code(BKPLZ) and city of bank (BKORT) are from structure Q0009 (on the infotype 9 screen level) and from table BNKA (at table level). The problem is that these are not getting updated by HR_INFOTYPE_OPERATION as they are not the part of infotype 9.
    Can anyone help me to understand how can these fields be updated ?
    Quick help will be highly appreciated.

    Hi Spantaleoni,
    Thanks for your quick response.
    Well actually the table BNKA is a master table for the bank information and we must not create entries in it or update the table programatically,  rather we should  use the available data in it.
    Now say employee currently has bank as A and he wants to change it as B which is available in BNKA then he will just select the bank B from search help provided in portal which again comes from table BNKA only. Employee then submits the info and it must get updated in the infotype PA0009.
    As far as think, this should be done on screen level of infotype PA0009 as I have already mentioned that certain fields are coming from structure Q0009 and they cannot be updated on PA0009 table level.
    I am just looking for way through which I can update the screen of infotype PA0009 of employee through workflow.
    Regards

  • Table entries update through tcode me21n

    Hi ,i want to update the database table ekpo through the screen fields execution.
    please help me with the code lines.
    thanks

    i am doing like this for updating the entries through tcode me21n.
    IN PBO;
    data: v_date type ekpo-zzpldte,
          v_code type ekpo-zzreason.
    if sy-tcode = 'ME21N'
    or sy-tcode = 'ME21'.
      loop at screen.
        if screen-name = 'EKPO-ZZREASON'
         or screen-name = 'EKPO-ZZPLDTE'.
          screen-input = '0'.
          modify screen.
        endif.
      endloop.
    endif.
    IN PAI:
    types:ekpo.
    data:it_ekpo like standard table of ekpo with header line,
         wa_ekpo like ekpo.
    select * from ekpo
    into corresponding fields of table it_ekpo.
    loop at it_ekpo into wa_ekpo.
    wa_ekpo-zzpldte = v_date.
    wa_ekpo-zzreason = v_code.
    modify ekpo from wa_ekpo.
    endloop.
    i dont know whther i am doing it correctly,
    will this will give me the database updates.
    please note v_date and v_code is my feilds on th screen for the user entry.
    please suggest.
    thanks.

  • How to check the way table S066 is updated through VKM3

    Hello Experts!
    I'm debbuging transaction VKM3. This is used to release open orders. Within this functionality infostructure S066 (credit managment for open orders) will be updated.
    My problem is that I can't see the values it's using to update the table because it is being updated through a "commit work and wait" statement.
    this is where the update takes place:
    include MV45AF0B_BELEG_SICHERN
        if call_function = space or us_syncron = charx.
        if us_syncron = space.
            commit work.
        else.
           commit work and wait. " This is getting executed
        endif.  
    I've already activated the update mode debugging (so it's calling all the update functions registered through "call fucntion in update task"), but I think it's calling some system functions (not sure about it).
    Is there a way to check how the update takes place?
    thanks in advance for your help!

    Hi,
    Yes there is another way where you view the values used to update S066.
    As Rob said you can get the details through ST05.
    Else after we do the UPDATE DEBUGGING ON and once a COMMIT WORK  statement is encounted then the debugging session will open in another screen there goto menu path Breakpoints->Breakpoints at->Statement----"UPDATE"....
    Similary for "INSERT" & for "MODIFY". This will stop at all the DB tables update where in if S066 is updated then definetly it will stop at S066 UPDATE.
    Please try this once and let me know if any.
    Regards,
    Srinivas

  • Urgent : update of table QALS  through transaction QA12 after save

    Hello Experts ,
      I need to update the table field SELHERST of standard table QALS through transaction QA12 after the save button is clicked  .
    I have implemented the exit QEVA0010 which is triggered after clicking the save button , and have put the update command there , followed by commit work statement .
    But it is not updating the table QALS .
    Thanks in advance ....

    When the SAVE button is pressed, SAP execute some checks and launch the update task, if you want that your changes are not overwritten by SAP you need to submit those for execution during update task.
    So you need to use instructions like
    - PERFORM ON COMMIT
    - CALL FUNCTION IN UPDATE TASK
    and execute the update in one of these. (Reference [Updates in the R/3 System (BC-CST-UP)|http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCCSTUP/BCCSTUP_PT.pdf])
    You may also try to force the update in the main program, declaring a pointer (field symbol) in the calling program data '(SAPMQEVA)QALS'  (But that's not very correct)
    Regards

  • Email Notifications through workflow for all Approved and Rejected Orders

    hi,
    i have to send Email Notifications through workflow for all Approved and Rejected Orders to the user who have submitted the order for approval.how could it be done.please send ur solutions.
    regards
    yesukannan

    Hi,
    An option would be use Oracle Alert. Create an event based alert on the table where you have order approvals or rejections. This alert will be raised after inserting or updating this table. Create an action linked to this alert, and choose message as action type.
    This setup can be done under Alert Manager Responsibility.
    Regards,
    Ketter Ohnes

  • Performing multiple updates through a grid

    I'm pretty green as far as Dynpro goes so please forgive me if this is an easy one.
    Basically I have a table (grid) which allows a user to view and edit pricing information.
    The data is retrieved and updated through .NET web services.
    The pricing values are edited through an InputField contained in one of the columns of the grid.  This InputField is, in turn, bound to a property in the response from the web service in my view context.
    Lets say a user edits one price, hits the down arrow on the keyboard and edits another field and then hits Enter.
    Somehow, I need to identify in my "OnEnter" event handler, exactly which rows were edited so I can then pass the pertainent data to the web service for processing.
    I don't think I can use the typical "getLeadSelected" and "isMultiSelected" scenario that you would for deleting a row. 
    I really don't want to have to create a separate view for editing individual grid lines one at a time and relegate the grid to being a simple read only selection control.
    Any suggestions?
    -Sheldon

    Ended up solving this one today.   Wasn't too bad once I got a good handle on tranversing the Context and using the .isChangedByClient() property.  (Like I said, I'm pretty new to Dynpro)
    For completeness I am including my solution with this post.  (sorry for the exceedingly long names)
      public void onActionUpdatePricing(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
        //@@begin onActionUpdatePricing(ServerEvent)
         //Find out how many records we have
        int n = wdContext.nodeRequest_EmployeeSalesServicesSoap_getAllProductPrices().nodeProductPrice_Response().nodeProductPrice_Result().size();
         // create an instance of the update web service class
         Request_EmployeeSalesServicesSoap_updatePrice reqUpdPrice = new Request_EmployeeSalesServicesSoap_updatePrice();
         wdContext.nodeRequest_EmployeeSalesServicesSoap_updatePrice().bind(reqUpdPrice);
         //temporary storage for a single element as we iterate through them
        IWDNodeElement PriceElement;
         for (int i = 0; i <= n - 1; i++)
              //Get an element
              PriceElement = wdContext.nodeRequest_EmployeeSalesServicesSoap_getAllProductPrices().nodeProductPrice_Response().nodeProductPrice_Result().getElementAt(i);
              //Check to see if it has been modified
              if (PriceElement.isChangedByClient())
                   //If it has been modified then call the update function in the component controller.  This
                   // method will, in turn, call the web service class with the appropriate parameters
                   // TO DO: error checking for update failure.
                   wdThis.wdGetMainmenuController().UpdatePrice(Integer.parseInt(PriceElement.getAttributeAsText("priceID")),Float.parseFloat(PriceElement.getAttributeAsText("productSellingPrice")));
         //After we are done updating, reset the Context changed bit for all items
         wdContext.getContext().resetChangedByClient();
        //@@end

  • True about updates through a view

    hi frds
    i just need the right answer for the choices mentioned below with explanation
    plz help me
    What is true about updates through a view?
    A. You cannot update a view with group functions.
    B. When you update a view group functions are automatically computed.
    C. When you update a view only the constraints on the underlying table will be in effect.
    D. When you update a view the constraints on the views always override the constraints on the underlying tables.

    And a very tricky only it is.
    Peter, you are correct that view constraints are not enforced in the sense of PKs and FKS, but there are two other view constraints that are enforced.
    SQL> CREATE TABLE t AS
      2  SELECT rownum id, object_name
      3  FROM all_objects
      4  WHERE rownum < 11;
    Table created.
    SQL> CREATE VIEW t_read AS
      2  SELECT * FROM t
      3  WITH READ ONLY;
    View created.
    SQL> CREATE VIEW t_check AS
      2  SELECT * FROM t
      3  WHERE mod(id,2) = 0
      4  WITH CHECK OPTION;
    View created.
    SQL> CREATE VIEW t_nocheck AS
      2  SELECT * FROM t
      3  WHERE MOD(id, 2) = 0;
    View created.
    SQL> INSERT INTO t_read VALUES (100, 'READ ONLY');
    INSERT INTO t_read VALUES (100, 'READ ONLY')
    ERROR at line 1:
    ORA-01733: virtual column not allowed here
    SQL> INSERT INTO t_check VALUES (100, 'EVEN ID');
    1 row created.
    SQL> INSERT INTO t_check VALUES (101, 'ODD ID');
    INSERT INTO t_check VALUES (101, 'ODD ID')
    ERROR at line 1:
    ORA-01402: view WITH CHECK OPTION where-clause violation
    SQL> INSERT INTO t_nocheck VALUES(100, 'EVEN ID');
    1 row created.
    SQL> INSERT INTO t_nocheck VALUES(101, 'ODD ID');
    1 row created.
    SQL> UPDATE t_check SET id = 201
      2  WHERE id = 2;
    UPDATE t_check SET id = 201
    ERROR at line 1:
    ORA-01402: view WITH CHECK OPTION where-clause violation
    SQL> UPDATE t_nocheck SET id = 201
      2  WHERE id = 2;
    1 row updated.The WITH READ ONLY constraint bars all changes to the view. The WITH CHECK OPTION stops any changes that would make the record invisible to the view. It is essentially a CHECK constraint on the view.
    John

  • Error  while uploading data in table t_499s through BDC Prog

    Hi
    am facing problem while uploading data in table t_499s through BDC Program  , if there is more than 15 records in file its not allowing to upload kindly suggest what to do
    Thanx
    Mukesh s

    Hi,
    See if you want to update only single table, which has User maintenance allowed
    Use Modify statement.
    EX:
    LOOP AT ITAB INTO WA_TAB.
        MOVE-CORRESPONDING WA_TAB TO T499S.
        MODIFY T499S.
        CLEAR T499S.
      ENDLOOP.
    It will update the table, to check go to sm30 , and check in V_T499S.
    Rgds
    Aeda

  • Table control through screens

    hello friends,
    i was informed that i would be working on table controls through dialogue program,
    if any one has a sample code for tabel control through screens,
    plz post it here, so that , i can understand which command is to use for what, and what would be most common commands.
    thank you in  advance.

    Hello,
    Check this sample
    **********      Trancsaction code-  ‘zrtc’ **********************
    ***********     Default Screen- ‘1000’   ************************
    PROGRAM ZRAVI_TABLECONTROL message-id zrtc.
    *Displaying data from VBAP,VBAK and VBKD tables using table control
    tables : VBAP,VBAK,VBKD.
    controls : tab_cntrl type tableview using screen '2000'.
    data : begin of it_sales occurs 0,
           vbeln like VBAP-vbeln,
           matnr like VBAP-matnr,
           erdat like VBAK-erdat,
           ernam like VBAK-ernam,
           auart like VBAK-auart,
           konda like VBKD-konda,
           kdgrp like VBKD-kdgrp,
           end of it_sales.
    data : l_count type i.
    *&      Module  USER_COMMAND_1000  INPUT
    *       text
    MODULE USER_COMMAND_1000 INPUT.
    case sy-ucomm.
      when 'SHOW'.
        if VBAP-MATNR ne ''.
          select vp~vbeln vp~matnr vk~erdat vk~ernam vk~auart vd~konda
          vd~kdgrp into corresponding fields of table it_sales from
          ( ( VBAP as vp inner join VBAK as vk on vp~vbeln = vk~vbeln )
          inner join VBKD as vd on vk~vbeln = vd~vbeln )
          where vp~matnr = VBAP-MATNR.
       else.
           select vp~vbeln vp~matnr vk~erdat vk~ernam vk~auart vd~konda
          vd~kdgrp into corresponding fields of table it_sales from
          ( ( VBAP as vp inner join VBAK as vk on vp~vbeln = vk~vbeln )
          inner join VBKD as vd on vk~vbeln = vd~vbeln ).
       endif.
    **   leave to list-processing.
    **   *For testing the query
    **   loop at it_sales.
    **     write : / it_sales-matnr.
    **   endloop.
    **  *End testing of query
         call screen '2000'.
       when 'EXIT'.
         leave program.
    endcase.
    ENDMODULE.                 " USER_COMMAND_1000  INPUT
    *&      Module  STATUS_2000  OUTPUT
    *       text
    MODULE STATUS_2000 OUTPUT.
    *  SET PF-STATUS 'xxxxxxxx'.
    SET TITLEBAR 'Sales Document Information'.
    ENDMODULE.                 " STATUS_2000  OUTPUT
    *&      Module  USER_COMMAND_2000  INPUT
    *       text
    MODULE USER_COMMAND_2000 INPUT.
      case sy-ucomm.
        when 'BACK'.
          leave to screen '1000'.
        when 'P--'.
          perform paging using 'P--'.
        when 'P-'.
          perform paging using 'P-'.
        when 'P+'.
          perform paging using 'P+'.
        when 'P++'.
          perform paging using 'P++'.
      endcase.
    ENDMODULE.                 " USER_COMMAND_2000  INPUT
    *&      Module  GET_CTRL_SALES  INPUT
    *       text
    MODULE GET_CTRL_SALES INPUT.
      case sy-ucomm.
        when 'SAVE'.
        data : line_count type i value 0.
            modify it_sales index tab_cntrl-current_line.
            line_count = line_count + 1.
    *      *VBAP,VBAK and VBKD tables
    *           vbeln like VBAP-vbeln,
    *           matnr like VBAP-matnr,
    *           erdat like VBAK-erdat,
    *           ernam like VBAK-ernam,
    *           auart like VBAK-auart,
    *           konda like VBKD-konda,
    *           kdgrp like VBKD-kdgrp,
    *      update VBAP set vbeln = it_sales
    *       if sy-subrc = 0.message i001.endif.
             IF SY-SUBRC = 0 AND SY-TABIX > LINE_COUNT.
             MESSAGE E001 WITH LINE_COUNT.
    *         STOP.
             ENDIF.
    *LEAVE TO LIST-PROCESSING.
    *WRITE : 'TABIX',SY-INDEX,'LINE',LINE_COUNT.
      endcase.
    ENDMODULE.                 " GET_CTRL_SALES  INPUT
    *&      Module  FILL_TAB_CNTRL  OUTPUT
    *       text
    MODULE FILL_TAB_CNTRL OUTPUT.
      read table it_sales index tab_cntrl-current_line.
      l_count = sy-loopc.
    *  leave to list-processing.
    *  write : l_count,tab_cntrl-top_line.
      if sy-subrc ne 0.exit from step-loop.endif.
    ENDMODULE.                 " FILL_TAB_CNTRL  OUTPUT
    *&      Module  GET_MESSAGE  INPUT
    *       text
    MODULE GET_MESSAGE INPUT.
    *        if sy-subrc = 0.
    *        message i001 with line_count.
    *        endif.
    ENDMODULE.                 " GET_MESSAGE  INPUT
    *&      Form  PAGING
    *       text
    *      -->P_0189   text
    FORM PAGING USING    code.
      data : i type i,
             j type i.
      case code.
        when 'P--'.
          TAB_CNTRL-top_line = 1.
        when 'P-'.
          TAB_CNTRL-top_line = TAB_CNTRL-top_line - l_count.
          message i001.
          if TAB_CNTRL-top_line le 0.
            TAB_CNTRL-top_line = 1.
          endif.
        when 'P+'.
          i = TAB_CNTRL-top_line + l_count.
          j = TAB_CNTRL-lines - l_count + 1.
          if j le 0.j = 1.endif.
          if i le j.
            TAB_CNTRL-top_line = i.
          else.
            TAB_CNTRL-top_line = j.
          endif.
        when 'P++'.
          TAB_CNTRL-top_line  = TAB_CNTRL-lines - l_count + 1.
          if TAB_CNTRL-top_line le 0.
            TAB_CNTRL-top_line = 1.
          endif.
      endcase.
    ENDFORM.                    " PAGING
    *&      Module  INIT_CONTROL  OUTPUT
    *       text
    MODULE INIT_CONTROL OUTPUT.
      TAB_CNTRL-top_line = 1.
    ENDMODULE.                 " INIT_CONTROL  OUTPUT
    **********************    flow logic of  screen ‘2000’  ********************
    PROCESS BEFORE OUTPUT.
    MODULE STATUS_2000.
    module init_control.
    loop with control tab_cntrl.
      module fill_tab_cntrl.
    endloop.
    PROCESS AFTER INPUT.
    MODULE USER_COMMAND_2000.
    loop with control tab_cntrl.
      field SEL module get_ctrl_sales on input.
    endloop.
    *module get_message.
    ******************** End of flow logic  ************************
    If useful reward.
    VAsanth

  • BCALV_EDIT_03 - Need the table update function

    I am fairly new to OO programming and have worked through the various sample programs. I am currently using BCALV_EDIT_03 and _04 to write a table maintenance program.
    I kind of have figured out how the delete and insert function works but unfortunately in sample program _03 the final table update function is missing.
    What I am after is that I get all the changed records from the grid and update the external table just with those records.
    Could somebody post some sample update code that I could check out?
    Thanks in advance.
    Gerd

    Table update as in, database table update or ALV table update ?
    ALV Table update will be done automatically, in case you have used the method : set_table_for_first_display
    As you also quote that you are checking out BCALV_<b>EDIT</b>_03, I will just clarify this point, all changes made to the table are triggered by the EVENT DATA_CHANGED and this event has the necessary fields, from which you can come to know which rows and what values have changed. You need to use this DATA_CHANGED event and update your internal table. This is then shown in SET_TABLE_FOR_FIRST_DISPLAY in PBO.
    In case you are talking about database update and if it is a custom table, then you have to use the direct update.
    In case it is a SAP table, you might let us know which table it is, and probably some of the experts here can let you know the Function Module, BAPI or any method of a class to use.
    In case you need a good tutorial help, you can find it in Serdar Simsekler's
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/documents/a1-8-4/an easy reference for alv grid control.pdf
    Let me know if I am way tangent here or I could be of help to you.
    Regards,
    Subramanian V.

Maybe you are looking for

  • Cannot move/delete file, Error code -36

    "The Finder can't complete the operation because some data in "file name.png" can't be read or written. (Error code -36) This is appearing as I try to move or delete a file on my external hard drive. I am on OS X 10.10.1, The hard drive works perfect

  • WiFi loss & battery drain a software issue, not hardware

    I wrote the commentary below after installing IOS 7 on a 4S and resultantly losing WiFi entirely and enduring major battery drain issues. After two trips to the Apple store and meeting with their techs at the "genius" bar, I was emphatically told tha

  • I think I may have a virus on my MacBook laptop, ran disk utility, "filesystem verify failed." Help!

    I'm running a MacBook laptop and thought I might have a virus b/c i was browsing online a couple of days ago when i clicked on a link that appeared to automatically start downloading a file. I tried to stop it from downloading by clicking "cancel" in

  • VGA port loose

    I regularly connect a 2nd monitor to my laptop through the VGA port. Recently I have been having issues with it and the wire staying in properly. I had been able to prop it up a little, but that now is not even working and not that practical all the

  • Avi files ending early in Quicktime.

    I'm running a mac pro on 10.4.11 with quicktime installed. I have avi movies that i'm trying to watch and installed the div x codec into Quicktime.. The movies played without a problem via quicktime but the movie came to an end early as if there were