I Need to update CDPOS, CDHDR table

Hi,
in my system. CO01, CO02 status blank i need to update this table CDPOS, CDHDR
I need operation release time and date. any configuration for Change documents update
MANOJ
Edited by: SAPPPCONSULTANT on Feb 26, 2012 9:38 AM

pl check oss note 390635

Similar Messages

  • View for CDPOS & CDHDR tables

    Hi all,
    I am developing a report for which I am fetching fields from CDPOS & CDHDR tables (both r cluster tables). when i run st05, it fetches values from a cluster table CDCLS which takes most of the database time.
    Is there any view for CDPOS & CDHDR tables?
    How to find the views for cluster tables?
    Thanx in advance.
    Vijay.

    hi,
    check this code,
    here i used function module to get details of cdhdr,cdpos.
    TABLES : MARC.
    DATA :BEGIN OF GI_MARC OCCURS 0,
          MATNR LIKE MARC-MATNR,
          WERKS LIKE MARC-WERKS,
          DISPO LIKE MARC-DISPO,
          END OF GI_MARC.
    DATA : CHAR TYPE I,
           COUNT TYPE I,
           VAR TYPE I.
    DATA : BEGIN OF GI_FINAL OCCURS 2000,
           MATNR LIKE MARC-MATNR,
           DISPO LIKE MARC-DISPO,
           USERNAME LIKE CDHDR-USERNAME,
           UDATE LIKE CDHDR-UDATE,
           UTIME LIKE CDHDR-UTIME,
           TCODE LIKE CDHDR-TCODE,
           TABNAME LIKE CDPOS-TABNAME,
           TABKEY  LIKE CDPOS-TABKEY,
           FNAME  LIKE CDPOS-FNAME,
           VALUE_NEW  LIKE CDPOS-VALUE_NEW,
           VALUE_OLD   LIKE CDPOS-VALUE_OLD,
           CHANGENR LIKE CDHDR-CHANGENR,
           END OF GI_FINAL.
    DATA : MATNR LIKE MARC-MATNR,
           DISPO LIKE MARC-DISPO,
           USERNAME1 LIKE CDHDR-USERNAME,
           UDATE1 LIKE CDHDR-UDATE,
           UTIME LIKE CDHDR-UTIME,
           TCODE LIKE CDHDR-TCODE,
           CHANGENR LIKE CDHDR-CHANGENR.
    DATA : GI_CDHDR LIKE CDHDR OCCURS 0 WITH HEADER LINE.
    DATA : GI_CDPOS LIKE CDPOS OCCURS 0 WITH HEADER LINE.
    DATA : OBJECTCLAS LIKE CDHDR-OBJECTCLAS VALUE 'MATERIAL',
           OBJECTID LIKE CDHDR-OBJECTID,
           USERNAME LIKE CDHDR-USERNAME VALUE 'RSS-SPE',
           UDATE LIKE CDHDR-UDATE VALUE '20070101',
           CHANGE_IND LIKE CDHDR-CHANGE_IND VALUE 'U'.
    type-pools: slis.
    data: gt_slis_fcat type slis_t_fieldcat_alv.
    data: gt_fieldcat type slis_t_fieldcat_alv.
    *data: gt_fieldcatall type slis_t_fieldcat_alv.
    data: g_repid like sy-repid.
    data: gs_layout type slis_layout_alv.
    gs_layout-zebra             = 'X'.
    gs_layout-colwidth_optimize = 'X'.
    SELECTION-SCREEN: BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-110.
    SELECT-OPTIONS :  P_DISPO FOR MARC-DISPO.
    SELECT-OPTIONS : RECORDS FOR CHAR.
    SELECTION-SCREEN : END OF BLOCK B1.
    START-OF-SELECTION.
    perform process_data.
    perform f_fieldcat_init using gt_fieldcat[].
    perform alv_display tables gi_final using gt_fieldcat[].
    form process_data.
      SELECT MATNR WERKS DISPO FROM MARC INTO TABLE GI_MARC
                                WHERE DISPO IN P_DISPO
                                AND WERKS = '1011'." Becoz we hav to chk the
    the changes made in the material while extendin tht matrl frm 1011 to
    *other plant.
      IF NOT GI_MARC[] IS INITIAL.
        IF NOT RECORDS-LOW IS INITIAL .
          IF NOT RECORDS-HIGH IS INITIAL.
            DESCRIBE TABLE GI_MARC LINES COUNT.
            IF RECORDS-HIGH < COUNT.
              DELETE GI_MARC FROM RECORDS-HIGH TO COUNT.
            ENDIF.
            IF RECORDS-LOW <> 1.
              IF RECORDS-LOW <> 0.
                DELETE GI_MARC FROM 1 TO RECORDS-LOW.
              ENDIF.
            ENDIF.
          ENDIF.
        ENDIF.
      ENDIF.
      LOOP AT GI_MARC.
        CALL FUNCTION 'CONVERSION_EXIT_MATN1_INPUT'
          EXPORTING
            INPUT              = GI_MARC-MATNR
         IMPORTING
           OUTPUT             = GI_MARC-MATNR
    EXCEPTIONS
      LENGTH_ERROR       = 1
      OTHERS             = 2
        IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
        OBJECTID = GI_MARC-MATNR .
        CALL FUNCTION 'CHANGEDOCUMENT_READ_HEADERS'
          EXPORTING
      ARCHIVE_HANDLE                   = 0
           DATE_OF_CHANGE                   = UDATE
            OBJECTCLASS                      = OBJECTCLAS
            OBJECTID                         = OBJECTID
      TIME_OF_CHANGE                   = '000000'
           USERNAME                         = USERNAME
      LOCAL_TIME                       = ' '
      DATE_UNTIL                       = '99991231'
      TIME_UNTIL                       = '235959'
          TABLES
            I_CDHDR                          = GI_CDHDR
         EXCEPTIONS
           NO_POSITION_FOUND                = 1
           WRONG_ACCESS_TO_ARCHIVE          = 2
           TIME_ZONE_CONVERSION_ERROR       = 3
           OTHERS                           = 4
        IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
        CALL FUNCTION 'ARCH_ANA_PROGRESS_INDICATOR'
             EXPORTING
                  TEXT = 'Processing'.
        IF NOT GI_CDHDR[] IS INITIAL.
          LOOP AT GI_CDHDR.
          MOVE GI_MARC-MATNR TO GI_FINAL-MATNR.
          MOVE GI_MARC-DISPO TO GI_FINAL-DISPO.
          MOVE GI_CDHDR-USERNAME TO GI_FINAL-USERNAME.
          MOVE GI_CDHDR-UDATE TO GI_FINAL-UDATE.
          MOVE GI_CDHDR-TCODE TO GI_FINAL-TCODE.
          MOVE GI_CDHDR-CHANGENR TO GI_FINAL-CHANGENR.
            VAR = 1.
            CALL FUNCTION 'CONVERSION_EXIT_MATN1_INPUT'
              EXPORTING
                INPUT              = GI_FINAL-MATNR
                IMPORTING
               OUTPUT             = GI_FINAL-MATNR
             EXCEPTIONS
               LENGTH_ERROR       = 1
               OTHERS             = 2
            IF SY-SUBRC <> 0.
            ENDIF.
            OBJECTID = GI_FINAL-MATNR ."to ensure that objid is in proper
    *format
            SELECT *
                   FROM CDPOS
                   INTO TABLE GI_CDPOS
              PACKAGE SIZE 100
              FOR ALL ENTRIES IN GI_cdhdr
                   WHERE OBJECTID = OBJECTID
                     AND CHANGENR = GI_CDHDR-CHANGENR
                     AND OBJECTCLAS = OBJECTCLAS
                     AND CHNGIND =  CHANGE_IND." only those values will b
    *takn which have been modified nd nt created
            IF SY-SUBRC = 0.
              LOOP AT GI_CDPOS.
          MOVE GI_MARC-MATNR TO GI_FINAL-MATNR.
          MOVE GI_MARC-DISPO TO GI_FINAL-DISPO.
          MOVE GI_CDHDR-USERNAME TO GI_FINAL-USERNAME.
          MOVE GI_CDHDR-UDATE TO GI_FINAL-UDATE.
          MOVE GI_CDHDR-TCODE TO GI_FINAL-TCODE.
          MOVE GI_CDHDR-CHANGENR TO GI_FINAL-CHANGENR.
                MOVE GI_CDPOS-TABNAME TO GI_FINAL-TABNAME.
                MOVE GI_CDPOS-TABKEY TO GI_FINAL-TABKEY.
                MOVE GI_CDPOS-FNAME TO GI_FINAL-FNAME.
                MOVE GI_CDPOS-VALUE_NEW TO GI_FINAL-VALUE_NEW.
                MOVE GI_CDPOS-VALUE_OLD TO GI_FINAL-VALUE_OLD.
                  APPEND GI_FINAL.
                  CLEAR GI_FINAL.
               ENDIF.
                VAR = VAR + 1.
       ENDSELECT.
              ENDLOOP.
            ENDIF.
          ENDLOOP.
              CALL FUNCTION 'ARCH_ANA_PROGRESS_INDICATOR'
             EXPORTING
                  TEXT = 'Processing'.
        ENDIF.
      ENDLOOP.
      endform.
    form f_fieldcat_init using lt_fieldcat type slis_t_fieldcat_alv.
      data: ls_fieldcat type slis_fieldcat_alv.
       clear ls_fieldcat.
      ls_fieldcat-fieldname    = 'MATNR'.
      ls_fieldcat-seltext_l    = 'Material number'.
    ls_fieldcat-tabname      = 'GI_final'.
      append ls_fieldcat to lt_fieldcat.
      clear ls_fieldcat.
      ls_fieldcat-fieldname    = 'DISPO'.
      ls_fieldcat-seltext_l    = 'mrp controller'.
      append ls_fieldcat to lt_fieldcat.
      clear ls_fieldcat.
      ls_fieldcat-fieldname    = 'USERNAME'.
      ls_fieldcat-seltext_l    = 'Username'.
      append ls_fieldcat to lt_fieldcat.
      clear ls_fieldcat.
      ls_fieldcat-fieldname    = 'CHANGENR'.
      ls_fieldcat-seltext_l    = 'Change Number'.
      append ls_fieldcat to lt_fieldcat.
      clear ls_fieldcat.
      ls_fieldcat-fieldname    = 'UDATE'.
      ls_fieldcat-seltext_l    = 'modified date'.
      append ls_fieldcat to lt_fieldcat.
      clear ls_fieldcat.
      ls_fieldcat-fieldname    = 'UTIME'.
      ls_fieldcat-seltext_l    = 'MODIFIED TIME'.
      append ls_fieldcat to lt_fieldcat.
    clear ls_fieldcat.
    ls_fieldcat-fieldname    = 'UDATE'.
    ls_fieldcat-seltext_l    = 'MODIFIED DATE'.
    append ls_fieldcat to lt_fieldcat.
      clear ls_fieldcat.
      ls_fieldcat-fieldname    = 'TCODE'.
      ls_fieldcat-seltext_l    = 'TRANSACTION CODE'.
      append ls_fieldcat to lt_fieldcat.
      clear ls_fieldcat.
      ls_fieldcat-fieldname    = 'TABNAME'.
      ls_fieldcat-seltext_l    = 'TABLE NAME'.
      append ls_fieldcat to lt_fieldcat.
      clear ls_fieldcat.
      ls_fieldcat-fieldname    = 'TABKEY'.
      ls_fieldcat-seltext_l    = 'TABLE KEY'.
      append ls_fieldcat to lt_fieldcat.
      clear ls_fieldcat.
      ls_fieldcat-fieldname    = 'FNAME'.
      ls_fieldcat-seltext_l    = 'FNAME'.
      append ls_fieldcat to lt_fieldcat.
      clear ls_fieldcat.
      ls_fieldcat-fieldname    = 'FVALUE'.
      ls_fieldcat-seltext_l    = 'FVALUE'.
      append ls_fieldcat to lt_fieldcat.
      clear ls_fieldcat.
      ls_fieldcat-fieldname    = 'VALUE_NEW'.
      ls_fieldcat-seltext_l    = 'NEW VALUE'.
      append ls_fieldcat to lt_fieldcat.
      clear ls_fieldcat.
      ls_fieldcat-fieldname    = 'VALUE_OLD'.
      ls_fieldcat-seltext_l    = 'OLD VALUE'.
      append ls_fieldcat to lt_fieldcat.
    endform.                    " f_fieldcat_init
    form alv_display tables  gi_final using gt_fieldcat .
      call function 'REUSE_ALV_LIST_DISPLAY'
       exporting
      I_INTERFACE_CHECK              = ' '
      I_BYPASSING_BUFFER             =
      I_BUFFER_ACTIVE                = ' '
       I_CALLBACK_PROGRAM             = ' Material list '
      I_CALLBACK_PF_STATUS_SET       = ' '
      I_CALLBACK_USER_COMMAND        = ' '
      I_STRUCTURE_NAME               =
         is_layout                      = gs_layout
         it_fieldcat                    = gt_fieldcat
      IT_EXCLUDING                   =
      IT_SPECIAL_GROUPS              =
      IT_SORT                        =
      IT_FILTER                      =
      IS_SEL_HIDE                    =
      I_DEFAULT                      = 'X'
      I_SAVE                         = ' '
      IS_VARIANT                     =
      IT_EVENTS                      =
      IT_EVENT_EXIT                  =
      IS_PRINT                       =
      IS_REPREP_ID                   =
      I_SCREEN_START_COLUMN          = 0
      I_SCREEN_START_LINE            = 0
      I_SCREEN_END_COLUMN            = 0
      I_SCREEN_END_LINE              = 0
    IMPORTING
      E_EXIT_CAUSED_BY_CALLER        =
      ES_EXIT_CAUSED_BY_USER         =
        tables
          t_outtab                       = gi_final
    EXCEPTIONS
      PROGRAM_ERROR                  = 1
      OTHERS                         = 2
      if sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      endif.
    endform.
    regards
    siva

  • In OWB I need to update the target table with same field for match/update

    In OWb I am trying to update the target table with the match and the update on the same field can this be done. I am getting a error match merge error saying you cannot update and match on the same field. But in SQl my select is
    Update table
    set irf = 0
    where irf = 1
    and process_id = 'TEST'
    Hwo do i do this in OWB.

    table name is temp
    fields in the table
    field1 number
    field2 varchar2(10)
    field3 date
    values in the table are example
    0,'TEST',05/29/2009
    9,'TEST',05/29/2009
    0,'TEST1',03/01/2009
    1,'TEST1',03/01/2009
    In the above example I need to update the first row field1 to 1.
    Update temp
    set field1 = 1
    where field1 = 0
    and field2 = 'TEST'
    when I run this I just need one row to be updated and it should look like this below
    1,'TEST',05/29/2009
    9,'TEST',05/29/2009
    0,'TEST1',03/01/2009
    1,'TEST1',03/01/2009
    But when I run my mapping I am getting the rows like below the second row with 9 also is getting updated to 1.
    1,'TEST',05/29/2009
    1,'TEST',05/29/2009
    0,'TEST1',03/01/2009
    1,'TEST1',03/01/2009

  • Need to update column in table from joining the two tables

    Hi
    i want to update a table by joining two table but i m getting the below error
    single row subquery returns more than one value.
    i m using following query
    update table2
    set deposite_date=(select a.deposit_date from table1 a,table2 b
    where a.ban=b.ban and (a.deposit_date between b.cy_start_date and b.due_date))
    table2
    ban due_date cy_start_date deposite_date
    100 5/6/2011 22/05/2011
    101 7/11/2011 22/05/2011
    102 5/25/2011 22/05/2011
    table1
    ban      deposit_date
    100      04/12/2011
    100      04/15/2011
    102      03/25/2011
    101      04/26/2011
    101      05/06/2011
    101      07/26/2011
    can i insert latest deposit_date from table1 which lies between b.cy_start_date and b.due_date
    Thanks

    Hi,
    Welcome to the forum!
    876466 wrote:
    Hi
    i want to update a table by joining two table but i m getting the below error
    single row subquery returns more than one value.Exactly!
    (   SELECT  a.deposit_date
        FROM    ...returns all deposit_dates.
    (   SELECT  MAX (a.deposit_date)
        FROM    ...would return only the latest one.
    Also, you need to correlate the sub-query to the main query, so that it only looks for rows with the same ban.
    i m using following query
    update table2
    set deposite_date=(select a.deposit_date from table1 a,table2 b
    where a.ban=b.ban and (a.deposit_date between b.cy_start_date and b.due_date))
    table2
    ban due_date cy_start_date deposite_date
    100 5/6/2011 22/05/2011
    101 7/11/2011 22/05/2011
    102 5/25/2011 22/05/2011
    table1
    ban      deposit_date
    100      04/12/2011
    100      04/15/2011
    102      03/25/2011
    101      04/26/2011
    101      05/06/2011
    101      07/26/2011
    can i insert latest deposit_date from table1 which lies between b.cy_start_date and b.due_datePerhaps you need something like this:
    UPDATE  table2     b
    SET     deposit_date     =
             (    SELECT  MAX (a.deposit_date)
                   FROM      table1           a
               WHERE      a.ban          = b.ban
               AND      a.deposit_date BETWEEN b.cy_start_date
                               AND     b.due_date
    ;Notice that table1 is the only table in the FROM clause of the sub-query, but the sub-query is correlated to table2, so we can reference columns from table2 in the sub-query.
    Whenever you have a problem, post CREATE TABLE and INSERT statements for your sample data.
    Also post the results you want from that data, and an explanation of how you get those results from that data, with specific examples.
    If you're asking about a DML statement, such as UPDATE, the CREATE TABLE and INSERT statements should re-create the tables as they are before the DML, and the results will be the contents of the changed table(s) when everything is finished.
    Always say which version of Oracle you're using.
    Edited by: Frank Kulash on Aug 1, 2011 1:58 PM

  • XD01 Custom screen for custom fields,need to update tables kna1,knvv

    Hi all,
             I have designed a custim screen for XD01 with four custom fields five from kna1 other one from knvv table.  i need to update the respective tables with these fields in badi GET_DATA of method IF_EX_CUSTOMER_ADD_DATA how to update the database table. Please help me in the same.

    see the help
    http://help.sap.com/saphelp_nw04/helpdata/en/c3/4099948b8911d396b70004ac96334b/frameset.htm
    Regards
    Kiran Sure

  • Create a new entry for zfield in the CDHDR table when sales order is create

    Hi,
    We have some custom field added to table VBAP and that field need is updated thorugh transaction VA01 or VA02.
    The Function poeple is asking to Update the CDHDR table for the ztable when ever the field is updated ,and they want
    the changes to appear in the sales order changes Log.
    Prabhudas

    Problem solved.
    By using the ..
    Used this FM "VERKBELEG_WRITE_DOCUMENT" in MV45AFZZ in exit...DOCUMENT_SAVE.
    by passign the only VBAK and VBAP table structure of XVBAP and YVABP and field name as ZZFIELD.
    Prabhudas.

  • Updation of db tables through Function module

    Using the below funtion module i need to update an internal table with 3 fields (Fkkop-opbel,fkkop-xblnr,fkkop-opord) into their respective tables
    CALL FUNCTION 'FKK_DOCUMENT_CHANGE'
      EXPORTING
        I_OPBEL                           = v_OPBEL
      I_UPDATE_TASK                     = 'X'
    TABLES
       T_CHANGEDOPS                      =   it_fkkop.
    please can anyone tell me how.

    hi,
    chk this.
    CALL FUNCTION 'Z_SAVE_SHIP_MET_TABLE'
            TABLES
              zmpets_ship_met_save = int_zmpets_ship_met.
    FUNCTION Z_SAVE_SHIP_MET_TABLE.
    ""Update Function Module:
    ""Local Interface:
    *"  TABLES
    *"      ZMPETS_SHIP_MET_SAVE STRUCTURE  ZMPETS_SHIP_MET
    modify zmpets_ship_met from table ZMPETS_SHIP_MET_SAVE.
    ENDFUNCTION.
    rgds
    anver  pls mark hlpful answers

  • Updating a DB table by a BDC session in background

    Hi,
    I need to  update a DB table with records using a BDC session. I need to run this session in background. But the Error Log I'm getting suggests that Table Maintenance is required for the same.
    Note that I can very well insert records in this table thru se11 and also by running the session in foreground.
    Is there any work-around for this issue?
    Thanks.

    Hi
    If at all you are using any DOWNLOAD and UPLOAD related function modules you can't run the BDC program in the background.
    If it is a Z table update you can create the table maintenance generator.
    other wise you can do it.
    You can run session in background.
    Reward points if useful
    Regards
    Anji

  • How to update a Z table by sm31

    hi guys,
    i need to update some z tables, i know that there is a way in TXN se11 the option utilities, create update.tab, but that ask me for a FM!!
    do i need to create a fm for each table? is there any standard fm for updating tables?
    i need to modify this table by SM31,
    any ideas?

    Hi Javier,
    The first question is where from are you going to update the tables? will yo manually change the entries?
    Try to generate the table maintenance for the 'Z' table.. by SE11>Environment>Table maintenance generator..
    You will not need to write any code for this... then goto SM30, put your table name and you will be able to create, modify or delete entries of your table..
    Thanks and Best Regards,
    Vikas Bittera.

  • Regarding updating of database table..

    Halo All,
    I have actually done the program successfully for updating the database table QMFE some days back, now we needed to update some more records and i have just changed the path of the text files but the problem is that all the values are being uploaded but the update statement is not executing successfully
    I have also tried to debug the program and saw that the sy-subrc value is 4 instead of 0.
    I am pasting my code here.
    Please solve this asap.
    *&     Report          Y_UPDATE_QMFE_01                                *
    *&     Program         Y_UPDATE_QMFE_01                                *
    *&     Author          RAMA KRISHNA BASA                               *
    *&     Date            02-04-2007                                      *
    *&     Description     REPORT FOR Update of Table QMFE                 *
    *&     Includes                                                        *
    *&     Tables          QMFE                                            *
    *&     Program Maintenance History                                     *
    *&     Date         Author     Change Request Number       SAP Release *
    *&  02-04-2007       BASA           EF7K919575                 6.10    *
    REPORT  Y_UPDATE_QMFE                            .
    Tables: qmfe.
    data: begin of gt1_qmfe occurs 0,
          qmnum       like qmfe-qmnum,
          fenum       like qmfe-fenum,
          /itml/usr20 like qmfe-/itml/usr20,
          end of gt1_qmfe.
    data: begin of gt2_qmfe occurs 0,
          qmnum       like qmfe-qmnum,
          fenum       like qmfe-fenum,
          /itml/usr21 like qmfe-/itml/usr21,
          end of gt2_qmfe.
    data: begin of gt3_qmfe occurs 0,
          qmnum       like qmfe-qmnum,
          fenum       like qmfe-fenum,
          /itml/usr19 like qmfe-/itml/usr19,
          end of gt3_qmfe.
    data: begin of gt4_qmfe occurs 0,
          qmnum       like qmfe-qmnum,
          fenum       like qmfe-fenum,
          /itml/usr07 like qmfe-/itml/usr07,
          end of gt4_qmfe.
    data: gs1_qmfe like line of gt1_qmfe,
          gs2_qmfe like line of gt2_qmfe,
          gs3_qmfe like line of gt3_qmfe,
          gs4_qmfe like line of gt4_qmfe.
    data: ls_lines1 type i,
          ls_lines2 type i,
          ls_lines3 type i,
          ls_lines4 type i.
    parameters: ip_file1 type RLGRAP-FILENAME default 'C:\Urgent\New\Text Files\StoDt.txt'     obligatory,   " usr20
                ip_file2 type RLGRAP-FILENAME default 'C:\Urgent\New\Text Files\RcDtCust.txt'  obligatory,   " usr21
                ip_file3 type RLGRAP-FILENAME default 'C:\Urgent\New\Text Files\DockDate.txt'  obligatory,   " usr19
                ip_file4 type RLGRAP-FILENAME default 'C:\Urgent\New\Text Files\AWB.txt'       obligatory.   " usr07
    field-symbols: <fs1> like gs1_qmfe,
                   <fs2> like gs2_qmfe,
                   <fs3> like gs3_qmfe,
                   <fs4> like gs4_qmfe.
    perform upload_gt1_qmfe.
    perform upload_gt2_qmfe.
    perform upload_gt3_qmfe.
    perform upload_gt4_qmfe.
    perform update_qmfe.
    *&      Form  upload_gt1_qmfe
          text
    -->  p1        text
    <--  p2        text
    FORM upload_gt1_qmfe .
    CALL FUNCTION 'WS_UPLOAD'
    EXPORTING
       FILENAME                      = ip_file1
       FILETYPE                      = 'DAT'
      TABLES
        DATA_TAB                      = gt1_qmfe.
    describe table gt1_qmfe lines ls_lines1.
    write: / ls_lines1.
    ENDFORM.                    " upload_gt1_qmfe
    *&      Form  upload_gt2_qmfe
          text
    -->  p1        text
    <--  p2        text
    FORM upload_gt2_qmfe .
    CALL FUNCTION 'WS_UPLOAD'
    EXPORTING
       FILENAME                      = ip_file2
       FILETYPE                      = 'DAT'
      TABLES
        DATA_TAB                      = gt2_qmfe.
    describe table gt2_qmfe lines ls_lines2.
    write: / ls_lines2.
    ENDFORM.                    " upload_gt2_qmfe
    *&      Form  upload_gt3_qmfe
          text
    -->  p1        text
    <--  p2        text
    FORM upload_gt3_qmfe .
    CALL FUNCTION 'WS_UPLOAD'
    EXPORTING
       FILENAME                      = ip_file3
       FILETYPE                      = 'DAT'
      TABLES
        DATA_TAB                      = gt3_qmfe.
    describe table gt3_qmfe lines ls_lines3.
    write: / ls_lines3.
    ENDFORM.                    " upload_gt3_qmfe
    *&      Form  upload_gt4_qmfe
          text
    -->  p1        text
    <--  p2        text
    FORM upload_gt4_qmfe .
    CALL FUNCTION 'WS_UPLOAD'
    EXPORTING
       FILENAME                      = ip_file4
       FILETYPE                      = 'DAT'
      TABLES
        DATA_TAB                      = gt4_qmfe.
    describe table gt4_qmfe lines ls_lines4.
    write: / ls_lines4.
    ENDFORM.                    " upload_gt4_qmfe
    *&      Form  update_qmfe
          text
    -->  p1        text
    <--  p2        text
    FORM update_qmfe .
    data: ls_cnt1 type i,
          ls_cnt2 type i,
          ls_cnt3 type i,
          ls_cnt4 type i.
    *refresh gt1_qmfe.
    *clear   gt1_qmfe.
    loop at gt1_qmfe assigning <fs1> .
    *concatenate <fs1>-/itml/usr206(2) '.' <fs1>-/itml/usr204(2) '.' <fs1>-/itml/usr20+2(2) into <fs1>-/itml/usr20.
    data wa_qmfe type qmfe.
    *select single * from qmfe into wa_qmfe where qmnum = <fs1>-qmnum
                                                      and   fenum = <fs1>-fenum.
    *wa_qmfe-/itml/usr20 = <fs1>-/itml/usr20.
    update QMFE  set    /itml/usr20 = <fs1>-/itml/usr20
                 where  qmnum       = <fs1>-qmnum
                 and    fenum       = <fs1>-fenum.
    *modify qmfe from wa_qmfe.
    if sy-subrc = 0.
    commit work.
    add 1 to ls_cnt1.
    endif.
    endloop.
    write: / ls_cnt1.
    *refresh gt2_qmfe.
    *clear   gt2_qmfe.
    loop at gt2_qmfe assigning <fs2>.
    *concatenate <fs2>-/itml/usr216(2) '.' <fs2>-/itml/usr214(2) '.' <fs2>-/itml/usr21+2(2) into <fs2>-/itml/usr21.
    update qmfe set    /itml/usr21 = <fs2>-/itml/usr21
                where  qmnum       = <fs2>-qmnum
                and    fenum       = <fs2>-fenum.
    if sy-subrc = 0.
    commit work.
    add 1 to ls_cnt2.
    endif.
    endloop.
    write: / ls_cnt2.
    *refresh gt3_qmfe.
    *clear   gt3_qmfe.
    loop at gt3_qmfe assigning <fs3>.
    *concatenate <fs3>-/itml/usr196(2) '.' <fs3>-/itml/usr194(2) '.' <fs3>-/itml/usr19+2(2) into <fs3>-/itml/usr19.
    update qmfe set    /itml/usr19 = <fs3>-/itml/usr19
                where  qmnum       = <fs3>-qmnum
                and    fenum       = <fs3>-fenum.
    if sy-subrc = 0.
    commit work.
    add 1 to ls_cnt3.
    endif.
    endloop.
    *top_of_page.
    write: / ls_cnt3.
    *refresh gt4_qmfe.
    *clear   gt4_qmfe.
    loop at gt4_qmfe assigning <fs4>.
    update qmfe set    /itml/usr07 = <fs4>-/itml/usr07
                where  qmnum       = <fs4>-qmnum
                and    fenum       = <fs4>-fenum.
    if sy-subrc = 0.
    commit work.
    add 1 to ls_cnt4.
    endif.
    endloop.
    write: / ls_cnt4.
    ENDFORM.                    " update_qmfe
    Thanks in advance,
    rama.

    Hi,
    Thanks for the reply..
    But last time the update was successfull and the program was transported onto the productive system
    after that now i need to update the new records into QMFE
    so what i did is just changed the path of the text files since they are of same format as of the old text files.
    Does it have any problems.
    How can i do that using what u have suggested......
    i need to update the database table QMFE
    is there any bapi to update the data base table

  • Updating/Inserting multiple tables

    Hi,
    I've been trying to figure out how to update/insert multiple fields in 2 different tables with one RowSet. im new to java and have been using Creator for about 2 weeks
    basically there are 3 tables: one containing user info(USER), one containing department info (DEPT), and one table relating the two (USER_DEPT). my form lets uers update, among others, their NAME in table USER, and DEPT_NAME in table DEPT.
    These are all VARCHAR types.
    I used the Clips provided by Creator to initialize and do the updating. i am using updateRow() to do the updating. the fields are bound to specific database fields. the RowSet is updatable.
    in my app i chose some specific fields, but for the sake of avoiding pasting very long SQL queries lets just say i chose everything. some of the queries i tried:
    SELECT *
    FROM USER WHERE USER.USERNAME = ?This one works.
    SELECT *
    FROM USER, DEPT, USER_DEPT
    where USER.ID = USER_DEPT.USER_ID
    and DEPT.ID = USER_DEPT.DEPT_ID AND USER.USERNAME = ?this one gives me a Conversion Error message. i have no conversion going on whatsoever. i havent even learned how to use conversion yet.
    another query i tried:
    SELECT * FROM USER
    INNER JOIN USER_DEPT ON USER.ID = USER_DEPT.USER_ID
    INNER JOIN DEPT ON DEPT.ID = USER_DEPT.DEPT_ID
    WHERE USER.USERNAME=?this one gives me no error. the app works except the database doesnt get updated. i have determined that when using this query updateRow() is skipped. i dont know why. the app keeps running in that it goes to the next page as defined by the XML, but updateRow() is never called.
    so can anyone please tell me how to update/insert multiple fields in multiple tables using one RowSet PLEASE?
    THANKS!

    The only way this can be done with a single rowset is if you do your query against a view (instead of a join), and if your JDBC driver supports updates to multiple tables through a view. Otherwise, you're going to need to update the underlying tables individually.
    Craig

  • Updating an oracle table with data from an xml string

    Hi - I need help with the following problem:
    We have a table in the database with a field of xml type. We are going to take each string that gets inserted into the xml type field in the 'xml table' and parse the data into another oracle table with corresponding fields for every element.
    once the record gets inserted into the 'real table' the user might want to update this record they will then insert another record into the 'xml table' indicating an update(with a flag) and then we need to update the 'real table' with the updated values that have been sent in.
    The problem that I am having is that I do not know how to create this update statement that will tell me which fields of the table need to be updated.(only the fields that need to be updated will be in the xml string in the 'xml table').
    Please help me with this - ASAP!

    Are you wanting to upload the file through an Oracle Form or just upload a file? If it isn't via forms, then you should probably post your question here: {forum:id=732}
    You also should post the version of Forms, Database, etc...
    As far as uploading files via a text file, I personally like to use Oracle External Tables even in Forms. You can Google that and there is plenty of information. If you search this forum, then you will see lots of people use UTL_FILE in forms, but you can Google that also for more information.

  • On submit perform an insert on one table and an update on aother table

    I am trying to perform and insert on the table one table (the wizard created my form the insert is going against the table that I created using the wizard) and on the form is on field that is also in another table. Therefore, I am trying to perform an update on one attribute of one table and a insert into another table. How do I do this in apex?

    If you have used wizard to create form, then you may see a process of type 'Automatic Row Processing (DML)' in your page which will perform INSERT/UPDATE/DELETE on your form table. Here you can see APEX performs INSERT only when REQUEST is in 'INSERT, CREATE, CREATE_AGAIN, CREATEAGAIN'
    So create one more PL/SQL page process which will execute at 'on Submit after validations' and write update process as follows
    begin
    -- pseudo table/columns
    update tbl_second
    set col1 = :p1_item
    where pk_col = :p1_pk_item;
    end;Make this process conditional so that it will perform UPDATE only when request value is in 'INSERT, CREATE, CREATE_AGAIN, CREATEAGAIN' ( i.e. only when you are inserting into your form table)
    Cheers,
    Hari
    p.s. I think you may also need to update the second table when some-one updates your form table.
    Edited by: Hari_639 on Oct 26, 2009 9:46 AM

  • Update a Z table

    Hi,
    I need to update a Z table.. ( update is a primary key .. this table has 7 P. keys )
    Bcoz of performance reasons, I can not go line by line and use SET command..
    IS there any other way i can upadte the records of this table in one shot.. like..
    UPDATE <ztable? from <internal table> but I think this can not update the P. key
    Modify will not work as it would insert a new entry in the table....
    Any ways to handle this issue.. apart from looping it through...

    Hi Dhruv,
    FIRST TEST IN SANDBOX or DEV REGION/SERVER.
    THIS METHOD IS NOT TESTED BUT MIGHT JUST WORK , TRY ONLY  IF NO OTHER SOLUTION AVAILABLE.
    TAKE THE BACKUP OF THE TABLE BEFORE DOING ANY CHANGES.
    Consider a following example.
    ZT00_EMP has employee data and the PK of this constituted by MANDT, EMP_NO  and ACC_NO.
    Now you want to change the values in say ACC_NO column for all the entries.i.e. you want to update records.
    Add a new column (in SE11 )  in the table say - ACC_NO_1
    and update the new/changed values in this column in the table. After this , in SE11 change the table defination by removing the ACC_NO from key and adding ACC_NO_1 in the key. So the new key will be MANDT, EMP_NO and ACC_NO_1.  You can either delete column ACC_NO and rename column ACC_NO_1 to ACC_NO or leave it as it is but then you will have to change all programs for name from ACC_NO to ACC_NO_1.
    You can always do this in INTERNAL TABLE first and then UPDATE ZTABLE from ITAB..... (FOR DATA PART)
    Hope this works.
    PLEASE TAKE BACKUP FIRST.
    Regds,
    Gaurav
    Edited by: Gaurav P Fadnis on Mar 7, 2008 11:05 AM

  • Price change in Schedule agreement but not updated in CDHDR and CDPOS

    Hi Experts
    We have change price in  SA ,please see the below screen shot. But these changes not update in CDHDR and CDPOS. We can see current rate in ME33L.
    Please guide how to update these changes.
    Regards
    Parkash Chand

    Generally in standard, the changes logs are saved into table CDPOS and CDHDR.
    Its working fine in my system.
    Can you see the changes log with regards to document number by running program RSSCD200.
    Go to SE38 or SA38, enter the program RSSCD200 then press execute.
    Enter * in object class and enter the document number
    Then press execute. You can find more details into the wiki content Steps to enable logging of changes in change documents - Code Gallery - SCN Wiki

Maybe you are looking for