Code for updating/deleting in R/3 from WD java

Hi All,
Please provide me the code for deleting/updating seleected row of a table of which data is coming from SAP R/3. (Webdynpro java) The changes should reflect in R/3. I want to put the selected row values in a value node and then updated in the backend.
Regards
Shilpa Bhanot

hi
  get the size of the model node that you have bind to the table
int n= wdcontext.nodeModeNode.size();
  for(int i=0;i<n;i++)
  fetch the data from the row of the table on LeadSelection
String name= wdcontext.nodeModelNode.getElementNameatindex(i).getName();
  String age= wdcontext.nodeModelNode.getElementNameatindex(i).getAge();
  String ID= wdcontext.nodeModelNode.getElementNameatindex(i).getID();
  String Salary= wdcontext.nodeModelNode.getElementNameatindex(i).getSAL();
  here after fetching the data from the table to update to the R/3 table ,
you have to set the data to the RFC
  ZRFCCclass name = new ZRFCClassname();
name.set(name);
name.set(age);
name.setId(id);
name.set(slary)
and then bind or the add  the strucute node and in the same way delete operation
  create a value node called Employee , and attributes name , id , age , sal
  adding the data to the value node node ;
   IprivateViewname.IEmployeeElement element  = wdcontext.nodeEmployee.createemployeeelement();
  element.setname(name);
element.setname(age);
element.setid(id);
element.setsalary(salary);
wdcontext.nodeemployee.addelement(element);

Similar Messages

  • "ORA-01762: vopdrv: view query block not in FROM" while using LOG ERRORS INTO  feature for Update/Delete

    Hi
    Ours is VPD database in 11GR2. We're using "LOG ERRORS INTO " feature to track list of records violating constraints.
    For Inserts it is working as expected but for Updates/Deletes it is throwing mis. ORA- errors. "ORA-01762: vopdrv: view query block not in FROM"
    We dint find any clue when searched in net.
    Could someone help us here? Is there any limitation with "LOG ERRORS INTO" ?
    Below are the steps we're executing
    EXEC DBMS_ERRLOG.CREATE_ERROR_LOG(
    dml_table_name => 'EMP',
    err_log_table_name => 'ERR_EMP'
    > DESC EMP
    Name                                      Null?    Type
    EMPNO                                     NOT NULL NUMBER(4)
    ENAME                                              VARCHAR2(10)
    SAL                                                NUMBER(7,2)
    COMM                                               NUMBER(7,2)
    DEPTNO                                             NUMBER(2)
    INSERT INTO EMP VALUES('1','Test','@' /* generates Ora */,2,'2); -- ERR_EMP populated
    UPDATE EMP set SAL='@'
    where EMPNO='1' -- Throwing ORA-01762: vopdrv: view query block not in FROM
    Could someone help us?

    Hi
    Ours is VPD database in 11GR2. We're using "LOG ERRORS INTO " feature to track list of records violating constraints.
    For Inserts it is working as expected but for Updates/Deletes it is throwing mis. ORA- errors. "ORA-01762: vopdrv: view query block not in FROM"
    We dint find any clue when searched in net.
    Could someone help us here? Is there any limitation with "LOG ERRORS INTO" ?
    Below are the steps we're executing
    EXEC DBMS_ERRLOG.CREATE_ERROR_LOG(
    dml_table_name => 'EMP',
    err_log_table_name => 'ERR_EMP'
    > DESC EMP
    Name                                      Null?    Type
    EMPNO                                     NOT NULL NUMBER(4)
    ENAME                                              VARCHAR2(10)
    SAL                                                NUMBER(7,2)
    COMM                                               NUMBER(7,2)
    DEPTNO                                             NUMBER(2)
    INSERT INTO EMP VALUES('1','Test','@' /* generates Ora */,2,'2); -- ERR_EMP populated
    UPDATE EMP set SAL='@'
    where EMPNO='1' -- Throwing ORA-01762: vopdrv: view query block not in FROM
    Could someone help us?

  • Wanted to update the software now available, but it is asking for a pass code. As far as I remember in didn't put in any pass code , how do I settle this issue . Earlier updates were asking Apple ID but pass code for updating the new soft ware not known.

    Wanted to update the software now available, but it is asking for a pass code. As far as I remember in didn't put in any pass code , how do I settle this issue . Earlier updates were asking Apple ID but pass code for updating the new soft ware not known.

    Hello Kewal,
    Thank you for the details of the issue you are experiencing when trying to perform an update.  I recommend trying to update using iTunes, and as always, it is a good idea to make a backup first. 
    iOS: Back up and restore your iOS device with iCloud or iTunes
    http://support.apple.com/kb/ht1766
    Update your iPhone, iPad, or iPod touch
    http://support.apple.com/kb/ht4623
    Thank you for using Apple Support Communities.
    Best,
    Sheila M.

  • I cannot enter the key code for updating to QuickTime Pro 7 as there is no Icon in Preferences and no Registration option in menu?

    I have followed the clear instructions to enter the purchased key code for QuickTime Pro 7. There are two options offered:-
    1. Go into Preferences and select the QuickTime Player icon and enter the code that way.
    2. Open QuickTime Player and open up ‘registration’ and enter the key code.
    For whatever reason I have neither option available to me although QuickTime player is on my system and I use it regularly. It is version 10 build (118). I have run software updates and there is no upgrade available. I have downloaded the latest version and tried to load it but this fails because the system finds a version already available. I have attempted to uninstall but whilst it moves it from the Application folder, it remains on the Mac as it is part of the system files. So I cannot use the Pro version. The iMac is a 27” Intel about a year old and has all the software updates available to me installed.
    Any offers for suggestions or past experiences that can help me overcome this conundrum?

    Both answers were spot on. I made the mistake yesterday of downloading the version for Leopard in my haste. I also thought the issue was related to having to uninstall the current version X.
    So the moral of the episode is check the version you have and make certain you download the correct version for your system. All works now.
    Thanks chaps!

  • T. Code for Cancelling / Deleting the Payment Run in F110

    Hi Gurus,
    Can anybody please tell me the transaction code for deleting the payment run (before taking print out) in F110.
    I tried to do it from F110 itself and is working fine.
    I want to know if there is any separate T.Code available.
    Regards.
    Vikas

    Hi Chintan
    If there is no concept of Deleting Output then why SAP provided Delete Output Option in F110.
    Vikas you are right We can Delete the Payment Run in F110 itself.
    And as you mentioned you did not make the printout form so there is no Check Printed, you go to Transaction FBRA and Reset & Reverse the Payment Document(Clearing Document).
    If the Check is printed then you need to use FCH8 , Cancel the Check and then Reverse the Document as said Above by Zubin.
    Regards
    Venkat

  • Trasaction code for mass delete of open Pur req.

    I was looking for is a way to perform a mass delete of open PRu2019s prior to running MRP.  My reasoning is if a PR has not been converted to a PO by the time the next MRP runs we  want to delete all open PRu2019s so items are re-planned based on the most current data.
    Is there a mass delete transaction code for PRu2019s?
    Thanks

    The blw are the options'
    1- Try with MEMASSPR for PR
    2- You cannot directly delete PRs, You can only mark them as "deleted". To delete them physically from DB you have to "archive" them via transaction SARA.
    Deletion of PR can be done using ME52N
    This is only possible provided that no purchase order have been assigned. If po has been created, you can only Flag for Deletion.
    To delete the PR, select the line(s) you wish to delete and then click on the dustbin (Thrash) icon.
    3 - Try with LSMW

  • Code To Update the Table in ECC from Webdynpro

    Hi All,
    I want to know, the table is dispalyed in the webdynpro browser when we calls the Adaptive RFC Model.
    after i want to add one more row in the webdynpro and just clicking on add button the row will be updated in the ECC server(backend) for that how can i write the coding,  regarding this issue can you please help me.
    ThanX All,

    Hi Sriram,
              Assuming you have a table filled with records by adding one by one, If you want to update a table in SAP ECC, follow these steps..   i think already you are triggering the action for the button in view(for table updation) to method in controller or created a custom controller and mapped the model node.
    1.  Initialize the main model node and bind the model node with the intialised object like
         Zbapi_MainModelNode_Input input = new Zbapi_MainModelNode_Input();
                           wdContext.nodeZbapi_MainModelNode_Input ().bind(input);     
    2.  Now loop the table node and set the values with corresponding class in the generated model (from webdynpro explorer) and initialize like
            IPrivateControllerName.ITableElement myTab = null;     
           for ( int i = 0; i < wdContext.nodeTable().size();i++)
                         myTab = this.wdContext.nodeTable().getTableElementAt(i);
         Bapi_structname name = new Bapi_structname();     
                        name.setFieldName1(myTab.getFieldName1);
                        name.setFieldName2(myTab.getFieldName2);
                        input.addT_Bapi_(name);
    Finally execute the BAPI..
       wdContext.currentZbapi_MainModelNode_Input tElement().modelObject().execute();
    Hope this solves your issue - Update the Table in ECC from Webdynpro.
    Regards,
    Manjunath
    Edited by: Manjunath Subramani on Nov 20, 2009 4:26 PM
    Edited by: Manjunath Subramani on Nov 20, 2009 4:27 PM

  • For Update Query with Wait Clause from ORACLE Forms

    Hi
    We are using Oracle Forms 10g running with 10g database 10.2.0.1.0. We happend to see a query which is getting generated in AWR report like Select rowid, all_columns from TableName for Update of C1 Nowait. But no such query is really written in forms and we are aware that, Any query prefixed with rowid is definitely executing from Forms. But how the ForUpdate and Nowait clause is appended to the query.
    We have checked the following properties in the database Block
    *1) Locking Mode is set to Automatic*
    *2) Update Changed Columns only is set to YES*
    *3) Query all records is set to No (Though this particular property may not be relevant to the issue)*
    What is the property or setting which might trigger such a query from ORACLE Forms with ForUpdate and Nowait clause.
    Any ideas/suggestions on why such behaviour. Please have a healthy discussion on this. Thanks in advance.

    Why have you started another thread on the same thing?
    FOR UPDATE cursor is causing Blocking/ Dead Locking issues
    Just use one thread to avoid confusion.
    The fact that nobody has answered on the other thread for a couple of days could be to do with it being the weekend and most people are not at work.
    Either be patient or, if it's more "urgent" than that, raise a SR/Tar with Oracle metalink.

  • Code for displaying the word doc file from servlet as response.

    Hi can any provide me code for displaying the word document form servlet as response.
    here i have file from file it should ale to read them and display it.
    i have written code but the proble here is in displaying.it ios as not showing as word.can any one help me here
    vijay

    Are we talking of HTTP?
    If yes, you'll need to provide an appropriate content-type and use the binary output stream.
    IE does not trust the content-type header but relies upon the file name, so set it too.
    response.setHeader( "Content-Disposition", "attachment; filename=" etc. Edited by: BIJ001 on Oct 22, 2007 10:10 AM

  • Example code for Trigering a workflow using WAPI from JAVA based tool

    Hi Experts,
    I am the newest guy in SAP workFlow and BAPI world. I need to trigger a workflow defined in WebFlow engine from a Java client. I know i can use JCo and to use WAPI to get workflow information but i am not sure how it works. Can you give me some example code to trigger one workflow defined in WebFlow using WAPI? If there is any alternative i am interested to know that as well.
    Thanks in advance.
    Regards,
    Riyadh

    Use Function Module SWE_EVENT_CReate top trigger event that is linked with a Workflow.
    <b>Please reward points if useful</b>
    INCLUDE <cntn01> .
      DATA:i_emp_details TYPE STANDARD TABLE OF p0001,  "Employee Details
           wa_request    TYPE p0001,                    "Workarea for Employee details
           v_country_grp TYPE molga,                    "Country SubGrouping
           v_object_key  TYPE sweinstcou-objkey.        "Key for the buisness object ZWOBUSTRIP
      CONSTANTS: c_bo_trip     TYPE swo_objtyp VALUE 'ZWOBUSTRIP',
                 c_event_trip  TYPE swo_event  VALUE 'TripCreate',
                 c_infy_type_1 TYPE infty      VALUE '0001'.
    Event Container declaration
      swc_container i_event_cont.
      swc_create_container i_event_cont.
    Reading the INFO TYPE 0001 to obtain the
    Employee details
      CALL FUNCTION 'HR_READ_INFOTYPE'
        EXPORTING
          pernr           = i_emp_number
          infty           = c_infy_type_1
          begda           = sy-datum
          endda           = sy-datum
        TABLES
          infty_tab       = i_emp_details
        EXCEPTIONS
          infty_not_found = 1
          OTHERS          = 2.
    SY-SUBRC check is not required as the error
    handelling will be done by WorkFlow rule
    resolution.
      CLEAR wa_request.
      READ TABLE i_emp_details INTO wa_request INDEX 1.
      IF sy-subrc = 0.
      Retrieving the Country SubGrouping for the employee
        SELECT SINGLE molga
          FROM t001p
          INTO v_country_grp
         WHERE werks = wa_request-werks
           AND btrtl = wa_request-persk.
      ENDIF.
    Sending the relevant data to event container
      swc_set_element i_event_cont 'EmpId'     i_emp_number.
      IF sy-subrc <> 0.
    No Processing needed.
      ENDIF.
      swc_set_element i_event_cont 'PersonnelArea'    wa_request-werks.
      IF sy-subrc <> 0.
    No Processing needed.
      ENDIF.
      swc_set_element i_event_cont 'CountryGrouping' v_country_grp.
      IF sy-subrc <> 0.
    No Processing needed.
      ENDIF.
      swc_set_element i_event_cont 'EmpSubGrp'       wa_request-persk.
      IF sy-subrc <> 0.
    No Processing needed.
      ENDIF.
      swc_set_element i_event_cont 'EmpTripId'       i_emp_trip.
      IF sy-subrc <> 0.
    No Processing needed.
      ENDIF.
    Raising the event to trigger the workflow
      v_object_key = i_emp_number.
      CALL FUNCTION 'SWE_EVENT_CREATE'
        EXPORTING
          objtype           = c_bo_trip
          objkey            = v_object_key
          event             = c_event_trip
        TABLES
          event_container   = i_event_cont
        EXCEPTIONS
          objtype_not_found = 1
          OTHERS            = 2.
      IF sy-subrc <> 0.
    No Processing needed.
      ENDIF.
      COMMIT WORK.
    ENDFUNCTION.
    Thanks
    Arghadip

  • Need BAPI/RFC for Updating Category field of CRM_DNO_MONITOR  from SAP R/3.

    Hi SAP GURUS!!
    I need to have a new field category in "Create support message"  of the HELP menu in SAP server. This field values needs tobe updated with that of Category in Solution Manager ( CRM_DNO_MONITOR) .We have found a BADI (SBCOS001 ) where we designed the screen for having the new field. FOr updating the value of this field to sol man, is there any bapi or rfc ..
    Thanks in Advance,
    gopa.

    Hi
    Please check the following points.
    1. Please check the settings that you maintained in the table CRMSUBTAB in ECC. You need to have an entry as follows:
    User: CRM
    Object: VENDOR_MAIN
    U/D : DOWNLOAD
    Object Class: VEND ( & not BUPA for this entry)
    Function Module: PI_BP_VENDOR_MAIN_EXTRACT
    The other entry (for upload) has similar but different values. (Refer to the OSS note 883162.)
    2. Check if you have applied any filter settings in CRM for the adapter object VENDOR_MAIN.
    Regards,
    Srini.

  • Create , Update, Delete item columns missing from Personalization Structure

    Suddenly, I don’t see create, update, delete columns. I can see my customized items, but not able to do anything with it as these three columns are not displayed.

    Hi All
    We are also getting the same problem.In few of the pages we are not getting create,update,delete columns...
    Pls help on this !!
    Regards
    Naveen

  • Error code U44M1U5 for updating PSE and Premiere Elements from 12.0 to 12.1

    Why not just give a hint in plain language rather than an error code and no listing?

    See this help document:
    http://helpx.adobe.com/photoshop-elements/kb/elements-12-1-update-error.html

  • Product code for Update on N73

    I have several issues with the N73 OS example cant delete emails and frequent crashes I checked with the update software and read this board so I hope some one can advice me of a updater to fix this small but annoying issues.
    Product Code 0539691
    N73

    If your problems are so severe you should either get over to an NSP and do the update tyhere (You'll get V2.0628.0.0.3 at first and there's a huge chance that you can then update to v3.0368.0.0.1 from there) or just go over to your reseller and claim warranty. I have never yet had any of the problems you pointed out. Just today, I couldn't get my phone out of the Offline mode (first time since I've had it) and had to reset it using *#7370#, which means I had to restore a back-up for it... But because I knew this was to happen just CREATED a backup first, so that no data would be lost at all. However, if such a thing happens again I might go and claim warranty as well...
    V3.0704.1.0.1
    19-01-2007
    RM-133 Nokia N73(57.01) Product Code:0539338

  • Software update deleted close to EVRYTHING from phone?

    I installed the recent update on Sunday, and when my phone rebooted i noticed my lock screen was different. Upon unlocking my phone i saw that all of my screens were blank - no clock, no widgets, no apps...nothing. I immediately go to my messages inbox and see the same...nothing. Close to panic mode, i check my contacts...nothing. I ran the backup assistant to retrieve contacts, but even then not all came through for me. I had several VERY important "locked" messages that were also deleted and cannot be restored. Even my saved voicemails are gone. The even stranger part is that the majority of my downloaded aps. survived, but have been acting funny ever since. All of my settings are gone too, and I am having to start at square one for just about everything!
    I know that this info is gone and never coming back, but what caused this to happen? Im fearful of relying on my phone to do what it is SUPPOSED to do in case this happens again. Several hours have been wasted already trying to gather the info needed from my messages & voicemails from people, i can not afford to keep a phone that doesnt work the way it was promised and the reason why i purchased in the first place, nor can i sit around crossing my fingers that this doesnt happen again. Any ideas or input to how this happened and how I can prevent it from happening again?

    I also recently lost ALL my contacts and ALL of my messages!!!  I have ran back up assistant numerous time and it downloaded only half of the T's, V's, W's and Z contacts I had.  I go to the Backup Assistant website and it show I have 329 contacts and that they all have been synced to my phone.  I spent 25 minutes on the phone with Tech support only for him to put me on hold ALOT and tell me he has no idea what to do to fix it!!!  I am so frustrated!!!!!!  Any and ALL help will be tried and appreciated!!!  Soon.......

Maybe you are looking for