Passing table to the RFC from BSP!

Dear friends,
I am trying to call a RFC (on 4.6c) from a BSP page( on a 6.20 System). i am trying to pass a table from the BSP to the RFC and get the result back. This is not working as expected.
The Function module  at R3 (4.6c) which takes a table as an input and gives string as an output.
The code is for Function module is given below.
<b>FUNCTION ZBHAVIN1.
""Local interface:
*"  EXPORTING
*"     VALUE(TEMP) TYPE  STRING
*"     VALUE(TEMP1) TYPE  STRING
*"  TABLES
*"      ITAB STRUCTURE  ZITAB
TEMP  = ITAB-MESSAGE.
TEMP1 = ITAB-MESSAGE1.
ENDFUNCTION.</b>
To call this function module the code for the bsp page (created on a 6.20 System) is :
<b>
<%@page language="abap"%>
<% TYPE-POOLS ZBSP1. %>
<html>
  <head>
    <link rel="stylesheet" href="../../sap/public/bc/bsp/styles/sapbsp.css">
    <title> Display Page </title>
  </head>
  <body class="bspBody1">
    <%
    DATA TEMP2  TYPE STRING.
    DATA TEMP3 TYPE STRING.
    DATA ITAB1 TYPE TABLE OF ZBSP1_ITAB11.
    DATA WA LIKE LINE OF ITAB1.   
    WA-MESSAGE  = 'THIS IS FIRST ELEMENT'.
    WA-MESSAGE1 = 'THIS IS SECOND ELEMENT'.
    APPEND WA TO ITAB1.
    CALL FUNCTION 'ZBHAVIN1'
         DESTINATION 'TCLCLNT200'
           IMPORTING
              TEMP  = TEMP2
              TEMP1 = TEMP3
           TABLES
              ITAB  = ITAB1
           EXCEPTIONS
             OTHERS = 1.
    %>
    <P><%=  TEMP2  %>
    <P><%=  TEMP3 %>
  </body>
</html></b>
This code is not working for me as it is.
If i remove the comments, then it works, which means that the table passed from the BSP has no Header Line.
So , do i need to always chnage my Receving RFC to take care of this issue? or is there a way to pass the Tabkle with Header line to the RFC from BSP?

You'll have to define a table type either in the Types tab of the BSP application or as a Dictionary object.
Then you can define a page attribute for the table and call the code from your OnCreate event handler (just to clean up your page layout)
You have to remember that you are working with the whole OO context and so working with the tables inside the BSP are quite different.
Have a look at this article for some examples: https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/unkown/exploring bsp development and the miniwas.htm

Similar Messages

  • Problem with passing table values to RFC

    Hi all,
    I am passing values in table in RFC. There are no import/export parameters in RFC. We are passing only tables.
    There are two tables in the RFC I_Dept and I_Subdept. Initially RFC is executed for getting the Dept which works fine as for this there is no need to set in input table value. But to get sub department I need to set the dept in I_Dept and after executing RFC I should get values in table I_Subdept. The code is as below:
    wdContext.nodeOutput_I_Dept().invalidate();
    wdContext.nodeOutput_I_Subdept().invalidate();
    Z_Bapi_Dept_Values_Input d_Input = new Z_Bapi_Dept_Values_Input();
    wdContext.nodeZ_Bapi_Dept_Values_Input().bind(d_Input);
    Zdept dept = new Zdept();
    dept.setZname("Sales");
    d_Input.addI_Dept(dept);
    try
    wdContext.nodeZ_Bapi_Dept_Values_Input().currentZ_Bapi_Dept_Values_InputElement().modelObject().execute();
    wdContext.nodeZ_Bapi_Dept_Values_Input().nodeOutput().invalidate();
    catch (WDDynamicRFCExecuteException e)
    msgManager.reportException(e.toString(), true);
    Is anything wrong in this code because even after executing the RFC the size of node I_Subdept() is zero. But the RFC works fine in the backend.
    Regards,
    Jaydeep

    A typical misunderstanding when populating structured input data  
    via code is the following:                                              
    - You have bound a WD context node hierarchy to the model say
      N1         >         M1
      ->N2       >         ->M2
                                                                                    where N1, N2 are WD Context nodes (N2 is child of N1) and M1, M2 are   
    model classes bound to the context nodes. Important: M1 has a relation 
    to M2 on the model side, means there is some method M1.setMyM2(M2)   
    (assuming the target role of the relation is called "MyM2").           
    - You create context elements for N1 and N2 which are bound to a model  
    class instances of M1 and M2 respectively.                                                                               
    Assuming that M1 is the "executable" model class (*_Input) and M2       
    represents an input structure needed, the M2-input will - using the     
    above approach - not be available on execution. Why? The relation on the
    model side (MyM2) is not available if just maintaining it via the     
    context, i.e. context and model are not "in sync". As RFC execution is  
    done via the model the M2 input will not be available.                  
    You best create complex/nested input structures on the model            
    side and then bind the top-level model object to the resp context node. 
    In the above sample this would be:                                      
    M1 m1ModelObject = new M1();                                            
    M2 m2ModelObject = new M2();                                            
    m1ModelObject.setMyM2(m2ModelObject);
    Hope it helps!
    Regards,
    Sangeeta

  • Populate a table reading the data from a TXT file

    how can I populate a table reading the data from a TXT file?
    thanks

    Hey Kevin!
    Using FORMS.TEXT_IO to bulk load data from a file strikes me as re-inventing the wheel. It is just about justifiable in a self-service environment, but I regard the EXTERNAL TABLE is a better solution for that situation as well.
    The same applies to UTL_FILE. I think the ability to read text with UTL_FILE is primarily intended for read file-based configuration or file manipulation/processing rather than data loading.
    Re-writing a text file into SQL statements is too much like hard work (even with an editor that supports macro definition and regular expressions) for no real benefit. You lose all the bulk load peformance you would get from SQL*Loader. But for QAD I'd probably let you off with it.
    You missed out one obvious alternative: using Java to turn the contents of an XML file into a CLOB and inserting it into a table which is read by a PL/SQL procedure that parses the XML records and insert the retrieved data into a table.
    Stay lucky, APC

  • How to call the RFC from R/3 to SRM, when we use webdynpro abap? (Urgent)

    Hello
    We use SRM Server 5.5 with classic scenario.
    We want to call RFC in R/3 from webdynpro ABAP.
    How can we do that?
    We are developing the web report using webdynpro abap.
    So we need some of R/3 data such like PR(EBAN)and PO(EKKO,EKPO).
    When user choose the search parameter, report diplay the Shopping cart, PR and PO data on webdynpro.  So we call the R/3 RFC to display the PR, PO data.
    But I tired to call the RFC in R/3, We could not call it.
    How to call the RFC from R/3 to SRM, when we use webdynpro abap?
    Thank you,
    Best Regards,
    SH.

    Hi
    <b>Please look at the following threads as well -></b>
    WebDynpro in SRM
    BAPI's /RFC's in SRM
    BAPI to Change Shopping Cart by RFC
    SRM60 and webdynpro
    Webdynpro Services Exception
    WebDynpro using BAPI has an error
    SRM60 and webdynpro...
    <b>SAP uses META Function modules in SRM to get data from R/3 back-end.</b>
    <u>For getting Purchase requistion data, use the function modules -></u>
    META_REQUISITION_CHANGE        Change purchase requisition              
    META_REQUISITION_CREATE        Create Requisition                       
    META_REQUISITION_DELETE        Delete/close purchase requisition        
    META_REQUISITION_GETDETAIL     Display requisition details              
    META_REQUISITION_GETITEMS      Display requisition items                
    META_REQUISITION_GETRELINFO    Get Releasease Info for requisitions
    <u>For getting Purchase order data, use the function modules -></u>
    META_PO_CREATE                 Create purchase order                    
    META_PO_DELETE                 Delete reservation                       
    META_PO_GETDETAIL              Display purchase order details           
    META_PO_GETITEMS               Display purchase order items             
    META_PO_GETRELINFO             Display purchase order release information
    Hope this will definitely help. Do let me know.
    Regards
    - Atul

  • When target DB is down in which table is the data from source is stored, also where are the error messages stored in ODI

    When target DB is down in which table is the data from source is stored, also where are the error messages stored in ODI( I am not getting any error message in E$_TARGET_ANI_TEST).
    When i am running the interface i am getting the below error against the errored step
    "ORA-01045: user ABC lacks CREATE SESSION privilege; logon denied."
    Only E$_TARGET_ANI_TEST  is created with no data. No such tables like C$_0TARGET_ANI_TEST, I$_TARGET_ANI_TEST are created and also data is not inserted in the target table TARGET_ANI_TEST.

    Hi,
    I have checked that only E$ table is created. C$ and I$ table are not created ( I have selected my target schema as the part for the staging table).
    All the parameters for dropping the tables are selected as "<default>:false".
    I am importing the following KMs with the following parameters:
    1) CKM Oracle
    DROP_ERROR_TABLE
    :false
    DROP_CHECK_TABLE
    :false
    CREATE_ERROR_INDEX
    :true
    COMPATIBLE
    :9
    VALIDATE
    :false
    ENABLE_EDITION_SUPPORT
    :false
    UPGRADE_ERROR_TABLE
    :false
    2) LKM SQL to SQL
    DELETE_TEMPORARY_OBJECTS
    :true
    3) IKM SQL Incremental Update
    INSERT
    :true
    UPDATE
    :true
    COMMIT
    :true
    SYNC_JRN_DELETE
    :true
    FLOW_CONTROL
    :true
    RECYCLE_ERRORS
    :false
    STATIC_CONTROL
    :false
    TRUNCATE
    :false
    DELETE_ALL
    :false
    CREATE_TARG_TABLE
    :false
    DELETE_TEMPORARY_OBJECTS
    :true 

  • Is it possible to pass TABLE as the output parameter in stored procedure

    Hey Experts,
      Is it possible to pass TABLE as the output parameter in stored procedure.
    eg
    create procedure spGetData
    @tableName as TABLE(intValue INT NOT NUL)
    as 

    You can use OPENQUERY or OPENROWSET, as mentioned above, to make stored procedure results table like. There are
    some limitations with these methods:
    http://technet.microsoft.com/en-us/library/ms188427.aspx
    In OPENQUERY this-sql-server-instance can be used instead of a linked server name. It requires setting data accces server option:
    exec sp_serveroption @server = 'PRODSVR\SQL2012'
    ,@optname = 'DATA ACCESS'
    ,@optvalue = 'TRUE'
    LINK: http://www.sqlusa.com/bestpractices/select-into/
    Kalman Toth Database & OLAP Architect
    SELECT Video Tutorials 4 Hours
    New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012

  • Passing an Internal Table to an RFC from Adobe Designer

    Hi All,
    I am using Adobe Designer to create interactive Adobe Forms. Now I am using an RFC/WebService which expects an Internal Table in import parameter.
    In my form designer I am getting this as only one field.
    So when I insert values in this from my form it updates only the entered in the last textbox all other values entered are lost.
    Any ideas how this can be done????
    Thanks...
    Sameer

    Hi Sameer,
              While you are mapping the input parameter mapped it to the value node or context node of the view.When you go to the adobe form you can see the mapping as a table itself instead of a field.Then use sub form inside adobe form UI layout to display it in the .pdf format in the adobe interactive form.
              If you see the mapping as a single field when a table is reqd then it implies mapping while creating the Model is not done correctly.So re import the model and do the mapping from the begining accordingly.
              If you want refer my tutorial on Adobe form in SDN
               https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/integration of invoice details in adobe interactive forms.pdf
    Hope these info help you.
    Regards,
    Guru

  • Unable to call the RFC from the WD java Program

    Hi All,
    I have a table and three buttons Create, Edit, Save in the layout.
    If no record available in the R3 the the end user will click on create and then he will click on save so that the insert RFC will be called accordingly and the record will be inserted.My table is limited to 5 records only. If  i enter all the 5 records and Click on submit the record is inserting in the backend , but if i enter less than 5 records im unable to call the RFC what might be the issue. 
    My insert RFC takes one Table node and 4 import parameters i'm passing all of the all the mentioned import parameters.
    Code:-
    View Controller code
    // This file has been generated partially by the Web Dynpro Code Generator.
    // MODIFY CODE ONLY IN SECTIONS ENCLOSED BY @@begin AND @@end.
    // ALL OTHER CHANGES WILL BE LOST IF THE FILE IS REGENERATED.
    package com.gmr.ess;
    // IMPORTANT NOTE:
    // ALL IMPORT STATEMENTS MUST BE PLACED IN THE FOLLOWING SECTION ENCLOSED
    // BY @@begin imports AND @@end. FURTHERMORE, THIS SECTION MUST ALWAYS CONTAIN
    // AT LEAST ONE IMPORT STATEMENT (E.G. THAT FOR IPrivateAPPView).
    // OTHERWISE, USING THE ECLIPSE FUNCTION "Organize Imports" FOLLOWED BY
    // A WEB DYNPRO CODE GENERATION (E.G. PROJECT BUILD) WILL RESULT IN THE LOSS
    // OF IMPORT STATEMENTS.
    //@@begin imports
    import java.math.BigDecimal;
    import java.util.Date;
    import java.text.DateFormat;
    import java.text.ParseException;
    import java.text.SimpleDateFormat;
    import java.util.ArrayList;
    import java.util.Calendar;
    import java.util.Collection;
    import java.util.Iterator;
    import com.gmr.ess.wdp.IPrivateAPPView;
    import com.gmr.pck.Zst_Hr_Nominee;
    import com.sap.tc.webdynpro.progmodel.api.IWDMessageManager;
    import com.sap.tc.webdynpro.services.sal.um.api.IWDClientUser;
    import com.sap.tc.webdynpro.services.sal.um.api.WDClientUser;
    //@@end
    //@@begin documentation
    //@@end
    public class APPView
    Logging location.
      private static final com.sap.tc.logging.Location logger =
        com.sap.tc.logging.Location.getLocation(APPView.class);
      static
        //@@begin id
        String id = "$Id$";
        //@@end
        com.sap.tc.logging.Location.getLocation("ID.com.sap.tc.webdynpro").infoT(id);
    Private access to the generated Web Dynpro counterpart
    for this controller class.  </p>
    Use <code>wdThis</code> to gain typed access to the context,
    to trigger navigation via outbound plugs, to get and enable/disable
    actions, fire declared events, and access used controllers and/or
    component usages.
    @see com.gmr.ess.wdp.IPrivateAPPView for more details
      private final IPrivateAPPView wdThis;
    Root node of this controller's context. </p>
    Provides typed access not only to the elements of the root node
    but also to all nodes in the context (methods node<i>XYZ</i>())
    and their currently selected element (methods current<i>XYZ</i>Element()).
    It also facilitates the creation of new elements for all nodes
    (methods create<i>XYZ</i>Element()). </p>
    @see com.gmr.ess.wdp.IPrivateAPPView.IContextNode for more details.
      private final IPrivateAPPView.IContextNode wdContext;
    A shortcut for <code>wdThis.wdGetAPI()</code>. </p>
    Represents the generic API of the generic Web Dynpro counterpart
    for this controller. </p>
      private final com.sap.tc.webdynpro.progmodel.api.IWDViewController wdControllerAPI;
    A shortcut for <code>wdThis.wdGetAPI().getComponent()</code>. </p>
    Represents the generic API of the Web Dynpro component this controller
    belongs to. Can be used to access the message manager, the window manager,
    to add/remove event handlers and so on. </p>
      private final com.sap.tc.webdynpro.progmodel.api.IWDComponent wdComponentAPI;
      public APPView(IPrivateAPPView wdThis)
        this.wdThis = wdThis;
        this.wdContext = wdThis.wdGetContext();
        this.wdControllerAPI = wdThis.wdGetAPI();
        this.wdComponentAPI = wdThis.wdGetAPI().getComponent();
      //@@begin javadoc:wdDoInit()
      /** Hook method called to initialize controller. */
      //@@end
      public void wdDoInit()
        //@@begin wdDoInit()
        try{
              IWDMessageManager manager1 = wdComponentAPI.getMessageManager();
              IWDClientUser user = WDClientUser.getLoggedInClientUser();
              String logUser= user.getSAPUser().getUniqueName();
              wdContext.currentContextElement().setUserid(logUser);
              wdThis.wdGetAPPController().executeBapi_Employee_Getdata_Input();//Returns the user id for the employee
              Collection nomineeList = new ArrayList();
              wdThis.wdGetAPPController(). executeZ_Hrfm_Nominee_Disp_Input( );          
              int nomineeTableSize = wdContext.nodeZ_Hrfm_Nominee_Disp_Input().nodeOutput_Nominee().nodeNominee().size();
              for(int i=0;i< nomineeTableSize;i++){          
                IPrivateAPPView.IDisplay_table_nodeElement ele = wdContext.nodeDisplay_table_node().createDisplay_table_nodeElement();
                ele.setAddr(wdContext.nodeZ_Hrfm_Nominee_Disp_Input().nodeOutput_Nominee().nodeNominee().getNomineeElementAt(i).getAddr());
                ele.setDob(wdContext.nodeZ_Hrfm_Nominee_Disp_Input().nodeOutput_Nominee().nodeNominee().getNomineeElementAt(i).getDob());
                ele.setGuard(wdContext.nodeZ_Hrfm_Nominee_Disp_Input().nodeOutput_Nominee().nodeNominee().getNomineeElementAt(i).getGuard());
                ele.setName(wdContext.nodeZ_Hrfm_Nominee_Disp_Input().nodeOutput_Nominee().nodeNominee().getNomineeElementAt(i).getName());
                ele.setPerc(wdContext.nodeZ_Hrfm_Nominee_Disp_Input().nodeOutput_Nominee().nodeNominee().getNomineeElementAt(i).getPerc());
                ele.setRelat(wdContext.nodeZ_Hrfm_Nominee_Disp_Input().nodeOutput_Nominee().nodeNominee().getNomineeElementAt(i).getRelat());
                nomineeList.add(ele);
              wdContext.nodeDisplay_table_node().bind(nomineeList);
              wdContext.currentContextElement().setEdit_val_attr(true);
              if(nomineeTableSize<=0){
                   wdContext.currentContextElement().setCreateButtonEnable(true);
                   wdContext.currentContextElement().setEditButtonEnable(false);
              else{
                   wdContext.currentContextElement().setCreateButtonEnable(false);
                   wdContext.currentContextElement().setEditButtonEnable(true);
        catch(Exception e){
              wdComponentAPI.getMessageManager().reportException("",true);
        //@@end
      //@@begin javadoc:wdDoExit()
      /** Hook method called to clean up controller. */
      //@@end
      public void wdDoExit()
        //@@begin wdDoExit()
        //@@end
      //@@begin javadoc:wdDoModifyView
    Hook method called to modify a view just before rendering.
    This method conceptually belongs to the view itself, not to the
    controller (cf. MVC pattern).
    It is made static to discourage a way of programming that
    routinely stores references to UI elements in instance fields
    for access by the view controller's event handlers, and so on.
    The Web Dynpro programming model recommends that UI elements can
    only be accessed by code executed within the call to this hook method.
    @param wdThis Generated private interface of the view's controller, as
           provided by Web Dynpro. Provides access to the view controller's
           outgoing controller usages, etc.
    @param wdContext Generated interface of the view's context, as provided
           by Web Dynpro. Provides access to the view's data.
    @param view The view's generic API, as provided by Web Dynpro.
           Provides access to UI elements.
    @param firstTime Indicates whether the hook is called for the first time
           during the lifetime of the view.
      //@@end
      public static void wdDoModifyView(IPrivateAPPView wdThis, IPrivateAPPView.IContextNode wdContext, com.sap.tc.webdynpro.progmodel.api.IWDView view, boolean firstTime)
        //@@begin wdDoModifyView
        //@@end
      //@@begin javadoc:onActionGetData(ServerEvent)
      /** Declared validating event handler. */
      //@@end
      public void onActionGetData(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
        //@@begin onActionGetData(ServerEvent)
        //$$begin ActionButton(-535519310)
        //wdThis.wdGetAPPController().executeZ_Hrfm_Nominee_Disp_Input();
        //$$end
        //@@end
      //@@begin javadoc:onActionEdit(ServerEvent)
      /** Declared validating event handler. */
      //@@end
      public void onActionEdit(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
        //@@begin onActionEdit(ServerEvent)
       //$$begin ActionButton(-535519310)
       displayTablesize=wdContext.nodeDisplay_table_node().size(); 
       if(displayTablesize<5){
         for(int i=0;i<size-displayTablesize;i++){           
              IPrivateAPPView.IDisplay_table_nodeElement ele = wdContext.nodeDisplay_table_node().createDisplay_table_nodeElement();
              wdContext. nodeDisplay_table_node().addElement(ele);               
       operation="MOD"; 
       wdContext.currentContextElement().setTableReadOnly(true);
       wdContext.currentZ_Hrfm_Nominee_Ins_Mod_InputElement().setOperation(operation);                                 
        //$$end
        //@@end
      //@@begin javadoc:onActionCreate(ServerEvent)
      /** Declared validating event handler. */
      //@@end
      public void onActionCreate(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
        //@@begin onActionCreate(ServerEvent)
         int month=0,year=0,day=0;
         String month1,day1,year1;   
         try{
              displayTablesize=wdContext.nodeDisplay_table_node().size();
              wdContext.currentContextElement().setEdit_val_attr(false);
              if(wdContext.nodeDisplay_table_node().isEmpty()){                    
                   if(displayTablesize<5){
                        Calendar cal=Calendar.getInstance();
                        month=cal.get(Calendar.MONTH)+1;
                        if(month==1||month==2||month==3||month==4||month==5||month==6||month==7||month==8||month==9){
                             month1="0"+month;
                        else{
                             month1=""+month;                                   
                        day = cal.get(Calendar.DAY_OF_MONTH);
                             if(day==1||day==2||day==3||day==4||day==5||day==6||day==7||day==8||day==9){
                             day1=  "0"+day;
                        else{
                             day1=""+day;
                        year = cal.get(Calendar.YEAR);
                        year1=""+year;
                        String strFormat=day1"."month1"."year1;                    
                        wdContext.currentOutput_NomineeElement().setBegda(strFormat);
                        wdContext.currentOutput_NomineeElement().setEndda("31.12.9999");                         
                        for(int i=0;i<size-displayTablesize;i++){           
                             IPrivateAPPView.IDisplay_table_nodeElement ele = wdContext.nodeDisplay_table_node().createDisplay_table_nodeElement();
                             wdContext. nodeDisplay_table_node().addElement(ele);               
                   operation="INS";
                   wdContext.currentZ_Hrfm_Nominee_Ins_Mod_InputElement().setOperation(operation);                    
              wdContext.currentContextElement().setTableReadOnly(true);          
         catch(NullPointerException npe){
              wdComponentAPI.getMessageManager().reportException("No Data Available",true);
        //@@end
      //@@begin javadoc:onActionSaveData(ServerEvent)
      /** Declared validating event handler. */
      //@@end
      public void onActionSaveData(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
        //@@begin onActionSaveData(ServerEvent)
         float percentage=0;
         float dupePercentage=0;
         boolean isTest = false;
         Collection DispTList =      new ArrayList();
         IWDMessageManager manager1 = wdComponentAPI.getMessageManager();
         try{
              displayTablesize = wdContext.nodeDisplay_table_node().size();
              //for(int     i=1;i<=displayTablesize;i++){
              for(int     i=0;i<displayTablesize;i++){
                   BigDecimal share = wdContext.nodeDisplay_table_node().getDisplay_table_nodeElementAt(i).getPerc();
                   String name =  wdContext.nodeDisplay_table_node().getDisplay_table_nodeElementAt(i).getName();
                   percentage = share.floatValue();
                   dupePercentage = dupePercentage + percentage;
                   if(name!=null && share!=null){                    
                        Zst_Hr_Nominee nominee = new Zst_Hr_Nominee();
                        nominee.setAddr(wdContext.nodeDisplay_table_node().getDisplay_table_nodeElementAt(i).getAddr());
                       manager1.reportSuccess(wdContext.nodeDisplay_table_node().getDisplay_table_nodeElementAt(i).getAddr());               
                        nominee.setDob(wdContext.nodeDisplay_table_node().getDisplay_table_nodeElementAt(i).getDob());     
                        manager1.reportSuccess(""+wdContext.nodeDisplay_table_node().getDisplay_table_nodeElementAt(i).getDob());               
                        nominee.setGuard(wdContext.nodeDisplay_table_node().getDisplay_table_nodeElementAt(i).getGuard());     
                       manager1.reportSuccess(""+wdContext.nodeDisplay_table_node().getDisplay_table_nodeElementAt(i).getGuard());               
                        nominee.setName(wdContext.nodeDisplay_table_node().getDisplay_table_nodeElementAt(i).getName());
                       manager1.reportSuccess(""+wdContext.nodeDisplay_table_node().getDisplay_table_nodeElementAt(i).getName());                    
                        nominee.setPerc(wdContext.nodeDisplay_table_node().getDisplay_table_nodeElementAt(i).getPerc());
                       manager1.reportSuccess(""+wdContext.nodeDisplay_table_node().getDisplay_table_nodeElementAt(i).getPerc());
                        nominee.setRelat(wdContext.nodeDisplay_table_node().getDisplay_table_nodeElementAt(i).getRelat());     
                       manager1.reportSuccess(""+wdContext.nodeDisplay_table_node().getDisplay_table_nodeElementAt(i).getRelat());               
                        DispTList.add(nominee);     
                   wdContext.nodeZ_Hrfm_Nominee_Ins_Mod_Input().nodeNominee_ins().bind(DispTList);
              if((dupePercentage)!=100)
              wdComponentAPI.getMessageManager().reportException(
                        "The sum of the share Percentages is not 100. Modify the percentages accordingly",true);
              wdContext.nodeZ_Hrfm_Nominee_Ins_Mod_Input().nodeNominee_ins().bind(DispTList);
              IWDMessageManager manager = wdComponentAPI.getMessageManager();
              String beginDate = wdContext.currentOutput_NomineeElement().getBegda();
              manager.reportSuccess(wdContext.currentOutput_NomineeElement().getBegda());
              String endDate=wdContext.currentOutput_NomineeElement().getEndda();
              manager.reportSuccess(wdContext.currentOutput_NomineeElement().getEndda());
              wdContext.currentZ_Hrfm_Nominee_Ins_Mod_InputElement().setBegda(beginDate);
              wdContext.currentZ_Hrfm_Nominee_Ins_Mod_InputElement().setEndda(endDate);          
              wdContext.currentZ_Hrfm_Nominee_Ins_Mod_InputElement().setOperation(operation);
              wdComponentAPI.getMessageManager().reportSuccess(operation);     
              wdThis.wdGetAPPController().executeBapi_Employee_Getdata_Input();
              wdThis.wdGetAPPController().executeZ_Hrfm_Nominee_Ins_Mod_Input();           
              //wdContext.currentContextElement().setTableReadOnly(false);
         catch(Exception e){
              e.getMessage();
        //@@end
    The following code section can be used for any Java code that is
    not to be visible to other controllers/views or that contains constructs
    currently not supported directly by Web Dynpro (such as inner classes or
    member variables etc.). </p>
    Note: The content of this section is in no way managed/controlled
    by the Web Dynpro Designtime or the Web Dynpro Runtime.
      //@@begin others
      int nomineeTableSize = 0;
      int displayTablesize = 0;
      String operation= null;
      int size=5;
    // float dupePercentage=0;
      //String mod_op="MOD";
      //@@end
    content of obsolete user coding area(s) -
    //@@begin obsolete:javadoc:onActionSave(ServerEvent)
    //  /** Declared validating even
    Component controller code
    // This file has been generated partially by the Web Dynpro Code Generator.
    // MODIFY CODE ONLY IN SECTIONS ENCLOSED BY @@begin AND @@end.
    // ALL OTHER CHANGES WILL BE LOST IF THE FILE IS REGENERATED.
    package com.gmr.ess;
    // IMPORTANT NOTE:
    // ALL IMPORT STATEMENTS MUST BE PLACED IN THE FOLLOWING SECTION ENCLOSED
    // BY @@begin imports AND @@end. FURTHERMORE, THIS SECTION MUST ALWAYS CONTAIN
    // AT LEAST ONE IMPORT STATEMENT (E.G. THAT FOR IPrivateAPP).
    // OTHERWISE, USING THE ECLIPSE FUNCTION "Organize Imports" FOLLOWED BY
    // A WEB DYNPRO CODE GENERATION (E.G. PROJECT BUILD) WILL RESULT IN THE LOSS
    // OF IMPORT STATEMENTS.
    //@@begin imports
    import java.util.Iterator;
    import com.gmr.ess.wdp.IPrivateAPP;
    import com.gmr.pck.Bapi_Employee_Getdata_Input;
    import com.gmr.pck.Bapip0002B;
    import com.gmr.pck.Z_Hrfm_Nominee_Disp_Input;
    import com.gmr.pck.Z_Hrfm_Nominee_Ins_Mod_Input;
    import com.gmr.pck.Zst_Hr_Nominee;
    import com.sap.lcr.api.util.SetProfileConnect;
    import com.sap.tc.webdynpro.modelimpl.dynamicrfc.WDDynamicRFCExecuteException;
    import com.sap.tc.webdynpro.progmodel.api.IWDMessageManager;
    //@@end
    //@@begin documentation
    //@@end
    public class APP
    Logging location.
      private static final com.sap.tc.logging.Location logger =
        com.sap.tc.logging.Location.getLocation(APP.class);
      static
        //@@begin id
        String id = "$Id$";
        //@@end
        com.sap.tc.logging.Location.getLocation("ID.com.sap.tc.webdynpro").infoT(id);
    Private access to the generated Web Dynpro counterpart
    for this controller class.  </p>
    Use <code>wdThis</code> to gain typed access to the context,
    to trigger navigation via outbound plugs, to get and enable/disable
    actions, fire declared events, and access used controllers and/or
    component usages.
    @see com.gmr.ess.wdp.IPrivateAPP for more details
      private final IPrivateAPP wdThis;
    Root node of this controller's context. </p>
    Provides typed access not only to the elements of the root node
    but also to all nodes in the context (methods node<i>XYZ</i>())
    and their currently selected element (methods current<i>XYZ</i>Element()).
    It also facilitates the creation of new elements for all nodes
    (methods create<i>XYZ</i>Element()). </p>
    @see com.gmr.ess.wdp.IPrivateAPP.IContextNode for more details.
      private final IPrivateAPP.IContextNode wdContext;
    A shortcut for <code>wdThis.wdGetAPI()</code>. </p>
    Represents the generic API of the generic Web Dynpro counterpart
    for this controller. </p>
      private final com.sap.tc.webdynpro.progmodel.api.IWDComponent wdControllerAPI;
    A shortcut for <code>wdThis.wdGetAPI().getComponent()</code>. </p>
    Represents the generic API of the Web Dynpro component this controller
    belongs to. Can be used to access the message manager, the window manager,
    to add/remove event handlers and so on. </p>
      private final com.sap.tc.webdynpro.progmodel.api.IWDComponent wdComponentAPI;
      public APP(IPrivateAPP wdThis)
        this.wdThis = wdThis;
        this.wdContext = wdThis.wdGetContext();
        this.wdControllerAPI = wdThis.wdGetAPI();
        this.wdComponentAPI = wdThis.wdGetAPI().getComponent();
      //@@begin javadoc:wdDoInit()
      /** Hook method called to initialize controller. */
      //@@end
      public void wdDoInit()
        //@@begin wdDoInit()
        //$$begin Service Controller(1490375209)
    //    wdContext.nodeZ_Hrfm_Nominee_Ins_Mod_Input().bind(new Z_Hrfm_Nominee_Ins_Mod_Input());
         Z_Hrfm_Nominee_Ins_Mod_Input input = new Z_Hrfm_Nominee_Ins_Mod_Input();
         input.addNominee(new Zst_Hr_Nominee());
         wdContext.nodeZ_Hrfm_Nominee_Ins_Mod_Input().bind(input);
        //$$end
        //$$begin Service Controller(-932523997)
        wdContext.nodeZ_Hrfm_Nominee_Disp_Input().bind(new Z_Hrfm_Nominee_Disp_Input());
        //$$end
        //$$begin Service Controller(-368783613)
        wdContext.nodeBapi_Employee_Getdata_Input().bind(new Bapi_Employee_Getdata_Input());
        //$$end
        //@@end
      //@@begin javadoc:wdDoExit()
      /** Hook method called to clean up controller. */
      //@@end
      public void wdDoExit()
        //@@begin wdDoExit()
        //@@end
      //@@begin javadoc:wdDoPostProcessing()
    Hook called to handle data retrieval errors before rendering.
    After doModifyView(), the Web Dynpro Framework gets all context data needed
    for rendering by validating the contexts (which in turn calls the supply
    functions and supplying relation roles). In this hook, the application
    should handle the errors which occurred during validation of the contexts.
    Using preorder depth-first traversal, this hook is called for all component
    controllers starting with the current root component.
    Permitted operations:
    - Flushing model queue
    - Creating messages
    - Reading context and model data
    Forbidden operations:
    - Invalidating model data
    - Manipulating the context
    - Firing outbound plugs
    - Creating components
    @param isCurrentRoot true if this is the root of the current request
      //@@end
      public void wdDoPostProcessing(boolean isCurrentRoot)
        //@@begin wdDoPostProcessing()
        //@@end
      //@@begin javadoc:wdDoBeforeNavigation()
    Hook before the navigation phase starts.
    This hook allows you to flush the model queue and handle any
    errors that occur. Firing outbound plugs is allowed in this hook.
    Using preorder depth-first traversal, this hook is called for all component
    controllers starting with the current root component.
    @param isCurrentRoot true if this is the root of the current request
      //@@end
      public void wdDoBeforeNavigation(boolean isCurrentRoot)
        //@@begin wdDoBeforeNavigation()
        //@@end
      //@@begin javadoc:wdDoApplicationStateChange()
    Hook that informs the application about a state change.
    <p>
    This hook is called e.g. to tell the application that will be
    <ul>
    <li>left via a suspend plug and therefore should go into a suspend/sleep
         mode with minimal need of resources. errors that occur. Firing
         outbound plugs is allowed in this hook.
    <li>left due to a timeout and could write it's state to a data base if the
         user comes back later on
    </ul>
    The concrete reason is available via IWDApplicationStateChangeInfo
    <p>
    <b>Important</b>: This hook is called for the top level component only!
    @param stateChangeInfo contains the information about the nature of the state change
    @param stateChangeReturn allows the application to ask for a different state change.
           The framework is allowed to ignore it considering i.e. the current resources situation.
      //@@end
      public void wdDoApplicationStateChange(com.sap.tc.webdynpro.progmodel.api.IWDApplicationStateChangeInfo stateChangeInfo, com.sap.tc.webdynpro.progmodel.api.IWDApplicationStateChangeReturn stateChangeReturn)
        //@@begin wdDoApplicationStateChange()
        //@@end
      //@@begin javadoc:executeBapi_Employee_Getdata_Input()
      /** Declared method. */
      //@@end
      public void executeBapi_Employee_Getdata_Input( )
        //@@begin executeBapi_Employee_Getdata_Input()
        //$$begin Service Controller(1705750894)
        IWDMessageManager manager = wdComponentAPI.getMessageManager();
         Iterator itrGetData = null;
                             Bapip0002B out = null;
        try
          wdContext.currentBapi_Employee_Getdata_InputElement().modelObject().execute();
          wdContext.nodeOutput().invalidate();
           itrGetData = wdContext.currentOutputElement().modelObject().getPersonal_Data().iterator();
           while (itrGetData.hasNext()) {
               out = (Bapip0002B) itrGetData.next();
          empNo = out.getPerno();
          wdContext.currentZ_Hrfm_Nominee_Disp_InputElement().setPernr(empNo);
         wdContext.currentZ_Hrfm_Nominee_Ins_Mod_InputElement().setPernr(empNo);
    //      manager.reportSuccess(empNo);
         //wdThis.executeZ_Hrfm_Nominee_Disp_Input();
        catch(WDDynamicRFCExecuteException e)
          manager.reportException(e.getMessage(), false);
        //$$end
        //@@end
      //@@begin javadoc:executeZ_Hrfm_Nominee_Disp_Input()
      /** Declared method. */
      //@@end
      public void executeZ_Hrfm_Nominee_Disp_Input( )
        //@@begin executeZ_Hrfm_Nominee_Disp_Input()
        //$$begin Service Controller(-366407911)
        IWDMessageManager manager = wdComponentAPI.getMessageManager();
        try
          wdContext.currentZ_Hrfm_Nominee_Disp_InputElement().modelObject().execute();
          wdContext.nodeOutput_Nominee().invalidate();
        catch(WDDynamicRFCExecuteException e)
          manager.reportException(e.getMessage(), false);
        //$$end
        //@@end
      //@@begin javadoc:executeZ_Hrfm_Nominee_Ins_Mod_Input()
      /** Declared method. */
      //@@end
      public void executeZ_Hrfm_Nominee_Ins_Mod_Input( )
        //@@begin executeZ_Hrfm_Nominee_Ins_Mod_Input()
        //$$begin Service Controller(1524028406)
        IWDMessageManager manager = wdComponentAPI.getMessageManager();
        try
          wdContext.currentZ_Hrfm_Nominee_Ins_Mod_InputElement().modelObject().execute();
          wdContext.nodeOutput_nominee_ins_mod().invalidate();
        catch(WDDynamicRFCExecuteException e)
          manager.reportException(e.getMessage(), false);
        //$$end
        //@@end
    The following code section can be used for any Java code that is
    not to be visible to other controllers/views or that contains constructs
    currently not supported directly by Web Dynpro (such as inner classes or
    member variables etc.). </p>
    Note: The content of this section is in no way managed/controlled
    by the Web Dynpro Designtime or the Web Dynpro Runtime.
      //@@begin others
      String empNo = null;
      //@@end
    Suman
    Edited by: sumankumar kurimilla on Dec 23, 2008 9:26 AM

    Hi,
    I have checked from RFC side that is working fine only java app its not working can you tell any thing needs to be changed from my application end.
    Please check in Savedata action.
    Regards,
    Suman
    Edited by: sumankumar kurimilla on Dec 23, 2008 11:01 AM

  • Passing table values to RFC

    how can i pass tables to RFC as input?
    Thanks.

    Thanks for the replies.
    I have actually written the below code, but not getting the output.
    Model1 mod=new Model1();
      zbapi_Input ip=new Zbapi_Input(mod);
                ztable tab1;
                tab1=new Ztable(mod);
                tab1.setcode("2100");
              input.addZtable(tab1);
                wdContext.nodezbapi_Input ().bind(ip);
                try {
                   wdContext.currentzbapi_Input Element().modelObject().execute();
              } catch (ARFC2ModelExecuteException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();

  • Callng a RFC from BSP application

    Hi Everyone,
    I am calling a RF function from a BSP function through a destination.
    The BSP application is running on a SRM server and FM is in R3 server.
    In the BSP application ,the function call has just only exporting parameters.
    No need ti return any values back.
    The destination is working fine..
    I tried for  two modes of call to RFC FM
    1. with detination
    2. with detination and background run.
    but it is not traversing into remote Fm.
    Can any one propose the solution.
    Bye,
    satish

    Hi Satish,
    there are a few things that can cause issues:
    Does the user that is used to logon to the remote system has sufficient authorization to execute the function module?
    In case you are using trusted RFC-connections has the user in the remote system sufficient authorization to log on via this trusted connection?
    Is there an authorization required to use the specified RFC-destination and if so does the user performing the call have this authorization?
    In case you want to debug into the remote system the RFC-User used for logon into the remote system needs to have authorization to execute the function module remotely, debug in the remote system and log on as dialog user.
    The use of destination executes it in synchronous mode, the use of destination + background performs the rfc asynchronously. For synchronous call always define the 2 exceptions described in the online help for RFC-calls (system_failure communication_failure) so that you can react on errors during the rfc such like the remote system not being available.
    Hope that helps to dig into this in more detail.
    Best Regards
    Michael

  • Update a table in the database from a report

    The user needs to print a report multiple times for the day but needs to knwo whether or not the data was already printed so that it is not printed again...therefore I have a y/n/all field on the report to allow the user to choose what subsets of data to print...
    Problem is, how do I actually update the data base table and the subset of records currently printed as printed from the report runtime....how do I code this ...
    Please help......

    oyu can use the following to insert or update in data base from reports
    CMD_LINE := 'insert into Table values
    ('''||:toDate||''','||a||')';
    SRW.DO_SQL(CMD_LINE);
    CMD_LINE := 'update Table set net = '||a||'
    where ddate ='''||:todate||'''';
    commit ;

  • Updating Table using the data from a flat file

    Hi,
    I have a table called emp;
    Name,
    empno,
    accountno,
    amount.
    This table is filled with values of name and empno.
    The columns accountno and amount are empty.
    I have a flat file created in some folder.
    Contents of the flat file can be like this:
    mani | 23 | 123 | 1000
    spr | 22 | 342 | 2133
    asjf | 54 | 432 | 2345
    I need to access the file in the specified location, read all the records one after the other in the flat file and update the table "emp" with the values in the flat file.
    Row after row all the records in the file should be updated to the table.
    I found out some way to do this - its sqlloader - But it loads the data from a file to the table - i dont need that - i need to update the table.
    Let me know how this can be solved ?????????
    Thanks in advance.......

    Just to clarify Andrew's point, you can use external tables as the source table for an UPDATE statement. You cannot use them as a target for an UPDATE statement (i.e. you can't update the text file from an Oracle table).
    Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • Master Table for Work Items from BSP Application

    hello guys,
    just want to ask if there is a master table for work items (and other details) from BSP application?

    Hi,
          Ya its true but i want to connect my customized application to UWL in Enterprise Portal and there after approval i want my workitems to be punched in R/3 system.Is there any source code available,so that my application directly contact UWL in sap enterprise Portal as a link or workitems where user should have an option to approve or reject.
    If u have any idea plz let me know.
    Thanks in Advance
    Regards
    Santosh Saraf

  • How to call the RFC from XI system

    Dear Friends,
        My requirement is RFC to RFC scenario      i.e SAP to XI to Third party system.
    I have the BAPI_EUQI_CREATE rfc, this RFC is available in ECCsystem, that RFC I imported in XI system, so third party system how to call this RFC.
    please give me the suggestion it is very helpful.
    Regards,
    Shalini Shah

    Hi Shalini,
    You have create a RFC in the 3rd party system and import that RFC in XI System using 3rd party adapter.Do the necessary mapping and configure the sender RFC Adapter and at receiver side configure 3rd paty Adapter.
    The 3rd party adapters must be installed via Deploy Tool or JSPM. But u should have a sda file with the adpater content.
    see here for more details on JSPM
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/5006901f-925c-2910-5f98-9ae26cc07eca
    For more info:
    If you still want to do it,
    1. Import the RFCs of sender and of receiver.
    2. Do the necessary mapping.
    3. Configure sender and receiver RFC adapters.
    Before that check if you have RFC destination for the RFC adapter. If not You should establish it. To establish an RFC destination for the RFC adapter.
    1. Call the transaction Display and Maintain RFC Destinations (SM59).
    2. Select an existing RFC destination of type ABAP Connections (for example, ABAP_Old) by double-clicking it.
    3. Choose Destination ® Copy and copy the RFC destination using a new name (for example, ABAP_New).
    4. Save the new RFC destination (ABAP_New) and delete the old RFC destination (ABAP_Old).
    5. Create a new RFC destination (for example, RFC_Adapter) of type T (TCP/IP connection) as the RFC destination for the RFC adapter.
    6. Select the registration type Registered Server Program and in the Program ID field enter the corresponding program ID from the configuration of the sender RFC adapter.
    7. In the Gateway host and Gateway service fields, enter the gateway host and gateway service from the configuration of the sender RFC adapter.
    8. If the sender system is a Unicode system, define the RFC destination as Unicode.
    9. Using the name of the old ABAP connection (ABAP_Old), create a new RFC destination of type L (logical destination with reference entry).
    10. In the Reference Entry field enter the RFC destination (RFC_Adapter) for the RFC adapter.
    For more details take a look at this link. http://help.sap.com/saphelp_nw70/helpdata/en/25/76cd3bae738826e10000000a11402f/content.htm
    Dont forget to Reward points if this helps
    Regards
    Pragathi.
    Edited by: Pragathi on May 24, 2008 7:21 AM

  • Issue when Calling the RFC from external system

    Hi,
    I have created one RFC, in which I am using one function module to get the material customer status.
    Functional Module name is "QC01_BATCH_VALUES_READ".
    When I run this in SAP, it is giving a value for Cusotmer Status. But when this RFC is called from .Net system it is not returning any value for this field.
    Even I used a different function module 'CLAF_CLASSIFICATION_OF_OBJECTS' for the same, in this also in SAP it is doing good, but when it is called from .Net, the program is giving dump.
    Please help me to resolve this issue
    Thanks
    Ravi

    Hi Ravi,
    Issue can be either in the .NET program or in the RFC destination creation.
    1)
    Check whether data types of .NET program which is calling the SAP function module are correct. 
    If there are issues with data types,  program dont report if you dont so explicitly.
    2) Check whether RFC destination you are giving in your .NET program is correctly configured in
        SAP , verify by testing the same.
    Apart from above two reasons, I dont see any other major reasons for not getting correct results.
    Regards
    Krishna

Maybe you are looking for

  • Error when trying to preview screen in screen file

    A few of us are receiving an error when trying to 'preview' a screen via screen file in rulebase. A large error window pops up with about 30 lines of text in it. The window is 'Preview in Web Determinations'. It starts with: class com.oracle.determin

  • Broadband novice needs help & advice

    Hi, I am new to this forum and looking for help. I have a BT Home Hub (plugged into master bt socket) and connect to it via my laptop wirelessly. Our printer also connects in wirelessly. We have slow broadband speeds generally (130mbps top). Our phon

  • Asymmetrical Dimensions in Oracle 9i

    We are trying to built a demo application using Oracle 9i components. For some of the dimensions, we need an asymmetrical dimension, meaning a dimension with varying number of levels. I.e. Accounts; some account categories use 3 levels to roll up fro

  • Delete child records before I can delete the parent

    Hello,I'm a newbie to SQL and if it is not to difficult I can succeed to write querie's. I don't much know about PL/SQL. We are working with Oracle.The parent ERD is this. Table 1 --> linking Table --> Table 2 --> Table 3(detail) 1 | 1 1 1 1 1 n |-->

  • 2 Flex Developer Opportunities

    Hello, I have 2 immediate consulting opportunities in north San Diego County, CA for strong Flex developers. Do any of you know people who might be interested? Please have them contact me. Thanks, Kevin Kevin Junge Surrex Solutions Corporation Irvine