Need to update custom fields in MSEG table using "BAPI_GOODSMVT_CREATE"

Hi All,
There is a requirement to update custom fields in table MSEG which are part of append structure. There is a option to update the custom fields using the one of the tables parameters "EXTENSIONIN". Anyone please advice how can I update the custom field thru EXTENSIONIN.
Thanks in advance.
cheers,
Vijay

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

Similar Messages

  • BAPI_GOODSMVT_CREATE ---- need to update custom field in MSEG table

    Greetings all,
    I'm using 'BAPI_GOODSMVT_CREATE' to create goods movements. also I need to update one cutom field(z-field) in MSEG table. Could anyone please advice how can I update the custom field thru EXTENSIONIN.
    thanks in advance.

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

  • BADI MB_MIGO_BADI not updating custom field in MSEG Table

    Dear Experts,
    I am working on screen exit In MIGO transaction for transfer Posting.
    I checked that BADI MB_MIGO_BADI having facility for screen exit and method line_modify having facility to change GOITEM Structure for the changed line item.
    Now, to make this functionality work I have enhanced include structure CI_COBL which is available in both mseg table and goitem structure, now I have this customized fields on my custome tab through the enhancement and also to update this value 2 custom fields created in goitem structure and MSEG table through include structure  CI_COBL.
    Here my question is at the time of transfer posing creation in MIGO when I am passing the value in custom fields through screen and assigning it to custom fields of structure GOITEM through LINE_MODIFY method, it is giving me below worning message
    BADI: Field GOITEM-ZZIDNLF is not ready for input. (Change is not taken over)
    Now I have debuged the code, also checkout many threads and came to know that because of few checks in standred program (iNCLUDE:LMIGOKL3) these fields will not be updated WHERE IT always checks whether these fields are ready for input or not and if not ready then instead of assigning the values it throws worning message.
    Now can you please through some light how can I go ahead as I have check out many threads and also tried to change value of cs_goitem structure using field symbol but throughing dump that it is blocked against changes through field symbol.
    The helpful answers will be highly appriciated.

    Hi,
    In the badi mentioned by you GOITEM is the importing parameters & if the relevant field is not used in any MIGO screen you cannot change the data.
    Please check example BADI interface: IF_EX_MB_MIGO_BADI~LINE_MODIFY
    Please check the BADI documentation:
    Changed data in GOITEM is only adopted if the relevant fields are visible and ready for input.
    Changed data in GOITEM is not adopted if the relevant field is not used in any MIGO screen (warning via MIGO 049).
    Changed data in GOITEM is not adopted if the relevant fields are not ready for input (warning via MIGO 050)
    Thanks and Regards,
    Chandra

  • Updating custom fields to MSEG through MIGO

    Hi,
    I got a requirement to add a tab with custom fields in MIGO transaction, which I did using BADI MB_MIGO_BADI
    and requirement also says to extend table MSEG with custom fields and store the values in MSEG.
    I have gone through example implimentation and updated MSEG in similar way. IS it a good approach to extend MSEG table? I read one thread says we can't extend MSEG table with custom fields. is it true?
    Goods receipt will be done only through MIGO to restrict inconsistensies in material documents.
    One more question.
    How to restrict the additional custom screen to be displayed for particular action in MIGO?
    Thanks

    Hi,
    Yes you can do it, i did it with the same BADI method to update to custom fields in MSEG table through MIGO transaction.
    Here is the steps you need to follow :-
    1. Create a append structure or you can use the CI include to add fields in MSEG table. I did it though append structure only.
    2. Create a implementaion of MB_MIGO_BADI through SE18 or SE19 transaction.
    3. Inplement the interface IF_EX_MB_MIGO_BADI methods, the details of interface implementaions are described below:-
    Attribute
    GV_VEND_LOT     Instance Attribute     Public     Type     CHAR1     'X' : Purchase order Type NB (Standard PO) found                                                                               
    GIT_MSEG     Instance Attribute     Public     Type     TY_T_MSEG     Table MSEG                                                                               
    GV_BSART     Instance Attribute     Public     Type     ESART     Purchasing Document Type                                                                               
    GV_GRMODE     Instance Attribute     Public     Type     CHAR1     X: Document is of Type GR with PO and Y : Document with Mat.                                                                               
    GWA_MSEG     Instance Attribute     Public     Type     MSEG     Document Segment: Material                                                                               
    GC_CLASS_ID     Constant     Private     Type     MIGO_CLASS_ID     Class ID for MIGO Components (External Detail Screen)     'ZIMP_MB_MIGO_BADI'
    GV_LINE_ID     Instance Attribute     Private     Type     GOITEM-GLOBAL_COUNTER     LINE_ID of Line Displayed in Detail                                                                               
    GIT_LINE_ID     Instance Attribute     Private     Type     /KYK/TRG_NUMC6     Range Table: NUMC6                                                                               
    GWA_LINE_ID     Instance Attribute     Private     Type     /KYK/SRG_NUMC6     Range Structure: NUMC6                                                                               
    GC_X     Constant     Private     Type     CHAR1     'X' : Select     'X'
    GC_BSART     Constant     Private     Type     ESART     Purchasing Document Type     'NB' 
    IF_EX_MB_MIGO_BADI~INIT
    METHOD if_ex_mb_migo_badi~init.
      IF gv_grmode = gc_x.
    Regristration of BAdI-Implementation:
    Append class attribute GF_CLASS_ID (='ZIMP_MB_MIGO_BADI') to
    regristration table.
        APPEND gc_class_id TO ct_init.
      ENDIF.
    ENDMETHOD.
    IF_EX_MB_MIGO_BADI~PBO_DETAIL
    METHOD if_ex_mb_migo_badi~pbo_detail.
    Lines added to do display Vendor lot tab in the item level
    Only for Purchase order type NB (Standard PO)
    Local constants
      DATA : lc_cprog TYPE sycprog VALUE 'ZMMM_MIGO_VENDOR_COO',
             lc_dynnr TYPE sydynnr VALUE '0100'.
            lc_heading TYPE migo_badi_heading VALUE 'Vendor Lot Number'.
    Read Line item from buffer table
    if sy-subrc =0 then only display vendor lot tab
      READ TABLE git_line_id WITH KEY low = i_line_id
      BINARY SEARCH TRANSPORTING NO FIELDS.
      IF sy-subrc EQ 0 AND ( gv_grmode IS NOT INITIAL
        AND gv_vend_lot = gc_x ).
        e_cprog   = lc_cprog. " Program name
        e_dynnr   = lc_dynnr. " Screen number
        e_heading = text-001. " Tab Heading
        gv_line_id = i_line_id. " line Item
      ENDIF.
    ENDMETHOD.
    IF_EX_MB_MIGO_BADI~PAI_DETAIL
    METHOD if_ex_mb_migo_badi~pai_detail.
      IF gv_grmode IS NOT INITIAL AND gv_vend_lot = gc_x.
    'X':  The Method LINE_MODIFY Is Processed
        e_force_change = gc_x.
    Reset the Flag for next line item selection
        CLEAR gv_vend_lot.
      ENDIF.
    ENDMETHOD.
    IF_EX_MB_MIGO_BADI~LINE_MODIFY
    METHOD if_ex_mb_migo_badi~line_modify.
      IF cs_goitem-ebeln IS NOT INITIAL.
    Look for Purchase order number from EKKO and get the Order Type.
    If the Order type is NB (Standard PO) then set the flag GV_VEND_LOT.
        SELECT SINGLE bsart FROM ekko INTO gv_bsart
          WHERE ebeln = cs_goitem-ebeln.
        IF sy-subrc EQ 0 AND gv_bsart = gc_bsart.
          gv_vend_lot = gc_x.
          IF NOT i_line_id IS INITIAL.
            gwa_line_id-low = i_line_id.
          ENDIF.
          IF git_line_id IS NOT INITIAL.
            SORT git_line_id BY low.
          ENDIF.
          READ TABLE git_line_id WITH KEY
          low = i_line_id BINARY SEARCH
          TRANSPORTING NO FIELDS.
          IF sy-subrc <> 0 AND gwa_line_id IS NOT INITIAL.
            APPEND gwa_line_id TO git_line_id.
          ENDIF.
        ELSE.
          CLEAR gv_vend_lot.
        ENDIF.
        CLEAR : gv_bsart,
                gwa_line_id.
      ENDIF.
    *************Buffer MSEG table with custom fields **********************
    *Item is Adopted in Document
      IF NOT cs_goitem-take_it IS INITIAL.
        CLEAR gwa_mseg.
        MOVE-CORRESPONDING cs_goitem TO gwa_mseg.
        APPEND gwa_mseg TO git_mseg.
      ENDIF.
    ENDMETHOD.
    METHOD if_ex_mb_migo_badi~post_document.
    Delete duplicate line item if avail in GIT_MSEG table
      SORT git_mseg BY zeile.
      DELETE ADJACENT DUPLICATES FROM git_mseg COMPARING zeile.
    To access these valu in Ennhancement Spot ZENHIMPL_MM_MB_MIGO_BADI_MB
      EXPORT : git_mseg FROM git_mseg TO MEMORY ID 'GIT_MSEG',
               gv_grmode FROM gv_grmode TO MEMORY ID 'GV_GRMODE'.
    Refresh all class content
      CLEAR : gv_vend_lot,
              gv_bsart,
              gv_grmode,
              gwa_mseg,
              gv_line_id,
              gwa_line_id.
      REFRESH : git_mseg,
                git_line_id.
    ENDMETHOD.    
    METHOD if_ex_mb_migo_badi~mode_set.
    Local Constants
      DATA : lc_a01 TYPE goaction VALUE 'A01', " Goods Receipt
             lc_r01 TYPE refdoc VALUE 'R01',   " Purchase order
             lc_a04 TYPE goaction VALUE 'A04', " Display
             lc_r02 TYPE refdoc VALUE 'R02',   " Material Document
             lc_y   TYPE char1 VALUE 'Y'.      " Indicator for Display material document
    Set mode variable for Good Receipt with Purchase order
      IF i_action = lc_a01 AND i_refdoc = lc_r01.
        gv_grmode = gc_x.
      ELSEIF i_action = lc_a04 AND i_refdoc = lc_r02.
    Set mode variable for Good Receipt with Purchase order
        gv_grmode = lc_y.
      ELSE.
        CLEAR gv_grmode.
      ENDIF.
    ENDMETHOD.
    METHOD if_ex_mb_migo_badi~publish_material_item.
      IF ls_goitem-ebeln IS NOT INITIAL.
    Look for Purchase order number from EKKO and get the Order Type.
    If the Order type is NB (Standard PO) then set the flag GV_VEND_LOT.
    This method is used to material document display
        SELECT SINGLE bsart FROM ekko INTO gv_bsart
          WHERE ebeln = ls_goitem-ebeln.
        IF sy-subrc EQ 0 AND gv_bsart = gc_bsart.
          gv_vend_lot = gc_x.
          IF NOT ls_goitem-zeile IS INITIAL.
            gwa_line_id-low = ls_goitem-zeile.
          ENDIF.
          IF git_line_id IS NOT INITIAL.
            SORT git_line_id BY low.
          ENDIF.
          READ TABLE git_line_id WITH KEY
          low = ls_goitem-zeile BINARY SEARCH
          TRANSPORTING NO FIELDS.
          IF sy-subrc <> 0 AND gwa_line_id IS NOT INITIAL.
            APPEND gwa_line_id TO git_line_id.
          ENDIF.
        ELSE.
          CLEAR gv_vend_lot.
        ENDIF.
        CLEAR : gv_bsart,
                gwa_line_id.
      ENDIF.
    ENDMETHOD.
    METHOD modify_mseg.
      DATA : lwa_mseg TYPE mseg.
    Check if buffer MSEG table is not initial
    and mode is GR with PO then only update XMSEG from GIT_MSEG
      IMPORT : git_mseg TO git_mseg FROM MEMORY ID 'GIT_MSEG',
               gv_grmode TO gv_grmode FROM MEMORY ID 'GV_GRMODE'.
      IF git_mseg IS NOT INITIAL
         AND gv_grmode = gc_x.
        SORT git_mseg BY zeile.
        LOOP AT xy_mseg INTO lwa_mseg.
    Identify the record and update XMSEG
          CLEAR gwa_mseg.
          READ TABLE git_mseg
          INTO gwa_mseg
          WITH KEY zeile = lwa_mseg-zeile BINARY SEARCH.
          IF sy-subrc EQ 0.
            MODIFY xy_mseg FROM gwa_mseg
            TRANSPORTING zvendlot zcoo WHERE zeile = gwa_mseg-zeile.
          ENDIF.
          CLEAR lwa_mseg.
        ENDLOOP.
    Reset buffer table and mode
        REFRESH git_mseg.
        CLEAR gv_grmode.
      ENDIF.
    Free memory ids
      FREE MEMORY ID : 'GIT_MSEG',
                       'GV_GRMODE'.
    ENDMETHOD.
    4. Now go to the function module MB_POST_GOODS_MOVEMENT andcall the method modify_msegfrom the implemented class ZCL_IM__MB_MIGO_BADI.
    ENHANCEMENT 110  ZENHIMPL_MM_MB_MIGO_BADI_MB.    "active version
    Data declaration for badi method
      Data : lo_ZCL_IM__MB_MIGO_BADI TYPE REF TO ZCL_IM__MB_MIGO_BADI.
      CREATE OBJECT lo_ZCL_IM__MB_MIGO_BADI.
      if sy-subrc eq 0 and xmseg[] is NOT INITIAL.
        CALL METHOD lo_zcl_im__mb_migo_badi->modify_mseg
          CHANGING
            xy_mseg = xmseg[].
      endif.
    ENDENHANCEMENT.   
    Regards,
    Dhirendra Pandit

  • Update Custom fields in MSEG in MIGO through MB_MIGO_BADI

    Hi All,
    I have to update my custom fields in MSEG table after getting them from user in MIGO transaction. I am using BADI--> MB_MIGO_BADI for this. There is method called POST_DOCUMENT in BADI but it is having MSEG as importing parameter. Also, How can i send my custom fields to BADI. If some how I send them how to update MSEG through this BADI.
    Please help me out in this. This is urgent.
    Thanks,
    Ravi

    Hi Ravi,
        I have the same issue . So can you please help me on the same.
        Through the BADI : MB_MIGO_BADI~POST_DOCUMENT method I have to update a customer field named zznotno.
           Added By Kamal on 21/07/2010 Ticket No 8000003778 ***
      DATA : lt_goitem TYPE TABLE OF goitem,
             wa_goitem LIKE LINE OF lt_goitem. .
      FIELD-SYMBOLS: <mseg> TYPE mseg,
                     <fs>   TYPE ANY.
      IMPORT lt_goitem TO lt_goitem FROM MEMORY ID 'GT_GOITEM'.
      LOOP AT it_mseg ASSIGNING  <mseg>.
        IF <mseg>-bwart = '415' OR
           <mseg>-bwart = '301'.
          IF <mseg>-sobkz = 'Q'.
            READ TABLE lt_goitem INTO wa_goitem WITH KEY zeile = <mseg>-zeile.
            IF sy-subrc IS INITIAL.
              wa_mseg-zznotno = <mseg>-zznotno.       <<<<<<<<<
              ASSIGN ('(SAPLMIGO)mseg') TO <fs>.
              MOVE wa_mseg-zznotno TO <fs>-zznotno .
             MODIFY it_mseg FROM wa_mseg TRANSPORTING zznotno.
            ENDIF.
          ENDIF.
        ENDIF.
      ENDLOOP.
    End Addition By Kamal on 21/07/2010 Ticket No 8000003778 ***
    Thanks and regards
    kamal kumar

  • Updating custom fields in BSEG table

    Hi Experts,
    I searched through SDN but did not find satisfactory answer to my problem.
    The scenario is that FIDCC2 Idoc is coming to SAP system. This Idoc has extended to include few custom fields. These fields need to be updated in table BSEG. Table BSEG also contains these custom fields. However, the Idoc processing routine is not updating custom fields in table BSEG with the data coming in Idoc. How can I do that?
    Thanks in advance,
    Netrey

    This message is processed by function module IDOC_INPUT_FIDCC2. If you drill down into the code a little bit, you should be able to find BTE/open FI or user exit calls (CALL CUSTOMER-FUNCTION) before the document is being posted.
    I found two that are using the ACCIT structure for passing the line items, which should contain your customer fields as well, if they were added to BSEG properly (via transaction OXK3).
    Please have a look.
    Thomas

  • How to update a custom field of MARC table using BAPI_MATERIAL_SAVEREPLICA

    Hi,
    I want to update a custom field (Appended field) of MARC table using  BAPI_MATERIAL_SAVEREPLICA. Please help me in this issue. I cannot use BAPI_MATERIAL_SAVEDATA as this updated the MARC table record by record. I have to update bulk records at a time.
    Thanks
    Rahul.

    Hi,
    Use the Documentation given for struture in BAPI docuemntation...
    For loading data into custom fields of MARC use the structure - BAPI_TE_MARC.
    First, structures BAPI_TE_<NAME> (<NAME> = MARA, MARC, MARD, MBEW, MLGN, MLGT, MVKE, MARM, MAKT) and the appropriate check structures BAPI_TE_<NAME> (<NAME> = MARAX, for example) have to be extended by the customer to include the required fields. The structures that are delivered as standard only contain the relevant key fields. When new fields are added to this structure, you should ensure that a field has the same name as the field in the database table. Furthermore, the fields in the structures BAPI_TE_<NAME> can only be CHARACTER fields. Data element BAPIUPDATE is to be used for the fields in the check structure (exception to this: key fields.)
    Parameters EXTENSIONIN and EXTENSIONINX are used for transferring data to the method. Field STRUCTURE contains the name of the structure (for example, BAPI_TE_MARA or BAPI_TE_MARAX). This names is used to identify the work area (for example,  WA_BAPI_TE_MARA or WA_BAPI_TE_MARAX) to which the data is transferred. The remaining fields in parameters EXTENSIONIN or EXTENSIONINX contain data for the key fields (for example, the material number) and the data for customer-specific fields. The number of characters reserved in both parameters for the contents of the customer-specific fields must match the number of characters for the relevant field in the work area. If the number of required characters is less, the remaining characters are left blank. Only when all characters have been filled can the contact for an additional field be transferred. Bear in mind that only data for which an appropriate indicator has been set in the work area can be updated to the database.
    Regards,
    Bhargava

  • To Update Custom field in mch1 table through MIGO Tcode

    Dear champs,
    I have added one custom field in mch1 table ( date ).
    Now , In MIGO Tcode when i am doing posting, MCH1 table is also updated.
    I want to know how to update my custom field in mch1 table at the time of posting.
    Please tell me where to write logic to update mch1 table.
    Regards,
    Satyen Trivedi

    Hi Satyen,
           what data has to be update in MCH1 table new field, for this did you added any screen or you want to implement your own custom logic.
    1) if you implemented the screen , then you have to write logic there itself.
    2) If you want to update through custom logic , then you takeup with the  Enhancements or BADI.
    Regards,
    Krishna

  • Updating the CUstomer fields in mARC table using BAPI_MATERIAL_SAVEREPLICA

    Hi friends,
    I want to update the Zfields in MARC table .Please provide me the details for updating these fields (Extension in bapi) Using the  BAPI_MATERIAL_SAVEREPLICA
    Thanks in advance

    Hi Varsha,
    There is documentation provided for this funtion module:
    If long texts (for example, basic data texts, internal notes, purchasing info texts, material notes or sales and distribution texts) or customer-specific fields have to be created for a material, some specific characteristics have to be taken into consideration. These characteristics are detailed in the documentation for parameters MATERIALLONGTEXT and EXTENSIONIN.
    Documentation is present for the parameters by clicking on EXTENSIONIN, EXTENSIONINX
    Regards,
    Swarna Munukoti

  • Updation of Custom Fields in AFRU table Using Customerexit

    Hi all,
    I added two fields in CO11n Tcode using SCREEN EXIT - CONFPP07 and iam trying to update these two fields in AFRU table
    using CONFPP05.  But iam unable to update these two field .
    see this code in CONFPP05
      LOOP AT afrud_tab.
        afrud_tab-zzshift = wa_afrud-zzshift1 .
        afrud_tab-zzoperator = wa_afrud-zzoperator1 .
        MODIFY afrud_tab.
      ENDLOOP.
    Plz help me regarding this..

    Thanks for reply
    Ya i added two fields in confpp07 .
    see the code :
    *&  Include           ZXCOFTOP
    tables : afrud.
    DATA : WA_AFRUD TYPE AFRUD,
            IT_AFRUD TYPE TABLE OF AFRUD.
    Include           ZXCOFU24
    MOVE afrud-zzshift1 TO wa_afrud-zzshift1.
    MOVE afrud-zzoperator1 TO wa_afrud-zzoperator1.
    Even though it is not updating . except these two fields.
    Regards,
    Srinivas

  • Updating custom field in standard table ERCH

    Hi All,
    I'm trying to update a custom field bill type in table ERCH.I could not find any function for ERCH table and hence i am using enqueue dequeue with update statement.During debugging,the field BELNR(bill doc) is seen with a value for bill document but if at that moment i take that bill doc and put in table ERCH,it shows no entries found.Because of this reason,sy-subrc is not zero and bill type does not get updated.Any suggestions here are welcome.
    Thanks,
    Shreeraj

    Thanks for your replies,
    I need to update the custom field bill type in table ERCH depending upon the bill transaction( if bill transaction is periodic,bill type will be updated as P and so on for other cases)
    I am implementing a BADI ISU_DEF_BILL_PERIOD and i have used case statements(when abrvorg is P,bill type is P). While debugging i saw that the importing parameter bill document is generated but if i enter the same bill document number at that point in time in table ERCH, it shows no entries found. Thus sy-subrc is retrieved as not zero and hence the custom field bill type does not get updated.
    I would like to know how do i go about this requirement since it seems that the bill document entry is made in table ERCH outside this BADI.How do i update the bill type in table ERCH based on the billing transaction?
    Thanks,
    Shreeraj

  • I want to update date field in oracle table using database adaptor

    Hi Guys,
    I want to update date in oracle table field which is 'DATE' type , but i am getting following error.
    Pure SQL Exception.
    Pure SQL Execute of update crp3apps.IFACE_SO_DATE_CHANGES set PROCESSED_DATE=? where CTRL_ID=? failed. Caused by java.sql.SQLException: ORA-01830: date format picture ends before converting entire input string
    The Pure SQL option is for border use cases only and provides simple yet minimal functionality. Possibly try the "Perform an operation on a table" option instead.
    </summary>
    </part>
    - <part name="detail">
    <detail>
    ORA-01830: date format picture ends before converting entire input string
    </detail>
    i am formated the date using following code and assigned to one variable.
    ora:formatDate(ora:getCurrentDateTime(),'dd-MMM-yyyy hh:mm:ss ')
    this is update query
    update crp3apps.IFACE_SO_DATE_CHANGES set PROCESSED_DATE=#date where CTRL_ID=#id
    Please provide solution.
    regards
    janardhan

    The thing is that XSLT often doesn't deliver the functionality required when it comes to times.
    You suggest appening "Z" to the time but this means that the time is now in UTC time. What if the system from where the date is being converted is running in NZ using local time? Other systems that recieve the date (and correctly handle the time zone) will now have a time that is out by a number of hours.
    You often can't ignore the time zone (drop the 'Z') as if you send the time to a system it has to either assume the time is local to it (which may not be the case... the other system coudl be in a different time zone) or assume the time is UTC (I think crossfire does this by default).
    Typically can't just append a time zone (e.g. +11:00) either as many places have daylight savings so the value to appended is variable (you then need some way of determining what the value is... either Java Embedding or a Service).
    As you mention it does depend on the use case but in many circumstances using Jaba Embedding, not as suggested above but with the appropriate Java.util.Calendar classes, is the best way to handle date and time in BPEL. Even still you need to ascertain the format of times external to the system and ensure you parse them correctly.
    ANd even if you do all this you can still run into problems. I've seen a real world example where two systems which both handled time zones correctly and had previously been working together for quite a while, satrted reporting different times. It turns out that only one of them had had the most recent Java Time Zone patches applied and there had been a change in the dates for daylight savings here (Australia). Be warned!

  • Ideal way to update a field in a table

    Hi All,
    We need to update a field in a table which have some 8 million records.
    The value of the field needs to be updated in all the above mentioned records.
    Now, we have an input file with all the primary key fields and the field to be updated.
    Can any one suggest the ideal way to update the field.
    1.     Updating the database for each record.
    Loop at itab.
    Update…….
    Endloop.
    2.     Updating the database with a set of 100 records.
    We are planning to schedule the job in the background.
    Thanks for your help.
    Regards,
    Krishna

    Hi,
    be very carefull with the update, ´cause you can damage 8 million records !!
    You better use instruction Update for this:
    update mytable set field = value where conditions.
    Try to use all key fields in the conditions and never use something like
    update mytable set: field1 = value1
                        field2 = value2
                        field3 = value3 where conditions.
    The loop in your case 1 is not absolutely necessary, ´cause you update a whole bunch of records at once with the conditions in Update.
    Test the changes in the development system before you do it in production

  • Update 2 fields in 1 table

    I need to update an Oracle 8i database. I need to update 2 fields in 1 table with about 2,000 rows of data.
    Right now the date is stored in an Excell file in columns A and B.
    I need Something like:
    Update Table1
    set field1 with value from A:1,
    set field2 with value from B:1
    repeated with A:2,B:2 and so on

    I believe you could use sql loader to get your excel file in but here is a way I cheat to do it.
    I save the excel file as a comma deliminated file (I think it is .csv)
    then I open it up and copy and paste it into the following. (the part that says paste flat file here)
    this is assuming 8i supports model clause I'm unsure on that point.
    create or replace view view_xl_file_to_table as
    select * from
    with t as (select
    --- copy paste your flat file here
    ' Bob,Jones,12345,Employee
      Fred,Thebes,32,Manager
      John,Smith,12,Employee
      Karl,Cane,432,Employee
      George,Johnson,54,Manager
      ' flat_text_file from dual
    select flat_text_file text_file_turned_into_row,
            substr(flat_text_file, 1, instr(flat_text_file,',',1,1)-1) col1, -- get text up to the first comma
            substr(flat_text_file, instr(flat_text_file,',',1,1)+1, instr(flat_text_file,',',1,2) - instr(flat_text_file,',',1,1)-1  ) col2, --2nd comma
            substr(flat_text_file, instr(flat_text_file,',',1,2)+1, instr(flat_text_file,',',1,3) - instr(flat_text_file,',',1,2)-1  ) col3, --3rd
            substr(flat_text_file, instr(flat_text_file,',',1,3)+1, instr(flat_text_file,',',1,4) - instr(flat_text_file,',',1,3)-1  ) col4,
            substr(flat_text_file, instr(flat_text_file,',',1,4)+1, instr(flat_text_file,',',1,5) - instr(flat_text_file,',',1,4)-1  ) col5,
            substr(flat_text_file, instr(flat_text_file,',',1,5)+1, instr(flat_text_file,',',1,6) - instr(flat_text_file,',',1,5)-1  ) col6,
            substr(flat_text_file, instr(flat_text_file,',',1,6)+1, instr(flat_text_file,',',1,7) - instr(flat_text_file,',',1,6)-1  ) col7
      from t
    -- first turn the carriage return into seperate rows
    model return updated rows
    dimension by (0 d)
    measures (flat_text_file, 0 position_of_return )  -- the position of return is where the next carriage return is
    rules iterate(1000) until position_of_return[iteration_number+1] = 0
    position_of_return[iteration_number + 1] = instr(flat_text_file[0],chr(10),1,iteration_number + 1), -- find the next carriage return
    -- get the text between the previous carriage return and the next and make it a row
    flat_text_file[iteration_number + 1] = replace(substr( flat_text_file[0],
                                                position_of_return[iteration_number],
                                                position_of_return[iteration_number + 1] - position_of_return[iteration_number]
                                               ),chr(10))||',' 
    )now I have a view and I could anything I want with it and I just drop it when I'm done.
    Edited by: pollywog on Apr 19, 2010 7:57 AM

  • Update XARCH field in BSIS table

    Hello Experts,
    Need to update XARCH field in BSIS table . I know using update in program is not recommended .
    Please advice if there is a function or BAPI to do this. We are using ECC 6.0
    Thanks,
    Murtuza.

    Hi
    Check This BAPI
    BAPI_ACC_GL_POSTING_POST
    Ranga

Maybe you are looking for

  • How to Fix my Error in windows 8.1 64 bit

    Hi, I have many errors at my Asus A46CB core i5 like error System Thread not handled, error equal or less and error power driver state failure. my laptop will restarting and run normal after that. how to fix my laptop? my OS is windows 8.1 enterprise

  • Basic questions about downloading updates and smartnet licensing

    I have been trying to get a definitive answer to these questions by browsing around cisco.com, but so far no luck. 1. I manage an ASA5510 for which there is no current smartnet contract.  It is running an outdated code version (8.2) of the Security P

  • Hardcode Logical Column

    Hi, I need to hard-code a logical column to hold 2 values "Pay" and "Buy" and i need this field in Prompt as multiselect. Any help will be greatly appreciated. Thanks

  • After Installing Acrobat X Standard, Cannot print from another Windows Program

    I am having a strange problem.  Once I installed Acrobat X Standard, another Windows based program stopped printing.  It now comes up with a usp10.dll error, but most of the time it just crashes the program.  Tried reinstalling the program and no luc

  • Can I replace the RAM chips in my MacBook Air (11 inch 2011)

    I'd like to increase the RAM in my MacBook Air.  Is this possible?  I see no information from Apple about how to do this relatively simple thing.