Update adress data of customers

Hi there,
I created a dialog application for creating or changing customer data. The changes must be released by the head of the financial department. The data are stored in separate data tables. When a changed or new customer is released the dialog calls transaction FD01 or FD02 with the necessary dynpros using the saved data.
Unfortunately in Call-Transaction Mode there is no possibility to fill fields like mail adress and cell phone number.
I try to add the missing fields by using BAPI BAPI_ADDRESSORG_CHANGE. After the customer is created/changed I use BAPI BAPI_ADDRESSORG_GETDETAIL to get the existing adress data. Then I add the cell phone number and the mail adress.
Everything works fine when I run my application in Debugging-Mode. The customer is created and the mail adress and cell phone number are available as well. But when I run my application in "normal" Mode the customer is created but the additional fields were not updatet. At the moment I am running out of ideas what the reason could be. I added a call of BAPI_TRANSACTION_COMMIT after I used BAPI BAPI_ADDRESSORG_CHANGE but it didn´t solve my problems.
If anybody got an idea I would appreciate it.
Regards
Ben

Generally, Customer (or most of other SAP documents) are Created / Changed in the Asynchronous Update Task.
When you are doing it in dubugging, system will finish that update task by the time it reaches to the FM BAPI_ADDRESSORG_GETDETAIL. But, in online it may not get the customer which was just created.
Try using the BDC Option to process the first transaction in Synchronous update task, like:
     DATA:       option        TYPE ctu_params.
      OPTION-UPDMODE = 'S'.
      OPTION-DISMODE = 'N'.
      CALL TRANSACTION 'FD01'
                       USING BDCDATA_TAB
                       OPTIONS FROM OPTION
                       MESSAGES INTO INT_ERRORS.
Or introduce some wait before calling the FM BAPI_ADDRESSORG_GETDETAIL.
Regards,
Naimesh Patel

Similar Messages

  • EXIT_SAPMF02K_001: Update customer on the time when vendor adress data chan

    Hello,
    I want to update the adress data of a assign customer, if someone changed adress data in vendor master.
    For this proposal I use the exit: EXIT_SAPMF02K_001
    But my issue is now: Where can I get the temp data. Means where in which structure can I see the new data.
    In the exit itself I have I_lfa1 and some other importing parameters, but this structure dont't have the new data.
    Does anyone have an idea?
    Thanks in advance,
    Michael

    HI,
        Since the user exit was not implemented, i cant debug and say the exact answer, but looks like you can see in I_LFA1 only.
    *"*"Lokale Schnittstelle:
    *"       IMPORTING
    *"             VALUE(I_LFA1) LIKE  LFA1 STRUCTURE  LFA1
    *"             VALUE(I_LFB1) LIKE  LFB1 STRUCTURE  LFB1
    *"             VALUE(I_LFM1) LIKE  LFM1 STRUCTURE  LFM1
    *"             VALUE(I_ADDRHANDLE) LIKE  ADDR1_SEL-ADDRHANDLE
    *"                             OPTIONAL
    *"       TABLES
    *"              T_LFBK STRUCTURE  LFBK OPTIONAL
    *"              T_LFB5 STRUCTURE  LFB5 OPTIONAL
    *"              T_LFZA STRUCTURE  LFZA OPTIONAL
    *"              T_LFBW STRUCTURE  LFBW OPTIONAL
    *"              T_LFAS STRUCTURE  LFAS OPTIONAL
    *"              T_LFAT STRUCTURE  LFAT OPTIONAL
    *"              T_LFLR STRUCTURE  LFLR OPTIONAL
    *"              T_LFM2 STRUCTURE  LFM2 OPTIONAL
    *"              T_WYT1 STRUCTURE  WYT1 OPTIONAL
    *"              T_WYT1T STRUCTURE  WYT1T OPTIONAL
    *"              T_WYT3 STRUCTURE  WYT3 OPTIONAL

  • Jdbc-updating spatial data

    i looked to the next link:
    http://java.sun.com/docs/books/tutorial/jdbc/basics/connecting.html
    I want to update spatial data.To the previous link i found how to update tables but not how to update tables which contain spatial data.For example:
    CREATE TABLE customers (
    customer_id NUMBER,
    last_name VARCHAR2(30),
    first_name VARCHAR2(30),
    street_address VARCHAR2(40),
    city VARCHAR2(30),
    state_province_code VARCHAR2(2),
    postal_code VARCHAR2(9),
    cust_geo_location SDO_GEOMETRY);
    INSERT INTO customers VALUES
    (1001,'Nichols', 'Alexandra',
    '17 Maple Drive', 'Nashua', 'NH','03062',
    SDO_GEOMETRY(2001, 8307,
    SDO_POINT_TYPE (-71.48923,42.72347,NULL), NULL, NULL));
    if i want to update the costumer position (-71.48923,42.72347) how can i do this;;;

    Try posting this to the JDBC forum:
    http://forum.java.sun.com/forum.jspa?forumID=48

  • Updating spatial data USING JAVA

    I want to update spatial data using java.Does anyone know how can i do this;;;
    for example i have created the following table.
    CREATE TABLE customers (
    customer_id NUMBER,
    last_name VARCHAR2(30),
    first_name VARCHAR2(30),
    street_address VARCHAR2(40),
    city VARCHAR2(30),
    state_province_code VARCHAR2(2),
    postal_code VARCHAR2(9),
    cust_geo_location SDO_GEOMETRY);
    HOW CAN I UPDATE THE FIELD:cust_geo_location,
    WHICH TYPE IS: SDO_GEOMETRY;;;;;
    I wrote a programm in java, which updates the FIELD CUSTOMER_ID.
    ( rset.absolute(3);
    rset.updateInt("CUSTOMER_ID",2222 );
    CUSTOMER_ID = rset.getInt("CUSTOMER_ID");
    rset.next();
    rset.updateRow(); ).
    ---------- THE FULL JAVA PROGRAMM
    import java.sql.*;
    import java.io.*;
    import java.util.Date;
    public class update{
    public static void main (String args [])
    throws SQLException, IOException
    System.out.println ("Loading Oracle driver");
    try {
    Class.forName ("oracle.jdbc.driver.OracleDriver");
    catch (ClassNotFoundException e)
    System.out.println ("Could not load the driver");
    e.printStackTrace ();
    System.out.println ("Connecting to the local database");
    try{
    Connection conn =
    DriverManager.getConnection("jdbc:oracle:thin:@127.0.0.1:1521:XE", "sp", "spgianna");
    Statement stmt = conn.createStatement (ResultSet.TYPE_SCROLL_INSENSITIVE,
    ResultSet.CONCUR_UPDATABLE);
    // String LAST_NAME,FIRST_NAME ;
    int CUSTOMER_ID ;
    ResultSet rset = stmt.executeQuery("SELECT CUSTOMER_ID FROM CUSTOMERS");
    /* while ( rset.next() ) {
    CUSTOMER_ID = rset.getInt("CUSTOMER_ID");
    LAST_NAME = rset.getString("LAST_NAME");
    FIRST_NAME = rset.getString("FIRST_NAME");
    System.out.println( CUSTOMER_ID+""+LAST_NAME + " " +FIRST_NAME);
    rset.absolute(3);
    rset.updateInt("CUSTOMER_ID",2222 );
    CUSTOMER_ID = rset.getInt("CUSTOMER_ID");
    rset.next();
    rset.updateRow();
    System.out.println(CUSTOMER_ID);
    catch(SQLException sqle) {
    System.out.println("SQL Exception encountered: " );
    } catch(Exception e) {
    System.out.println("Unexpected Exception: " );
    HOW CAN I UPDATE THE FIELD:cust_geo_location,
    WHICH TYPE IS: SDO_GEOMETRY;;;;;;;;;;;;;;

    Hi Guys,
    Dont forget to close your stmt and connection after execution
    Use this as a template if you like:
    try{
         /**make connection**/
         ServerConnection sc = new ServerConnection();
    Statement stmt = sc.conn.createStatement();
    /**create statement & execute**/
    String insertstmt = "insert into .......";
    //execute
    stmt.execute(insertstmt);
    /**Close and catch exception**/
    stmt.close();
    sc.conn.close();
    catch(SQLException sqlE){
         sqlE.printStackTrace();
         System.out.println(sqlE.getMessage());
    As for the string "insertstmt" itself, this is where your standard SQL statement goes
    So get it working using a standard SQL editor first, then copy and paste it in to this string variable. The string should be a series of concatenated strings and variables to recreate the SQL atatement in Java. For example
    the SQL statement:
    insert into Mytable(SESSIONID, TIME1) values ('300', '4.45pm' );
    assuming the values are stored in variables called 'sessionnumber' and 'time'
    will become
    String stmt =
    "insert into Mytable(SESSIONID, TIME1) values ('"+sessionnumber+"', '"+time+"')";
    Hope this helps.
    E
    Ps. Do a system.out.println after you create the stmt. The statement printed out to the console should be a valid SQL statement that you can use in your editor. (minus the ;)
    ...keep working on the string until you can do this.

  • "Failed to update binary data in the database".

    Hi,
    we will get this message ("Failed to update binary data in the database".) when one of our customers want to install our add-on in one specific server.
    they got a copy of their database and put in another computer and could install add-on. but they can not install add-on on their main server.
    please advice me.

    Hi Senthil,
    Thanks for your consideration,
    They checked and they don’t have any record in SARI table related to R1. they have one record for XLR only.
    This problem is only on one specific server.
    Do you have any other idea? Please help us.
    Regards,
    Neda

  • How to update the data  in database in webdynpro

    I have to update the data in databse table using adaptive rfc in WebDynPro

    Hi,
    You can refer to these links:
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/wdjava/faq%2b-%2bmodels%2b-%2badaptive%2brfc
    Update data into SAP Table
    http://help.sap.com/saphelp_nw70/helpdata/en/41/38bc8f813719488ddc9d9b21251ec3/frameset.htm
    http://help.sap.com/saphelp_nw70/helpdata/en/d5/1558bfa6aa80499113983e738b1b21/frameset.htm
    Regards
    Inder

  • How to Update the data in R/3 From BW

    Hi All ,
         I Need some suggestion . i want to update the data of MARC table in R/3 from BW . Here data goes from BW to R/3 . so How to do this ? . There are no standard BAPI's in BW for this .
    Thanks
    Prithvi.

    Hi,
    The scenario you are explaining is little opposite to what happens generally. Are you sure, you want to update R/3 from BW?
    If you have to update MARC table that means you have to extend the material for different plants. Try using BAPI_MATERIAL_SAVE_DATA.
    Regards,
    Ravi
    Note : Please mark all the helpful answers

  • Unable to run bapis for project status update and date update together

    Hi Experts,
    I have a requirement to update the dates and status of a project WBS at level 4. I am trying to do update the CJ02 Transaction using standard BAPI available. I need to do both Date update and status update in the same LOOP PASS   i am using the below mention bapi. when i am doing so i am getting an error Project 'A._____' has been currently processed by ID i.e. my id.
    I have tried putting  a wait for 2 seconds in the code but its still not working. please find the order below in which i am calling the bapi.
    Loop at itab.
    if  date_changed = 'X'.
          CALL FUNCTION 'BAPI_PROJECT_MAINTAIN'
          READ TABLE it_error WITH KEY message_type = c_e.
          IF sy-subrc <> 0.
    Commit
            CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
                 EXPORTING
                      wait   = c_x
                 IMPORTING
                      return = s_ret.
       endif.
    endif.
    if Status_change = 'X'.
          CALL FUNCTION 'BAPI_PS_INITIALIZATION' .
          CALL FUNCTION 'BAPI_BUS2054_SET_STATUS'
          READ TABLE t_result WITH KEY message_type = c_e.
          IF sy-subrc NE 0.
            CALL FUNCTION 'BAPI_PS_PRECOMMIT'
                 TABLES
                      et_return = t_ret.
            CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
                 EXPORTING
                      wait   = c_x
                 IMPORTING
                      return = s_ret.
         ENDIF.
    endif.
        WAIT UP TO 4 SECONDS.
    endloop.

    Try to use
    SET UPDATE TASK LOCAL.
    before each BAPI call.
    Did you try to debug through your code, leaving sufficient time between BAPI calls? If it does work like that, then the above statement might help.

  • Updating array data in sql database

    HI,
    Im facing problems in updating array data in SQL database.
    As of now, i am able to write an "insert" query and insert array data in an image datatype field. Im using image datatype because the array size is very big(around 80,000 x and y values).
    Althoug inserting data is easy im unable to write a query to update this data.
    Referring to the help of SQL server and Labview database connectivity toolkit, i came across a method of accessing image datatype....using textpointers, which are 16 bit binary values and using the WRITETEXT function instead of the UPDATE function.
    but the problem im facing is that ive to pass the array as a 2d string array in the query as a result the updated array is retrieved in the form of a string a
    nd not as an array. how do I get over this problem?

    Hi Pavitra,
    I'm not very clear on how you have inserted the data into your application, but I do know that when you call the UPDATETEXT or WRITETEXT function you use the TEXTPOINTERS to point to the first location of a 1d array. So, depending on how you've stored the data, you may have problems updating your data if you're looking at it as a 1d array instead of how you originally formatted it. If you are able to successfully access the data as a 1d array, you can use the database variant to data type vi and pass in a string array constant for the data type. This will convert the variant datatype into whatever you specify. You may have to index the row and column of the variant (you receive a 2d array of variant) first before you convert. If possible, can yo
    u provide some more detail and maybe some example code of how you perform the insert and plan to do the update? I can probably give you a better solution if I know how you are formatting the data. Thanks!
    Jeremy L.
    National Instruments
    Jeremy L.
    National Instruments

  • How can I activate the transfer rules for the ODS updating a data target.

    We are on BW 3.5 and I'm loading data into the 0FIGL_O10 ODS  and then uploading the data into the cube 0FIGL_C10. The data loads just fine to the ODS but when I try to <u><b>'update the data target'</b></u> I get a date & time stamp' error on the info-package transfer rules.
    I then Replicate the datasource 80FIGL_O01.
    I must then <u><b>'activate' the transfer rules</b></u>.
    However I cannot get the transfer rules for 80FIGL_O10 in CHANGE MODE to activate them.
    How can I activate the transfer rules for the ODS updating a data target.
    The error text is as follows:
    DataSource 80FIGL_O10 has to be replicated (time stamp, see long text)
    Message no. R3016
    Diagnosis
    DataSource 80FIGL_O10 does not have the same status as the source system in the Business Information Warehouse.
    The time stamp in the source system is 02/15/2007 10:42:33.
    The time stamp in the BW system is 11/07/2006 13:11:54.
    System response
    The load process has been terminated.
    <b>Procedure
    Copy the DataSource again and then activate the transfer rules that belong to it. You have to activate the transfer rules in every case, even if they are still active after the DataSource has been copied.</b>
    Thanks for your assistance.
    Denny

    Hi Dennis,
           Try, using Business Content to activate your data source
           hope this will help you
    How activate business content?
    http://help.sap.com/saphelp_nw04/helpdata/en/80/1a66d5e07211d2acb80000e829fbfe/frameset.htm

  • How to update the data in sqlserver table using procedure in biztalkserver

    Hi,
    Please can any one answer this below question
    how to update the data in sqlserver table using procedure in biztalkserver
    while am using executescalar,typedprocedure getting some warning
    Warning:The adapter failed to transmit message going to send port "SendtoSql1" with URL "mssql://nal126//MU_Stage2?". It will be retransmitted after the retry interval specified for this Send Port. Details
    Please send me asap....
    Thanks...

    Hi Messip,
    A detailed error would have helped us to answer you more appropriately but
    You can follow the post which has step by step instructions, to understand how to use Stored Procedure:
    http://tech-findings.blogspot.in/2013/07/insert-records-in-sql-server-using-wcf.html
    Maheshkumar
    S Tiwari|User
    Page|Blog|BizTalk
    2013: Inserting RawXML (Whole Incoming XML Message) in SQL database

  • Can't update the data of my credit card

    My credit card information was changed. Now I can't update this data on my account since days. Any idea, why?  the error message is 'Card is invalid, please check card details'. thanks

    Hi up1975.
    Please contact our chat support: http://helpx.adobe.com/x-productkb/policy-pricing/membership-subscription-troubleshooting- creative-cloud.html#Contact_us as they can provide you personalised experience in getting your issue fixed.
    Regards,
    Romit Sinha

  • Automatic remote key updation in data manager after a data import.

    Hi experts,
    I'm using SAP MDM 7.1 SP10 and after I do a data load via import manager my remote keys of lookup tables are updated. For example, lets just say I do a vendor mass load for some operating company for which I didn't maintain remote key for lookup table "Country" (figure Before load) and after the load its autometically updated in data mager (figure After load).
    Before load.
    After load.
    I want to understand if its noramal SAP behaviour or not. If yes, how can i avoid this.
    Thanks and regards
    Shamit Prakash

    Hello Ravi, I just want to leverage Shamit question :
    I noticed the same behavior after the key mapping enable and the problem is : every time I import a file via Import manager now, when I check my mapping, sometimes a supplier that does not exist in my file is mapped with a different one from MDM. Previously the key mapping property was enabled, if this situation occurs  in my import, as the supplier is a key in my map, this field would not be mapped and I had to correct my file or include this supplier in the database. Now, this became dangerous, as my import can map wrong information. Do i have another option to syndicate only changed records, without enable the key mapping ??? Example : use the selection Criteria in syndicator.

  • Update XML data stored in CLOB Column

    Hi All,
    i am new to Oracle and new to SQL
    i am trying to update XML data stored in CLOB cloumn,data is stored with the follwoing format
    <attrs><attr name="name"><string>Schade</string></attr></attrs>
    i am using the following query for updating the value
    UPDATE PRODUCT p SET ATTRIBUTES_nl_nl=UPDATEXML(XMLTYPE.createXML(ATTRIBUTES_nl_nl),'/attrs/attr[@name="name"]/string/text()','Schade').getClobVal() WHERE p.sku='000000000000040576_200911-5010057'
    this query is working fine but it changing the data to the following format
    <attrs><attr name="name">Schade</attr></attrs>
    some how it is ommiting the <string> tag from it, i am unable to figure it out whats the reason.
    any help in this regard will b e much appriciated
    Thanks in Advance
    -Umesh

    Hi,
    You should have created your own thread for this, and included database version.
    This works for me on 11.2.0.2 and 10.2.0.5 :
    SQL> create table t_org ( xml_clob clob );
    Table created
    SQL>
    SQL> insert into t_org
      2  values(
      3  '<Message>
      4  <Entity>
      5  <ASSIGNMENT>
      6  <OAVendorLocation> </OAVendorLocation>
      7  <Vendorid>1</Vendorid>
      8  </ASSIGNMENT>
      9  </Entity>
    10  </Message>'
    11  );
    1 row inserted
    SQL> commit;
    Commit complete
    SQL> select '*' ||
      2         extractvalue(xmltype(xml_clob),'/Message/Entity/ASSIGNMENT/OAVendorLocation')
      3         || '*' as result
      4  from t_org;
    RESULT
    SQL> update t_org set xml_clob =
      2  updatexml(xmltype(xml_clob),
      3  '/Message/Entity/ASSIGNMENT/OAVendorLocation/text()','LONDON').getClobVal()
      4  ;
    1 row updated
    SQL> select '*' ||
      2         extractvalue(xmltype(xml_clob),'/Message/Entity/ASSIGNMENT/OAVendorLocation')
      3         || '*' as result
      4  from t_org;
    RESULT
    *LONDON*
    Does the OAVendorLocation really have a whitespace value?
    If not then it's expected behaviour, you're trying to update a text() node that doesn't exist. In this case, the solution is to use appendChildXML to create the text() node, or update the whole element.
    Is it your real document? Do you actually have some namespaces?

  • Delta Update in data Target Must be Deactivated Before deleting the request

    Hi Experts,
    I got an error while deleting a request from an ODS target.  In breaf Let me explain..
    Today one data load got failed. The data source 0CRM_SALES_CONT_I ( CRM  Sales Contract : Item ) is updating data to 4 ( Four ) ODS targets.
    So I forcefully made the request red to delete the request from the targets. But  I unfortunately deleted another request without making it RED, I reconstructed it. Everything is looking fine.
       But the thing is , when I tried to  Delete the ERROR request from  the other two related Data Targets ( 0CRM_CN2P  and   0CRM_CNT1) , I fount these warnings..
                    --> Request 140522 already retrieved by Data Target BWPCLNT600
                    --> Delta update in Data Target BWPCLNT600 must be DEACT. before deleting the request.
                    --> Do you want to DEACTIVATE the Delta Update in the Data Target BWPCLNT600   ?
       I clicked on YES.
    I am having doubt, will it make any problem in future ? Or How Can I Resolve this problem   ?
    Thanks,
    Utpal.

    Hi shanthi bhaskar ,
    Thank you. But the client no which I have mentioned is not our. That is different, I have given for the example. Bur the DS and ODS name are as it is.
       and  Shanthi, Won't be any problem as  I got the warning as mentioned above.. ?
    Thanks,
    Utpal

Maybe you are looking for