How to modify or put entry in a particular field of a database table

i want to to modify a field in a database table record identification by primary key fileds
the situatio is like this
there are two primay key in database table
customer number PK
status PK
date
and third field which i want to modify is customer part number.
based on condition that
database table1-cuspip = wa_record-cuspip.
database table1-status <> wa_record-status
and database table-date = wa_record-date
if above is true a particular field  the database table  for that record
ie customer_part_number = 'FAiled'.
loop at it_record into wa_Record
endloop.
please suggest how to modify the database table record if the avove condition is tru and please give me full working code
regards
Arora

Dear Nishant,
Use UPDATE function for updating the customer part number.
But please do mention the database table and the keys used for update.
if en entry already exists with the key then the Entry will fail so use MODIFY statement to modify the Consumber Part Number  with the specificed keys  and transport the modified customer part number and then do COMMIT the changed entry to database.
Hope this helps you in some way.
Encourage others to answer you queries by suitably rewarding them.
Thanks
Venugopal

Similar Messages

  • How can i update the REMARK field in ADRT database table

    Hi all,
    How can i update the REMARK field in ADRT database table
    By using Function modules or BAPI’s
    Please reply me fast

    Hi,
    you can try this code:
        SELECT SINGLE * FROM KNA1 WHERE KUNNR = wa_kunnr.
        IF sy-subrc = 0.
          CLEAR adrct.
          SELECT SINGLE * FROM adrct WHERE addrnumber = kna1-adrnr.
          IF sy-subrc = 0.
            adrct-remark = wa_remark.
            MODIFY adrct.
          ENDIF.
        ENDIF
    best regards,
    Thangesh

  • How to delete data from single field in a database table?

    Hi guys,
         Plz suggest me How to delete data from single field in a database table?
    thnks,
    pavan

    hi
    in addition to abv details..chk this:
    http://help.sap.com/saphelp_nw2004s/helpdata/en/fc/eb3aef358411d1829f0000e829fbfe/content.htm
    http://dev.mysql.com/doc/maxdb/en/34/ee7fbd293911d3a97d00a0c9449261/content.htm
    regards,
    madhu

  • To modify a field in a database table based record identification by primar

    hi
    i want to to modify a field in a database table based record identification by primary key filed and two more fields
    ie customer (primary key
    i want to modify record from intenal table the record existing with primary key field customer
    the status field needs to be mofied as " value rolled"
    the below code is happening
    loop at it_record into wa_Record
    wa_inv-customer (primary key) = wa_Record=custome
    wa_inv-date = wa_Record-date
    ...so one
    append wa_inv to it_invest
    clear wa_inv
    endloop.
    if not it_invest  is initial
    modify TABle1 ( this table is data base table which needs to be mofified) based on the primary key field
    and also date field and status field which is not primary key.
    regards
    arora

    Hi there.
    Your requirement is to update a Z Database table from your internal table, right? You have several options:
    LOOP AT it_invest INTO wa_inv.
      UPDATE dbtable
         SET date = wa_inv-date
       WHERE prim_key = wa_inv-prim_key
         AND any_field = wa_inv-any_field.
    ENDLOOP.
    or
    LOOP AT it_invest INTO wa_inv.
      UPDATE dbtable FROM wa_inv. "if wa_inv of same type of dbtable
    ENDLOOP.
    In the first example, I wrote any field because you can update dbase table, filtering for fields that don't belong to the primary key. However, remember that you will change all records that respect the key you used (so, in your case, use the primary key).
    Regards.
    Valter Oliveira.

  • How to Find the Data Type of the Field In a Database Table

    Hi Experts,
    I'm currently working on a program which needs to find out the data type of the given field in a database table. In addition to accessing DD03L directly, is there any other workaround such as function module to help me achieve this? It would be helpful if a demo example could be provided.
    Thanks a lot.

    Hi,
    Use this..
    DESCRIBE FIELD dobj  TYPE typ.
    write typ.
    type will contain the data type of the object.
    and check this thread also....
    Re: How to get datatype of fields in dynamic structures
    Cheers,
    Simha.
    Reward all the helpful answers..

  • How to find the structure fields data in database tables?

    how to find the structure fields data in database tables?

    Your question doesn't appear to be Web Dynpro ABAP related. Please only post questions in this forum if they are directly Web Dynpro ABAP related.  There are several other more general ABAP related forums.

  • How to create a new field in predefined database table

    Hi friends,
    now i am working on scripts. In script form i have got a new field(vehicle number in goods receipt against purchase order) which is not available in any table.  i think we have to create a new field in database table.how to create  field in a pre defined data base table.

    Hi,
    To add new field to table, there are two option.
    1.Include structure and
    2. append struct..
    the best way is append structure.
    goto se11>give your table name>there is append structure button, when you will click on it, it will create a 'append  structure',
    after activating it, it will add fields to your table.

  • New records or modified records field name in database table

    hi am working on HR Payroll module. I want to know in new records are added in table PA0015 , how can we recgonize means is there any status field from which we can get it?

    Hi,
    Try using following fields in PA0015.
    AEDTM
    UNAME
    HISTO
    Regards,
    Shashank

  • How to catch any changes made in a particular field of a table.

    Dear Friends,
                           How can we display changes to a filed of a particular table.
    To make it simple:--
    The Program should take values for the name of the table and the field according it will handle all the update ,deletion of a record..i mean any change happening to the respective field will be displayed.
    Suppose there is table STUDENT and a field STUDENT_ID.
    So i want to display  the newly entered student id or the deleted student id .
    thx
    ram

    Hi,
    RSSCD100                 Display Change Documents
    RSSCD100_PFCG      Display Change Documents for Role Administration
    RSSCD110                 Display change documents (cross-client)
    RSSCD150                  Display change documents
    reward if useful
    ~Lakshmiraj~

  • How to get last 4 digits of a particular field?

    Hi to all,
    here i have three fields,
    f1 length 18 char,
    f2 length 4 char,
    f3 length 4 char,
    now i want to take last 4 char of f1 to f2 and the same i have to pass to f3.
    how to do this?
    regards,
    swami

    Hi,
    1. Take the maximum length of the field. Pass it to an integer  variable. Lets say L1.
    2. Subtract this variable by 4. Move this value to another variable. Lets say L2.
    3. WRITE F1+L2(4) TO F3.
    Sample Code.
    REPORT  zmaytest.
    DATA : f1 TYPE string VALUE 'abcdefghijk',
               f2(4) TYPE C,
               f3(4) TYPE C.
    DATA : l1 TYPE i,
                l2 TYPE i.
    START-OF-SELECTION.
      l1 =  STRLEN( f1 ).
      l2 = l1 - 4.
      WRITE f1+l2(4) TO f2.
      WRITE f1+l2(4) TO f3.
      WRITE: / 'F2', F2.
      WRITE: / 'F3', F3.
    Regards,
    Mayank

  • How to add 5 hours to an existing date field in the database

    Have a date field 2013-11-21 00:00:00.000 but need to add 5 hours to it to make it 2013-11-21 05:00:00.000.
    Please how can I do this?
    Mijecarr

    Fantastic...
    DATEADD (hour , 5 , Cast(ActivationDate as datetime) ) worked!!!
    Thank you very much
    Mijecarr

  • How can I defualt a value in a formValue field in an advance table

    Hi,
    I am developing 3 custom master detail OAF Pages. All of these pages have one advance table region(Detail Region). Master Region is a message component layout. All these pages share same AM.
    Source for advance table on all the pages is same database table.
    Vo for the advance table has a query as below:
    select * from XXTABLE where textid = &ref_id and rf_code ='PAGE1'
    select * from XXTABLE where textid = &ref_id and rf_code ='PAGE2'
    select * from XXTABLE where textid = &ref_id and rf_code ='PAGE3'
    I have created one EO and one VO on XXTABLE.
    I want to create 3AO and 3VL's for each master detail relationship.
    My requirement is to default "PAGE1", "PAGE2" and "PAGE3" respectively in the refcode filed in VO when it is called from there respective pages.
    Thanks!
    Ritu

    Hi Sanu,
    Thanks for addressing the issue.
    I can create multiple rows in advance table and with the click of a button all the rows are saved in one go. If I take a handle of VO in controller, I will still have to interate through each row in VOROwImpl to set ref_code for each row.(This would also need a logic to find which row is new and which is updated)
    Is there any way where I dont have to do any interation and set a default.
    Thanks!
    Ritu

  • How do i import data in an Excel sheet into an Oracle Database table

    I know one way to do is to convert the data into a text file and then use Sqlldr to load the data into the DB.
    Is there any other easy way, like directly connecting to the DB from Excel sheet itself. Any links to this wud be greatly helpful.
    Thanks and Rgds,
    Vig

    --Create a DSN (ODBC) from Windows control panel
    Open Excel, Dataimport external data--import data
    --click new source, select ODBC DSN, choose your DSN ..
    --select any table from shown list..next.....                                                                                                                                                                                                                                                                                                                                                                                                                               

  • How to upload data to a "CLOB" datatype field in a database table

    Using sqlldr what is the correct way to upload character data (far greater than the 4000 Bytes allowed in varchar2)?
    setting the table field name datatype to clob and then using the field name against a large dataset in the control file I get the error that the input record (field) is to large.. adding "clob" after the table field name in the sqlldr control file just gives me a syntax error..
    Running Oracle 9.2.0.6 on Solaris 9

    user511518,
    I think you're in the wrong forum. Perhaps you should start with this Web page:
    http://www.oracle.com/technology/products/database/utilities/index.html
    Look for the SQL*Loader links.
    Good Luck,
    Avi.

  • How do store a time type field in a database table?

    We added a UDF of time type.  SQL Server says its a small integer.  After I pull the time off a date, I convert it to an integer.  For example, I convert 6:00 AM to 600.  When I try to store 600 in the field, I get a type mismatch exception.  What am I doing wrong?

    Adele,
    Thanks a bunch!
    Your code was syntactically incorrect but it moved me in the right direction.  Here is the code I ended up with:
    DateString = DateIn.ToString("yyyyMMdd HHmm")
    Time = Date.ParseExact(DateString, "yyyyMMdd HHmm", system.Globalization.DateTimeFormatInfo.InvariantInfo)
    Then update the Time field with the Time variable.
    This does the trick.  It looks like it is only necessary to save a date data type in a time type field and only the time piece of it is saved.
    Thanks again,
    Mike

Maybe you are looking for

  • E-Business Suite 11i apps on RedHat Linux 4 or 5

    Hi, Our E-business suite 11i has been running on the application tiers RHEL 4, due to the requirement to support large memory configurations on a 32-bit system.  Is it true that from RHEL 5, the "hugemem" kernel which achieves this 32-bit memory scal

  • Process chain - APAP-Program - Raise exception, messages and log

    Hello, I've got a process chain with a "ABAP program" process. How should I deal with an exceptions in the program? In a test, I created an exception. But I could not find it in the log of the process. How can I fill the log? Thanks for your help!

  • Error 5 when downloading trial CS6 indesign & illustrator (mac)

    Please suggest what can I do, have tried to uninstall then reinstall both trial product, and it still doesnt work

  • Urgent: Form Validation on invalid default value.

    We have a user that edited a form to use date validation on a field that has a default value set to DD-MON-YY. Clearly, this will not work. The problem is that when I go in and try and restore it from an archived version, it will not allow that. The

  • Will the REAL My Documents please identify itself???

    I'm setting up a computer that runs on Windows 7 (W7).  I need to locate the user data on a different drive (partition) than the one in which the OS (W7) is stored.  Let's say that the data partition is called drive D:.  Then let's say I define the t