How to call an external server from Webdynpro program?

Hi All,
i have a requirement in which i have to call an external server from Webdynpro ABAP program.
how to imp

hi ,
do u mean u need to call the external link from ur WD ABAP application ?
if so , u either create
1 a Link to URL ( LTU ) UI element  and call the external link using that
2 if u wish to use some other fuctionality and thn wish to call the URL in ur application ,u write this piece of code in ur relevant on Action method :
data:  lo_window_manager type ref to if_wd_window_manager.
data:  lo_api_component  type ref to if_wd_component.
data:  lo_window         type ref to if_wd_window.
data:  ld_url type string.
lo_api_component  = wd_comp_controller->wd_get_api( ).
lo_window_manager = lo_api_component->get_window_manager( ).
ld_url =  ''.  // ur external sever link here
CALL METHOD lo_window_manager->CREATE_EXTERNAL_WINDOW     
EXPORTING     URL                = ld_url           
RECEIVING     WINDOW         = lo_window.
lo_window->open( ).
I hope u wud be able to create URL now .
regards,
amit
Edited by: amit saini on Oct 13, 2009 11:25 AM

Similar Messages

  • How to call a maintenance view  from a program

    Hello Abapers,
    Can anybody explain with some examples. How to call a mainetenance view from a program.
    Thanks
    Ranjith.

    Use FM 'VIEW_MAINTENANCE_CALL'.
    REPORT  zmaintaintest.
    VARIABLES / CONSTANTS                          
    CONSTANTS: 
                    c_action(1) TYPE c VALUE 'U',                                 "Update
              c_viewname TYPE tabname value 'ZEMP_EXAMPLE', "View Name
              c_field(6) TYPE c VALUE 'EMPNO'.                            "Field Name
    INTERNAL TABLES
    DATA: itab_rangetab TYPE STANDARD TABLE OF vimsellist,
              v_empno TYPE zempno,
              wa_rangetab TYPE vimsellist.
    SELECTION SCREEN
    PARAMETERS:     p_empno TYPE   zempno   OBLIGATORY.  "Emplyee ID
    AT SELECTION-SCREEN                                                 
    AT SELECTION-SCREEN.
    Chcking the existence of the user in EMPLOYEE table
      PERFORM validate_employee.
    START_OF_SELECTION                                                  
    START-OF-SELECTION.
    This will restrict the user view so that user can only view/change
    Table data corresponding to his/her Employee ID
      PERFORM define_limited_data_area.
    Displaying table maintenance view for a particular employee ID
      PERFORM call_view_maintenance.
    *&      Form validate_employee
    Validate plant entered in the selection screen
    FORM validate_employee.
      SELECT SINGLE empno     u201CEmployee ID
        FROM zemp_example     u201CEmployee Table
        INTO v_empno
        WHERE empno = p_empno.
      IF sy-subrc <> 0.
        MESSAGE 'Not an Valid User' TYPE 'I'.
      ENDIF.
    ENDFORM.                    "validate_employee
    *&      Form DEFINE_LIMITED_DATA_AREA
    To restrict the user view so that user can see/change table data
    corresponding to his employee ID. Here one internal table is
    getting populated with field name as u201CEMPNOu201D (Key field of the table)
    And value as given by user in Selection Screen and this is passed as
    Parameter in function module 'VIEW_MAINTENANCE_CALL'
    FORM define_limited_data_area.
      CLEAR wa_rangetab.
      wa_rangetab-viewfield  = c_field.
      wa_rangetab-operator  = 'EQ'.
      wa_rangetab-value       = p_empno.
      APPEND wa_rangetab TO itab_rangetab.
    ENDFORM.                    "define_limited_data_area
    *&      Form CALL_VIEW_MAINTENANCE.
    Displaying table maintenance view for a particular employee ID
    FORM call_view_maintenance.
      CALL FUNCTION 'VIEW_MAINTENANCE_CALL'      
        EXPORTING
          action           = c_action
          view_name   = c_viewname
        TABLES
          dba_sellist     = itab_rangetab.
    ENDFORM.                    "call_view_maintenance
    Regards,
    Joy.

  • How to call an alv report from another program and return back

         Hello ,
    I am calling one abap program (Prgm B) from another program (Prgrm A).
    Here, Prgm B is an ALV report. I have fetch some data from Prgem B that gets stored in an internal table.
    Now, I am using below code in Prgrm A,
      SUBMIT Prgrm B VIA SELECTION-SCREEN
                          WITH SELECTION-TABLE rspar
                          EXPORTING LIST TO MEMORY
                          AND RETURN.
    When Prgrm A executed, it lead me to selection screen of Prgrm B and when I click F8, it shows me the report output, In short, it doesnt return back to Prgrm A. It ends up showing me the alv report if Prgrm B even afetr using RETURN statement.
    I want to get back to Prgrm A by fetching some data from Prgrm B.
    Please let me know, if i am missing something.
    Regards,
    Seema

    Hi Seema,
    Refer below code.
    DATA: v_matnr LIKE mara-matnr.
    DATA: t_listobject TYPE abaplist OCCURS 0 WITH HEADER LINE.
    DATA: t_mara TYPE mara OCCURS 0 WITH HEADER LINE.
    DATA: BEGIN OF t_ascilist OCCURS 0,
             line(200).
    DATA: END OF t_ascilist.
    data var(3) type c.
    SELECT-OPTIONS: s_matnr FOR v_matnr.
    var = '  3'.
    START-OF-SELECTION.
       SUBMIT ztestaks1 WITH s_matnr IN s_matnr EXPORTING LIST TO MEMORY
       AND RETURN.
       CALL FUNCTION 'LIST_FROM_MEMORY'
            TABLES
                 listobject = t_listobject
            EXCEPTIONS
                 not_found  = 1
                 OTHERS     = 2.
       IF sy-subrc <> 0.
         MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                 WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
       ELSE.
         CALL FUNCTION 'LIST_TO_ASCI'
    *     EXPORTING
    *       LIST_INDEX               = -1
    *       WITH_LINE_BREAK          = ' '
           TABLES
             listasci                 = t_ascilist
             listobject               = t_listobject
           EXCEPTIONS
             empty_list               = 1
             list_index_invalid       = 2
             OTHERS                   = 3.
         IF sy-subrc <> 0.
           MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                   WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
         ELSE.
           WRITE:/ 'Below are the lines from the submitted program.'.
           LOOP AT t_ascilist.
             WRITE:/ t_ascilist-line.
           ENDLOOP.
           SKIP 2.
         ENDIF.
       ENDIF.
       IMPORT t_mara FROM MEMORY ID 'T_MARA'.
       WRITE:/
    'Here is the output from the table exported from the submitted program.'
       LOOP AT t_mara.
         WRITE:/ t_mara-matnr.
       ENDLOOP.
    Submitted program
    REPORT  ZTESTAKS1.
    DATA: v_matnr LIKE mara-matnr,
           v_maktx LIKE makt-maktx.
    DATA: t_mara TYPE mara OCCURS 0 WITH HEADER LINE.
    DATA: BEGIN OF t_makt OCCURS 0,
             matnr LIKE makt-matnr.
    DATA: END OF t_makt.
    SELECT-OPTIONS: s_matnr FOR v_matnr,
                     s_maktx FOR v_maktx.
    START-OF-SELECTION.
       SELECT matnr INTO TABLE t_makt
                    FROM makt
                   WHERE matnr IN s_matnr
                     AND maktx IN s_maktx.
    if not t_makt[] is initial.
       SELECT * FROM mara
                INTO TABLE t_mara FOR ALL ENTRIES IN t_makt
               WHERE matnr = t_makt-matnr.
    endif.
       EXPORT t_mara TO MEMORY ID 'T_MARA'.
       WRITE:/ 'This list is from the submitted program'.
       SKIP 1.
       LOOP AT t_mara.
         WRITE:/ t_mara-mtart.
       ENDLOOP.
    Hopes this helps you.
    Thanks,
    Ashok.

  • How to call a external software in java program?

    for example, if I want to execute internet explore or windows word in java program, how to do it?

    // Modified from Just Java
    import java.io.*;
    public class execDir {
    public static void main(String args[]) {
    try {
    Runtime rt = Runtime.getRuntime(); // step 1
    Process prcs = rt.exec("doDir.bat"); // step 2
    InputStreamReader isr = // step 3
    new InputStreamReader( prcs.getInputStream() );
    BufferedReader br = new BufferedReader( // step 4.
    isr );
    String line;
    while ((line = br.readLine()) != null)
    System.out.println(line);
    } catch(IOException ioe) { System.out.println(ioe); }
    Maybe this will help you.

  • How to call the 2 Tcodes from single program.

    Dear Friends,
    I would like to call 2 tcodes form a single program based on some conditions like :
    I have a program ZRR wich is madule pool report with selection screen and screen 100, 200.
    If I excuted tcode ZXX then I need to call the report with selectin screen ( from there with giving some input data I will go to screen 100 ),
    If I excuted tcode ZYY then I need to call the same report skiping the selection screen and need to go directly screen 200.
    Pls help me on this if any bady is faced the similar problem.
    Thanks,
    Sridhar

    hi,
    yes you can do this..
    try this
    create a two screen suppose 9000 and 9001..
    then right click on your program name...
    create a TCODE say TONE..
    in this give the screen number 9000..
    now again right click on the program name
    create a TCODE say Tsecond
    in this give the screen number 9001...
    hope this will help you..
    Regards
    Ritesh J

  • How to call a badi implementaion from report program

    Hi ABAP Guru,
    I have ZBADI_FALLBACK_DEF new badi created by me and there two implementation ZBADI_FALLBACK_IMP and ZBADI_FALLBACK_IMP1
    Now I am calling this badi from report program
    DATA:
       W_HANDLE TYPE REF TO ZBADI_FALLBACK_DEF.
    * GET BADI - for getting objects..................
    GET BADI W_HANDLE.
    * CALL BADI - for calling interface methods.
    CALL BADI W_HANDLE->ADD.
    This is fine,,,
    But I want to call only one implementaion ZBADI_FALLBACK_IMP.But here two implementaion is called.Please help....

    Hi Palash,
    Then you create filter BADI  and  use filter in implementation.
    While getting BADI reference use filter
    GET BADI W_HANDLE FILTERS
    Thanks & Regards,
    Arun

  • Getting APPSRV_JNDI_LOOKUP_ERROR while calling CAF Ext Serv from WebDynpro

    Hi,
    Iam developing a Composite application using CAF External Service & Application Service with a Web Dynpro UI wherein all the business logic is developed and invoked as web services. I do not face any problem in generating project code, building, deploying and running the application in my machine. But when I deploy the relevant .ear files to some other machine, I get APPSRV_JNDI_LOOKUP_ERROR and Iam unable to perform any operation which invokes a web service.
    Iam only trying to deploy in some other machine the following .ear files available in my machine available at ...\LocalDevelopment\DCs\sap.com\project\... folder :-
    sap.com~project.ear
    sap.comprojectmetadata.ear
    sap.comprojectpermissions.ear
    sap.comprojectwebdynpro.ear
    The following is the exception trace that I get :-
    ===========================================================
    Message : APPSRV_JNDI_LOOKUP_ERROR
    [EXCEPTION]
    com.sap.caf.rt.exception.ServiceException: Object not found in lookup of ZWSD__MATERIAL__SAVEDATA.
         at com.sap.pxwebservice.utils.HomeFactory.getLocalHome(HomeFactory.java:60)
         at com.sap.pxwebservice.appsrv.materialsavedata.MaterialSaveDataBean.getZWSD__MATERIAL__SAVEDATA(MaterialSaveDataBean.java:341)
         at com.sap.pxwebservice.appsrv.materialsavedata.MaterialSaveDataBean.MaterialSaveData(MaterialSaveDataBean.java:315)
         at com.sap.pxwebservice.appsrv.materialsavedata.MaterialSaveDataLocalLocalObjectImpl0.MaterialSaveData(MaterialSaveDataLocalLocalObjectImpl0.java:103)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    ===========================================================
    Please let me know :-
    1) I find that always one more file called .ear is created under ...\LocalDevelopment\DCs\sap.com\project\webdynpro\_comp
    But Iam unable to deploy this because it always throws invalid ear error. If I need to deploy this also, how do I do it ?
    2) Is my deployment approach correct ? Is there any other simpler approach ?
    3) If I need to deliver the project binaries to a third party how do I package them to ensure that it can be re-deployed at the other end ?
    Thanks in advance,
    Regards,
    Rajkumar

    Looks like a known issue with missing jar files.
    Please refer to Oracle support document - [ID 1332553.1]

  • How to call an external application from the current one

    Hi Guys,
    Im not sure if/how this is possible.
    For example:
    I have two projects : Project1 and Project 2.
    When I click on a button in Project2, Project1 needs to be launced. That is, the Main class of Project1 needs to be triggered.
    How do I do this? I have tried everything.
    Kind Regards,
    Christiaan

    There is no problem with handling multiple Frame with a javaFX app. Some features are needed to improve that, like AlwaysOnTop, modal, ...
    For exemple it can be used like a splashscreen.
    If your question was about launching anything on your machine, the regular java API can do that.

  • How to call a perl module from Java program.

    Hi,
    I create a simple java program as follows
    class test{
    public static void main(String args[])
    {try {                    
    Runtime r = Runtime.getRuntime();
    r.exec("perl test.pl");
    catch(Exception e)
    {e.printStackTrace();}
    and test.pl is located in the same directory as the java program. The program compiles but with no return as I execute it. I am not sure what is wrong.
    Thanks,

    I think the wrong line is here; r.exec("perl test.pl");
    Usually the JVM needs the full path.If the path for either the executable or the script was wrong then, given the code posted, it would not hang.
    >
    To automatticaly get the path (if the file is in the
    class path) use
    System.getProperty("java.class.path")
    That gets paths(plural).
    Try this:
    r.exec("perl " +
    System.getProperty("java.class.path") + "\test.pl");I am rather certain that that won't work on any standard operating system.

  • Call more external webservice from apex

    How can call more external webservice from apex - consecutively one after another - one execute, than next used as a parameter of the previous webservice results

    Sandboxed solution server code can't call an external web service.  There are ways to write a sandboxed solution that calls a web service using client side code.  Here's a sample of a silverlight application deployed via the sandbox that can call
    an external web service.
    http://msdn.microsoft.com/en-us/library/gg615590(v=office.14).aspx
    Paul Stork SharePoint Server MVP
    Principal Architect: Blue Chip Consulting Group
    Blog: http://dontpapanic.com/blog
    Twitter: Follow @pstork
    Please remember to mark your question as "answered" if this solves your problem.

  • How to call a web service from forms 9i

    Hello all, I was trying to run the example on this website that shows how to call a webservice from forms, and I recieved an error. I am at the last step, where it tells me to create a button and add a when button pressed trigger. Here is the code I am using from the example:
    DECLARE
    jo ora_java.jobject;
    rv ora_java.jobject;
    ex ora_java.jobject;
    BEGIN
    jo := CurrencyExchangeServiceStub.new;
    --This will get the exchange rate from US Dollars to UK Sterling.
    rv := CurrencyExchangeServiceStub.getRate(jo,'USA','UK');
    message (float_.floatValue(rv));
    EXCEPTION
    WHEN ORA_JAVA.JAVA_ERROR then
    message('Unable to call out to Java, ' ||ORA_JAVA.LAST_ERROR);
    WHEN ORA_JAVA.EXCEPTION_THROWN then
    ex := ORA_JAVA.LAST_EXCEPTION;
    message(Exception_.toString(ex));
    END;
    It gives me an error on"Exception_.tostring" component must be declared. Does anyone have any suggestions? I am trying to figure out how to call an external WS from a form. Thanks.

    IN forms Builder under Import java classes
    Change the Import Classes field to java.lang.Exception and press Import. This will create a PL/SQL package for the Exception Java class. While this is not essential, it does make error reporting easier. Now press Close to dismiss the dialog.

  • How to call an external web service from OIM?

    Hi,
    I have a question on how to call an external web service from OIM within e.g. creating user process? How should it be done; through adapter and task in the process?
    Any recomendations?
    Thanks in advance!

    it is not clear to me if you are having problems with calling java code from OIM or if the problem is the web service API.
    Lets do some divide and conquer:
    Can you create a simple java class that just writes a couple of lines to the log? Please attach this code to the OIM task and make sure it runs.
    Once this works we can start looking at the web service call.
    Best regards
    /Martin

  • How to call a sql server stored procedure from oracle

    Hi all,
    Please anybody tell me how to call a sql server stored procedure from oracle.
    I've made an hsodbc connection and i can do insert, update, fetch data in sql server from oracle. But calling SP gives error. when I tried an SP at oracle that has line like
    "dbo"."CreateReceipt"@hsa
    where CreateReceipt is the SP of sql server and hsa is the DSN, it gives the error that "dbo"."CreateReceipt" should be declared.
    my database version is 10g
    Please help me how can i call it... I need to pass some parameters too to the SP
    thanking you

    hi,
    thank you for the response.
    when i call the sp using DBMS_HS_PASSTHROUGH, without parameters it works successfully, but with parameters it gives the following error
    ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
    [Generic Connectivity Using ODBC][Microsoft][ODBC SQL Server Driver]Invalid parameter number[Microsoft][ODBC SQL Server Driver]Invalid Descriptor Index (SQL State: S1093; SQL Code: 0)
    my code is,
    declare
    c INTEGER;
    nr INTEGER;
    begin
    c := DBMS_HS_PASSTHROUGH.OPEN_CURSOR@hsa;
    DBMS_HS_PASSTHROUGH.PARSE@hsa(c, 'Create_Receipt(?,?)');
    DBMS_HS_PASSTHROUGH.BIND_VARIABLE@hsa(c,1,'abc');
    DBMS_HS_PASSTHROUGH.BIND_VARIABLE@hsa(c,2,'xyz');
    nr:=DBMS_HS_PASSTHROUGH.EXECUTE_NON_QUERY@hsa(c);
    DBMS_HS_PASSTHROUGH.CLOSE_CURSOR@hsa(c);
    end;
    Create_Receipt is the sp which requires two parameters.
    please give me a solution
    thanking you
    sreejith

  • How can we call a external webservice from sandboxed webpart?

    Hi,
    I need to call an external webservice from sandboxed visual webpart in 2013. And that webpart would be used in office-365 site. Please let me whether it is possible or not.
    Thanks,
    Arindam

    Sandboxed solution server code can't call an external web service.  There are ways to write a sandboxed solution that calls a web service using client side code.  Here's a sample of a silverlight application deployed via the sandbox that can call
    an external web service.
    http://msdn.microsoft.com/en-us/library/gg615590(v=office.14).aspx
    Paul Stork SharePoint Server MVP
    Principal Architect: Blue Chip Consulting Group
    Blog: http://dontpapanic.com/blog
    Twitter: Follow @pstork
    Please remember to mark your question as "answered" if this solves your problem.

  • How to call procedure in Java from SQL Server Database

    Hello Every Body
    i Have Question about
    How to call procedure in Java from SQL Server Database
    Thanks

    Hi,
    have you tried a Google search? I just gave it a 3 second try and already found: http://stackoverflow.com/questions/6113674/how-do-i-execute-a-ms-sql-server-stored-procedure-in-java-jsp-returning-table-d
    Frank

Maybe you are looking for

  • USB Mass-Storage Device on CompactRio 9025

    I'm trying to store data in the memory stick which is connected to the CompactRio 9025. The memory is formatted with FAT32 file system. That's should be all right. It says that LabVIEW maps USB devices to the U:, V:, W:, or X: drive. But when I ran t

  • Getting an error message, "timed out trying to establish a connection to server" , trying to open a video on website

    cannot connect to MLB.com video of game with firefox, but can with internet explorer. Also same thing when trying to view video at NY Giants.com

  • Vendor Hiearchy

    Guru's, Please enlighten how do i configure vendor hierarchy in SAP. What does it do and what are the benefits. I If i have " Walmart"" as the main corporate vendor, and local  "Walmart offices" with in each zip code, how do i see the vendor hierarch

  • Lottery number generator

    Hi Everyone, I just bought myself a lottery ticket and as I was driving home why not write a small program to generate my own numbers?  I came up with the following but I can't seem to figure out why I am getting the following error:  PLS-00306: wron

  • Photoshop (CS6 64Bit) wont detect GPU (GTX 590)

    This just recently started happening, before it was fine. But now when I go to enable OpenGL, it says it doesn't detect my card (GTX 590). The drivers are updated as well. Is there a way to force photoshop to use OpenGL?