Updating SAP table field directly?

Hi all,
The client is using SAP for 2-3 years and this will be replaced by new SAP system ( same version - 4.6c) in few months.
So as to get data from old system we are doiong conversion right now. In this client, PO creator name is very important and it drives so many things. When we will do conversion and convert old PO into the PO in the new system, the username ( created by) will be "batch user".
Client somehow want to retain the username, the original username of old POs.
For this, they are asking to update the EKKO-ERNAM field directly once the new POs are created ( we will have old PO - new PO mapping and user name).
In my view, it is not advisable to update the SAP standard table directly. But i want the opinion from you guys that what are the implications of updating field directly. Is it advisable? Is there any other way to meet this requirement?
Thanks,
Pratik

Hi palaniappan,
1. Good question and good concern !
2. Your concern is absolytely correct.
3. Sap does not advise to
   update SAP standard tables directly
   thru any z program
  (It may stop support in future)
4. But for your requirement,
   it the po user will be "batch user",
   then
   thru some Z program,
   u may do so.
5. BUT
   Please take care that
   a) u have signed specifications of this logic
      and concern from the FUNCTIONAL CONSULTANT !
     (only after that one should do)
regards,
amit m.

Similar Messages

  • Creating a new Search Help on a standard SAP table field?

    Good day, everyone!
    As part of a report I am writing, the customer would like to have Search Help added to the AUFEX field in table AUFK.  They would like this functionality so that when they are changing an order via t-code ko02, they can get a list of valid values to put in field AUFEX.  I would like to tie it to a zTable I've created; in my zTable, I have just 2 fields:  a key value (that will go into AUFEX) and a text description of the key value.  This zTable is used in my report.
    While I've created a Search Help on this table already for table maintenance, I've never added a custom Search Help to an existing standard SAP table field before.  I've done some Googling and other searching to see what I need to know, but I've only been able to find information on Collective Search Helps.  AUFEX doesn't yet have a Search Help field, so I don't think Collective Search Helps is my answer.
    Is this possible?  Can I add a custom Search Help to a standard SAP table field that doesn't have any Search Help linked to it yet?  Is there an existing thread or guide somewhere that can tell me how to do this?
    Thank you!

    Hi
    Yes u can: u can assign the search help to (A) data element livel or (B) field table livel.
    After creating your search help:
    A) Run SE11, insert your data element (AUFEX), press edit and insert the search help in "Search Help" area on DEFINATION tab;
    B) Run SE11, insert your table (AUFK), press edit, place the cursor on your field (AUFEX) and go to GoTo->Search help->for field
    But u should consider it'll mean to change a standard object for both cases: so u need to get the access key from your OSS.
    Max

  • IDoc field and SAP Table field

    I want to find out which SAP table field is populating the given IDoc segment without getting into ABAP code? Do we have something like "Where-used" list? On the reverse side, If I want to know which SAP Table field the incoming IDoc segement is posting to, how do I do that? Thanks in advance.

    Hi,
    This is very difficult without going into the ABAP code. Some time it is easy like if you see IDOC MATMAS05
    Segment  E1MARAM = MARA
    Segment  E1MAKTM = MAKT
    Segment  E1MARCM = MARC
    etc.... also you can judge from the name of a segment.
    Thanks,
    Mandar

  • Updating SAP  Table using JCO

    Dear All
                      How to update SAP Table (Any single or multiple tables) through Java code using JCO. Can any body provide sample code regarding this...
    Thanks&Regards
    mgreddy

    Hi,
    I think for that anyway you will have to use JCO as the middleware to connect to SAP R/3.
    So what you can to do is to write three RFCs and call them through JCO from your JAVA application.
    1. First BAPI for reading the dictionary information about an SAP table.
    2. Second to read data from the table.
    3. And, third to write data to that table.
    But if you want to edit any table (and not a specific table) then your program will become even more complex since then you will have to pass the table name and information dynamically to the BAPIs.
    Best regards,
    Guru.

  • Update sap table using a function module call by php code

    Hello,
    I m trying to update the table VBAP using a function module ZZ_SET_DISTANCE  call by a php code.
    But I have this problem:
    the saprfc seems to work well but when I look to the table VBAP the fields have not been update.
    I tried the function module in debug mode and it work good. The fields are update.
    I also handle the saprfc call function and the return SAPRFC_OK
    This are the function module ZZ_SET_DISTANCE, and the php code
    //PHP CODE
    $fce = saprfc_function_discover($sap,"ZZ_SET_DISTANCE");
                  if (! $fce ) {echo "Echec d'ouverture du module fonction "; exit;}
                   saprfc_import ($fce,"COMMANDE", '0000001998');
                   saprfc_table_init($fce,"TBLE_CMDE");
                        $val=array();
                        $val['NUM_POST']='000030';
                        $val['HN_EXP']='';
                        $val['ST_EXP']='';
                        $val['PC_EXP']='';
                        $val['CI_EXP']='';
                        $val['CO_EXP']='';
                        $val['HN_REC']='';
                        $val['ST_REC']='';
                        $val['PC_REC']='';
                        $val['CI_REC']='';
                        $val['CO_REC']='';
                        $val['DIST']='popo';
                        saprfc_table_append ($fce,"TBLE_CMDE", $val);
                 $rfc_rc = saprfc_call_and_receive ($fce);
                 echo "\n".$rfc_rc;
                 if ($rfc_rc != SAPRFC_OK) { if ($sap == SAPRFC_EXCEPTION ) echo ("Exception raised: ".saprfc_exception($fce)); else echo (saprfc_error($fce)); }else{echo '/execution de la function ;}
                 saprfc_function_free($fce);
    //FUNCTION MODULE ZZ_SET_DISTANCE
    FUNCTION ZZ_SET_DISTANCE.
    ""Local Interface:
    *"  IMPORTING
    *"     VALUE(COMMANDE) TYPE  VBELN
    *"  TABLES
    *"      TBLE_CMDE STRUCTURE  ZADD_COM_LOXAN
    DATA : NUMC TYPE VBELN.
    NUMC = COMMANDE .
    WHILE STRLEN( NUMC ) < 10 .
      CONCATENATE '0' NUMC INTO NUMC .
    ENDWHILE .
    DATA tble_addrcomm LIKE LINE OF TBLE_CMDE .
    LOOP AT  TBLE_CMDE INTO  tble_addrcomm.
      DATA : NUMP TYPE POSNR.
      NUMP = tble_addrcomm-NUM_POST.
      WHILE STRLEN( NUMP ) < 6 .
      CONCATENATE '0' NUMP INTO NUMP .
      ENDWHILE .
      UPDATE VBAP SET ARKTX = tble_addrcomm-DIST
      WHERE VBELN EQ COMMANDE
      AND POSNR EQ NUMP.
    ENDLOOP.
    ENDFUNCTION.
    Is anybody can help me?
    thank.

    Marie, create a Blog please, about more details for dummies....
    1) how to connect to sap system?
    2) you run the php code where? in a webserver or where?
    3) wich is the url for run the FM: ZZ_SET_DISTANCE
    4) you placed some dlls files on the web server?
    please is interesting this...
    Thanks

  • I want to update standard table field (EKES-EINDT)? Not using BDC using FM.

    Hi all,
    I would like to seek for you help, to resolve a problem.
    I need to know how can i update the EINDT(date) field in the EKES table.
    Is there any Function Module or BAPI available for update EKES-EINDT ? 
    And my requirement is don't use BDC.
    Currently I am doing in following way
    LOOP AT I_DATA.
      UPDATE EKES SET EINDT = P_NEWDAT
      WHERE EBELN = I_DATA-EBELN
      AND EBELP = I_DATA-EBELP
      AND ETENS = I_DATA-ETENS.
    ENDLOOP.
    I know we should not update standard table directly. This will only update EKES it will not update other tables related with EKES-EINDT.
    Got my point?
    Please help me it's on high priority.

    EKES can be updated with function module
    ME_CONFIRMATION_UPDATE

  • Update SAP table from BSP

    Hello,
    A simple question: how do I update and SAP table (that I have created) from my BSP?  Maybe there are tuorials out there, but I haven't found it ...
    Thanks,
    Timothy

    Hi,
    if you have the table in your BSP as an internal table (example: wt_mytable), and the ABAP table is called mytable, you can use this code:
    modify mytable from wt_mytable.
    This will add new entries and modify existing ones, based on the contents of your internal table wt_mytable.
    Trond

  • SAP table field names

    in program i want to pass sap table name and get all the fields of this table name.  how i can achieve this through abap program. table will be standard sap table and not internal table.

    hi ,
    enter the table name and get the fields..
    REPORT  Z_DYNALV                                     .
    *Type pools declaration for ALV
    TYPE-POOLS: SLIS.   " ALV Global Types*data declaration for dynamic internal table and alv
    DATA:     L_STRUCTURE   TYPE REF TO DATA,
              L_TABLE    TYPE REF TO DATA,
              STRUC_DESC   TYPE REF TO CL_ABAP_STRUCTDESCR,
              LT_LAYOUT   TYPE SLIS_LAYOUT_ALV,
              LS_LVC_FIELDCATALOGUE  TYPE LVC_S_FCAT,
              LT_LVC_FIELDCATALOGUE  TYPE LVC_T_FCAT,
              LS_FIELDCATALOGUE TYPE SLIS_FIELDCAT_ALV,
              LT_FIELDCATALOGUE TYPE SLIS_T_FIELDCAT_ALV.
    *field symbols declaration
    FIELD-SYMBOLS :
      <IT_TABLE>    TYPE STANDARD TABLE,
      <DYN_STR>         TYPE ANY,
      <STR_COMP> TYPE ABAP_COMPDESCR.
    *declarations for grid title
    DATA : T1(30),
           T2(10),
           T3(50).
    *selection screen declaration for table input
    PARAMETERS : P_TABLE LIKE DD02L-TABNAME.
    *initialization event
    INITIALIZATION.
    *start of selection event
    START-OF-SELECTION.
    *texts for grid title
      T1 = 'Dynamic ALV display for table'.
      T2 = P_TABLE.  CONCATENATE T1 T2 INTO T3 SEPARATED BY SPACE.
    Dynamic creation of a structure
      CREATE DATA L_STRUCTURE TYPE (P_TABLE).
      ASSIGN L_STRUCTURE->* TO <DYN_STR>.
    Fields Structure
      STRUC_DESC ?= CL_ABAP_TYPEDESCR=>DESCRIBE_BY_DATA( <DYN_STR> ).
      LOOP AT STRUC_DESC->COMPONENTS ASSIGNING <STR_COMP>.
      Build Fieldcatalog
        LS_LVC_FIELDCATALOGUE-FIELDNAME = <STR_COMP>-NAME.
        LS_LVC_FIELDCATALOGUE-REF_TABLE = P_TABLE.
        APPEND LS_LVC_FIELDCATALOGUE TO LT_LVC_FIELDCATALOGUE.
      Build Fieldcatalog
        LS_FIELDCATALOGUE-FIELDNAME = <STR_COMP>-NAME.
        LS_FIELDCATALOGUE-REF_TABNAME = P_TABLE.
        APPEND LS_FIELDCATALOGUE TO LT_FIELDCATALOGUE.
      ENDLOOP.
    Create internal table dynamic
      CALL METHOD CL_ALV_TABLE_CREATE=>CREATE_DYNAMIC_TABLE
        EXPORTING
          IT_FIELDCATALOG = LT_LVC_FIELDCATALOGUE
        IMPORTING
          EP_TABLE        = L_TABLE.
          ASSIGN L_TABLE->* TO <IT_TABLE>.
    Read data from the table selected.
      SELECT * FROM (P_TABLE)
        INTO CORRESPONDING FIELDS OF TABLE <IT_TABLE>.
    ALV Layout
      LT_LAYOUT-ZEBRA = 'X'.
      LT_LAYOUT-COLWIDTH_OPTIMIZE = 'X'.
      LT_LAYOUT-WINDOW_TITLEBAR = T3.
    *ALV  output
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          IS_LAYOUT     = LT_LAYOUT
          IT_FIELDCAT   = LT_FIELDCATALOGUE
        TABLES
          T_OUTTAB      = <IT_TABLE>
        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.
    regards,
    venkat.

  • Problem in Updating KNA1 table fields.

    Hi,
       I have small issue , i need to block the customer while creating im using BADI(ADDRESS_UPDATE) to block the customer created.In the BADI im trying to update few fields of KNA1 table using UPDATE statement.
    Like this...
        WA_KNA1-SPERR = 'X'.
        WA_KNA1-CASSD = 'X'.
        WA_KNA1-AUFSD = '01'.
        WA_KNA1-FAKSD = '01'.
        WA_KNA1-LIFSD = '01'.
        UPDATE KNA1 SET SPERR = WA_KNA1-SPERR
                                        AUFSD = WA_KNA1-AUFSD
                                         LIFSD = WA_KNA1-LIFSD
                                       FAKSD = WA_KNA1-FAKSD
                                        CASSD  = WA_KNA1-CASSD
                    WHERE KUNNR = W_KUNNR.
    when this statement excutes it is updating
                                                                         1) SPERR
                                                                         2) AUFSD this two field remaining 3 fields it is not updating
    Can anyone pls let me know the reason .
    thanks in Adv.

    see note 1469543
    it is not possible to update kna1 directly, you must create a bim
    oops sorry see that you're question is it inside a badi and not bapi
    kind regards
    arthur
    Edited by: A. de Smidt on Jul 20, 2010 10:45 AM

  • Update SAP tables after ALV report is displayed

    Hi All,
    I have to display a ALV report using function module REUSE_ALV_GRID_DISPLAY.
    After the report is displayed, user can edit some of the flds in the report, and the fields need to updated in the table. How do I proceed to accomplish this.
    Is it possible to use FM 'REUSE_ALV_DRID_DISPLAY' to do this or we need to use OOPS ALV to do this. 
    I searched for this in this forum, but couldnt get.
    Thanks in advance,
    Ananth

    You can use the REUSE_ALV_GRID_DISPLAY. and can make it a changable. You can specify the column to be changable. Once the user enters data into that coloumn the interna table automatically gets populated with the values.
    I have done a similar program. However you might need to copy some standard GUI status based on your requirements.
    Whats ur mail ID. I can send you the program I have developed.
    Shreekant

  • Approach for holding the same message and updating the table field Status

    Hi,
    I have a scenario a (first) proxy asynchronous to JDBC synchronous and then(second) proxy asynchronous.
    my first proxy calls sends records (which has a status entry " in process" ) to JDBC it updates or inserts.
    JDBC sends a response (may be a count of records updated or inserted)
    now i need to handle some how to get the records which have been inserted or updated, so that i can map and change the table entry  status field" in process" to " active".
    Can i handle this without stored procedures.If so how
    Can it be done through BPM  where i retain inital mapping or any other solution. please  help.

    Hi Robin,
    Ok (but that would be the apt method)
    Some other approaches :
    1. Make a async scenario (Proxy to DB), which will update or insert records. Write a trigger in DB which will fetch updated/inserted records and send it to XI. Then you update them in R/3 (via proxy). So you will have two async interfaces (one is Proxy to DB and other one DB to Proxy)
    2. go for BPM. Receive (from proxy), transform sync send, transform send (to proxy) . I will not prefer this as it will be a performance hinderance.
    Regards
    Suraj

  • Update a Table Field of QMEL Table Using Function Module

    hello Guru
    I want to update a field of QMEL table suing FM which was created by user. how to write code for that. i have some idea but it is not helpful for us.....
    Moderator Message: Searching the forums/Google is a good start.
    Edited by: kishan P on May 19, 2011 12:13 PM

    hi Ram,
    You can use update query on table setting particular field value...There is no Function module for it.
    Regards,
    Pawan.

  • FOR UPDATE OF table.field

    Why does the following not work
    create table division (code varchar2(2) primary key, div_desc varchar2(20));
    insert into division values ('01', 'Ninja assassins');
    insert into division values ('02', 'Working for the man');
    create table employees (tk number, first_name varchar2(10), last_name varchar2(10), code varchar2(2) references division(code));
    insert into employees values (1, 'Chuck', 'Smith', '01');
    insert into employees values (2, 'John',  'Smith', '02');
    DECLARE
      CURSOR my_csr IS
        Select e.tk, e.first_name, e.last_name
        From employees e, division d
        Where e.code = d.code
          and e.code = '01'
          and e.last_name = 'Smith'
        For update;
        cnt_updated NUMBER;
    BEGIN
      cnt_updated := 0;
      FOR my_row IN my_csr
      LOOP
        Update employees
        Set last_name = 'Forbes'
        Where current of my_csr;
        cnt_updated := cnt_updated + SQL%ROWCOUNT;
        dbms_output.put_line('You updated '||cnt_updated||' records');
      END LOOP;
    END;but just adding to the "for update" clause allows for an update?
    DECLARE
      CURSOR my_csr IS
        Select e.tk, e.first_name, e.last_name
        From employees e, division d
        Where e.code = d.code
          and e.code = '01'
          and e.last_name = 'Smith'
        For update *of e.tk*;We found this out recently, and fellow Developers are asking "Why?". Is there a documented reason, or is that just how it is?
    Thanks,
    --=Chuck

    It is not about locking it is how oracle translate the "where current". it is a simple rowid.
    did a little trace, and look what I got from 10046 trace file:
    For the update without the "update of", look at the 0 at the cr in the plan,
    Oracle already knows that this update will not do anything:
    PARSING IN CURSOR #6 len=62 dep=1 uid=82 oct=6 lid=82 tim=88904356722 hv=1877266405 ad='1a9b0404' sqlid='5a5zpz5ry9mz5'
    UPDATE EMPLOYEES_T SET LAST_NAME = 'Forbes' WHERE ROWID = :B1
    END OF STMT
    PARSE #6:c=0,e=258,p=0,cr=0,cu=0,mis=1,r=0,dep=1,og=1,tim=88904356717
    BINDS #6:
    Bind#0
      oacdty=208 mxl=3950(3950) mxlc=00 mal=00 scl=00 pre=00
      oacflg=00 fl2=206001 frm=00 csi=00 siz=3952 off=0
      kxsbbbfp=0c2ef090  bln=3950  avl=00  flg=05
    EXEC #6:c=0,e=1108,p=0,cr=0,cu=0,mis=1,r=0,dep=1,og=1,tim=88904357955
    STAT #6 id=1 cnt=0 pid=0 pos=1 obj=0 op='UPDATE  EMPLOYEES_T (cr=0 pr=0 pw=0 time=0 us)'
    STAT #6 id=2 cnt=0 pid=1 pos=1 obj=74422 op='TABLE ACCESS BY USER ROWID EMPLOYEES_T (cr=0 pr=0 pw=0 time=0 us cost=1 size=29 card=1)'for the update with the "update of", look at the 1 at the cr in the plan:
    PARSING IN CURSOR #6 len=62 dep=1 uid=82 oct=6 lid=82 tim=88913977309 hv=1877266405 ad='1a9b0404' sqlid='5a5zpz5ry9mz5'
    UPDATE EMPLOYEES_T SET LAST_NAME = 'Forbes' WHERE ROWID = :B1
    END OF STMT
    PARSE #6:c=0,e=87,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=1,tim=88913977304
    BINDS #6:
    Bind#0
      oacdty=208 mxl=3950(3950) mxlc=00 mal=00 scl=00 pre=00
      oacflg=00 fl2=206001 frm=00 csi=00 siz=3952 off=0
      kxsbbbfp=09f3abfc  bln=3950  avl=13  flg=05
      value=
    Dump of memory from 0x09F3ABFC to 0x09F3AC09
    9F3ABF0                            22010001              [..."]
    9F3AC00 000400B6 00780401 00000000           [......x.....]   
    EXEC #6:c=0,e=379,p=0,cr=1,cu=1,mis=0,r=1,dep=1,og=1,tim=88913977802
    STAT #6 id=1 cnt=1 pid=0 pos=1 obj=0 op='UPDATE  EMPLOYEES_T (cr=1 pr=0 pw=0 time=0 us)'
    STAT #6 id=2 cnt=1 pid=1 pos=1 obj=74422 op='TABLE ACCESS BY USER ROWID EMPLOYEES_T (cr=1 pr=0 pw=0 time=0 us cost=1 size=29 card=1)'Also notice that in the update version with the "update of" we can see dump of memory.
    There are some binds type that oracle won't show directly in the dump (e.g. timestamp, rowid, etc)
    For future, more hex oriented readers here is the rowid from table:
    SQL> select rowid from employees_t;
    ROWID
    AAASK2AAEAAAQR4AAAIf, somebody out there, can show me a way to read the memory dump back into the real rowid,
    I will be very happy.
    Amiel

  • SAP Tables & Fields

    Hi Guru's,
    I need Tables And Fields for the below Mentioned Fields, it is very urgent please....
    Product code     
    Item Number     
    %of total sales YTD(Year to Date)     
    YTD Actual     
    Last -YTD atual     
    % YTD to LY(LY- lAST YEAR)     
    Qty sold  YTD     
    Qty sold last YTD     
    %Qty sold last YTD     
    Regards,
    Chandrasekhar.

    Link: http://www.sap-img.com/
    Topic: Free ABAP eBook Download
    SAP MM, SD, FI, PS, PP, PM, HR, System Tables
    Regards,
    Rajesh Banka

  • Update SAP table w/o transport request

    Hi
    We want to update entries in table (tcode: OPDA).
    There are a lot of updates every week, and we want to make the updates directly in the production system, but because of the delivery class of the table I need to transport changes from development to production.
    Can there be any good solution to solve this, so we can make the changes directly in prod?
    OPDA is the transaction to the view V_TCYTM (TCYTM, T001W, T006, T006A).
    br

    Hello,
    I have the same problem; we have a table that can be maintained in production and test environment without being asked to transport the changes (It's a customer spezific 'Z' table). But as soon as it comes to our development system, you have no chance to make any change without a transport. Which is a problem because we like to have this table records system specific.
    In SOBJ the table is set as 'Automatic transport'
    Object type is 'S'
    Category = APPL
    Adjustment = Automatically adjustable
    Client specific is ticked
    Translation relevant is ticked
    Contains addr is unticked
    in SE11 the table is set as 'A' application table and display/maintenance allowed.
    My plan was to set the table to no transport required in SOBJ, but it's automatically adjusted to 'Automatic transport' as soon as I try to do the switch. (same for any other available settings)
    The system returns me below message:
    The flag for the transport link was corrected
    Message no. OZ120
    Diagnosis
    The transport link flag does not agree with the extended view/table maintenance settings.
    System Response
    The flag is corrected.
    Would it really help if I tick the current settings and transport the SOBJ change through to our production system, because I have ticked it and tested in our development system but was still prompted to provide a transport ID, so I do not think this will solve my problem.
    Thank you
    Florian Wittmann

Maybe you are looking for

  • Can't install Quicktime 7.03

    Other folks have posted similar problems, but I wanted to provide a little more detail. I got a nano for xmas and promptly installed itunes. A couple of days ago I got prompted to install itunes 6.02 (?) I downloaded and tried to install and got the

  • Synch'ing calendar between Outlook 07 and BB DTM 4.3 crashes DTM

    Following problems with BB DTM not even running, clean install of BB DTM 4.3.025 now suffering repeated crashes when synch'ing the calendar between Outlook 07 (fully patched Vista) and my BB 8100... DTM dialog says "processing device calendar" when i

  • Photoshop Organizer not working

    After many attempts I now have Photoshop Elements 12 up and running, however the Elements Organizer function does not operate.  I have re-downloaded files from the website, uninstalled, re-installed, done a clean boot, etc. No success.  I run the pro

  • Aperture Vault with iPhoto Pics

    I have just vaulted all of my photos in Aperture but I was wondering if Aperture also vaulted my iPhoto library that is in Aperture as well. I have some old pictures that were in iPhoto and when I started using Aperture it brought up my iPhoto librar

  • Three different output tables

    Hi Experts, what has to be done if you have three different output tables which you would like display by the ALV.  How can you change between those three  tables . If possible I wold like to use the same alv reference. data ref_alv TYPE REF TO cl_gu