How to update Z-Fields in BP Transaction

Hi SDN members.
I´m using the BDT event DSAVE and checking some own table values. Now I want to update some customer fields of the Business Partner. How is this possible? I don´´t want to update the database directly. These fields have to download also to the mobile sales system.
Does anyone know the procedure?
Thx andreas

Hi,
You should update them in the memory. They will then be included in the transactional save & the outbound bdoc. Depending on where the Z-field is located, you can use the BUPA-functions to read & modify the memory. Take a look at functions CRM_BUPA_FRG*
The easiest way is to enhance the business partner  transaction with the easy enhancement workbench and fill the field in the Badi.
Michael.

Similar Messages

  • 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.

  • How to update single field

    Hi frnds,
                        How to update single field data in Z table .
                       I am taking data from screen, when i press update button  the data will store specific field data in Z table.

    Dear Rakhi,
    You can use the below syntax.
    Hope this would solve your problem.
      LOOP AT tpra INTO wpra.
        UPDATE zpra
        SET    pra2 = wpra-pra2
        WHERE  pra1 = wpra-pra1.
      ENDLOOP.
    In WHERE give KEY VALUES
    In SET give the particular value that has to be changed.
    Regards,
    Pintoo
    Edited by: pintoo2805 on May 18, 2010 7:10 AM

  • How to update ABSKZ field in the table EKPO

    Hi
    Is there any way to update the rejection indicator (ABSKZ) field of table EKPO?.
    I am looking at BAPI_CHANGE_PO FM, But it does not have ABSKZ field in the item structure BAPIMEPOITEM.
    Do I need to extend the BAPI structure with ABSKZ field ?
    Regards
    Raj.

    Hi
    To extend  BAPI_PO_CHANGE  for EKPO-ABSKZ field , we have to add field in the structure BAPI_TE_MEPOITEM to pass it to  EXTENSIONIN. As ABSKZ field already availble in the EKPO it is not allowed to add ABSKZ in the structure BAPI_TE_MEPOITEM. it is throwing below error message.
    Field ABSKZ in table EKPO is specified twice. Please check
    Since it is not Z field and also not availble in the structure BAPIMEPOITEM  not sure how to update ABSKZ field in the EKPO table.
    Please advice.
    Regards
    Raj

  • How to update 2 fields automatically rest manually on page

    Hello folks,
    I have got a question on how to update 2 fields in a table automatically (in my case this is one field for the user and one field for the correct date and time). This should happen automatically every time an user changes a row in the table. But it seems as if i cant change the fields i tried it with the changing of the textfield but he dont change the values in the database. I even tried a separate update statement but since this is set after the commitchanges() command it seems as if he ignores any following commands.
    So anybody a good idea how i can change easily these two data fields? I just cant believe that you must manually change the fields, thats not the use of these 2 fields.
    Thanks in advance for your help
    Acinonyx

    To be exact i have got a page with different fields which get their data from my database. Two fields which contain an userid and the other a date and time value should get updated automatically when the user changes something of the other values on this page and press a button which calls the commitchange method. But since this should happen automatically and not manually i cant put these changes in the database. The manual changes are saved without any problems but the automatical changes not. So my question is how can i change a value programmatically and make him save these canges in the database?
    I already tried to put the new values in the fields or even detailed in the database but i cant get him to update these two fields.
    Acinonyx

  • How to update the field ZLSPR of table BSEG

    HI Friends,
    Can anyone tell me how to update the field ZLSPR of table BSEG? I've a 700 line abap program and I should include some logic in this program to make an entry into BSEG-ZLSPR. Is there any FM/BAPI available? Is BDC a healthy approach?. My team lead do not want me to use UPDATE statement....please help.
    Thanks in advans,
    Varsha.

    Hi,
    Hi ,
    You will need to group that radiobuttons so that SAP knows they are linked together. To do this using the grahical layout editor simply select all the radiobuttons and then right click on them, Now choose define group. Once you have done this you should not need any of the "clear" or "='X'" statements SAP should control it all for you.
    hope this helps
    Reward if found helpfull...
    Venkoji Babu.

  • Master Detail Form - How 2 update a field in the Detail form using a query?

    Hello,
    I have a master detail form with, each master record having a fixed(6) number of detail records. One of the fields in the detail record is the PART_DESCRIPTION field. I am trying to update this field by querying Table_X. TABLE_X is in the format of (desciption id, description). Description id runs from 1 to 6.
    When the form displays, the PART_DESCRIPTION field for the 6 detail records needs to be automatically populated with the six values of description stored in Table_X. How can this be done?
    Tried using session storage objects, but made no headway.
    Would greatly appreciate pointers on how to go about doing this.
    Thanks.
    Dev

    If you are on a Portal Version lesser than 3.0.9.8.3, then please try the following to populate
    the PART_DESCRIPTION field.
    Steps:-
    1> Edit the form and go to the Additional PL/SQl section and put the following code in the
    "...after displaying the page area" :-
    declare
    type t_vc_arr is table of varchar2(4000) index by binary_integer;
    l_arr_desc t_vc_arr;
    l_form_name varchar2(200);
    l_form_state varchar2(500);
    begin
    l_form_name := p_session.get_module().get_name();
    l_form_state := p_session.get_value_as_varchar2(
    p_block_name => 'MASTER_BLOCK',
    p_attribute_name => '_FORM_STATE'
    if l_form_state = 'QUERY_AND_SAVE' then
    select description
    bulk collect into l_arr_desc
    from <schema>.table_x;
    htp.p('
    <script>
    var descArr = new Array();
    var Fidx = 1;
    var formObj = document.WWVM'||p_session.get_id()||';
    var fieldName = "'||l_form_name||'.DETAIL_BLOCK.PART_DESCRIPTION.0";
    for i in 1..l_arr_desc.count loop
    htp.p('descArr['||to_char(i-1)||']="'||l_arr_desc(i)||'";');
    end loop;
    htp.p('
    for (var i=0; i < formObj.length; i++){
    if (formObj.elements.name == fieldName+Fidx){
    formObj.elements[i].value = descArr[Fidx-1];
    ++Fidx;
    htp.p('</script>');
    end if;
    end;

  • How to update flex field data on a human task?

    After entering a human task and assigning the data how do you then update flex field data whilst the task is still assigned. I'm using the task services to communicate with the task and applying filters based on the flex field data.
    I want to update the data when actions take place on the task e.g. suspend, aquire, release.
    Any ideas?

    You can fetch the task , change the flex attribute value and update the task. Find below the steps we do for updating one of the TextAttribute
    Task completeTask =  // get the task using task query service
    completeTask.getSystemMessageAttributes().setTextAttribute2(updatedfolderName);
    completeTask = // update the task using "updateTask" method

  • How to update information fields of a profile in Oracle UCM using RIDC

    Hi All
    I have a requirement in which i need to modify/update the metadata/information fields of a Profile in Oracle Webcenter Content(UCM).
    I found out that this can be achieved using RIDC api, but i have little knowledge about the same.
    If someone could suggest about how to retrieve and update the fields in UCM using RIDC or some other approach would be of great help.
    It's really important.Kindly help
    Regards
    ACM

    user13069455 wrote:
    Hi Jiri
    Even i have thought about the same as one of the approaches, but i was a bit apprehensive about using this one.
    I have few stupid queries regarding this:
    1)Will it expose the production database(connection details) to the environment?Yes. If you don't like the idea of giving connection to the database to a "third-party" program, you could go from the other side - create a UCM component (some kind of scheduled job), which will be a part of UCM, but do the same. It will be a bit more complicated, but might be considered more secure.
    2)Will it have any performance impact?I don't think there will be much impact - most of time, tables will be accessed in read-only mode (pulling the data out), so except few per cent of CPU and some memory it should not consume anything. Besides, you should be able to schedule upload to "quiet hours", if there are some
    3)Will it still be an integration with the UCM?Well, yes. It will be integration at the database level. But honestly, as long as it works, do you care how is it called?
    >
    Thanks
    ACM

  • How to update the field of a Parent enity (field is not visibe on the Form) from a Child Entity in MSCRM 2013

    Hi All,
              I m new to CRM customization. I have requirement like this..
    I have 3 entities.. Entity1 , Entity 2 and Entity3.
    Entity1 is the parent of Entity2 and Entity3. Entity2 is the parent of Entity3 and child of Entity1 ..
    In Entity1 I have a field eg:product1 which acts as lookup for Entity2 field availableproducts.  Now in Entity2 I have a field the quantity of products which acts as lookup for Entity3 as given below.
    In Entity3: fields:;; products==Lookup of Products(Entity1)
                                  quantity == Lookup of Quantity (Entity2)
    Now from Entity3 I need to update the fields of Entity1 like I have field named Price which is not visible on the Entity3 Form  but when I access this field from javascript I m getting null exceptions since the field is not in the context of the Entity
    on which it is defined. How can I update the fields of the Parent Entity1 from child Entity3  and also update the quantity field on Entity2 which are not avialable on the Entity3 Form.
    Any help is appreciated
    Waiting for the reply..
    FayazSyed

    Hi,
    To do it in JS you need to use oData, as wrote above:
    to make this requests easer, i use a XrmSvcToolkit library (https://xrmsvctoolkit.codeplex.com/)
    Your code will be about this:
    /// <reference path="rtb_XrmSvcToolkit.js" />
    XrmSvcToolkit.retrieve({
    entityName: "Entity1",
    id: Xrm.Page.getAttribute("quantity").getValue()[0].id,
    select: ["my_FieldNeedToUpdate"], //Here are the name of your fields, which you want to select.
    expand: [""],
    async: false,
    successCallback: function (result) {
    FieldNeedToUpdate= result.my_FieldNeedToUpdate;
    errorCallback: function (error) {
    Error = error;
    FieldNeedToUpdate = FieldNeedToUpdate + 1; //Doing some work here
    var InputEntity =
    my_FieldNeedToUpdate: FieldNeedToUpdate //here are fields, witch you want to update
    XrmSvcToolkit.updateRecord({
    entityName: "Entity1",
    id: Xrm.Page.getAttribute("quantity").getValue()[0].id,
    entity: InputEntity ,
    async: false
    Here are more samples:
    https://xrmsvctoolkit.codeplex.com/SourceControl/latest#Samples/XrvSvcToolkit.Samples.updateRecord.js

  • How to update the field 'VBRK-ZUONR' of Billing Document Header(VF03)

    Hi Experts.
    I got a request to update the field 'VBRK-ZUONR' of Billing Document Header(T-code:VF03).
    At first i thought it might be a BADI or User-Exit case and looked up in Standard Program but found nothing.
    Thus i doubted if it was a configuration problem.
    I tryed to configure through transaction code "VTFA" "VTFL" "VTFF" and met another failure.
    Now i'm totally lost and hope for your advice,any information would be appreciated.
    The Billing Document is automatically generated from the posting of Outbound Delivery.
    Regards.
    Panda.

    Hi friends.
    I've found where point is.
    The include program 'RV60AFZC' contains a form named 'USEREXIT_FILL_VBRK_VBRP',
    in which the field 'VBRP-ZUONR' could be set through coding.
    In our system the codes had been changed once,which led to the misalignment that confused me yesterday.
    On the other hand,undoubtedly VTFL is available to configure the value of 'VBRP-ZUONR'.
    For more information plz refer to
    http://help.sap.com/saphelp_46c/helpdata/en/18/f62c7dd435d1118b3f0060b03ca329/content.htm
    Thanks again to all of you.
    Best Regards
    Panda.

  • How to add a field in FV60 transaction ALV

    Hi,
    I want to add a new field in FV60 transaction, I know that it can be done adding a new screen variant is this right? and how do i do this? What I exactly want is to add a field in the Table Control Named "Distance" and it should be type character with 12 positions, how can I do this?
    Thanks!!

    u have to search for a screen exit to implement the field in the screen of LT31. then u have to write ur code to upload to the zcode in the same exit..

  • How to update Reference field in the clearing document

    Hi Friends,
    While accounitng for billing document for sales Reference Key 2 is used for a data.
    Now when the payment is recieved from customer and accounted, how to update the Ref 2 automatically from the primary document.
    Pl, suggest.
    Thanks
    NNS

    Hi Robert,
    Thanks for answering.
    I am looking at Ref 2 should flow automatically to clearing document from the accounitng document for billing.
    Ex: Billing document is created and accounted. Ref 2 is AB
    Now when receipt is accounted for this biling document this AB should flow automatically to Ref 2 field.
    Thanks
    NNS.

  • How to update specific fields of a db table using MODIFY

    Hi all.
    I understand that MODIFY allows us to insert a record into the database if the a record with the same key is not there. If a record is there, it would update that record.
    However, when the record is there, could i update SPECIFIC fields of the record, instead of updating ALL fields of the record?

    Yes, you can with exception that you can not modify primary key values.
    Here are the details about MODIFY db table command with examples
    MODIFY - Change a database table
    Variants:
    MODIFY dbtab. or   MODIFY *dbtab. or
      MODIFY (dbtabname) ... .
    MODIFY dbtab FROM TABLE itab. or   MODIFY (dbtabname) FROM TABLE itab.
    MODIFY dbtab VERSION vers. or   MODIFY *dbtab VERSION vers.
    Effect
    Inserts new lines or updates existing lines in a database table (s. relational database). If a line with the specified primary key already exists, an UPDATE is executed. Otherwise, an INSERT is performed. You can specify the name of the database table either in the program itself in the form MODIFY dbtab ... or at runtime as the contents of the field dbtabname in the form MODIFY (dbtabname) ... . In both cases, the database table must be defined in the ABAP Dictionary. If the program contains the name of the database table, it must also have a corresponding TABLES statement. Normally, records are inserted or updated only in the current client. Data can only be inserted or updated using a view, if the view refers to a single table and was created in the ABAP Dictionary with the maintenance status "No restriction".
    MODIFY belongs to the Open SQL command set.
    When the statement has been executed, the system field SY-DBCNT contains the number of edited lines.
    The Return code is set as follows:
    SY-SUBRC = 0:
        All lines were successfully inserted or updated.
    SY-SUBRC = 4:
        One or more lines could not be inserted or updated.
    Notes
       1. You cannot modify a line if there is already a line in the table with identical key field values in a UNIQUE index.
       2. Automatic definition of INSERT and UPDATE is expensive. You should therefore use MODIFY only if you cannot define the INSERT and UPDATE cases yourself in the program.
       3. Since the MODIFY statement does not perform authority checks, you have to program them yourself.
       4. Adding or changing lines with the MODIFY command is only completed after a database commit (see LUW) has been performed. Before the database commit has been performed, any database changes can be reversed with a database rollback (see Programming transactions).
       5. Synchronization of simultanous accesses by several users to the same set of data cannot be exclusively achieved with the lock mechanism of the database system. In several cases, you are recommended to use the SAP lock mechanism.
    Variant 1
    MODIFY dbtab. or
    MODIFY *dbtab. or
    MODIFY (dbtabname) ... .
    Extras:
    ... FROM wa
    ... CLIENT SPECIFIED
    See Cannot Use Short Forms and
    Cannot Use *Work Areas.
    Effect
    Inserts a new line or updates an existing line in a database table. If you specify the name of the database table yourself, the primary key for identifying the line to be inserted or updated and the relevant values are taken from the table work area dbtab or *dbtab (see TABLES). If you declare the name of the database table explicitly, the program must also contain a corresponding TABLES statement. If the name of the database table is not determined until runtime, you need to use the addition ... FROM wa.
    Example
    Insert or change data of the customer Robinson in the current client:
    TABLES SCUSTOM.
    SCUSTOM-ID        = '12400177'.
    SCUSTOM-NAME      = 'Robinson'.
    SCUSTOM-POSTCODE  = '69542'.
    SCUSTOM-CITY      = 'Heidelberg'.
    SCUSTOM-CUSTTYPE  = 'P'.
    SCUSTOM-DISCOUNT  = '003'.
    SCUSTOM-TELEPHONE = '06201/44889'.
    MODIFY SCUSTOM.
    Addition 1
    ... FROM wa
    Effect
    The values for the line to be inserted or updated are not taken from the table work area dbtab, but from the explicitly specified work area wa. When doing this, the data is read from left to right according to the structure of the table work area dbtab (see TABLES). Since the structure of wa is not taken into account, the work area wa must be at least as wide (see DATA) as the table work area dbtab and the alignment of the work area wa must correspond to the alignment of the table work area. Otherwise, a runtime error occurs.
    Note
    If a work area is not explicitly specified, the values for the line to be inserted or updated are also taken from the table work area dbtab if the statement is in a FORM or FUNCTION where the table work area is stored in a formal parameter or local variable of the same name.
    Addition 2
    ... CLIENT SPECIFIED
    Effect
    Switches off automatic client handling. This allows you to edit data across all clients even when dealing with client-specific tables. The client field is treated like a normal table field that can be programmed to accept values in the table work area dbtab or *dbtab where the line to be edited occurs.
    The addition CLIENT SPECIFIED must be specified immediately after the name of the database table.
    Variant 2
    MODIFY dbtab FROM TABLE itab.or
    MODIFY (dbtabname) FROM TABLE itab.
    Addition:
    ... CLIENT SPECIFIED
    Effect
    Mass modify: Inserts new lines or updates existing lines of a database table. The primary keys for identifying the lines to be inserted or updated and the relevant values are taken from the internal table itab. The lines of the internal table itab must satisfy the same conditions as the work area wa in addition 1 to variant 1.
    Note
    If the internal table itab is empty, SY-SUBRC and SY-DBCNT are set to 0.
    Addition
    ... CLIENT SPECIFIED
    Effect
    As for variant 1.
    Variant 3
    MODIFY dbtab VERSION vers. or
    MODIFY *dbtab VERSION vers.
    See Cannot Use the VERSION Addition.
    Note
    This variant is obsolete.
    Effect
    Inserts a new line or updates an existing line in a database table, the name of which is taken from the field vers at runtime. If no line exists with the specified primary key, an INSERT is executed. Otherwise, an UPDATE is performed. The database table must be defined in the ABAP/4 Dictionary and its name must conform to the naming conventions for R/2 ATAB tables. These stipulate that the name must begin with 'T' and may contain up to four further characters. The field vers must contain the table name without the leading 'T'. Only lines in the current client are inserted or updated. The line to be inserted is taken from the statically specified table work area dbtab or *dbtab.
    SY-SUBRC is set to 0 if the line is successfully inserted or updated. SY-SUBRC <> 0 is not possible since any other result causes a runtime error.
    Hope this helps.
    ashish

  • How to update the field EKET-WEMNG (delivered) in database using BAPI.

    Dear All,
    How to update the values to good received field for EKET WEMNG (delivered) in database using BAPI and please give me the standard bapi and explain the process  how to update to database bcoz am new to bapi concepts and i will be thankful to your help.
    Regards,
    Tazeer.

    this field is only updated when you do a goods receipt. 
    So the only BAPI that can do this is the BAPI GoodsMovement  (BUS2017)

Maybe you are looking for