Updating values in database table through Transaction

Hi,
Actually We have one transaction named EWAWA01. In that when we display the values from the transaction, there is a netweight field. The transaction displaying netweight values, but that value is not updated in the database table named EWA_WA_WEIGHPROC. How can i update that netweight value in the table.

data:v_v_EWA_WA_WEIGHPROC type  (v_EWA_WA_WEIGHPROC lenth) c.
decleare the data in charter type.
after pass the data charter type.
v_EWA_WA_WEIGHPROC = EWA_WA_WEIGHPROC
update db.

Similar Messages

  • Updating values in mara table through bapi

    Hi friends,
    I am very new to ABAP , just now i have started my carrier in SAP-ABAP.
    I have to update these three fields MSTAE, EXTWG, MTPOS_MARA in MARA table through bapi. I need to give these values from selection screen followed by Material no.
    I already found some program in the forum  but that programs are very lenthy , i am not able to understand.
    Can anyone help me by giving some idea or sample program so that i can learn how to do this thing.
    Thankx in advance...

    Hi Ritesh,
    Use BAPI_MATERIAL_SAVEDATA to update the entries MSTAE, EXTWG and MTPOS_MARA by passing the following fields:
    DATA: ls_headdata     TYPE  bapimathead,
           ls_clientdata   TYPE  bapi_mara,
           ls_clientdatax  TYPE  bapi_marax,
           ls_return       TYPE  bapiret2.
    CALL FUNCTION 'CONVERSION_EXIT_MATN1_INPUT'
       EXPORTING
         input        = ls_material-matnr
       IMPORTING
         output       = ls_headdata-material
       EXCEPTIONS
         length_error = 1
         OTHERS       = 2.
    IF sy-subrc <> 0.
       CLEAR: ls_headdata-material.
    ENDIF.
    ls_clientdata-extmatlgrp  = ls_material-extwg.
    ls_clientdata-pur_status  = ls_material-mstae.
    ls_clientdata-item_cat    = ls_material-mtpos_mara.
    ls_clientdatax-extmatlgrp  = 'X'.
    ls_clientdatax-pur_status  = 'X'.
    ls_clientdatax-item_cat    = 'X'.
    CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA'
       EXPORTING
         headdata    = ls_headdata
         clientdata  = ls_clientdata
         clientdatax = ls_clientdatax
       IMPORTING
         return      = ls_return.
    IF ls_return-type = 'E' OR ls_return-type = 'A'.
       CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'.
    ELSE.
       CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
         EXPORTING
           wait = 'X'.
    ENDIF.
    Thanks & Regards,
    Prasanna

  • How to update values in the table control at  Cat2 transaction,

    Hi,
    i am working on cat2 transaction, here
    i am using the exit_saplcats_006 and updating values at catsdb table, but i want to display this values at the table control in the cat2 transaction.
       can any one provide me solution for this same.
    Regards

    Hi Suresh
      this is actual requirement
    in the CAT2.
    1. Add a new column for WBS description and derive the value as per the FS
    2. Retrieve project number and description and update in the column specified
    3. When a service order is selected it should do the same for 2.
    4. Finally repeat for the worklist view (which is the section above)
       here i am able to display values at data entry area
    for service order and network but not worklist area ?
        updation is not coming, can u plz go throw it..
    Thanks
    Chinna

  • Efficient way of updating data to database table

    what is the efficient way of updating data to database table  .
    i have huge amount of data in my internal table  , how to use update statement in this case .
    1. database table having 20 fields  ,
    2. one is key field and suppose 20 th field i want to change  .
    3. I have data for only 2 fields , i.e for ( 1 st and last 20 th field ) .
    i can't use update statement in loop , as it is not good practice(hits database several times ) .
    do it effects all the 20 fields for  particular record .

    Hi,
    Use UPDATE statement , check below description from SAP help.
    UPDATE dbtab FROM TABLE itab. or UPDATE (dbtabname) FROM TABLE itab.
    Effect
    Mass update of several lines in a database table.Here, the primary key for identifying the lines tobe updated and the values to be changed are taken from the lines of theinternal table itab. 
    The system field SY-DBCNT contains the number of updated lines,i.e. the number of lines in the internal table itab which havekey values corresponding to lines in the database table.
    Regards
    L Appana

  • How to get string value from database table using Visual Studio 2005?

    Hi,
    Im developing plugin in illustrator cs3 using visual studio 2005. I need to get the values eneterd in database. Im able to get the integer values. But while getting string values it is returning empty value.
    Im using the below code to get the values from database table
    bool Table::Get(char* FieldName,int& FieldValue)
        try
            _variant_t  vtValue;
            vtValue = m_Rec->Fields->GetItem(FieldName)->GetValue();
            FieldValue=vtValue.intVal;
        CATCHERRGET
        sprintf(m_ErrStr,"Success");
        return 1;
    Im using the below code to get the values.
    AIErr getProjects()
        char buf[5000];
        int i;   
        std::string  catName;
        ::CoInitialize(NULL);
        Database db;
        Table tbl;
        errno_t err;
        err = fopen(&file,"c:\\DBResult.txt","w");
        fprintf(file, "Before Connection Established\n");
        //MessageBox(NULL,CnnStr,"Connection String",0);
        if(!db.Open(g->username,g->password,CnnStr))
            db.GetErrorErrStr(ErrStr);
            fprintf(file,"Error: %s\n",ErrStr);
        fprintf(file, "After Connection Established\n");
    if(!db.Execute("select ProjectID,ProjectName from projectsample",tbl))
            db.GetErrorErrStr(ErrStr);
            fprintf(file,"Error: %s\n",ErrStr);
        int ProjectID;
        int UserID;
        int ProjectTitle;
        char ProjectName[ProjectNameSize];
        if(!tbl.ISEOF())
            tbl.MoveFirst();
        ProjectArrCnt=0;
        for(i=0;i<128;i++)
            buf[i]='\0';
            int j=0;
        while(!tbl.ISEOF())
            if(tbl.Get("ProjectID",ProjectID))
                fprintf(file,"Project ID: %d ",ProjectID);
                ProjectInfo[ProjectArrCnt].ProjectID = ProjectID;
                sprintf(buf,"%d",ProjectID);
                //MessageBox(NULL, buf,"f ID", 0);
                j++;
            else
                tbl.GetErrorErrStr(ErrStr);
                fprintf(file,"Error: %s\n",ErrStr);
                break;
            //if(tbl.Get("ProjectTitle",ProjectName))
            if(tbl.Get("ProjectName",ProjectName))
                MessageBox(NULL,"Inside","",0);
                fprintf(file,"ProjectTitle: %s\n",ProjectName);
                //catName=CategoryName;
                ProjectInfo[ProjectArrCnt].ProjectName=ProjectName;
                //sprintf(buf,"%s",ProjectName);
                MessageBox(NULL,(LPCSTR)ProjectName,"",0);
            else
                tbl.GetErrorErrStr(ErrStr);
                fprintf(file,"Error: %s\n",ErrStr);
                break;
            ProjectArrCnt++;
            //MessageBox(NULL, "While", "WIN API Test",0);
            tbl.MoveNext();
        //MessageBox(NULL, ProjectInfo[i].ProjectName.c_str(),"f Name", 0);
        ::CoUninitialize();
        //sprintf(buf,"%s",file);
        //MessageBox(NULL,buf,"File",0);
        fprintf(file, "Connection closed\n");
        fclose(file);
        for(i=0;i<ProjectArrCnt;i++)
            sprintf(buf,"%i",ProjectInfo[i].ProjectID);
            //MessageBox(NULL,buf,"Proj ID",0);
            //MessageBox(NULL,ProjectInfo[i].ProjectName.c_str(),"Project Name",0);
        return 0;
    In the above code im geeting project D which is an integer value. But not able to get the project name.
    Please some one guide me.

    As I said in the other thread, this really isn't the place to ask questions about a database API unrelated to the Illustrator SDK. You're far more like to find people familliar with your problem on a forum that is dedicated to answering those kinds of questions instead.

  • How to find for ex : kunnr is updating how many database tables

    Hi all
    How to find for ex : kunnr is updating how many database tables .
    Rgds
    Rafi .

    hi rafi
    go to se15->abap dictionary->fields->table fields-> give kunnr at  field name text box->press f8.
    then it will show ,in how many tables the kunnr field exist.the kunnr field updates those tables.
    don't forget reward points.
    kiran

  • Update database table through table control

    Dear friends
    i have to update entered data in table control to data base table please suggest some modification in my coding for the same
    following is my coding
    report  zrb_ins_data.
    data wa_tmp_rebset type zrb_hed.
    data wa_tmp_rebset1 type zrebate_items.
    types:begin of st_hdr,
              bukrs            type zrb_hed-bukrs,
              sch_typ          type  zrb_hed-sch_typ,
              sch_desc         type  zrb_hed-sch_desc,
              sch_no           type  zrb_hed-sch_no,
              vtweg            type  zrb_hed-vtweg,
              vkorg                type  zrb_hed-vkorg,
              vkbur            type  zrb_hed-vkbur,
              vkgrp                type  zrb_hed-vkgrp,
              spart            type  zrb_hed-spart,
              regio            type  zrb_hed-regio,
              ort02            type  zrb_hed-ort02,
              ort01            type  zrb_hed-ort01,
              kunnr                type  zrb_hed-kunnr,
              konzs            type  zrb_hed-konzs,
              matkl            type  zrb_hed-matkl,
              matnr            type  zrb_hed-matnr,
              lifsk            type  zrb_hed-lifsk,
              shtyp            type  zrb_hed-shtyp,
              from_date        type  zrb_hed-from_date,
              to_date          type  zrb_hed-to_date,
              hkont            type  zrb_hed-hkont,
              aufnr            type  zrb_hed-aufnr,
    end of st_hdr.
    types : begin of st_itm,
              item_id          type zrebate_items-sch_no,
              sch_no           type zrebate_items-sch_no,
              from_dat         type zrebate_items-from_dat,
              to_dat           type zrebate_items-to_dat,
              type             type zrebate_items-type,
              qty_per_rate     type zrebate_items-qty_per_rate,
              key1             type zrebate_items-key1,
              curr_com         type zrebate_items-curr_com,
              key2             type zrebate_items-key2,
              qty_per_rate1    type zrebate_items-qty_per_rate1,
              curr_com1        type zrebate_items-curr_com1,
            end of st_itm.
    data:it_hdr type table of st_hdr with header line,
         wa_hdr type st_hdr,
         it_itm  type table of st_itm with header line,
         wa_itm type st_itm.
    controls ztbl type tableview using screen 1000.
    *CALL SCREEN 1000.
    *&      Module  STATUS_1000  OUTPUT
          text
    module status_1000 output.
      set pf-status 'SYMBOL'.
      set titlebar 'xxx'.
    endmodule.                 " STATUS_1000  OUTPUT
    *&      Module  USER_COMMAND_1000  INPUT
          text
    *module USER_COMMAND_1000 input.
    *&      Module  get_data  OUTPUT
          text
    *&      Module  user_command_1000  INPUT
          text
    module user_command_1000 input.
      case sy-ucomm.
        when 'EXEC'.
    perform get_data.
    endcase.
    endmodule
    *&      Form  GET_DATA
          text
    -->  p1        text
    <--  p2        text
    form get_data .
      move-corresponding wa_hdr to wa_tmp_rebset.
          modify zrb_hed  from wa_tmp_rebset.
      move-corresponding wa_itm to wa_tmp_rebset1.
      wa_tmp_rebset1-item_id = 'TS1234'.
      wa_tmp_rebset1-sch_no =   wa_hdr-sch_no.
      wa_tmp_rebset1-from_dat = wa_itm-from_dat.
      wa_tmp_rebset1-to_dat = wa_itm-to_dat.
      append wa_itm to it_itm.
    modify zrebate_items from wa_tmp_rebset1.
    endform.

    hi,
    Refer to this link...you'll get the idea..
    how to update dbtab from table control?
    Re: How to update a DB from a table control.
    Edited by: avinash kodarapu on Dec 27, 2008 12:36 PM

  • Insert / update data to a table through DBLINK (oracle)

    I try to insert / update a table from one instance of oracle database to another one through oracle dblink, get following error:
    java.sql.SQLException: ORA-01008: not all variables bound
    ORA-02063: preceding line from MYLINK
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
    at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
    at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:582)
    at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1986)
    at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:1144)
    at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:2152)
    at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:2035)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2876)
    at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:609)
    The same code to insert / update the exact same table in local instance works fine.No any binding problem. So i am pretty sure all ? mark in SQL are set with some value before sending to Oracle.
    Someone please advise what is possible problem. Db link is not set correctly? or we can not update remote table by dblink.
    By the way i can do insert / update from TOAD to the remote table through DBLINK. Problem happens only in Java code.
    thanks!
    Gary

    dblink links from one database instance to another.
    So it is certainly a source of possible problems when it works on one database and not another.
    You should start by looking at the dblink and it possible testing it in the database not via java.
    Note as well that that error suggests that it is coming from the Oracle database. I believe if you had a bind parameter problem in your java code that the error would come from the driver. But that is a guess on my part.

  • Update ztable from database table directly

    hi all,
    can u tell me the possible ways to update a ztable from database table directly.
    i mean is there anyway to update ztable whenever entry is created in database table .
    i dont want to update using insert,modify statements.
    points will be rewarded to all hlpful answers.

    A slightly dirty solution:
    Use SAP functions for reading from CDHEADER and CDPOS tables [with enough filters such that you extract minimum records possible] to read changes to MARA table fields since last run of your program. Use this information to update your ZTABLE. I would recommend having a table maintainance generator on ZTABLE. The actual update should be by a BDC by calling transaction SM30 for ZTABLE maintainance. Now the program may be set up as a batch job running 1ce an hour. You get updates to the extent of 1 hour latency.
    Alternatively, you may look if an opportunistic BADI / user Exit is there alongside MM01/02 transactions - assuming the latter are the only ones updating MARA. In this BADI you may write the code to update ZTABLE- again, look to do it by BDC call transaction sm30 to maintain ZTable. To lighten up the code -load on BADI you may simply raise a custom event and move on. You will configure a job that runs your program when that particular event is raised. This will need the 'burden' of figuring out the changes, though.
    An elegant way would be to fire a MATMAS fIDOC for every change to Material, capture that and turn back the changes to ZTABLE. This will facilitate the delta load.

  • Create new rows or update rows in database table

    I have few table in database.
    I catch some values in my bean. Now I must put that values in my database tables. Values are in different tables.
    How can I update tables in database? Ok I know that my solution is updateable (entity) viewObject but please ... some example or description are welcome!
    Thx.
    Message was edited by:
    sinnerman

    Hi Frank. I read developer guide but this is detail and if you can help ... thanx in advance.
    I put code ... in my bean ... I need to insert row in table and commit. Please if you can answer me what`s wrong?
    code:
    FacesContext fc = FacesContext.getCurrentInstance();
    Application app = fc.getApplication();
    //Find corresponding object where variable "bindings" reside
    DCBindingContainer binding =
    (DCBindingContainer)app.getVariableResolver().resolveVariable(fc,
    "bindings");
    //Find the data control by name from the binding container
    DCDataControl dcCtl =
    binding.findDataControl("TMFStudServiceDataControl");
    //Retreive application module
    TMFStudServiceImpl am =
    (TMFStudServiceImpl)dcCtl.getApplicationModule();
    ViewObject vo = am.getGetIdStudentAnketaPitanje();
    ViewObject studentAnketaOdgovor = am.getStudentAnketaOdgovor();
    while (j < my_list.size()) {
    t = (Object)lista.get(j);
    System.out.println("IdOdgovora: " + t.toString());
    vo.setNamedWhereClauseParam("p_id_odgovora", t.toString());
    vo.executeQuery();
    Row currRow = vo.next();
    System.out.println("IdStudentAnketaPitanje: +currRow.getAttribute("IdStudentAnketaPitanje"));
    //am.insertStudentAnketaOdgovor();
    Row newStudentAnketaOdgovor = studentAnketaOdgovor.createRow();
    studentAnketaOdgovor.last();
    studentAnketaOdgovor.next();
    newStudentAnketaOdgovor.setAttribute("IdStudentAnketaPitanje", 1);
    newStudentAnketaOdgovor.setAttribute("IdOdgovor", 2);
    studentAnketaOdgovor.insertRow(newStudentAnketaOdgovor);
    am.getDBTransaction().commit();
    }

  • Insert value in a table through forms

    hello friends,
    I have table "log" with following fields.
    SQL> desc log;
    Name Null? Type
    IN_HR NUMBER
    IN_MIN NUMBER
    OUT_HR NUMBER
    OUT_MIN NUMBER
    DAYHR NUMBER
    DAYMIN NUMBER
    LOGUSER VARCHAR2(20)
    I created one form "user_activity" with two buttons named "IN" and "OUT"..
    when i press "IN" button i want to store follwing in LOG table..
    LOGUSER----> This should store the global variable value derived from another form called "login_main"...Actually i called "user_activity" form from "login_main" with global variable..this global variable have the username who is currently logged in...But my problem is i cant insert this value..
    NOTE: pls tell me how can i check this global variable is hold value or not...
    IN_HR---> This is successfully updated in log table..
    in_min--> This is successfully updated in log table..
    Pls help me how to store this global variable value into log table... my actual code is follows..I write this code in "when-button-pressed"trigger of "IN" Button..
    <code>
    declare
         name varchar2(30);
    begin
         name:=:global.username;
         insert into log(loguser)values(name);
    commit;
    :CUSTOMER.IN_TIME:=to_char(sysdate,'hh24:mi:ss');
    update log set in_hr=round(to_number(to_char(sysdate,'HH24'))),
    in_min=round(to_number(to_char(sysdate,'mi')))
    where loguser=name;
    commit;
    end;
    <\code>

    Hello,
    please don't open multiple threads for the same question. It only adds confusion to those willing to help you, and you won't get quicker answers when posting questions more then once.
    Also, mostly solutions to problems are version dependend, so the very first thing you should do is to provide the involved versions (database, forms, java, OS; remember that oracle products have 5 digit version numbers; 10g is not a version number, 10.2.0.5 is; also "Windows" has a lot of flavors; "Windows 3.11" is also "Windows", so don't say just "Windows"). Even if you think a solution isn't version dependend provide the involved versions. It isn't much effort on your side and saves us a question roundtrip when it is needed anyway.
    after that you didn't give us much to work with except a - sorry but I don't have any other word for this - ill data model where you seem to want to reinvent the date datatype and some code which seem to compile (no I didn't try it). Oh, and the fact that "it didn't work". Did you debug your code? How do you populate your global variable? Did you inspect your global variable before the insert? Also what should be stored in your global? is it the current logged on oracle user? You could simply use user to get this and forget about the global
    Oh, and before I forget it:
    please, don't reinvent the date datatype, and fix your data model.
    loguser varchar2(20)
    in_date date
    out_date date
    insert into log(loguser, in_date) values (user, sysdate);
    commit;no muss, no fuss and about 20% of the amount of code you wrote.
    cheers

  • Updating a standard database table

    how to update a standard db table  using t-code
    (without any program)

    To data in standard tables are related to the transaction.
    The data which you are storing through transaction which will be stored in more than one table at a time.
    Its possible to enter the data in one table bye writing the simple code.
    But that is not right way.
    You have to use the BDC or BAPI function module to store the transaction data.
    Regards,
    Madan.

  • Oracle Alert: Access before and after update values of a table column

    We have a requirement where a notification needs to be sent when 'END_DATE' attribute (column in a table X) is set, in an Oracle Applications form.
    I have defined an Event based Oracle Alert which fires 'On Update' of the table X.
    Could anyone please let me know as how to access the value of 'END_DATE' before and after update (i.e :new.END_DATE and :old.END_DATE) in the sql query of the alert.
    The need to use the before update and after update values of the attribute 'END_DATE' is that if we add the condition END_DATE is not null, the alert is sent even if any other attrbutes are updated in the Oracle form which is not the intended behavior.
    Appreciate any help.
    Thanks

    Hi
    use selectionlistener for your first table then add clientlistener and serverlistener so that you will get the rows on click in back bean.
    then get second table vo and and create and add row for that view object. add partial target to refresh your second table from back bean.
    on click of save call commit operation.

  • How to update value in internal table from cdpos taking fname n value_new?

    hello everyone,
              i want to insert  value in internal table from cdpos table taking field name  from fname and value from value_new.but the problem is i am not getting how to map the corresponding field of internal table with fname value  which is the field name.
    for example
    i
    fieldname
    value
    name1
    raj
    name2
    sharma
    i want to update field name1. this name1 is there in fname with updated value in value_new  how to make name1 with fname value
    thanks and regards
    laxmikant soni

    Hi Laxmikant,
    If I have understood your requirement correctly, you need to update an internal table with latest 'value_new' from cdpos table where  'fname' = 'fieldname' .
    Hope the below logic will help you:
    FIELD-SYMBOLS: <wa_intab> LIKE LINE OF lt_intab.  "the internal table you want to change
    LOOP AT lt_intab ASSIGNING <wa_intab> .
       READ TABLE lt_cdpos INTO wa_cdpos           "lt_cdpos contains latest data selected from CDPOS
        WITH KEY fname = <wa_intab>-fieldname.
       IF sy-subrc = 0.
         <wa_intab>-value = wa_cdpos-value_new.    
       ELSE.
         "//logic if the name is not there in CDPOS
       ENDIF.
       CLEAR  wa_cdpos.
    ENDLOOP.
    If you wish to improve performance, I suggest using
    1. "transporting value_new" addition in READ TABLE,
    2.  select only the data which you require from CDPOS,
    3.  create the internal tables with only fields which you require,
    4.  when you are using SELECT,LOOP AT statements, limit records by using WHERE condition
    Regards,
    Kavya

  • Update value in database(access-connectivity toolset )

    Hello,
    I am using the database connectivity toolset and I am trying to change values of an existing database.
    I used the "Update" command but i got an ERROR!!!.
    "Exception occured in Microsoft JET Database Engine, Syntax error in UPDATE statement..  in Conn Execute.vi->...."????
    What to do???
    Regard's
    Eyal.
    Attachments:
    update value.jpg ‏23 KB

    Hi
    The shearch statement (after Where) shud be anather field than the field you are trying to change.
    I am using defoult value on cursor type with sucsess.
    I hope this will help you
    Rune

Maybe you are looking for

  • ITunes cannot open. Error -200

    Hi guys, Any ideas what this could be? My computer has also slowed down to a grinding halt over the last 24hrs and I cannot figure out why. Cheers, Mike

  • Calling an external program (*.exe file) on the client

    Hi, I use 9iDS and I'd like to call an external program (*.exe file) on the client, but this exe file is located on the server not on the client. So it should be something like a mixture between host and client_host(webutil) command. Is it possible t

  • I have trouble when I go to Macys website

    When I go to Macys website and click on something, it takes a long time to connect. On the top of my screen it will say: "Firefox Not Responding."

  • Problem in Setting Focus, on a dynamically generated field

    Hi all, I am having a jsp page, in which I have dynamically generated n number of input text fields, and with the function onchange="chk();", and i am passing the current text field value, and 2 more parameters min and max. In function chk(), i am va

  • Extra characters when writing to file

    Hello, I'm currently working on a datalogging system using XP and 8.2. Our program monitors CAN messages, saves values to local variables, and records to a text file based on several inputs from the front panel (file location, ms delay, and write rat