What is 'URL' parameter in JCO.createClient method?

Hi,
What is the 'URL' parameter in the following createClient method.. can anyone provide an example?
public static JCO.Client createClient(
java.lang.String client,
java.lang.String user,
java.lang.String passwd,
java.lang.String lang,
java.lang.String url)
Creates an instance of a client connection to a remote SAP system (with load balancing)
Parameters:
url - the url to the remote host
Thx

Hi Serle,
Use following code for creating Client.
client = JCO.createClient( "100",       // SAP client
                                 "test",   // userid
                                 "*****",     // password
                                 "EN",        // language
                                 "appserver", // host name
                                 "00" );      // system number
Or you can make connection pool and use client from this pool like:
// 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)
      JCO.addClientPool( SID,         // Alias for this pool
                         10,          // Max. number of connections
                         "100",       // SAP client
                         "test",   // userid
                         "*****",     // password
                         "EN",        // language
                         "appserver", // host name
                         "00" );
        // Get a client from the pool
        JCO.Client client = JCO.getClient(SID);
Regards,
Bhavik

Similar Messages

  • Reading url parameter  in HANDLEDEFAULT method

    Hi,
    May be I am doing something very silly but I am trying to read URL parameter in my HANDLEDEFAULT method of  MAIN window , and I am trying to define URL paramter as Method parameters but its gives me run time exception every time 'The ASSERT condition was violated.' 
    my simple paramter is like this  HEADER_ID   TYPE  importing  associated type   STRING
    Can any body help me why this error happens.
    Regards,
    Gaurav

    Hello, Gaurav,
    Have you tried something like this:
      DATA: l_url_parameters          TYPE tihttpnvp,
            l_url_parameter           TYPE ihttpnvp.
      wdevent->get_data( EXPORTING name  = if_wd_application=>all_url_parameters
                         IMPORTING value = l_url_parameters ).
      READ TABLE l_url_parameters WITH KEY name = 'parameter_name'
                                  INTO l_url_parameter.
      IF sy-subrc EQ 0.
    *    your value treatment here
      ENDIF.
    There's no need to declare your parameters as method parameters.
    Regards,
    Andre

  • WDDOINIT and URL Parameter

    Hi Folks
    How can I access the URL parameter in WDDO INIT method of the window. I am trying to use ALL_URL_PARAMETER but its giving me error.
    I am using the following code:
    data: lo_component type ref to if_wd_component.
            lo_application type ref to if_wd_application.
    lo_component = wd_comp_controller->wd_get_api( ).
    lo_application = lo_component->get_application( ).
    lo_application=>ALL_URL_PARAMETERS.
    Regards
    Waz

    Hi Waz,
    You would need to call this from within the inbound plug of your window. Something like:
    wdevent->get_data( EXPORTING name = '_ALL_URL_PARAMETERS'
                                 IMPORTING value  = lt_all_url_param ).
    WDEVENT is a default parameter for the DEFAULT inbound plug.
    Try go through this [thread |Read URL Parameters programmatically;for more details regarding the same. You can't directly use ALL_URL_PARAMETER in your WDDOINIT as you dont have the WDEVENT being passed to it.
    Regards,
    Uday

  • The url parameter format of the JCO.createClient()

    Hi there,
    In JCO library, we have a function:
    createClient
    public static JCO.Client createClient(java.lang.String client,
                                          java.lang.String user,
                                          java.lang.String passwd,
                                          java.lang.String lang,
                                          java.lang.String url)Creates an instance of a client connection to a remote SAP system (with load balancing)
    Parameters:
    client - SAP logon client
    user - SAP logon user
    passwd - SAP logon password
    lang - SAP logon language
    url - the url to the remote host
    Returns:
    the newly created client
    This function takes a parameter url. Does anyone know the format of it?
    Thanks

    hi,
       as per my knowledge that is not url that is host name
    mConnection =
    JCO.createClient("001", // SAP client
    "<userid>", // userid
    "****", // password
    "EN", // language (null for the default language)
    "<hostname>", // application server host name
    "00"); // system number
    host name is the system's ip address as per my knowledge
    regards,
    pavan

  • How to catch URL parameter from Portal URL in Web Dynpro iView

    Hi All,
    I have a web dynpro application running as a portal iView successfully. Now the client wants to make it internationalized with 7 languages. Currently they access the portal - and via role assignment they get to the portal tab with the wd iView. Now they want to send a parameter for the language key with the portal URL. So when they are typing in http://myportal.mydomain.com now they want to type in http://myportal.mydomain.com?sap-locale=de or so. My question is how can I catch this parameter in the WD application when it is running inside a portal iView? Is it at all possible?
    I have written a very small application which is trying to catch a URL parameter named PARAM. The code I have written is the default one as below:
    String paramValue = WDWebContextAdapter.getWebContextAdapter().getRequestParameter("PARAM");
    When I run the application standalone and add the PARAM=something in last of the URL I can catch it. But when I create an iView and while previewing it I add the same PARAM value it is coming as null all the time. Same when I add this iView to a role and show it via role assignment in protal. Please help to let me know how to achieve this. I think if I can read the parameter value from Portal URL in the WD iView - then I can set it as the default locale of the application and then show language specific file to achieve internationalization.
    Your urgent help will be highly appreciated.
    Warm Regards,
    Shubho

    Hi Shubhadip
    Even if you get the parameters, how do you internationalize your application? Are you not following the standard way as described in the following link. In this case you never need to capture any such parameter. This is done by the WD runtime automatically .
    <a href="http://help.sap.com/saphelp_erp2005/helpdata/en/f4/d95664da179b4db731e21c2e470b72/frameset.htm">Internationalization of WD projects</a>
    You can retrieve application parameters specified at the creation of iview by "adding parameters(with the same name as in iview application parameters) to the default plug of the Component Interface View of the WD application". "onDefaultPlug" method of the interface view controller you get these values as parameters, which you can save in the context node of component controller for later use.This is guaranteed to work.
    But again this is not what you want exactly. You want the user to specify the value at runtime. If you have just 7 languages, you can create 7 set of iviews with different application parameter value indicating language key, and assign to 7 different set of roles, each representing one set of users with common language.
    I hope you find a solution.
    Regards
    kk

  • ABAP -WebDynpro - Read URL Parameter

    Hi,
    We have a Custom 'Catalog' that needs to be called from SRM using OCI (Open Catalog Interface). We are developing this custom catalog using ABAP Web Dynpro. We have following issues because of which we are unable to communicate back to Shopping cart from the Custom Catalog:
    1. Unable to read the value of 'HOOK_URL' in WebDynpro application. We need this value so that it can be used as Exit URL. How and where do we read this URL parameter in ABAP WebDynpro ?
    2. How can we return the 'HTML Form' to SRM with the values from Custom Catalog to fill the shopping cart ?
    I would appreciate your help...
    Thanks
    Meenal

    Hi Menal,
    I had the same problem.
    Did you define the HOOK_URL parameter in your webservice ? If not, do this 1st.
    2nd
    In you Webdynpro read the HOOK_URL in your handledefault method your window. Store it e.g. as attrribute in you assistance class.
    method handledefault .
    *&- Add FOF and HOOK_URL to assistanceclass attributes
      wd_assist->hook_url = hook_url.
    endmethod.
    After this you can read your HOOK_URL e.g in a view via:
    concatenate 'HOOK_URL=' wd_assist->hook_url zlv_hook_url into zlv_hook_url
    I hope your question is answered.
    What I want to now is: How to controll the HOOK_URL so that the formfields of the extenal catalog is added to the shopping card. Do you now that ?
    John

  • How to change the fields in a JSF form based on a URL parameter

    I am trying to build a generic JSF form of parameters which I want to dynamically change (i.e.
    change which field is visible, what the label text should be, etc) based on a URL parameter.
    I can set the fields using logic in the backing bean as an action on a command button pressed.
    But how do I do it based on the URL parameter ? I can retrieve the URL parameter but I
    don't know where to put (or hook) the Java code to do this initialization prior to
    the page being rendered for the first time.
    The fields in the JSF is being configured dynamically using a database table.
    BTW I am using Jdeveloper 10.1.3.5
    Thanks
    CK

    Thanks. I decided to set a Session bean to store the value of the URL parameter (if it is set)
    and then to use the session bean to initialize the attributes of the fields on the JSF Page.
    There also seems to be some caching of the inputText fields (i.e. it reverts back to the first
    initialized value) even though I tried to change it using the URL parameter in the requestScope
    backing bean. So, setting the values into the Session bean and retrieving it back from there
    seems to be more reliable.

  • What are the parameters in Call transaction method?

    Hi ABAPER'S,
        Please give me what are the parameters in call transaction method?
    Thanks,
    Prakash

    Processing batch input data with CALL TRANSACTION USING is the faster of the two recommended data transfer methods. In this method, legacy data is processed inline in your data transfer program.
    Syntax:
    CALL TRANSACTION <tcode>
    USING <bdc_tab>
    MODE  <mode>
    UPDATE  <update>
    <tcode> : Transaction code
    <bdc_tab> : Internal table of structure BDCDATA.
    <mode> : Display mode:
    A
    Display all
    E
    Display errors only
    N
    No display
    <update> : Update mode:
    S
    Synchronous
    A
    Asynchronous
    L
    Local update
    A program that uses CALL TRANSACTION USING to process legacy data should execute the following steps:
    Prepare a BDCDATA structure for the transaction that you wish to run.
    With a CALL TRANSACTION USING statement, call the transaction and prepare the BDCDATA structure. For example:
    CALL TRANSACTION 'TFCA' USING BDCDATA
    MODE 'A'
    UPDATE 'S'.
    MESSAGES INTO MESSTAB.
    IF SY-SUBRC <> 0.
    <Error_handling>.
    ENDIF.
    The MODE Parameter
    You can use the MODE parameter to specify whether data transfer processing should be displayed as it happens. You can choose between three modes:
    A Display all. All screens and the data that goes in them appear when you run your program.
    N No display. All screens are processed invisibly, regardless of whether there are errors or not. Control returns to your program as soon as transaction processing is finished.
    E Display errors only. The transaction goes into display mode as soon as an error in one of the screens is detected. You can then correct the error.
    The display modes are the same as those that are available for processing batch input sessions.
    The UPDATE Parameter
    You use the UPDATE parameter to specify how updates produced by a transaction should be processed. You can select between these modes:
    A Asynchronous updating. In this mode, the called transaction does not wait for any updates it produces to be completed. It simply passes the updates to the SAP update service. Asynchronous processing therefore usually results in faster execution of your data transfer program.
    Asynchronous processing is NOT recommended for processing any larger amount of data. This is because the called transaction receives no completion message from the update module in asynchronous updating. The calling data transfer program, in turn, cannot determine whether a called transaction ended with a successful update of the database or not.
    If you use asynchronous updating, then you will need to use the update management facility (Transaction SM12) to check whether updates have been terminated abnormally during session processing. Error analysis and recovery is less convenient than with synchronous updating.
    S Synchronous updating. In this mode, the called transaction waits for any updates that it produces to be completed. Execution is slower than with asynchronous updating because called transactions wait for updating to be completed. However, the called transaction is able to return any update error message that occurs to your program. It is much easier for you to analyze and recover from errors.
    L Local updating. If you update data locally, the update of the database will not be processed in a separate process, but in the process of the calling program. (See the ABAP keyword documentation on SET UPDATE TASK LOCAL for more information.)
    The MESSAGES Parameter
    The MESSAGES specification indicates that all system messages issued during a CALL TRANSACTION USING are written into the internal table <MESSTAB> . The internal table must have the structure BDCMSGCOLL .
    You can record the messages issued by Transaction TFCA in table MESSTAB with the following coding:
    (This example uses a flight connection that does not exist to trigger an error in the transaction.)
    DATA: BEGIN OF BDCDATA OCCURS 100.
    INCLUDE STRUCTURE BDCDATA.
    DATA: END OF BDCDATA.
    DATA: BEGIN OF MESSTAB OCCURS 10.
    INCLUDE STRUCTURE BDCMSGCOLL.
    DATA: END OF MESSTAB.
    BDCDATA-PROGRAM = 'SAPMTFCA'.
    BDCDATA-DYNPRO = '0100'.
    BDCDATA-DYNBEGIN = 'X'.
    APPEND BDCDATA.
    CLEAR BDCDATA.
    BDCDATA-FNAM = 'SFLIGHT-CARRID'.
    BDCDATA-FVAL = 'XX'.
    APPEND BDCDATA.
    BDCDATA-FNAM = 'SFLIGHT-CONNID'.
    BDCDATA-FVAL = '0400'.
    APPEND BDCDATA.
    CALL TRANSACTION 'TFCA' USING BDCDATA MODE 'N'
    MESSAGES INTO MESSTAB.
    LOOP AT MESSTAB.
    WRITE: / MESSTAB-TCODE,
    MESSTAB-DYNAME,
    MESSTAB-DYNUMB,
    MESSTAB-MSGTYP,
    MESSTAB-MSGSPRA,
    MESSTAB-MSGID,
    MESSTAB-MSGNR.
    ENDLOOP.
    The following figures show the return codes from CALL TRANSACTION USING and the system fields that contain message information from the called transaction. As the return code chart shows, return codes above 1000 are reserved for data transfer. If you use the MESSAGES INTO <table> option, then you do not need to query the system fields shown below; their contents are automatically written into the message table. You can loop over the message table to write out any messages that were entered into it.
    Return codes:
    Value
    Explanation
    0
    Successful
    <=1000
    Error in dialog program
    > 1000
    Batch input error
    System fields:
    Name:
    Explanation:
    SY-MSGID
    Message-ID
    SY-MSGTY
    Message type (E,I,W,S,A,X)
    SY-MSGNO
    Message number
    SY-MSGV1
    Message variable 1
    SY-MSGV2
    Message variable 2
    SY-MSGV3
    Message variable 3
    SY-MSGV4
    Message variable 4
    Error Analysis and Restart Capability
    Unlike batch input methods using sessions, CALL TRANSACTION USING processing does not provide any special handling for incorrect transactions. There is no restart capability for transactions that contain errors or produce update failures.
    You can handle incorrect transactions by using update mode S (synchronous updating) and checking the return code from CALL TRANSACTION USING. If the return code is anything other than 0, then you should do the following:
    write out or save the message table
    use the BDCDATA table that you generated for the CALL TRANSACTION USING to generate a batch input session for the faulty transaction. You can then analyze the faulty transaction and correct the error using the tools provided in the batch input management facility.

  • Webdynpro appln Url parameter "sap-wd-client= XML client "

    Hi all,
        I am a beginner in Webdynpro application development.
    I have a query on the usuage of Url parameter "sap-wd-client=XmlClient" in webdynpro application.
          When i set the Application parameter property of webdynpro iview in portal as "sap-wd-client=XmlClient", i am getting the content of webdynpro appln in XML format. What is the use of this XML format.
    Can we use this webdynpro appln in XML format in any other portal say Weblogic portal and produce an UI in that portal.
    Let me know the use of this XML format.
    Pls give me some exposure on this.
    Thanks & Regards,
    Siva

    Hi sivakumar,
    It is used for supplying data to another kind of client. You can download a trial version of it somewhere on SDN.
    Best regards,
    Thomas

  • [php+mysql] How to select a column using URL parameter?

    Hi all,
    I need to select a specific column from a mysql db.
    I have the column name in a URL parameter.
    How can I set a query so that it sounds like this:
    SELECT $_GET['id'] FROM mytable ORDER BY myorder ASC?
    I tried everything with dreamweaver but I cannot get anything
    similar
    to what I need.
    Is there a solution?
    TIA
    tony

    sweetman wrote:
    > How can I set a query so that it sounds like this:
    >
    > SELECT $_GET['id'] FROM mytable ORDER BY myorder ASC?
    You can't do it through the Recordset dialog box. The simple
    way to do
    it is to create this query in the Recordset dialog box:
    SELECT * FROM myTable
    ORDER BY myOrder ASC
    Then go into Code view and locate the following line:
    $query_recordsetName = "SELECT * FROM myTable ORDER BY
    myOrder ASC";
    Change it to this:
    if (isset($_GET['id'])) {
    $col = get_magic_quotes_gpc() ? stripslashes($_GET['id']) :
    $_GET['id'];
    $col = mysql_real_escape_string($_GET['id']);
    else {
    $col = '*';
    $query_recordsetName = "SELECT $col FROM myTable ORDER BY
    myOrder ASC";
    David Powers, Adobe Community Expert
    Author, "The Essential Guide to Dreamweaver CS3" (friends of
    ED)
    Author, "PHP Solutions" (friends of ED)
    http://foundationphp.com/

  • Call View controller with some URL parameter

    Hi
    I have a 3rd party system which need to send some data to my CRM system.
    One approch which is being suggested is by sending data by URL parameter.
    I have made a new component for this and have provided the 3rd party with its URL .
    The issue with calling a view controller URL along with some specific URL parameters is that i am not able to access its parameters.when i call method GET_PAGE_URL from the DOINIT method of the controller it does not provide me with the parameter list .
    How can i access these URL parameters ?
    Regards
    Ajitabh

    HI,
    have a look at component CRM_UI_FRAME. In the page default.htm they extract URL parameters.
    You have got the REQUEST variable in your view controller as well.
    cheers Carsten

  • Passing date criteria in url parameter

    Hi,
    I want to filter a recordset by a given date.
    Create the recordset, if I use a runtime value of #27/11/06#
    all the records for that date are returned.
    However, when I try to pass the same information through an
    URL Parameter it doesn't work.
    Is there a problem with passing this info in that way?
    Thanks, Mark.

    No, should be absoloutely fine. The prob is most likely to do
    with your SQL
    statement.
    As a test, don't display any records. At the top of your
    page, try
    outputting the completed SQL statement onto the page to see
    what it looks
    like. The problem being you may need to add the # symbols
    manually. Should
    look something like
    "SELECT * FROM TableName WHERE DateField = #" &
    URLParameter & "#"
    HTH,
    Piers

  • Calling a page with ajax based on url parameter

    please can anyone help me with this problem that i've encountered. i'm able to capture a url parameter with javascript and i want to add it to my jquery code which calls a page in a div  but i'm able to do it. here's my code:
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js"></script>
    <script language="javascript" type="text/javascript">
    function urlink()
    var tlink = window.location.search.substring(1)
    jQuery(function($){
        $('#mydiv').load('real_news.asp?'+ urllink());
    </script>

    Your jquery is trying to add data by calling a function. Also, you're just getting the value of the parameter. There's not a key to trigger anything on your server-side script. Make sure real_news.asp is processing correctly, looking for key (some-key) AND value (tlink). You might want to simply try concatenating the value of the var like this though:
    <script>
    var tlink = window.location.search.substring(1);
    $('document').ready(function() {
    $("#mydiv").load("real_news.asp?some-key=" + tlink);
    </script>
    Another way you could do it is use server side scripting to look and see if the URL-PARAM is set and if it is then echo value of URL-PARAM into load() method. php example below. I'm sure you can find an asp equivalent to achieve the same result. I think the key (pun) to this problem is that you do not have a key to associate the value with in order to process anything.
    <script>
    <?php if (isset($_GET['URL-PARAM'])) { ?>
    $('document').ready(function() {
    $("#mydiv").load("real_news.asp?some-key=<?php echo $_GET['URL-PARAM']; ?>");
    <?php }else{ ?>
    alert ("there is no ?URL-PARAM=something in the URL!!!");
    <?php } ?>
    </script>
    best,
    Shocker

  • Pagination with url parameter?

    I have a page that displays the contents of a mysql database
    via a dynamic table.
    currently I have the recordset query set to filter the id by
    url parameter "catID".
    So page?catID=5 displays the contents of record id 5 of the
    mysql table.
    I am trying to add pagination to this page but do not know
    what I am doing :L
    I can use the wizard to place pagination if I remove the
    filter on the query, and happily page through all the
    records....however I want my cake and want to eat it to...so I
    really want to get the pagination working and still be able to use
    the url parameter function to pinpoint records.
    Thanks for your time and assistance.
    Saw

    Saw_duuhst wrote:
    > dreamweaver cs3, mysql, php
    Just make sure your recordset is filtering from the
    querystring and your
    pagination links should be inserting them too. In all the ASP
    pages I
    have made with pagination they always carry over the
    querystring.
    Dooza
    Posting Guidelines
    http://www.adobe.com/support/forums/guidelines.html
    How To Ask Smart Questions
    http://www.catb.org/esr/faqs/smart-questions.html

  • Alternatives to long parameter lists when calling methods

    I've heard you shouldn't have more than 3 parameters when calling methods. What are the alternatives to long parameter lists when calling methods? Compounding parameters into new inner classes, declaring them as member fields? Which one is preferable?

    Okay, I get it. But since it's late in the day, I'll share my additional wandering thoughts. And I'll just go ahead and preemptively slap myself for doing so. Ouch! There. So the rules are more like this:
    1) Only use setters if the values in question are meant to be part of the state of an object.
    2) In general, don't let external entities directly set the state of an object.
    Which can be combined into:
    1) In general, never use setters.
    Which could be reworded to:
    1) Only use setters in non-general situations.
    Or:
    1) Only use setters when setters are a good solution...which isn't very often...generally speaking...
    Or if I were to infer when it's a good solution:
    1) Only use a setter when it is useful to the caller and has no significant negative effects on the operation of the object nor the maintainability, size, or performance of the class...generally speaking...
    Actually, you might just infer from here forward that the "generally speaking" is implicit to every rule, and is essentially the "There is an exception to every rule" rule. Which is an interesting rule because it can be applied to itself, resulting in a paradox...generally speaking...but I digress.
    And then translated back to the original topic:
    1) You can use a setter instead of a constructor argument so long as the value isn't needed at time of construction (or a default value will suffice) and it is useful for the caller to be able to use the setter and using the setter has no significant negative effects on the operation of the object nor the maintainability, size, or performance of the class.
    But this won't quite cut it either. With the input of others, we could eventually devise a very concise rule, but it will end up being so long that on one will ever read it...making it an ideal candidate to be included in a legal document. Which will eventually find it's way into a very long scroll pane with a check box at the end exclaiming that you read the document, at which you will not be able to continue unless you check the check box...at which point, what do you do? After all, you are not a liar...generally speaking...
    In summary, you could potentially use setters in some limited cases, but in the general sense, that's more of an option than a recommendation. :-)

Maybe you are looking for