Update PRODH field from table T179T

hi,
i want to update PRODH field from table T179T into table VBRP. for this we
need to take selection option also.
selection option will be :
·             Sales Organization (field VBRK-VKORG)
·       Billing Date Range (VBRK-FKDAT)
·       Distribution Channel (Vbrk-vtweg
while i have done this for one field by using hard code but like:
TABLES: VBRP.
CLEAR VBRP.
UPDATE VBRP SET PRODH = 'PLC01' WHERE VBELN = '0008300051'.
SELECT SINGLE * FROM VBRP WHERE VBELN = '0008300051'.
WRITE: VBRP-VBELN,VBRP-PRODH.
but this is not the right way. please guide me how to solve this.

TABLES: VBRP.
CLEAR VBRP.
UPDATE VBRP SET PRODH = 'PLC01' WHERE VBELN = '0008300051'.
<b>commit work.</b>
SELECT SINGLE * FROM VBRP WHERE VBELN = '0008300051'.
WRITE: VBRP-VBELN,VBRP-PRODH.
use commit work after update statement.
But this code would make vbrp-vbeln as plc01 only.
If you want to get the prodh value from t179t, then write a sleect on t179t and then update.
TABLES: VBRP.
CLEAR VBRP.
select single prodh
  from t179t
where......
UPDATE VBRP SET PRODH = t179-prodh WHERE VBELN = '0008300051'.
commit work.
SELECT SINGLE * FROM VBRP WHERE VBELN = '0008300051'.
WRITE: VBRP-VBELN,VBRP-PRODH.

Similar Messages

  • How to hide a field from table maintenance view?

    Hi,
    How to hide a field from table maintenance view? 
    The field is used for data created date. I need to hide it from display.
    Thanks

    Chk this link.
    http://help.sap.com/saphelp_nw04/helpdata/en/66/33f52010dd11d6999300508b5d5211/frameset.htm
    Maintenance Attributes
    You can assign a maintenance attribute P to individual fields in the maintenance view definition in the Dictionary (SE11). It can be  H (hidden)
    H (hidden)
    A field flagged H is not displayed on the screen. This field must also be filled in the background by a routine at an event.
    The system writes R and H fields to the database like all other fields when a new data record is saved.

  • Add Fields from table ADRC (Fields Name 1 to 4) for Open Item Processing

    Hi SAP Expert:
    Our client requires vendor/customer name to be displayed in the open item processing line layout for transaction code f-58, so they can double check if the vendor name is complete as intended. 
    We intend to add fields from table ADRC instead of REGUH since the characters in maintaining vendor/customer name is 40 characters and REGUH - ZNME1s are only 35 characters. 
    We have managed to add fields from ADRC and change the SAPDF05X program and were able to display the names in open item layout, except that the program seems to "automatically" create a generic table which only carries 30 characters of the vendor/customer name.  The source table should be RFOPS_DK but the program automatically looks up from table RFOPS_GEN for the particular fields - Name 1 to 4.  Is there a way to "instruct" the program to use RFOPS_DK instead of RFOPS_GEN?
    Hope this will merit somebody's attention... Thanks !!!

    Thanks,  i have assigned the layout via o7v3,  it is the program that i have a problem with,  actually another program that we change is the program MF05BFPO where it generates data to be displayed in the FBZ4 screen,  though we add a field with 40 characters (ADRC Name 1 to 4)  what the program dispalys is a 30 character Name1 to 4 from structure RFOPS_GEN. 
    My question is can i extend/change the structure RFOP_GEN to 40 characters,  is there any SAP standard program that will aftected if i do so?  thank very much...
    Lorena

  • How to update duplicate row from table

    Hi,
    how to update duplicate row from table?
    First to find duplicate row then update duplicate row with no to that duplicate row in oracle.
    can you give me suggestion on it?
    Thanks in advance.
    your early response is appreciated...

    In order to find a duplicate row, see:
    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:1224636375004
    (or search this forum, your question has been asked before)
    In order to update it, just create and use an Oracle sequence, have it start and increment at a value that doesn't exist in your table.
    If that doesn't get you going, post some CREATE TABLE + INSERT INTO statements, and the results you want from them, in other words: a complete testcase.

  • Updating a field from info from another table

    I am trying to update a field in a table by the data from another lookup table. These tables have to be linked by two columns, not just one. It seems like I have to use a sub query to extract data from the lookup table. I am unable to get a correct syntax for the SQL statements.
    Does anyone has any ideas??

    UPDATE table_B t2 SET t2.col1 = (SELECT t1.col1 FROM table_A t1 WHERE t1.col2 = t2.col2 AND t1.col3 = t2.col3);
    table_B is the table whose col1 needs to be updated with col1 of table_A. The join conditions are two (with col2 and col3)
    Hope this is what you are looking for!!
    Cheers
    r@m@

  • Update Z field from BSIK into BSAK when closing

    Hi,
    I have created Z field in BSIK table using "Append structure" option. I also created identical field via same option in table BSAK. When I clear open item system "delete" that item in table BSIK and create identical item in table BSAK (BSIK - open items; BSAK-closed items), BSIK and BSAK have same structure because of this trensfer of open items from BSIK to BSAK during open item clearing. My problem - when open item is cleared and item is transferd from BSIK to BSAK my Z field is not updated by system. Is it possible to set this in customizing or is there another way to update this Z field in BSAK when someone clear open items - user exit, modification or ???.
    Thanks in advance.
    Sasa

    Hi Andreas,
    than you for your responce.
    I tried to find out suitable event for this in fibf but withouth success. Could you suggest event that will be suitable for this purpuse.
    One more thing - if I reverse clearing (via transaction FBRA) system will transfer closed item from BSAK to BSIK and during that process Z field will not be updated so I also need event to update this field durind reverse clearing.
    Thank you in advance.
    Kind regards,
    Sasa

  • Regarding "Update .. From Table" Statement

    Hi,
    I have an existing piece of code which I'm trying to understand.
    There are two scenarios regarding the UPDATE statement.
    1) Scenario 1:
    There exists a database table with around 100 or more fields/columns [Eg: DB_TABLE1].
    An Internal Table exists with the same key as the above database table [EG: I_TABLE1].
    code:
    loop at I_TABLE1.
      update DB_TABLE1
      set kf1 = I_TABLE1-kfa
       kf2 = I_TABLE1-kfb
       kf3 = I_TABLE1-kfc
       kf4 = I_TABLE1-kfd
      where key1 = I_TABLE1-keya AND key2 = I_TABLE1-keyb.
    Endloop.
    In the above scenario the records in database table [DB_TABLE1] with matching condition are updated and the rest of the fields are not touched.  - Correct me if I am wrong.
    2) Scenario 2:
    There exists a database table with around 100 or more fields/columns [Eg: DB_TABLE1].
    Two Internal Tables exist with the same key as the above database table [EG: I_TABLE1 And  I_TABLE2].
    Code part a:
    SELECT * FROM DB_TABLE1 INTO TABLE I_TABLE2
          WHERE  KF1 <> 0.
    Internal Table 1 has some data.
    Code part b:
    loop at I_TABLE1.
      update DB_TABLE1
      set kf1 = I_TABLE1-kfa
       kf2 = I_TABLE1-kfb
       kf3 = I_TABLE1-kfc
       kf4 = I_TABLE1-kfd
      where key1 = I_TABLE1-keya AND key2 = I_TABLE1-keyb.
    Endloop.
    Code part c:
    update DB_TABLE1 FROM TABLE I_TABLE2.
    In the second scenario what will be the final effect of DB_TABLE1?
    As i understand it, there is no use of Code part b. Am I right?
    I thought that the records in I_TABLE2 with matching key in DB_TABLE1 will be updated and the rest of the records will be deleted.
    But actually there is not change in the DB_TABLE1 when the above code is executed.
    Help is appreciated.
    Thanks.

    Hi Joey,
    Scenario 1: In the above scenario the records in database table DB_TABLE1 with matching condition are updated and the rest of the fields are not touched.
    - That's right.
    Scenario 2: As i understand it, there is no use of Code part b.
    - Exactly because of the following reasons:
    1. Code part a shows data selected from DB_TABLE1 INTO TABLE I_TABLE2.
    2. Code part c shows DB_TABLE1 updated from TABLE I_TABLE2 whereas Code part b uses ONLY internal table I_TABLE1.
    3. If there are any operations performed in Code Part b on 'I_TABLE2', then this would have been different.
    Regards,
    Pranav.

  • How to update key fields for table

    Hi,
    how to update key fields for a table.The update statement is not working for the same.
    Regards,

    Hi,
    See the below example.
    TABLES SPFLI.
    DATA WA TYPE SPFLI.
    MOVE 'AA' TO WA-CARRID.
    MOVE '0064' TO WA-CONNID.
    MOVE 'WASHINGTON' TO WA-CITYFROM.
    UPDATE SPFLI FROM WA.
    MOVE 'LH' TO SPFLI-CARRID.
    MOVE '0017' TO SPFLI-CONNID.
    MOVE 'BERLIN' TO SPFLI-CITYFROM.
    UPDATE SPFLI.
    CARRID and CONNID are the primary key fields of table SPFLI. All fields of those lines where the primary key fields are "AA" and "0064", or "LH" and "0017", are replaced by the values in the corresponding fields of the work area WA or the table work area SPFLI.
    Regards,
    raj.

  • Update Date Field in Table Row to SysDate

    This appears to be an easy thing to do, but I can't figure out the best way to do it.
    I have a table with 2 input text boxes and some output text boxes.  When either input text box changes for a row, I need to update the date in one of the output text boxes in the same row to the current date. Then, when I commit the changes, the database should show the current date for that date field in that record.
    I'm using JDev 11.1.1.6
    Thanks,
    Ray

    Any help would be appreciated.
    I figure the RowImpl class is being instantiated when the table loads.  Is there a method in the RowImpl class that gets called when a row is changed?  Should I have an action on my submit button that scrolls through all rows to see if any are dirty and update the date from there?
    Please help.

  • Adobe Interactive - Problem Updating Form Fields within tables

    I am working with Interactive forms. My scenario is I download the form, update, upload to the Web and then submit to the backend, I am basically use a blend of the tutorials available. From a Web Dynpro perspective all is working well.
    The problem I am having is in the Form itself.
    I have 10 fields which I want the user to update.  Fields which are bound at Page Level, work fine. e.g.
    <CONTEXT>.<PAGE>.<FIELD>::Change
    Data_Source.Page1.Langu::Change
    However Fields in a table do not seemed to work properly. e.g.
    <CONTEXT>.<PAGE>.<TABLE>.<ROW[x]>.<CELL[y]>.<FIELD>::Change
    Data_Source.Page1.tblCusDetails.Row[0].Cell[1].Name
    If I perform an update in the form Langu works well, Name does not.
    e.g. Page1.Langu.rawValue = "EN"                             This works OK
           Page1.tblCusDetails.Row[0].Cell[1].Name = "Andrew "            This does not work.
    I got round this issue by searching for the attribute at runtime.
    Now (Based on my scenario) I am trying to update my form;
    I download the form to the front end. Update and save. When I open the form again only Langu has saved, Name reverts back to <Emtpy>.
    My workaround would be to remove all the tables, which I will start now, but  I am wondering if I am doing something wrong or if its a bug in the form,?
    Can anyone help?
    Andrew

    Hello Bhavik:
    Thank you, for your quick response.  To be honest, I went through the tutorial from SAP TechEd, "Creating Interactive Forms in Web Dynpro for JAVA, and it is drving me crazy.
    I did create under the Contect actually Value Node:
    DataSource and within that two Value Node for PersonalData and TravelData.  For PersonalData, the following Value Attribute: CostCenter, Department, Name etc etc........
    The properties is already set for the value attributes to string, I tried to change it to init it will not take it? 
    Please call me Amr.  Thank you,

  • BAPI_OUTB_DELIVERY_CHANGE to update Z fields from LIKP

    Hello,
    Im using BAPI_OUTB_DELIVERY_CHANGE bapi to change some fields from LIKP/LIPS table. Now, i have to update also some Z fields from this tables.
    I see that the bapi has Extension1 and Extension2 tables but i don't know how to use them. I have been looking for the forum and i have found you have to fill some structures with the Z fields, but i don't find them for deliveries. Also, i have read that you have to do it through an user exit, but i don't know what user exit and what relation it has with Extension tables.
    Anybody knows how to do it?
    Thx,
    Manel

    Hi,
    For changing the delivery quantity through BAPI_OUTB_DELIVERY_CHANGE you need to pass the following data :
    HEADER_DATA : Delivery no.
    DELIVERY : Delivery no.
    ITEM_DATA : Delivery no,
    item no,
    DLV_QTY quantity(changed),
    FACT_UNIT_NOM ( default to value '1')
    FACT_UNIT_DENOM ( default to value '1')
    ITEM_CONTROL : Delivey no,
    item no,
    CHG_DELQTY ( value "X")
    The import parameter Extension1 and  Extension2 are available for customer enhancements. Extension1 is an unstructured data container that is available for any use.
    Extension2 is a structured data container available for any use.
    For more information, see the function module documentation for BAPI_OUTB_DELIVERY_CHANGE.

  • Updating custom field in table EKKO within user exit when PO is saved

    I am trying to update a custom field in table EKKO when a PO is saved.  I am using FM EXIT_SAPMM06E_013, within enhancement MM06E005.  Since EKKO is not a table that can be updated with this user exit, I am using a technic that I read about on SDN where I assign a field symbol to the calling program variable and then am able to access data within EKKO table.  But when I pass this data back into the field symbol, for some reason this field is not getting saved when the PO is saved.  In debug mode, it looks like this field is getting updated, but when I look in the table after the PO is saved, it is not there.  My code sample is below.  What I am doing wrong?
    data:
      CHAR(50) VALUE '(SAPLMEPO)EKKO-ZHDRCSTCENTER',
      g_zhdrcstcenter like ekko-zhdrcstcenter,
      FIELD-SYMBOLS <F1> type any.
    if i_ekko-ekorg = '5401'.
      ASSIGN (char) to <F1>.
      g_zhdrcstcenter = <F1>.
      move '0000113322' to g_zhdrcstcenter.
      <F1> = g_zhdrcstcenter.
    endif.
    Thanks!
    Sarah Smyth.

    Firstly, have you investigated using EXIT_SAPMM06E_008 to set any custom fields you have added in the EKKO_CI / CI_EKKODB structure?.. that might work more easily.
    In terms of doing an assign back into a calling program's memory, it can work but it's probably worth setting a break point in your code then stepping through watching the values in EKKO - sometimes you can find subsequent code that re-writes an earlier copy of values back into the structure, thereby preventing you doing your change...  SAP does warn this method is for "internal use".  Also check in your debugger that it's SAPLMEPO and not SAPMM06E you need.

  • BADI or User exit  for FB50 to update custom field in table COEP

    Hi all,
    i have added one custom field in table COEP through include CI_COBL .
    when i do posting through sales order(VA02) or purchase order(ME22n) that custom fields in COEP get updated with controlling document
    and through BADI AC_DOCUMENT i m updating that custom field in COEP.
    but when i do manual posting through FB50 controlling document is generated in COEP but i m not able to update that custom field
    because in this case BADI AC_DOCUMENT  is not get triggered.
    is there any BADI or User exit or enhancement spot for FB50 through which i can update that custom field in table COEP

    Hi Sandy,
    Thanks for u r reply,
    RFAVIS01 is not getting triggered through FB50
    and F180A001 ( EXIT_SAPLF048_001) is getting triggered but it doesnt contain COEP field in its parameter
    import - F180A_DOC_HEAD_TAB
                 F180A_DOC_ITEM_TAB
    changing - RELATION_TAB

  • Problem in selecting object currency fields from table COSP and COSS

    Dear All,
    We are facing a issue while creating a virtual DataSource   for CCA plan from tables COSS and COSP.
    The issue is that we are able to activate the view by including the fields value in object currency ( WOG001 - WOG012 ) but not able  to create a DataSource   on the view.
    We are able to include the transaction currency value but as our application requires us to include the object currency fields.
    Error displayed:Invalid extract structure template .This operation failed, because the template structure quantity fields or currency fields, for example, field WOG001 refer to a different table.
    Any tips to resolve this issue would be valuable.
    Thanks in advance
    Rashmi Nair.

    HI,
    Can you see this thread.
    Re: How to display BAPI decimal values into webdynpro!
    Thanks
    nageswar

  • Remove fields from table key

    I define a customize table (maintenance only by cust., not SAP import).
    5 of the fields are the table keys.
    When I remove 2 fields from the key and adjust the table I get the following errors
    “Primary key change not permitted for value table ZT7IL60”
    “Activation of Table ZT7IL60 not possible (please check)”
    Any clue why and how to remove some fields from the key?

    hi there,
    the reason for  this error can be any....
    may be you are using that field in the foreign key reference of another table. thats y it is not allowing the change option as it will affect other table's values.
    another thing can be the one suggested in the above post.
    do reply if any of the methods mentioned helps.
    Do reward if helpful./

Maybe you are looking for