Calling BAPI from Portal Service

Hi all,
I have created a KM custom property renderer, what includes a Portal Service.
Now, I would like to call a BAPI from the renderer component using JCO.
Does anybody how or whether that works?
Or does anybody have a sample code how to call a BAPI using JCO from a portal service?
Thanks
ISmail

Hi,
This is possible.
Please see the following documentation:
[http://help.sap.com/saphelp_nwpi711/helpdata/en/48/634503d4e9501ae10000000a42189b/frameset.htm|http://help.sap.com/saphelp_nwpi711/helpdata/en/48/634503d4e9501ae10000000a42189b/frameset.htm]
Regards,
Zohar

Similar Messages

  • Calling a abstract portal component from portal service

    Hi
    Can i access a abstract portal component from portal service?
    My requirement is i have a method called getsessionID in portal service. My portal service is enabled as a webservice. Who ever consumes my webservice they will call this method.
    This method in portal service should call a method in abstract portal component to return the session id of the user.
    is this possible.
    Thanks in advance
    Kishore

    Hi Kishore,
           This is impossible. The AbstractPortalComponent is a servlet and it can only be executed via URL. It is easy to execute the component via url but you have to pass the logon information. Also it will run under a user context that you have specified(while passing the logon information) when calling the url. I think you ought to consider a different approach.
            Prakash Singh

  • Calling Bapi from Dot Net

    Hi All,
    We are Trying to upload Bapi's From Dot Net.
    When we are uploading Sales Order upload i will get this error ""ERROR: Sales document type DG-1 is not defined"" ,But If i Call Again It is not giving the any error and simply its updating the SAP data base.Not only Sales Order upload but Customer Master upload also First time iam getting :"" Invalid form of address text"" This Error...After Second Exectuion I am getting Sucess Message.
    Why My Bapi Call is Not Sucess for First Call and why it is Getting sucess in Second Exection When i am calling bapi from .Net
    how can i solve my Problem?
    Thank you,
    Madhu
    Edited by: madhubabu rao on Oct 24, 2008 8:20 AM

    Hello,
           Refer to the below Thread & Link respectively.
    Re: Call BAPI WS from .NET
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/12f6d390-0201-0010-e18d-cdb4554a9e75
    Thought it might give you some inputs.
    Thanks and Regards,
    Venkat Phani Prasad Konduri

  • Any program for calling bapi from ABAP step by step

    any program for calling bapi from ABAP step by step
    points will be rewarded,
    thank you,
    Jagrut BharatKumar Shukla

    Hi Jagrut,
    BAPI stands for Business API(Application Program Interface).
    A BAPI is remotely enabled function module ie it can be invoked from remote programs like standalone JAVA programs, web interface etc..
    You can make your function module remotely enabled in attributes of Function module but
    A BAPI are standard SAP function modules provided by SAP for remote access. Also they are part of Businees Objest Repository(BOR).
    BAPI are RFC enabled function modules. the difference between RFc and BAPI are business objects. You create business objects and those are then registered in your BOR (Business Object Repository) which can be accessed outside the SAP system by using some other applications (Non-SAP) such as VB or JAVA. in this case u only specify the business object and its method from external system in BAPI there is no direct system call. while RFC are direct system call Some BAPIs provide basic functions and can be used for most SAP business object types. These BAPIs should be implemented the same for all business object types. Standardized BAPIs are easier to use and prevent users having to deal with a number of different BAPIs. Whenever possible, a standardized BAPI must be used in preference to an individual BAPI.
    The following standardized BAPIs are provided:
    Reading instances of SAP business objects
    GetList ( ) With the BAPI GetList you can select a range of object key values, for example, company codes and material numbers.
    The BAPI GetList() is a class method.
    GetDetail() With the BAPI GetDetail() the details of an instance of a business object type are retrieved and returned to the calling program. The instance is identified via its key. The BAPI GetDetail() is an instance method. BAPIs that can create, change or delete instances of a business object type
    The following BAPIs of the same object type have to be programmed so that they can be called several times within one transaction. For example, if, after sales order 1 has been created, a second sales order 2 is created in the same transaction, the second BAPI call must not affect the consistency of the sales order 2. After completing the transaction with a COMMIT WORK, both the orders are saved consistently in the database.
    Create( ) and CreateFromData! ( )
    The BAPIs Create() and CreateFromData() create an instance of an SAP business object type, for example, a purchase order. These BAPIs are class methods.
    Change( )
    The BAPI Change() changes an existing instance of an SAP business object type, for example, a purchase order. The BAPI Change () is an instance method.
    Delete( ) and Undelete( ) The BAPI Delete() deletes an instance of an SAP business object type from the database or sets a deletion flag.
    The BAPI Undelete() removes a deletion flag. These BAPIs are instance methods.
    Cancel ( ) Unlike the BAPI Delete(), the BAPI Cancel() cancels an instance of a business object type. The instance to be cancelled remains in the database and an additional instance is created and this is the one that is actually canceled. The Cancel() BAPI is an instance method.
    Add<subobject> ( ) and Remove<subobject> ( ) The BAPI Add<subobject> adds a subobject to an existing object inst! ance and the BAPI and Remove<subobject> removes a subobject from an object instance. These BAPIs are instance methods.
    ex BAPI:
    API_SALESORDER_CREATEFROMDAT1
    BAPI_SALESORDER_CREATEFROMDAT2
    You can get good help form the following links,
    BAPI-step by step
    http://www.sapgenie.com/abap/bapi/example.htm
    list of all bapis
    http://www.planetsap.com/LIST_ALL_BAPIs.htm
    for BAPI's
    http://www.sappoint.com/abap/bapiintro.pdf
    http://www.sappoint.com/abap/bapiprg.pdf
    http://www.sappoint.com/abap/bapiactx.pdf
    http://www.sappoint.com/abap/bapilst.pdf
    http://www.sappoint.com/abap/bapiexer.pdf
    http://service.sap.com/ale
    http://service.sap.com/bapi
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCMIDAPII/CABFAAPIINTRO.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/CABFABAPIREF/CABFABAPIPG.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCFESDE8/BCFESDE8.pdf
    http://www.planetsap.com/Bapi_main_page.htm
    http://www.topxml.com/sap/sap_idoc_xml.asp
    http://www.sapdevelopment.co.uk/
    http://www.sapdevelopment.co.uk/java/jco/bapi_jco.pdf
    Also refer to the following links..
    www.sappoint.com/abap/bapiintro.pdf
    www.sap-img.com/bapi.htm
    www.sap-img.com/abap/bapi-conventions.htm
    www.planetsap.com/Bapi_main_page.htm
    www.sapgenie.com/abap/bapi/index.htm
    Checkout !!
    http://searchsap.techtarget.com/originalContent/0,289142,sid21_gci948835,00.html
    http://techrepublic.com.com/5100-6329-1051160.html#
    http://www.sap-img.com/bapi.htm
    http://www.sap-img.com/abap/bapi-conventions.htm
    http://www.sappoint.com/abap/bapiintro.pdf
    http://sap-img.com/bapi.htm
    <b>EG::</b>
    <b>Here is the step by step procedure for creating BAPIs.</b>
    There are 5 different steps in BAPI.
    - Create BAPI Structure
    - Create BAPI Function Module or API Method.
    - Create BAPI object
    - Release BAPI Function Module.
    - Release BAPI object.
    Step1. Creating BAPI Structure:
    - Go to <SE11>.
    - Select Data Type & Enter a name.
    - Click on Create.
    - Note: Always BAPI should be in a development class with request number (Not Local Object).
    - Select Structure & hit ENTER.
    - Enter the fields from your database. Make sure that the first field is the Primary Key Field.
    - Then SAVE & ACTIVATE.
    Step 2. Creating BAPI module:
    - Enter TR.CODE <SE37>.
    - Before entering any thing, from the present screen that you are in, select the menu
    Goto -> Function Groups -> Create Group.
    Enter a name (Note: This name Must start with ZBAPI)
    Let this screen be as it is and open another window and there, enter TR.CODE <SE80).
    Click on the Third ICON that says Inactive Objects.
    Select the group that you just created and click on Activate.
    Notice that the group you created will disappear from the list of inactive objects.
    - Go back to ><SE37> screen and enter a name and hit <ENTER>. Then enter the group name that you just created and activated.
    NOTE: When you release a function module the respective group will be attached to that particular application. It cannot be used for any other application. NEVER include an already existing group that is attached to another module.
    Now click on the first Tab that says [ATTRIBUTES] and select the radio button that says remote-enabled module since we will be accessing this from any external system.
    Then click on the second tab that says [IMPORT].
    Enter a PARAMETER NAME, TYPE and the structure you created in the first step. Also select the check box ‘Pa’. All remotely enabled functional modules MUST be Pa enabled, where Pa means ‘Passed by Value’ and if you don’t select ‘Pa’, then that means it will be passed by reference..
    Then click on tab that says [EXPORT].
    Enter the following as is in the first three fields
    RETURN TYPE BAPIRETURN (These 3 field values are always same)
    Here also select ‘Pa’ meaning Pass by value.
    Note: BAPIRETURN contains structure with message fields.
    Then SAVE and ACTIVATE.
    Step 3. Creating BAPI object:
    - Enter Tr.Code <SWO1> (Note. It is letter ‘O’ and not Zero).
    - Enter a name and then click on create. Enter details.
    NOTE: Make sure that that Object Type and Program name are SAME.
    - Enter Application ‘M’, if you are using standard table Mara. If you are using your own database then select ‘Z’ at the bottom.
    - Then hit <ENTER>.
    - Now we have to add ‘Methods’. High light METHODS and then select the following from the menu:
    Goto Utilities -> API Methods -> Add Methods.
    - Enter function Module name and hit <ENTER>.
    - Select the second FORWARD ARROW button (>)to go to next step.
    - Check if every thing looks ok and again click on FORWARD ARROW button (>).
    - Then select ‘YES’ and click on <SAVE>.
    - Now on a different screen goto TR.CODE <SE37>. Enter Function Module name and select from the top menu Function Module -> Release -> Release.
    - Goback to TR.CODE <SWO1>.
    Here select the menu combination shown below in the same order.
    - Edit -> Change Release Status -> Object Type Component -> To Implemented.
    - Edit -> Change Release Status -> Object Type Component -> To Released.
    - Edit -> Change Release Status -> Object Type -> To Implemented.
    - Edit -> Change Release Status -> Object Type -> To Released.
    - Then click on <SAVE>.
    - Then click on Generate Button (4th button from left hand side looks like spinning wheel).
    - Then Click on the button that says ‘PROGRAM’ to see the source code.
    To check if this is present in work flow goto TR.CODE <BAPI>.
    Here it shows business object repository.
    - First click on the middle button and then select “ALL” and hit ENTER.
    - Goto tab [ALPHABETICAL] and look for the object that you created. This shows that the BAPI object has been created successfully
    <b>Reward pts if found usefull :)</b>
    regards
    Sathish

  • How to call BAPI from R/3 system

    hi,
    i am doing small application by using Model. that is calling BAPI from R/3 system. but i am not able to get data from the back end system. please suggest me regarding this problem
    thanx
    tanvi

    steps:
    1) create Model
    2) bind Model to component controller ( you can use data modeler.) 2.1) open data modeler; if your model is not there, you can add by clicking add existing model;
    2.2) create data link between model and controller, it will open map dialog.
    2.3) click and drag BAPI_xxx_Input to context of controller and select all nodes inside
      - if there is any duplicate nodes, just rename it.
    3) map context to view controller
    3.1) map input parameters separately ( which takes value for IMPORT to BAPI. select only that fields
    3.2) do map for output (exact node which contains BAPI output)
    coding:
    1) in component controller you need to instantiate model and bind to context
    BAPI_xxx_Input my_input = new BAPI_xxx_input();
    wdContext.nodeBAPI_xxx_Input my_input().bind( my_input);
    2) create a method in the component controller so that we can execute it from any of views used.
    try{
      wdContext.currentBAPI_xxx_Input my_input().modelObject().execute();
    }catch(WDRFCException e) {
    e.printStackTrace();
    wdContext.node<ExactOutput>().invalidate();
    // this stmt will reflect new values
    3) Go to view and bind values to UI Elements
    in wdDoInit()
    IPrivate<Comp_Name>View.I<ExactOutput>Element  input = wdContext.create<BAPI_xxx_Input>Element();
    // see if this may demand model instance as parameter
    wdContext.node<BAPI_xxx_Input>().addElement( input);
    4) In OnAction you just executes the component controller method
    wdThis.wdGet<Com_Name>Controller().executeMyBapi();
    // executeMyBapi() is the method contains the mentioned try..catch code
    nikhiL

  • How to pull call reports from Customer Service phones

    I have a building that has normal users and a group of customer service users and I would like to pull a report showing how many incoming and or outcgoing calls just from customer service.How would you recomend doing this?

    You need to specify what products and versions you are using.
    https://
    Cisco Unified Communications Manager Call Detail Records Administration Guide, Release 8.6(1)

  • Can we call bapi from SAP or ABAP How? Pls Step by step

    Can we call bapi from SAP How? Pls Step by step
    thank you,
    Regards,
    Jagrut BharatKumar Shukla

    Hi,
    Do you mean you want to access BAPI in ABAP report?
    If yes, then YES we can call,
    1.Create a report -> In pattern write your BAPI name.
    2. It is like your FM , Read correspoding BAPI documentation
    3. Fill required parametes.
    4. Test run and if successful , final run it.
    And from Outside,
    You have to establish a connection and create a wrapper and access using avaialble APIs.
    Reward if useful!

  • Need to access R3 using IConnectorServiceGateway from portal service.

    Hi everyone,
    I need to access R3 using IConnectorServiceGateway from portal service but unable to access so as I don't get the IPortalComponentRequest. Can anyone help me out on how should i do the connection ?
    Please let me know as soon as possible.
    Thanks
    Ritu

    Hello.
    I think this should work
        * Méthode renvoyant une connexion au backend SAP/R3 via un pool de
        * connexion.
        * @param userLocale  - la locale de l'utilisateur
        * @param user        - utilisateur pour lequel il faut une connection
        * @param systemAlias - système pour se connecter
        * @return une connexion au backend SAP/R3.
        * @throws ConnectionPoolException
        *             levée en cas d'erreur.
       public IConnection getConnection(
             Locale userLocale,
             IUserContext user,
             String systemAlias) throws ConnectionPoolException {
          ConnectionProperties prop = null;
          IConnection connection = null;
          IConnectorGatewayService cgService = null;
          try {
             // Connector Gateway Service.
             cgService = (IConnectorGatewayService) PortalRuntime
                   .getRuntimeResources().getService(IConnectorService.KEY);
             if (cgService == null) {
                throw new ConnectionPoolException(
                      "Error in get Connector Gateway Service...");
             IPortalComponentRequest aRequest;
             if (systemAlias == null) {
                throw new ConnectionPoolException(
                      "System alias 'systemAlias' name is null...");
             // Demande la connexion au service :
             prop = new ConnectionProperties(userLocale, user);
             connection = cgService.getConnection(systemAlias, prop);
          } catch (Exception ex) {
             throw new ConnectionPoolException(ex);
    regards
    Guillaume PATRY

  • Call BAPI from ITS

    hi all,
    i'm wondering to know about how to call BAPI from ITS. Could I call BAPI from ITS? if yes, please advise me on this.
    Thank you so much for your effort.
    Peerasit

    Not solve yet.
    Thank you.

  • Where to find  Portal WebService from Portal Service

    Hello,
    I've managed to create a portal service. i would now like to use it as a web service.
    I've found document describing the process, however when try to create a portal object I'm proposed with the choice for portal service, Portal Componant and KM Componant , but not the needed "Web Service from portal Service" .
    Does anyone know what you have to get/add/activate to have this option ?
    i'm on NWDS version 7.0.14
    regards
    Guillaume PATRY

    Hi Guillame,
    To expose your Portal Service as a Web Service, follow the steps :
    1). Select the project containing the Portal Service you wish to expose as a web service.Generate Portal Web Service with PDK Wizard by choosing Portal Web Service From Portal Service.
    2). Select the interface by clicking the browse button.You can only expose the interface that are defined in your Portal Service Project.
    3). Select the method you want to expose to the web service.WSDL files will be generated.
    4). The portalapp.xml will be automatically updated with the WSDL entries.
    5). Deploy the Portal Service on Portal.
    6). View the Web Service on Portal in the following path :
    System Administration --> Support --> Portal Runtime --> SOAP Admin --> Web Services
    7). The generated WSDL can be viewed with the URL :
    http://<server>/irj/servlet/prt/soap/com.sap.portal.prt.soap.<servicename>.
    Hope this does solves your problem.
    Do award points if found helpful.
    Thanks & Regards
    Gourav.

  • Portal Webservice from Portal Service

    Hello community...
    I'm trying to build a Portal Webservice from a Portal Service, but the wizard doesn't appear in my Portal Application Object. There are only Portal Components, Portal Services and a RF Component Wizard. Are there any options configuring the NWDS to show the other wizards like the "Portal Webservice from Portal Service" one or do I have an old version of the nwds (7.0.14)?

    Hi Ozzie,
    in newer NWDS versions this wizard doesn't exist any more.
    [http://help.sap.com/saphelp_nw70/helpdata/en/1f/4554426dd13555e10000000a1550b0/frameset.htm|http://help.sap.com/saphelp_nw70/helpdata/en/1f/4554426dd13555e10000000a1550b0/frameset.htm] describes how to create a web service from a portal service.
    I personally didn't create a web service by this description however. I just created a normal Java class and created a Web Service out of this class (using EAR deployment).

  • Calling BAPI from Adobe Interactive Form

    Hi Guys,
    I have a requirement from my client to work on interface using BAPI for creating Service notification. Idea is that users will fill an Adobe interactive form (AIF) on company INTRANET and as soon as user press a SUBMIT button on the adobe form, BAPI should be called to create a SERVICE NOTIFICATION (Tcode IW51). I have work with BAPIs and I know the BAPI name (BAPI_SERVNOT_CREATE) to create SERVICE NOTIFICATIONS, but not with this kind of interface. Please advice me how to go about it and if some one can share any documentations to accomplish this task.
    Another developer is in charge of developing the AIF and I am responsible for ABAP side .
    Thanks in advance.
    mini

    Hi Mini,
    Kindly check the webDynpro ABAP section of Intercative form homepage. at - https://www.sdn.sap.com/irj/sdn/adobe.
    You can create a portal application and call your BAPI. Other options include - webDynpro Java, calling webservice (if the call can be unsecured). You will be able to call secure web services from adobe forms from future versions afaik.
    Thanks and Regards,
    - anto

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

  • Call BAPI from VBA (access 2007)

    Dear Experts
    how can i call a BAPI from Visual Basic (in MS Access 2007)
    i want to call the BAPI  -> BAPI_SALESORDER_CREATEFROMDAT1
    please help

    Hi, how are you?
    Look, it's easy to do a rfc call to SAP.
    But, if you look in the Netweaver Developer Studio 7.1, the SAP CONNECTOR is deprecated. So, my recomendation is to convert your RFC's to Web Services, and consume them like that, you won't have any problem with SOAP.
    Regards,
    Sebastiá

  • Webservice from Portal Service - Import Param of WebService Method Error

    Hello,
    I have developed a portal service and after that I created a portal web service from that portal service... If I use a String variable for the import parameter of my webservice method everything works fine! But if I us a custom class for the im port parameter of the method I get an soap error when I call the webservice!
    Error:
    Service: MyService
    URL: Endpoint
    http://myportal/irj/servlet/prt/soap/com.sap.portal.prt.soap.MyServicec?style=rpc_enc
    Method: add1to1
    Exception: System.Web.Services.Protocols.SoapException
    Message: com.company.ImportClass
    The WSDL was generated Correctly:
         <schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://namespace.com" elementFormDefault="qualified">
              <complexType name="ImportClass">
                   <sequence>
                        <element name="Import1" nillable="true" type="xsd:string"/>
                        <element name="Import2" nillable="true" type="xsd:string"/>
                   </sequence>
              </complexType>
         </schema>
    Thanks for your help!
    Johannes
    Edited by: Johannes Freitag on Jun 24, 2009 2:54 PM

    Hi Ozzie,
    in newer NWDS versions this wizard doesn't exist any more.
    [http://help.sap.com/saphelp_nw70/helpdata/en/1f/4554426dd13555e10000000a1550b0/frameset.htm|http://help.sap.com/saphelp_nw70/helpdata/en/1f/4554426dd13555e10000000a1550b0/frameset.htm] describes how to create a web service from a portal service.
    I personally didn't create a web service by this description however. I just created a normal Java class and created a Web Service out of this class (using EAR deployment).

Maybe you are looking for

  • I can't get my laptop to connect to the internet through my Ellipsis Jetpack.

    My laptop will connect to the jetpack but with limited access. It will connect to my mom's computer and my phone. I have windows 8.1 and she has windows vista.

  • Sporadic issues while starting SOA suite

    Hi All, I Installed successfully the SOA suite and am able to do all the development in ESB and able to registered the services in ESB. some time while starting the SOA suite am seeing randomly the ESBconssle,Application server console and BPEL conso

  • Firefox does not type what I type

    When I type in a search box in Firefox, it does not display the letters I type. Instead it assumes letters that are way off base. If I start to type 'I am here', it types,' It is heavy'.

  • Apple airport express wireless printing not working on Windows

    I have installed the Airport Utility v 5.5.3 and Bonjour Printer Wizard on my Windows XP (SP3) machine. I have successfully set up the router, but am unable to print wirelessly. In the utility, I see my printer and have selected the checkbox Share pr

  • Building /deploying sample plugin in WLI 2.1 and WLS 6.1

    I'm running WLI 2.1 (service pack 1) and WLS 6.1. I'm trying to build and deploy the sample plugin (sampleplugin-ejb.jar) but have had numerous problems. Specifically, though there are no errors and the WLS admin console tells me the plugin is deploy