How to access BAPI in enterprise portal perspective?

hi,I am venkat new to the portal.can anyone plz tel me how to access BAPI in enterprise portal perspective?is done through JCo or any other database connection?I hav not seen in System Landscape about BAPI access.plz give guidance about BAPI interface in enterprise portal.Hope u  will understand the question and answer the query.
thanx in advance.
Regards:
Venkataramana.

Guys,
Herez how you call a BAPI:
     public void buildConnection(){
          try {
                    System.out.println("**** DI2 *****");
                 //      Add a connection pool to the specified system
                 //    The pool will be saved in the pool list to be used
                 //    from other threads by JCO.getClient(SID).
                 //    The pool must be explicitely removed by JCO.removeClientPool(SID)
                   com.sap.mw.jco.JCO.addClientPool( SID,         // Alias for this pool
                                         10,          // Max. number of connections
                                         "040",       // SAP client
                                         "USERNAME",   // userid
                                         "PASSWORD",  // password
                                         "EN",        // language
                                         "IPADDRESS",// host name
                                         "40" );
                 //      Create a new repository
                 //    The repository caches the function and structure definitions
                 //    to be used for all calls to the system SID. The creation of
                 //    redundant instances cause performance and memory waste.
                   repository = com.sap.mw.jco.JCO.createRepository("MYRepository", SID);
                    JCO.Client client = null;
                    client = JCO.getClient(SID);
//                 Get a function template from the repository
                    //IFunctionTemplate ftemplate = repository.getFunctionTemplate("BAPI_CUSTOMER_GETDETAIL2");
                    IFunctionTemplate ftemplate = repository.getFunctionTemplate("YGGLB_BAPI_YGGLB9PRK_PRKDOCU");
//                 Create a function from the template
                    JCO.Function function = ftemplate.getFunction();
//                 Get import (of Function Module) "Parameter list"
                    JCO.ParameterList input = function.getImportParameterList();
//                 Set inputs for import parameters
                    //input.setValue("0000009000", "CUSTOMERNO");
                    //input.setValue("0248","COMPANYCODE");
//                 Get import (of Function Module) "Structure list".
                   //JCO.Structure importStructure = function.getImportParameterList().getStructure("CUSTOMERADDRESS");
                    JCO.Structure importStructure = function.getImportParameterList().getStructure("IM_DOCUMENTHEADER");
//                 Set values for import parameters (of Function Module) "Structure list"                     
                    importStructure.setValue( "SA", "DOC_TYPE" );
                    importStructure.setValue( "20080910", "PSTNG_DATE" );
                    importStructure.setValue( "20080910", "DOC_DATE");
                    importStructure.setValue( "BHARDWS", "USERNAME" );
                    importStructure.setValue( "2008", "FISC_YEAR" );
                    importStructure.setValue( "FRE1", "COMP_CODE" );
//                 Get import (of Function Module) "Table list - 1".
                    JCO.Table orderPartners = function.getTableParameterList().getTable("TBL_ACCOUNTGL");
//                 Set values for import parameters (of Function Module) "Table list - 1"
                    //Append Row -1
                    orderPartners.appendRow();
                   orderPartners.setValue("0000000001", "ITEMNO_ACC" );
                     orderPartners.setValue("0000400100", "GL_ACCOUNT" );
                    orderPartners.setValue("H", "DE_CRE_IND" );
                    orderPartners.setValue( "ANYTHING", "ITEM_TEXT" );
                    //orderPartners.setValue( "AG", "PROFIT_CTR" );
                    orderPartners.setValue( "AIG0000007", "COSTCENTER" );
                    //Append Row -2
                    orderPartners.appendRow();
                   orderPartners.setValue("0000000002", "ITEMNO_ACC" );
                    orderPartners.setValue("0000400100", "GL_ACCOUNT" );
                    orderPartners.setValue("S", "DE_CRE_IND" );
                    orderPartners.setValue( "NOTHING", "ITEM_TEXT" );
                    //orderPartners.setValue( "AG", "PROFIT_CTR" );
                    orderPartners.setValue( "AIG0000007", "COSTCENTER" );
//                 Get import (of Function Module) "Table list - 2".
                    JCO.Table orderItems = function.getTableParameterList().getTable("TBL_CURRENCYAMOUNT");
//                 Set values for import parameters (of Function Module) "Table list - 2"
                    //Append Row -1
                    orderItems.appendRow();
                   orderItems.setValue("0000000001", "ITEMNO_ACC" );
                    orderItems.setValue("USD", "CURRENCY" );
                    orderItems.setValue( "2000", "AMT_DOCCUR" );
                    //Append Row -2
                    orderItems.appendRow();
                   orderItems.setValue("0000000002", "ITEMNO_ACC" );
                    orderItems.setValue("USD", "CURRENCY" );
                    orderItems.setValue( "2000", "AMT_DOCCUR" );
//                 Execute client
                    client.execute(function);
//******************Start to work on fetching values now********************************
//                 Get export (of Function Module) "Structure list".
                    /*JCO.Structure returnStructure = function.getExportParameterList().getStructure("CUSTOMERADDRESS");
                    JCO.Structure returnStructure2 = function.getExportParameterList().getStructure("CUSTOMERGENERALDETAIL");
                    returnStructure.getString("NAME");
                    returnStructure2.getString("ENTERED_BY");*/
//                 Get export (of Function Module) "Table list"./// Create a new template if fetching table data from a different function module than above
                    //IFunctionTemplate ftemplateTable = repository.getFunctionTemplate("BAPI_CURRENCY_GETLIST");
                    //JCO.Function functionTable = ftemplateTable.getFunction();
                    //client.execute(functionTable);
                    JCO.Table table_return = function.getTableParameterList().getTable("RETURN");
                    Vector tbl = new Vector();
                    Vector row = new Vector();
                    Vector colNames = new Vector();
                    //Loop over all rows
                    do {
                    //Loop over all columns in the current row and add all those colums values to the current row
                    for (JCO.FieldIterator e = table_return.fields();
                         e.hasMoreElements();
                         JCO.Field field = e.nextField();
                         row.add(field.getString());
                         System.out.println(field.getName() + ":\t" + field.getString());
                         } // end for
                         //Add this newly built row to the table     
                         tbl.add(row);
                         } while (table_return.nextRow());
                         table_return = null;
                         table_return = function.getTableParameterList().getTable("RETURN");
                         table_return.nextRow();
                         for (JCO.FieldIterator e = table_return.fields();
                         e.hasMoreElements();
                         JCO.Field field = e.nextField();
                         colNames.add(field.getName().toString());
                    //DefaultTableViewModel dtvModel = new DefaultTableViewModel(tbl, colNames);
                    //beanObj.setModel(dtvModel);
                         System.err.println("getting value for you from session in Get Data 1:-");
                         JCO.releaseClient(client);
                    //     return dtvModel;
               catch (JCO.Exception ex) {
                 System.out.println("Caught an exception: \n" + ex.getMessage());
               }catch (Exception e){
                    System.out.println("Final Message" + e.getMessage());

Similar Messages

  • How to call BAPI in Enterprise Portal java

    Hi,
    In SAP R3 i created a BAPI .Now i want to call that BAPI from Enterprise Portal.
    How to do that?
    With regards,
    Suman Sahu

    Hi, Suman
      There are multiple ways to do this.
      1. via Web Dynpro Java
      2. via other tools like visual composer
      3. via Web Services
      Well, option 1 would be direct and flexible.
      And please refer to here - Web Dynpro samples.
    https://www.sdn.sap.com/irj/sdn/downloaditem?rid=/library/uuid/f0b0e990-0201-0010-cc96-d7ecd2e51715
      Best Regards.
      Sejoon

  • Urgent Please help me... How to access BAPIs from abstract portal component

    I am developing an application in Abstract Portal Component (in
    PDK).
    In that application I can able to acess BAPIs from my Componets
    using the code like
    inputPopSearchBapi = new Zad_Bapi_Pop_Search_Form_Input();
    outputPopSearchBapi = new Zad_Bapi_Pop_Search_Form_Output();
    popSearchBapi = new DropBox_PortType();
    colorList = new Tjj12Type_List();
    inputPopSearchBapi.setIm_Agencyid("0010000001");
    try {
    jcoClient.connect();
    outputPopSearchBapi =
    popSearchBapi.zad_Bapi_Pop_Search_Form(inputPopSearchBapi);
    colorList = outputPopSearchBapi.get_as_listIt_Color();
    request.getComponentContext().putValue("color",colorList.iterat
    or());
    jcoClient.disconnect();
    But I am not able to Access the data that is comming from the
    BAPI in my JSP Page. Pleeeeeeease help me. If you want any
    clarification about my problem then ask for further
    clarifications

    Hi,
      You can refer this link, to connecting the BAPI from Abstract Portal Component <a href="http://www.huihoo.org/openweb/jco_api/com/sap/mw/jco/JCO.html">JCo Tutorial1</a>
    <a href="http://www.apentia-forum.de/viewtopic.php?t=1962&sid=9ac1506bdb153c14edaf891300bfde25">JCo Tutorial2</a>
    With Regards,
    Venkatesh. K
    /* Points are Welcome */

  • How to access the webservice in portal component

    hai
         how to access the webservice in portal component.
         anyone knows give the solution
    Rds
    Shanthakumar

    Hai
    Please check this link.
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/vc/connectivity&
    Regards

  • How to connect LDAP to Enterprise Portal

    Hi Guru,
                I need complete steps to connect LDAP into enterprise portal as LDAP is microsoft AD existing one.            
            I am confuse about the user mapping and authenticatation, compareing and Single sign one.  Does we are calling Log on ticket to the first screen of enterprise portal where we enter user ID and password or ?.
                 One situation is that one SAP Enterprise portal acts as comparing user id against AD(LDAP) and issue logon ticket. Other system who is accepting the logon ticket is also SAP Netweaver and has its own portal. It has it own login module.
              My first question is " How to establish connection to AD in to on SAP Enterprise Portal
    Second is  " How to establish connection to that SAP enterprise portal to SAP Netweaver own portal".
    Third is " If we are trying to access to SAP Netweaver application through SAP Enterprise portal , how we can able to access, do we need to accesss through ivew of SAP Enterprise portal only or can we access the SAP Netweaver application as soon as we enter userid/passwd on first screen of Enterprise portal directly to SAP Netweaver application, without user the ivew of Enterprise portal
            If you guys understood this situation let me as soon as possible, cuz my boss is on my head. of send me your contack info to my email: [email protected]
    Thanks
    Happy

    Hi Ben,
              Here is my situation is little bit different, we have application server which is SAP Netweaver and HR application is running on this server. we are trying to login into this system through its portal and it has attached with LDAP Microsoft AD.
             We set all LDAP setting and this application having its own login module and it added and I hav seen in Security policy of Visual administrator.
              Now tell me how to configure or adjust login modules with its own login module. How to set login modules stacks such that user ID is match with AD and issue login ticket or can login.
               We tested using user ID which contains in AD as well as Application server's database. we it is not able to login.
               If you see this message please send me your contact info to this email I will explain you more on my situation. Please it is so urgent that my boss is on my head
    thanks
    happyman
    [email protected]

  • How to access GET-parameters in portal url

    Is it possible to access GET-parameters in a bsp application in an iview in the enterprise portal, and if so, how do I do it?
    If you look at the url of this post (/message/1514719#1514719 [original link is broken])
    I would like to have the value of "forumID" in the bsp application in the iview with shortlink "thread".

    Raja,
    your solution is what I was initially looking for, so thank you.
    Can you also supply a link to the article you refer to?  I can't find it:-)
    But while looking for this I found something even better, a way to pass parameters to an iview without having to define them in the iview ApplicationParameter-property.
    Apparently the trick is to add the parameter "DynamicParameter" to the url, that translates to different parameters in your bsp application(iview).
    So if you want your bsp application to have the parameters "roomid=555&date=01.01.2007" your url should be
    http://bla/irj/portal/rooms?DynamicParameter=roomid%3D555%26date%3d01.01.2007
    where %3D is the ascii representation of "=" and %26 is the ascii representation of &.
    I found this here : /message/529588#529588 [original link is broken] , but in this thread they say to separate the parameters by a ";", whereas for me it only works when i use %26 (&).
    Message was edited by: Dries Horions

  • How to install and add Enterprise Portal over an existing ECC server

    Hi Guys
    We have already installed the ERP package (ECC) and we have enough memory and diskspace on the server and there we are considering installing Enterprise Portal over the existing server so that we can use both ECC and EP.
    How can we do this? What are the steps to do it? I want to make sure that we don't corrupt the existing SAP stuff on the server, but just want to install enterprise portal .
    Your comments or suggestions will be highly appreciated.
    Thanks
    Ram

    just went ahead and installed from scratch

  • How to access survey and poll portal?

    hi,
    i got through the document and that say, this is the out of box facility. how can i make a portal link, by clicking that i can access the survey and poll facility?
    please give me steps?
    dhananjay

    You have to add the "Sruvey builder" portlet to an existing page to allow for creation of survey's polls. During creation, you can choose a page to publish the survey to.
    Otherwise, you can create a page and add the Survey FORM portlet to it. Then edit the portlet to display your created survey/poll.
    See the portal admin guide for additional info.

  • How to encrypt user credentials when he logs on the Enterprise Portal

    Hi all,
    I want to use a cookie approach on SAP Enterprise Portal i.e. when the user first logs on, i would create a cookie and store the encrypted password in it so that next time he hits the portal, he is directly authenticated with the help of the cookie.
    For this above functionality, i need to know how the encryption & decryption techniques can be achieved by using the SAP Encryption libraries.
    Would be highly appreciative if i get some info on this.
    Thanx & regards,
    Jitendra Chaudhari
    India

    You can use logon ticket for the implementation you want to do. For security issues you are talking about then you can use the SSL connection for the client who is accessing the SAP Enterprise portal. For SAP Logon Ticket see the login modules CreateTicketLoginModule and EvaluateTicketLoginModule
    Initially set the ume.configuration.active = true
    For the security related issues ypu can set the following properties in the login modules
    1) ume.logon.security.enforce_secure_cookie to TRUE.
    Marks the SAP logon ticket as a secure cookie, to enforce that the client browser sends the cookie only when an SSL connection to the J2EE Engine or the reverse proxy is established.
    2) ume.logon.httponlycookie to TRUE
    If true, the SAP logon ticket is set to HttpOnly. This prevents it from being read by malicious client-side script code such as JavaScript. The setting is only effective for clients that use Microsoft Internet Explorer 6.0 SP1 or higher.
    I would suggest to use the 1st option as SAP also recommend the use of SSL connection for Logon Tickets.
    I wish this could help you a bit.
    Thanks and with regards
    Pravesh

  • How to access a  web service(.wsdl) from portal component.

    Hi ,
    Is there any document/tutorial available on how to access a webservice from portal component ?
    I have found this linkhttps://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/ep/g-i/how to access a web service.htm...
    but the urls in the link are not working...
    i want  to know the steps to access webs service and sample code if some body has already done that..
    Thanks for the help.
    Lakshmi

    Hi Lakshmi,
    See the links below:
    http://help.sap.com/saphelp_nw04/helpdata/en/f0/581140d72dc442e10000000a1550b0/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/a3/918340d990ce62e10000000a155106/content.htm
    Hope this helps.
    Regards,
    Pooja.

  • How insert Enterprise portal in Solution Manager

    Hi guys,
    Can anyone explane me how can I insert an enterprise portal in Solution Manager?
    I have execute this steps:
    - transaction smsy
    - landscape components -> Systems -> Create New System With Assistant
    - Choose SAP Enterprise portal
    After that I can see the Entreprise portal in smsy but I haven't inserted the ip of EP.
    How can connect the E.P. with my solution manager?
    I would  configure the "System Monitoring" scenario for EP..
    Thank in advance for help.
    best regards
    giovanni

    does this actually work out?
    To have SolMan 7.0 EHp1 installed and than to install SAP EPC on top of this?
    SAP EPC is based on NW, so is SolMan 7.0. But according to the SolMan 7.0 Master Guide EPC/EP is not listed as a available Usage Type
    Nesimi

  • How to access the User's login portal ID?

    Hi all,
         How to access the user's portal login id??
       Thanks,
       Anirudh.

    Hi
    Try this
    String loginuser="";
         try{
              IWDClientUser wdUser = WDClientUser.getCurrentUser();
              IUser user = wdUser.getSAPUser();
              if(user != null)
                   IUserAccount acct[] = user.getUserAccounts();
                   if(acct[0] != null)
                        loginuser = acct[0].getLogonUid();
                        strUserid = strUserid + acct[0].getLogonUid();
    }catch(Exception e){
    Kind Regards
    Mukesh

  • ECC Transactions in Enterprise Portal

    We created a transaction iView that calls a specified transaction with the WebGUI, so users can access ECC transactions from our Enterprise Portal, just as they would if opening the desktop GUI.  The start transaction is the SAP Easy Access menu, the sign-on is done with a logon ticket, and the iView has been added to a role so it appears as a tab in the Portal to users.  We have run across an issue with the SAP Business Workplace in the Portal environment.  When a user goes to the workplace and clicks on any items, such as unread documents, work items, etc. in the overview tree nothing appears in the worklist or the work item preview screen areas.  When accessed through the GUI, the transaction functions correctly and data appears in both the worklist and work item preview.  The issue is only when the Business Workplace is access through our Enterprise Portal.  Has anyone ever encountered this issue before?  Any feedback would be greatly appreciated.

    Hi Erin,
    I would recommend to look at the following SAP Note first:
    Note 314568 - SAP GUI for HTML functionality / Limitations / Sp. Behaviour
    We also had some issues with displaying ECC transactions on the portal, but the limitation described in this note helped us to justify the requirements.
    hope this helps.
    harman

  • Access BAPIs Using the SAP Java Resource Adapter

    Hi experts,
    Can someone tell me how to Access BAPIs Using the SAP Java Resource Adapter?

    hi Shweta,
    Please refer the step by step procedure:
    1. Start the deploy tool of the SAP J2EE Application Server with the DeployTool.bat in the directory //<SAP J2EE Engine Installation Directory/.../j2ee/deploying.
    2. Choose Project &#8594; New Project and enter a name for the new project.
    3. Click on the Deployer tab.
    4. From the menu path, choose Deploy &#8594; EAR &#8594; Load Module and select the sapjra.rar file.
    5. For the newly created node sapjra.rar, choose Server Settings &#8594; Identity Subjects and select Caller Impersonation as authentication type, so that the J2EE user data is used to log on to the ABAP system.
    6. Make sure that the J2EE Application Server is running. Connect to the J2EE Application Server with Deploy &#8594; Connect.
    7. Deploy the sapjra.rar using the menu Deploy &#8594; Deployment &#8594; Deploy Module.
    8. Enter SAPJRADemo as application name and start the application.
    9. Close the deploy tool.
    10. Start the Visual Administrator again.
    11. Select the Cluster tab and switch to <Server Node> &#8594; Services &#8594; Connector Container.
    12. Click on the Runtime tab and choose sap.com/SAPJRADemo &#8594; eis/SAPJRADemoFactory.
    13. Choose Managed Connection Factory &#8594; Properties. On this page, you need to specify the logon data for the ABAP system. There is already some dummy data visible in the property list if no real system data has been specified so far.
    14. To change the value of a property, select the property in the list, change the value underneath it, and add the changes using the Add button. At the end, do not forget to save all changes by pressing the button Save Changes. The user configured for the SAP JRA must be the user authorized to read metadata of function modules.

  • Doubts relating to Enterprise Portal?

    Dear all,
    Please help me to understand the following issues, your help will be highly appreciated.
    How the Enterprise portal functionality works for SAP CRM?
    What is the relevance of BSP Applications for Enterprise Portal?
    How can we call SAP CRM Scenarios into Enterprise Portal, like Account Management, Marketing and Campaign management, Opportunity Management, External List management and Activity Management?
    what is the difference between PCUI and Enterprise Portal?
    How IC Webclient communicate with Enterprise Portal?
    Please send me any documentation which explains step by step process with screen shots. as I said earlier your suggestions and help will be highly appreciated.
    thank you
    Raghu Ram

    Dear Ram,
    use the following links,
    <b> EP Functionality  for CRM</b> :
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/ep/connecttoCRMSystemthroughEnterprisePortal7.0UsingaIView&
    http://help.sap.com/saphelp_nw70/helpdata/en/a4/76bd3b57743b09e10000000a11402f/frameset.htm
    <b>BSP Applications for EP</b> :
    http://help.sap.com/saphelp_nw04/helpdata/en/cb/f8751d8c6b254dac189f4029c76112/frameset.htm
    <b>for Overall Idea</b> :
    http://www.sap.com/about/press/factsheets/crm.epx
    <b>Portal Scenario</b> :
    http://help.sap.com/saphelp_nw70/helpdata/en/86/197142801a3654e10000000a155106/frameset.htm
    <b>Scenario for Marketing and Compaign Analysis</b> :
    http://help.sap.com/saphelp_nw70/helpdata/en/a6/d40d2026db90489fe5fd2f99140c53/frameset.htm
    <b>Scenario for Activity Analysis</b> :
    http://help.sap.com/saphelp_nw70/helpdata/en/b7/dfe83f6dcef206e10000000a1550b0/frameset.htm
    <b>Scenario for opportunity Analysis</b> :
    http://help.sap.com/saphelp_nw70/helpdata/en/dc/3ce73f2dc6f106e10000000a1550b0/frameset.htm
    <b>Scenario for External list Analysis</b> :
    http://help.sap.com/saphelp_nw70/helpdata/en/21/04d93ae06ca74c8a9dbf03a9875232/frameset.htm
    <b>Scenario for Account Management</b> :
    http://help.sap.com/saphelp_crm40/helpdata/en/07/d5c39e44b49f42a501878b0c7f86cb/frameset.htm
    http://help.sap.com/saphelp_crm40/helpdata/en/f9/a16b4060a1181ce10000000a1550b0/frameset.htm
    <b>PCUI</b>  : : 
    http://help.sap.com/saphelp_mic10/helpdata/en/f1/b761e81bfdf84dbe8e255dddb64a9c/content.htm
    http://www.ibsg.com.au/solutions_pcui.html
    <b>Portal</b> :
    http://help.sap.com/saphelp_nw70/helpdata/en/a4/76bd3b57743b09e10000000a11402f/frameset.htm
    <b>IC Webclient</b> : 
    http://help.sap.com/saphelp_crm50/helpdata/en/e5/e9bc787a4711d68790005004f2f41f/frameset.htm
    if u watch all the URLs that mentioned above, U will get full idea regarding your questions...
    with hopes,
    Raja Singh

Maybe you are looking for

  • VDI Early Access  - Starting Desktops

    I'm playing around with VDI Early Release 3 trying to get it to work. I've set the whole thing up and now managed to import a windows XP virtual machine. I've assigned a user to the desktop, and still under the vdi webadmin page in the pool section,

  • Rendering AVCHD files to H.264 causes file size to go up!!

    Hi everyone, I have a Sony HDR-SR11 camcorder that produces files in AVCHD format (.mts file extension). The camera natively produces file which are approx 100mb for every 1 min of video (1440x1080 setting). My issues is that when I add files to the

  • Bitmap on title in  Discoverer 4i

    How can i put a Bitmap on the title in Discoverer 4i?? I know how put it in Discoverer Plus, but when you acces to the workbook with Discoverer 4i the bitmat disappered.

  • Want to get rid of silent ring tone for unknown calls

    Since installing iOS 6, my iPhone 4S rings silently when the incoming call is an 'unkown number'. How can I turn this off - I keep missing calls!

  • AP 1231 vlan problem multiple ssid

    Hi all, I have troubles configuring the AP. This is what i want: 1 wireless network SSID WORTEL (vlan 1, my internal network) 1 wireless network SSID GUEST_NETWORK (vlan 10, for guests and user2) With this config only the GUEST_NETWORK have internet