Urgent : calling BAPI in webdynpro

i have an application in which i got the table . Inside this table , i got the details from one Bapi.
In the next view, I have one more table to get the details from other BAPI.
How should i write the code..so that the output of the first BAPI is the import parameter to the second BAPI and get the item level details.
I am able to see the data from first BAPI..but i m not getting the details in the second BAPI.

Hi ,
In controller u have execute method inthat u write like this.
execute()
BAPI2 output = new BAPI2();
output.nodeBAPI2().bind(output);
output.setempno(wdContext.nodeof firstBAPIoutputnode().currentURBAPIoutnodeelement.getEmpno());
wdcontext.currentBAPI2element().modelObjet().execute();
this execute method call in the first view table Onleadselection like as Action method .
I mean to say create method onclick() in that implementation call like this
pluin for first view to second view and
call the execute method.
wdthis.FirePlug();
Wdthis.wdGetCustomcontroller().execute() method.
This should works
If any query let me know.
Thaks
Mandapati
Message was edited by: Mandapati Nageswara Rao

Similar Messages

  • Calling BAPI in Webdynpro or EP

    Hi
    any one can u send how to store data in r/3 when we submit the form in either webdynpro or EP . i mean how to call BAPIs
    Regards
    sunil

    Hi Sunil
    Refer to
    <a href="https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/16244247-0a01-0010-3294-d81c21e7e86e">VC</a>
    2)
    <a href="https://www.sdn.sap.com/irj/sdn/developerareas/webdynpro?rid=/library/uuid/49f2ea90-0201-0010-ce8e-de18b94aee2d">Webdynpro</a>
    SDN :-https://www.sdn.sap.com/irj/sdn/howtoguides
    Check for RFC there
    Thanx
    Pankaj

  • Internationalization when calling BAPI in webdynpro

    Hi all,
    We are developping a multi-lingual application connected to a R3 backend with adaptive RFC model.
    When using RFC model we have to create JCO destinations.
    These JCO destinations need a user and an language. So no matter what we do, the text elements and dictionary metadata are returned in the language of the destination user.
    How can we managed to handle various language without having to create specific BAPIs with language parameter ?
    Regards,
    Sylvain

    Hi Sylvani,
    u can use SAP Enterprose Connector instead of JCo's.
    in the sap enterprise Connector we will pass the login credentionals at the runtime.so have an options to
    pass the language also.
    hope this will helps to u
    with regds
    Naidu

  • Creating webservice using webdynpro java calling bapi from r/3

    hi all,
    as i am new to this area can anyone provide me a guide to create a simple webservice using webdynpro java to call bapi's from r/3?
    i want to consume the created webservice on a .net client.
    Thanks in advance,
    Raghunandan

    You can use the SAP .NET Connector to do it.
    Download from [http://service.sap.com/connectors|http://service.sap.com/connectors].

  • Problem regarding BAPI call from a webdynpro applications

    Hi,
      We are trying to call a BAPI in R/3 system from a webdynpro application through the standard method. But we are getting some problems in JCO settings. We already wasted so much time in solving those problems. Is there anyway where i can access BAPI from Webdynpro application.
    Rgrds,
    Anna

    Hello Anna,
      You can do it by using SAP Java Connector API's in the implementation of the Webdynpro application. You can refer to the sample programs for JCO at http://service.sap.com/connectors and download the latest version of SAP JCo in that install those files as per the installation document in the downloaded zip. The downloaded zip contains information about JCo APIs and sample programs.
    Hope this will solve your problem.
    Best Regards,
    Srinivas.

  • Problem with special charecter while calling a BAPI from Webdynpro JAVA.

    Hi Experts,
    I am calling a BAPI from Webdynpro JAVA. I am passing a special charecter  u2018 as input to BAPI. But I am getting a # as input in R/3.. Can any one explain why it is getting changed?
    Any inputs regarding this issue are appreciated.
    Thanks,
    Kasinath.

    Hi,
        I had same problem before..For this I have created function module in backend for removing #. It was for converting Stream to ITF text.
    CONVERT_STREAM_TO_ITF_TEXT.
    Try this.
    Thanks,
    Prajakta

  • Calling BAPI only ones and receiving all values

    HI all,
      I am having a BAPI and I want to receive all the values from the BAPI at the first time.I am having two tables table1 and table2. These tables are inside a Tab(tab strip).
    When i click the Tab strip the BAPI fills the first table table1 and based on the lead selection in table1 it calls the BAPI again and fills the second table tab2. But I want to call BAPI only ones when i enter the Tab and show the details from buffer.
    It should give the values based on the lead only from webdynpro.
    Please help..Its urgent..
    Thangs&regards
    karthik.

    Hi Karthi,
    1> Take a Value Node with the necessary attributes to store the BAPI output only once.
    2> Inside wdDoint Method:  Execute the BAPI and Copy the BAPI Output to your Value Node.
    3>All the data will be available in your ValueNode. Use the Value Node as per your requirement.
    Re: RFC Issue - Cardinality and Selection problem
    Issue with Table
    Regards,
    Mithu

  • How to Call BAPI From the Custom Controller

    Hi
    I developed frist WD Application Using RFC Adapter.
    i did the following steps
    1. created the project
    2. created the model.
    3. created the customer controller and mapped the model of the controller to the model.
    4. mapped controller context to the views
    5. created one action in the start view
    6. created one method in the customer controller.
    so please let me know the lines of code to call BAPI using RFC.
    and  how to pass input valus to the bapi and how to execute the BAPI
    plese send the reply ASAP
    regards
    mmukesh

    Hi
    i did like this
    In  Start View OnActionSearch () method code
    public void onActionsearch (com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
           wdThis.wdGetTestCustControllerController().executeGetlistBapi();
    in CustomController Init method
    public void wdDoInit()
        Bapi_Flight_Getlist_Input input = new Bapi_Flight_Getlist_Input();
        wdContext.nodeBapi_FlightGetlist_Input().bind(input);
        input.setDestination_From(new Bapisfldst());
        input.setDestination_To(new Bapisfldst());
    In CUSTOMECONTROLLER executeGetlistBapi();
    METHOD
    public void executeGetlistBapi( )
        //@@begin executeGetlistBapi()
        try{
           wdContext.currentBapi_FlightGetlist_InputElement().modelObject().execute();
           wdContext.nodeOutput().invalidate();
        }catch(Exception ex){
           ex.printStackTrace();
    Then let me know what is wrong in this
    i did as per pdf
    please correct if there is any worng in this code.
    this is flight example .
    regards
    mmukesh

  • Calling RFC in Webdynpro...

    Hello,
    I am new to WebDynpro Java. How can I call a RFC in webdynpro. We have different SAP lanscapes viz: 4.7, ecc 5.0 and ecc 6.0. I want to call BAPI from 4.7 landscape in my webdynpro. How can I do this ?
    Regards,
    Jainam.

    Hi,
    The better way to call a RFC from Web Dynpro, is using Adaptive RFC Model.
    See it to help you :
    https://www.sdn.sap.com/irj/sdn/nw-wdjava?rid=/webcontent/uuid/403e6bf5-426e-2910-b0a8-a95548724af9#section10 [original link is broken]
    Read the all documents about Adaptive RFC Model to understand all details to use it with Web Dynpro.
    Its to a step by step sample:
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/a00f7103-6790-2a10-ac9c-fcac7c5b18a3
    Best regards

  • Sample ABAP code for userexits, and calling bapi's

    Hi,
    Can someone please send me sample ABAP code
    1) to do extractor enhancement using user exit.
    2) ABAP program to call BAPI to read live cache order series data in SNP and write to Idocs through some ports.
    3) ABAP routine to generate file name (based on date/country)in the infopackage to upload flatfiles.
    Thank you very much in advance and appreciate any help.
    Regards
    Prasad

    hai ,
    check this code...
    *& Tables
    tables : tstc,     "SAP Transaction Codes
             tadir,    "Directory of Repository Objects
             modsapt,  "SAP Enhancements - Short Texts
             modact,   "Modifications
             trdir,    "System table TRDIR
             tfdir,    "Function Module
             enlfdir,  "Additional Attributes for Function Modules
             tstct.    "Transaction Code Texts
    *& Variables
    data : jtab like tadir occurs 0 with header line.
    data : field1(30).
    data : v_devclass like tadir-devclass.
    *& Selection Screen Parameters
    selection-screen begin of block a01 with frame title text-001.
    selection-screen skip.
    parameters : p_tcode like tstc-tcode obligatory.
    selection-screen skip.
    selection-screen end of block a01.
    *& Start of main program
    start-of-selection.
    Validate Transaction Code
      select single * from tstc
        where tcode eq p_tcode.
    Find Repository Objects for transaction code
      if sy-subrc eq 0.
        select single * from tadir
           where pgmid    = 'R3TR'
             and object   = 'PROG'
             and obj_name = tstc-pgmna.
        move : tadir-devclass to v_devclass.
        if sy-subrc ne 0.
          select single * from trdir
             where name = tstc-pgmna.
          if trdir-subc eq 'F'.
            select single * from tfdir
              where pname = tstc-pgmna.
            select single * from enlfdir
              where funcname = tfdir-funcname.
            select single * from tadir
              where pgmid    = 'R3TR'
                and object   = 'FUGR'
                and obj_name = enlfdir-area.
            move : tadir-devclass to v_devclass.
          endif.
        endif.
    Find SAP Modifactions
        select * from tadir
          into table jtab
          where pgmid    = 'R3TR'
            and object   = 'SMOD'
            and devclass = v_devclass.
        select single * from tstct
          where sprsl eq sy-langu
            and tcode eq p_tcode.
        format color col_positive intensified off.
        write:/(19) 'Transaction Code - ',
        20(20) p_tcode,
        45(50) tstct-ttext.
        skip.
        if not jtab[] is initial.
          write:/(95) sy-uline.
          format color col_heading intensified on.
          write:/1 sy-vline,
          2 'Exit Name',
          21 sy-vline ,
          22 'Description',
          95 sy-vline.
          write:/(95) sy-uline.
          loop at jtab.
            select single * from modsapt
            where sprsl = sy-langu and
            name = jtab-obj_name.
            format color col_normal intensified off.
            write:/1 sy-vline,
            2 jtab-obj_name hotspot on,
            21 sy-vline ,
            22 modsapt-modtext,
            95 sy-vline.
          endloop.
          write:/(95) sy-uline.
          describe table jtab.
          skip.
          format color col_total intensified on.
          write:/ 'No of Exits:' , sy-tfill.
        else.
          format color col_negative intensified on.
          write:/(95) 'No User Exit exists'.
        endif.
      else.
        format color col_negative intensified on.
        write:/(95) 'Transaction Code Does Not Exist'.
      endif.
    Take the user to SMOD for the Exit that was selected.
    at line-selection.
      get cursor field field1.
      check field1(4) eq 'JTAB'.
      set parameter id 'MON' field sy-lisel+1(10).
      call transaction 'SMOD' and skip first screen.

  • Problem in calling bapi

    hi
    i developed one report and one bapi (to create sale order with ref to contract) every thing working fine.
    now my client asked he want to call bapi program from report because my report output is input to bapi for this i maintained check box for every row in report and in application tool bar i maintained one key , suppose he selected one record and press on that key it should move to bapi up to this working fine .for this my logic is
    SET PF-STATUS 'ZCON'.
    At USER-COMMAND.
    CASE SY-UCOMM.
    WHEN 'BAPI'. "this is key
    CALL TRANSACTION 'ZBC'. "zbc = my bapi tcode
    endcase.
    now i have to pass selected record values to bapi input automatically so what i have to write .
    please share information
    thanks in advance
    Moderator message : Duplicate post locked. Continue with the original thread.
    Edited by: Vinod Kumar on Sep 7, 2011 10:32 AM

    Hello Bhavin,
    you have marked your question an self solved. Would be fine if you post your solution.
    Regards
    Gregor

  • Error while trying to call a ABAP webdynpro appl. as a link on html form

    Hi,
      When I am trying to call a ABAP Webdynpro aplication as a link on html form. I get the following error
    Error when processing your request
    What has happened?
    The URL http:///sap/bc/webdynpro/form_ap/ (Path of ABAP webdynpro application) was not called due to an error.
    Note
    The following error text was processed in the system DRD : Error in Web Dynpro Runtime System
    The error occurred on the application server DRD_06 and in the work process 0 .
    The termination type was: RABAX_STATE
    The ABAP call stack was:
    Method: GET_REQUEST_INPLUG_PARAMETERS of program CL_WDR_CLIENT_APPLICATION=====CP
    Method: INIT of program CL_WDR_CLIENT_APPLICATION=====CP
    Method: IF_WDR_RUNTIME~CREATE of program CL_WDR_MAIN_TASK==============CP
    Method: HANDLE_REQUEST of program CL_WDR_CLIENT_ABSTRACT_HTTP===CP
    Method: IF_HTTP_EXTENSION~HANDLE_REQUEST of program CL_WDR_MAIN_TASK==============CP
    Method: EXECUTE_REQUEST_FROM_MEMORY of program CL_HTTP_SERVER================CP
    Function: HTTP_DISPATCH_REQUEST of program SAPLHTTP_RUNTIME
    Module: %_HTTP_START of program SAPMHTTP 
    What can I do?
    If the termination type was RABAX_STATE, then you can find more information on the cause of the termination in the system DRD in transaction ST22.
    If the termination type was ABORT_MESSAGE_STATE, then you can find more information on the cause of the termination on the application server DRD_06 in transaction SM21.
    If the termination type was ERROR_MESSAGE_STATE, then you can search for more information in the trace file for the work process 0 in transaction ST11 on the application server DRD_06 . In some situations, you may also need to analyze the trace files of other work processes.
    If you do not yet have a user ID, contact your system administrator.
    Error code: ICF-IE-http -c: 102 -u:  -l: E -s: DRD -i: DRD06 -w: 0 -d: 20081002 -t: 032939 -v: RABAX_STATE -e: UNCAUGHT_EXCEPTION
    HTTP 500 - Internal Server Error
    Your SAP Internet Communication Framework Team
    Any help will be greatly appreciated.
    Thanks
    RM

    RM,
    url clearly shows that it is unable to get host and port.check how you are building that url in html page
    Thanks
    Bala Duvvuri

  • How to add error message to return structure of calling BAPI from a BADI

    i have a bapi where a badi is triggered.this badi method has just importing and changing parameters.is there any way with which i can add error message to the return structure of calling bapi.please reply at the earliest.High points can be expected.

    thanks got it

  • Creation of sale order using bapi in webdynpro using table control

    only first row is getting updated when checked in va03, the line items are not getting replaced, only first row is committed..
    Here is the code for table control i used...
    http://www.scribd.com/doc/51879492/creation-of-sale-order-using-bapi-in-webdynpro-using-table-control
    pls help me out with this..

    Duplicate Posting.  Original is here: Sales order creation with bapi in webdynpro using table control

  • Calling an ABAP WebDynpro Popup from a BSP view

    I need to know if the following is possible.
    I have a requirement to call an ABAP WebDynpro Popup from a BSP view.
    When the Popup is triggered (eg via pushbutton) the BSP will pass data to the Popup, before the Popup is closed the Popup will pass data back to the BSP to be displayed in the BSP view.
    I do not want to rely on Portal Events as Portals may not be used, would really appreciate a clean simple solution.

    Hi,
    any webdynpro application has a URL behind it. Haven´t you tried to call that URL with Javascript code ??
    script language="Javascript"
          url = "test_page.htm" + "?field=" + param;
          window.open(url, "F4window", "width=400, height=400");
    /script
    You can pass data to the WD application using parameters as I show you after the "?".

Maybe you are looking for