Calling SAP Tcode on Button click

Hello All,
i want to call SAP Tcode on click of button.
below is the code for the same,
data l_componentcontroller type ref to ig_componentcontroller .
  data l_api_componentcontroller type ref to if_wd_component.
  data l_sapgui_manager type ref to cl_wdr_sapgui_integration.
  l_componentcontroller =   wd_this->get_componentcontroller_ctr( ).
  l_api_componentcontroller = l_componentcontroller->wd_get_api( ).
  l_sapgui_manager = l_api_componentcontroller->get_sapgui_manager( ).
  if l_sapgui_manager is not initial.
    l_sapgui_manager->fire_start_transaction( transaction = 'SE38' ).
  endif.
But the object l_sapgui_manager  is not getting instantiated. please let me know if i am calling the right method or  the code is wrong???
Regrads,
Chandra

Hi Chandra,
You need to Initialise the  l_sapgui_manager before you are accesing. see the folowing code i initialised my select options component.This code can be obtained from Wizard also. I hope this will help you.
Please do this in the WDDOINIT of component controller. So that it will be inistatiated before you are accessing the component.
** initialize select options component for query creation
  lr_cmp_usage = wd_this->wd_cpuse_sel_options( ).
  wd_this->usage_name = lr_cmp_usage->name.
  IF lr_cmp_usage->has_active_component( ) IS INITIAL.
    lr_cmp_usage->create_component( ).
  ENDIF.
  l_ref_interfacecontroller = wd_this->wd_cpifc_sel_options( ).
  wd_this->mr_selopt_helper   = l_ref_interfacecontroller->init_selection_screen( ).
Warm Regards,
Vijay.
Message was edited by:
        Vijaya Bhaskarudu Gangisetty

Similar Messages

  • Professional way to call that frame on button click?

    Hi
    Nice to get new look and feel for forum :)
    Wel my question is I have a frame which has many buttons textfields labels and other components too.
    On clicking one of the button I am opening a frame which is like calculator(display is same as calculator)
    I am using frame for that calculator.
    My question is that what will be the most professional way to call that frame on button click?
    All you java professionals your kind attention will be appreciated
    Regards

    Good question, I've often wondered this myself!
    Personally, I don't like to use anonymous inner classes for handling events. I generally handle events two ways:
    1. Make the main class implement lots of interfaces and use action commands. eg
    public class MyFrame extends JFrame implements ActionListener {
        public static final String CALC_BUTTON = "cb";
        public MyFrame() {
            super();
            JButton cButton = new JButton("Calculator");
            cButton.addActionListener(this);
            cButton.setActionCommand(CALC_BUTTON);
        public void actionPerformed(ActionEvent ae) {
             if (ae.getActionCommand().equals(CALC_BUTTON) {
                 //do something
    2. Subclass AbstractAction.
    public class MyAction extends AbstractAction {
        //create a constructor specific to the goal
        public MyAction(/*Some arguments*/) {
            //set  variables
        public void actionPerformed(ActionEvent ae) {
             //handle the action
    //and in the main class
    JButton cButton = new JButton("Calculator");
    cButton.setAction(new MyAction());I tend to use the first method more often, but if there's some specific kind of action, then I use the second method.
    I'm interested to know what other people do though. :)
    -Muel

  • To call SAP TCode

    Hi,
        Is there any way to call SAP standard transaction (tcode) in webdynpro?
        Actually here goes my requirement. If I click a button, it should go to a specific transaction.
    Regards,
    Kalai.

    Hi,
        Thanks for ur reply.
        Actually I dint want to display the standard transaction in my screen. But I would like to design my own screen which looks similarly as standard transaction but without some fields and functionalities.
       Also, if I give some input, it should do the same functionality as standard transaction.  Such as retrieving values, updating values, listing all possible values(using F4) and updating values in the table in R3 System.
       Is it possible to do this?? If so, Kindly suggest me some ways to do this.
    Regards,
    Kalai.
    Message was edited by:
            Kalaivani Pachiappan

  • Call SAP TCODE in a view

    Hi,
    I want to call a TCODE CS03  and skip first screen in a view based on a linkto action???
    I have done this..But a new  window/browser is opened for CS03....But I want to call in view itself.....
    Is it Possible?
    Thanks,
    Ganga

    Check these links
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/d0018077-f0c9-2b10-87af-eb9bb40776d4?QuickLink=index&overridelayout=true
    How to close parent window in Webdynpro applications?.
    http://help.sap.com/saphelp_nw04s/helpdata/en/45/19bf8c16f25d7ae10000000a11466f/content.htm
    CREATE_EXTERNAL_WINDOW to call another WDA but close current WDA
    Regards
    Srinvias

  • Calling sap tcode inback ground processing

    how to call sap tcdoe se38 in back ground processing.
    is - submit se38 - is enough.

    hi
    you cannot submit a t-code.
    you have to submit an executable program
    http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/dba51a35c111d1829f0000e829fbfe/content.htm
    or
    create a t-code for your report and then call the tcode.
    thx
    pavan

  • Show image on the form Java WS gets image. Call this WS on button click

    Hi,
    Is there a way to show an image on the form. On the form I have along with the data I have a button that when clicked get and show the image itself on the form. I have a Java WebService that gets the image from the remote location. How can I make the button click event to call this Web Service and show the image on the form itself. Any help is appreciated.
    Thanks

    WHiteSox, are you on client/server or web version.
    which version of forms are you using.
    something i can think of is.
    during the click to call the webservice, copy the image to the local system.
    next step is, using READ_IMAGE_FILE built in which reads the image from the local file system and displayed on the forms image item.

  • Call smart form on button click

    Hi Experts,
    I have a screen. In screen a button is available. I need when i clicked on button my smartform should be open. Plz provide me ur appreciated solution.
    Regards,
    Swapniks

    Hi Swapnika,
    You forgot a small code in between.
    data: v_formname type tdsfname value 'zmem',
    v_fmname type rs381_fname
    Case sy-ucomm.
    when 'okbut'.
    CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
    FORMNAME = v_formname
    IMPORTING
    FM_NAME = v_fname
    call function v_fname.
    exporting
    pernr = itab-pernr.
    tables
    itab = itab.
    Regards,
    Prakash Pandey

  • Calling default browser on button click in swings

    Hi all,
    I have built a window with tab page in it having a button on tabpage in java SWING. Now i want that when ever i click on button it calls my default browser i.e. IE6 with a predefined URL. The browser should open with in the tabpage area not beyond that. Please help........ Many people have helped till now because i am very new to this.......
    Again looking for help from experts................

    I feel like I answer this almost everyday
    search the web for JDIC and webbrowser

  • Call SAP Transaction from BSP

    Hi,
    I am new to BSP. I have to call SAP Screen on button click event on BSP and also need to pass data at runtime.
    I searched this forum but didn't find the right solution. I tried to call SAP screen from BAPI and through URL but no success.
    Anyone knows how it can be done?
    Regards,
    Usman Malik

    Thanks for your reply,
    Actually I am very new to BSP. I don't understand where to put this code?
    [System]
    Name=DEV
    Description=DEV [Development]
    Client=123
    [User]
    Name=RAJA
    Language=EN
    [Function]
    Title=
    Command=*SU01 USR02-BNAME=raja;
    Type=Transaction
    [Configuration]
    WorkDir=d:xxxxxxSapWorkDir
    [Options]
    Reuse=1
    Second thing is about shortcut. Do I have to place this shortcut on server?
    Thanks,
    Usman Malik

  • Rfc code to call  any sap tcode  in excel macro

    Hi all,
             We are trying call sap tcode in excel macro programm using RFC.
             Can any one  send me sample code for this?
             This is urgent.points will be rewarded.
    regards,
    Shyam

    Hi harish kollipara
    you should create the FM in the B system, that return some data that you can catch in system A after have called the FM.
    check this link for the function:
    http://help.sap.com/saphelp_nw04/helpdata/en/f9/3f69fd11a80b4e93a5c9230bafc767/frameset.htm
    CALL FUNCTION 'NAME OF FUNCTION' DESTINATION rfc_destination_name
    importing ...
    exporting ...
    EXCEPTIONS
    system_failure = 1
    OTHERS = 2.
    hope this help you
    Marco

  • Calling SAP Transaactions in Webdynpro ABAP

    Hi All
    I have a requirement, i have 4 link to actions in view, and created different views for all links. I creat viewuielement container in mainview and i embed all views in that. Now I want to call sap transaction when i click perticular link to action and i have to display perticular transaction in that view. is it possible in webdynpro or only in portal side.
    Thanks
    Madhan.

    Hi Madan,
    Yes It is possible in WDA as well as in Portal.
    we can use ITS for tat. In View Container UI element call view in which u have to create  IFrame then set this url to the IFrame :
    http://<domain>:<port>/sap/bc/gui/sap/its/webgui?sap-client=800&~TRANSACTION=<transaction name> 
    since IFrame is deprecated u can call this in external window using Window Manager.
    reply me if u need some more clarifications..
    Thanks,
    Regards,
    Kiran

  • How to call elem. Search help on Button click event in WD appilcation

    Hello All,
    i have requirement to call elem. search help on button click event in WD application. currently i am calling FM  F4IF_START_VALUE_REQUEST but getting the short dump as below,
    The following error text was processed in the system X31 : Screen output without connection to user.
    The error occurred on the application server saps_X31_31 and in the work process 0 .
    The termination type was: RABAX_STATE
    The ABAP call stack was:
    SYSTEM-EXIT of program SAPLSDH4
    Function: F4_PRESEL_WITH_TABSTRIP of program SAPLSDH4
    Form: F4PROZ_STEP_PRESEL of program SAPLSDSD
    Function: DD_SHLP_SINGLE_STEP of program SAPLSDSD
    Form: F4PROZ_LOOP of program SAPLSDSD
    Form: F4PROZ of program SAPLSDSD
    Function: F4IF_START_VALUE_REQUEST of program SAPLSDHI
    Method: ONACTIONSEARCH_CUSTOMER of program /1BCWDY/50TU5ZEXF3K0IWCWE153==CP
    Method: IF_WDR_VIEW_DELEGATE~WD_INVOKE_EVENT_HANDLER of program /1BCWDY/50TU5ZEXF3K0IWCWE153==CP
    Method: INVOKE_EVENTHANDLER of program CL_WDR_DELEGATING_VIEW========CP
    is there any way to achieve the required behaviour.
    please let me know.
    Regards,
    Chandra

    Hi Friends,
    I have the similar kind of requirement. Upon click on a Button on screen i need to call a search help, and collect one or more selected material numbers.
    The search help is working fine and i am getting the entries with the following code.
    The problem is i am finding extra popup on screen.
    CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
    EXPORTING
    tabname         =  space
    fieldname       =  space
    SEARCHHELP      =  'MAT1'
    MULTIPLE_CHOICE =  'X'
    STEPL           =  0
    value           = 'MATNR'
    *dynpprog        =  progname
    *dynpnr          =  dynnum
    *dynprofield     = 'CARRIER'
    CALLBACK_PROGRAM          = 'ZTEST_1_PRA'
    CALLBACK_FORM             = 'F4CALLBACK'
    TABLES
    RETURN_TAB                = RETURN_TAB
    EXCEPTIONS
    FIELD_NOT_FOUND           = 1
    NO_HELP_FOR_FIELD         = 2
    INCONSISTENT_HELP         = 3
    NO_VALUES_FOUND           = 4
    OTHERS                    = 5.

  • Call Web Dynpro application on a button Click.

    Hi,
    I have 2 web dynpro components.(COMP1 and COMP2). I wants to call  the application of COMP2  from a button click  from COMP1.
    1. In COMP1  view i have a button. I have  created an outbound plug 'TO_APP'  with parameter 'URL' type string.
    2.  Inside the event handler method for the button i have  written the code as given below.
      data str_url type string.
      CALL METHOD cl_wd_utilities=>construct_wd_url
        EXPORTING
          application_name              = 'COMP2_APP'
        IMPORTING
          out_absolute_url              = str_url
      wd_this->fire_to_app_plg(
        url =                               str_url
    When i click the button it wont navigate to COMP2. Is there any other step required ?
    Please helps me to solve this issue...
    Regards,
    Shaira.

    Hi,
       To call URL in same window first create an outbound plug in your current window(ex: EXIT_PLUG ),mark this
       EXIT_PLUG as interface and plug type EXIT. Now use the following code in your button action.
    data : lr_view_cont TYPE REF TO if_wd_view_controller.
    data : lr_win_cont TYPE REF TO if_wd_window_controller.
    data : lt_parameter_list type wdr_event_parameter_list.
    data : ls_parameter type wdr_event_parameter.
    data : lr_val type ref to data.
    data : lr_comusg type ref to if_wd_component_usage.
    field-SYMBOLS : <fs> type any.
    lr_view_cont = wd_this->wd_get_api( ).
    CALL METHOD LR_VIEW_CONT->GET_EMBEDDING_WINDOW_CTLR
      RECEIVING
        RESULT = lr_win_cont
    ls_parameter-name = 'URL'.
    create data lr_val type string.
    assign lr_val->* to <fs>.
    <fs> = 'HTTP://APPLICATION URL' .                                       "PASS YOUR URL HERE
    ls_parameter-value = lr_val.
    insert ls_parameter into TABLE lt_parameter_list.
    lr_win_cont->if_wd_view_controller~fire_plug(
    exporting
        plug_name = 'EXIT_PLUG'
        parameters = lt_parameter_list ).

  • Is there a way to answer the 5c without swiping? It really is a pain and hard to do at times one handed. Maybe allow favorites to be answered with a click of the home button or possibly all calls with a home button push

    Is there a way to answer the 5c without swiping? It really is a pain and hard to do at times one handed. Maybe allow favorites to be answered with a click of the home button or possibly all calls with a home button push. First smart phone I have owned and the old flip phone was much easier to answer.....just press one button.

    Is there a way to answer the 5c without swiping? It really is a pain and hard to do at times one handed. Maybe allow favorites to be answered with a click of the home button or possibly all calls with a home button push. First smart phone I have owned and the old flip phone was much easier to answer.....just press one button.

  • Help: How to call a plsql Package on click of a button in ADF

    Hi Guru's
    Please provide your suggestions, how to go ahead in ADF to call a plsql package when a button i clicked.
    I do have a knowledge of oracle callable statment to call the plsql package but not having any idea how to relate button click event in ADF.
    Thanks,
    SPC

    Create a service method in your Application Module to [url http://download.oracle.com/docs/cd/E14571_01/web.1111/b31974/bcadvgen.htm#sm0297]call the stored package, expose that service method on the client interface, and then drag the service method from the data control palette on to your page as a button.
    John

Maybe you are looking for

  • MSI GE60 2PL Cooling Question

    Hi there, I just bought a MSI GE60 Apache-629 Laptop. I Never owned a MSI Laptop but I am Very Satisfied so Far. Even though it doesn't have the NVidia GTX 860m , like the Apache Pro, I can Still Run Battlefield 4 on Medium Spec in 1920x1080. My Ques

  • DSP delay between AI to AO

    LV 7.1.1 Embedded & DSP 1.0 & DSK6711 Hi All, I am using LabVIEW DSP (without ever learning LabVIEW) so this may be a simple one: I have a VI which reads an analogue input and sends it to an analogue output with a While loop around it. Nothing else i

  • Exit 7 Adobe Premier Elements 10 from Photo Elem 8 on rMBP 2.7G i7 16 GB 768 GB SSD GT 650M 1GB

    Error 7 install Premiere_element_10 photoshop_elements_8 macbook_pro_with_retina_display mountain_lion warnings `` Due to directory that could not be removed in this error message: Exit Code: 7 -------------------------------------- Summary ---------

  • I'm new to photoshop-should I get elements or cs6?

    I'm new to photoshop, and I can't tell which version of photoshop to get? Do I get elements 11, or cs6? I don't have a massive budget, as I am new, but I want to be able to start editing pictures.  Please can someone advise which I should get?I'm ver

  • Seeburger AS2 error: No Trusted Certificate found

    Dear SAP experts, Good day! Need your expert advice regarding the error that I am getting in Seeburger AS2. Here's the scenario: SAP XI is sending messages to Trading Partner via AS2 adapter which resides in Seeburger. I've trigerred already messages