No CALL METHOD syntax used in Dynpro programming

Hi Gurus,
I have just starded with Web Dynpro ABAP. I found that while writing code we don't use CALL METHOD .
i.eTABLE_NODE = WD_CONTEXT->GET_CHILD_NODE('MY_TABLE_NODE').
How can we directly call a method using interface variable e.g WD_CONTEXT without syntax CALL METHOD?
Can anyone explain?
I am not much familiar with OOPs.
Thanks in advance.

Hi Anzy,
Can u correct this program to let me understand this concept. ( An example ABAP OOPs program)
REPORT  zjt_test_interface.
INCLUDE  zjt_test_interfac_class.
DATA : dd TYPE REF TO demo ,
       inter TYPE REF TO sample,
       inter1 TYPE REF TO sample.
START-OF-SELECTION.
  CREATE OBJECT dd .
  inter = dd.
  call method inter->test. ******No error with this statement
inter1 = inter->test.  *********** This statement gives error "Field 'Test' unknown
The below code is a separate include program.
*&  Include           ZJT_TEST_INTERFAC_CLASS
INTERFACE sample  .
  METHODS  test .
ENDINTERFACE.                    "sample
      CLASS demo DEFINITION
CLASS demo DEFINITION.
  PUBLIC SECTION.
    INTERFACES sample .
    METHODS : constructor.
ENDCLASS.                    "demo DEFINITION
      CLASS demo IMPLEMENTATION
CLASS demo IMPLEMENTATION.
  METHOD constructor.
  ENDMETHOD.                    "constructor
  METHOD  sample~test.
    WRITE : 'Method test of Interface sample executed'.
  ENDMETHOD.                    "sample~test

Similar Messages

  • How can we call methods of one web dynpro component in another one

    Hello Team,
    How do I call  one Web Dynpro component methods in another Web Dynpro component.
    How do we use public parts.
    thanks

    Hi,
    You want to use Comp2's getData() method in Comp1
    If both the WebDynpro components are in the same DC:
    1. Create a wrapper method (with the same signature) in the Comp2's Interface controller. And invoke the Component contorller's getData() method in this method using the below code.
    wdThis.wdGetComp2Controller.getData()
    2. Now Go to the Comp1 and right click on UsedWebDynproComps and add this Comp2 as a UsedWebDypro component.
    3. Now go to the Component Controller of Comp1 and in properties tab add the usage declaration of Interface controller of Comp2.
    4. Now using this below code you can access the method of InterfaceController of Comp2.
    wdThis.wdGetComp2Interface().getData();
    If both the WebDynpro components are in different DCs:
    1. Right click on Comp2 and select Add to public part on Comp2 in DC2.
    2. Now Add this public part in DC1 UsedDCs.
    Now repeat the above stpes 1...to..4. of  "If both the WebDynpro components are in the same DC" same.
    Regards,
    Charan

  • How to call method excel subtotal in ABAP program

    I'm trying to call excel method subtotal, but i get an error (sy-subrc <> 0). How to correctly call this method? One of the parameters is an array. I've tried to use an internal table as the array, but ABAP syntax checker shows error.

    Hi Vytautas,
    The best way is to start recording a Macro(Tools->Macro->Record New Macro), and then do the operations (like entering data into cells, summing up, calculations,etc...)
    once you are done, display the macro and you will find all the needful information regarding what metohds are to be called and how...
    Regards,
    Raj

  • Cross-component: Call method of using component from within used component?

    Hi,
    I began diving into cross-component programming.
    Meanwhile after having digged into some scenarios some questions came up to my mind that I am not able to answer myself. I would appreciate your help here!
    Say we have to components.  Comp A uses Comp B (hence, B is a component usage in A)
    1) How to make them communicate not on a data level (via context binding) but on a process level, thus...
    a) can I call A's method from within B? How is the approach on a general level? - as B can be used from totally different components (like A, A1, A2 ...)
    b) perhaps the only way to do this is by firing events? If so, how can I react in A when an event in B (marked as interface event) gets fired? As it seems they do not get registered within A directly...
    I guess the question seems to be a bit tricky. Nevertheless, I think there will be plenty of you out there who used to asked them the same questions before and came up with an approach. Would be nice to hear from you.
    Best wishes,
    Marc @sap1

    Hi,
    thanks for your reply!
    Indeed, I think the nature of WDA would be just to somehow map the context from the used component to the other back and forth.
    Nevertheless, what if I would like to invoke a method of the using component from inside the used component.
    One sample for this requirement could be e.g.:
    Component B offers a tree item and a send/verify button.
    Component A uses B and has some restraints regarding what the selection should look like.
    The user taps the button in B (at runtime in the view container of A), the context gets updated in A and B and in Component A the verifyWithOwnConstraints() method gets called (through B).
    Thanks again,
    Marc

  • Doubt in call method program

    hi,
    I am getting error as i marked BOLD in this program...can u give solutions for that..
    REPORT  YSBDC6.
    TABLES:LFA1.
    DATA:BEGIN OF ITAB OCCURS 0,
         LIFNR LIKE LFA1-LIFNR,
         LAND1 LIKE LFA1-LAND1,
         NAME1 LIKE LFA1-NAME1,
         END OF ITAB.
    DATA:BEGIN OF JTAB OCCURS 0.
         INCLUDE STRUCTURE BDCDATA.
    DATA:END OF JTAB.
    DATA:BEGIN OF KTAB OCCURS 0.
         INCLUDE STRUCTURE BDCMSGCOLL.
    DATA:END OF KTAB.
    CALL METHOD CL_GUI_FRONTEND_SERVICES=>GUI_UPLOAD
    EXPORTING
      FILENAME = 'C:\PRABA.TXT'
      FILETYPE = 'ASC'
      HAS_FIELD_SEPARATOR = 'X'
      CHANGING
        DATA_TAB = ITAB[].
       LOOP AT ITAB[] INTO ITAB.
        REFRESH JTAB.
        PERFORM SUB USING 'YVTRANS' '100'.
        PERFORM SUB1 USING:'LFA1-LIFNR' ITAB-LIFNR,
                           'LFA1-LAND1' ITAB-LAND1,
                           'LFA1-NAME1' ITAB-NAME1.
        PERFORM SUB1 USING 'BDC_OKCODE' 'INSERT'.
        CALL TRANSACTION 'YVTRANS' USING JTAB MODE 'A' MESSAGES INTO KTAB.
        LOOP AT KTAB.
        IF KTAB-MSGTYP = 'I' OR KTAB-MSGNR = 000.
          WRITE: /1 'vendor', 15 ITAB-LIFNR, 25 'INSERTED'.
          ELSEIF
            KTAB-MSGTYP ='E' OR KTAB-MSGNR = 001.
            WRITE: /1 'vendor', 15 ITAB-LIFNR, 25 'NOT INSERTED'.
            ENDIF.
            <b>REFRESH KTAB."ERROR IN THIS LINE 'YOU MAY NOT
            "Delete or overwrite table 'ktab' with in a loop through itself</b>
          ENDLOOP. 
       ENDLOOP.
            FORM SUB USING A B.
            CLEAR JTAB.
            JTAB-PROGRAM = A.
            JTAB-DYNPRO = B.
            JTAB-DYNBEGIN = 'X'.
            APPEND JTAB.
            ENDFORM.
        FORM SUB1 USING C D.
          CLEAR JTAB.
          JTAB-FNAM = C.
          JTAB-FVAL = D.
          APPEND JTAB.
          ENDFORM.

    HI,
    thanks for both..for immediate response..my PC got struck up that why i could not
    after editing this program i got error like YVTRANS not found..that means i have written seperate code for YVTRANS like below..is it correct..can u give solution for this..
    REPORT  YVTRANS.
    TABLES:LFA1.
    *DATA: WA TYPE LFA1.
    *ITAB TYPE TABLE OF LFA1.
    MODULE USER_COMMAND_0100 INPUT.
      CASE SY-UCOMM.
        WHEN 'INSERT'.
          INSERT LFA1.
          IF SY-SUBRC = 0.
            MESSAGE I000(0) WITH 'RECORD INSERTED'.
            ELSE.
              MESSAGE E001(0) WITH 'NOT INSERTED'.
              ENDIF.
              WHEN 'EXIT'.
                LEAVE PROGRAM.
                ENDCASE.
                ENDMODULE.
    orginal program
    REPORT  YSBDC6.
    TABLES:LFA1.
    DATA:BEGIN OF ITAB OCCURS 0,
         LIFNR LIKE LFA1-LIFNR,
         LAND1 LIKE LFA1-LAND1,
         NAME1 LIKE LFA1-NAME1,
         END OF ITAB.
    DATA:BEGIN OF JTAB OCCURS 0.
         INCLUDE STRUCTURE BDCDATA.
    DATA:END OF JTAB.
    DATA:BEGIN OF KTAB OCCURS 0.
         INCLUDE STRUCTURE BDCMSGCOLL.
    DATA:END OF KTAB.
    CALL METHOD CL_GUI_FRONTEND_SERVICES=>GUI_UPLOAD
    EXPORTING
      FILENAME = 'C:\PRABA.TXT'
      FILETYPE = 'ASC'
      HAS_FIELD_SEPARATOR = 'X'
      CHANGING
        DATA_TAB = ITAB[].
       LOOP AT ITAB[] INTO ITAB.
        REFRESH JTAB.
        PERFORM SUB USING 'YVTRANS' '100'.
        PERFORM SUB1 USING:'LFA1-LIFNR' ITAB-LIFNR,
                           'LFA1-LAND1' ITAB-LAND1,
                           'LFA1-NAME1' ITAB-NAME1.
        PERFORM SUB1 USING 'BDC_OKCODE' 'INSERT'.
        CALL TRANSACTION 'YVTRANS' USING JTAB MODE 'A' MESSAGES INTO KTAB.
        LOOP AT KTAB.
        IF KTAB-MSGTYP = 'I' OR KTAB-MSGNR = 000.
          WRITE: /1 'vendor', 15 ITAB-LIFNR, 25 'INSERTED'.
          ELSEIF
            KTAB-MSGTYP ='E' OR KTAB-MSGNR = 001.
            WRITE: /1 'vendor', 15 ITAB-LIFNR, 25 'NOT INSERTED'.
            ENDIF.
            ENDLOOP.
          REFRESH KTAB.
       ENDLOOP.
            FORM SUB USING A B.
            CLEAR JTAB.
            JTAB-PROGRAM = A.
            JTAB-DYNPRO = B.
            JTAB-DYNBEGIN = 'X'.
            APPEND JTAB.
            ENDFORM.
        FORM SUB1 USING C D.
          CLEAR JTAB.
          JTAB-FNAM = C.
          JTAB-FVAL = D.
          APPEND JTAB.
          ENDFORM.

  • How to use CALL METHOD

    Hi Xperts,
    how To CAll Methods In SE38.
    isit just like calling function module .
    Can any one guide me through the process with small example and TCODE.
    Thank You in Advance.

    Hi,
    to call a method u should use syntax from SAP help...
    Static Method Call
    1. [CALL METHOD] meth_identifier( parameter_list ).
       CALL METHOD  meth_identifier  parameter_list.
    Short Forms
    2. [CALL METHOD] { meth_identifier( )
                    | meth_identifier( a )
                    | meth_identifier( p1 = a1 p2 = a2 ... ) }.
    Dynamic Method Call
    3. CALL METHOD meth_identifier { parameter_list
                                  | parameter_tables }.
    Effect
    Call of a method in ABAP Objects. There is a difference between a static method call, in which the method ID must be fully known in the program, and a dynamic method call, in which the method ID is determined entirely or in parts at runtime. The static method call can be executed in different forms. In one form, the parameters are passed in a parenthetical expression, in the other without a parenthetical expression. For the parenthetical expression, short forms are allowed. With the dynamic method call, you are not allowed to specify the parameters in parentheses and you must use the statement CALL METHOD.
    When you call an instance method using a reference variable and the static type of the reference variable is a superclass of the dynamic type, then you can use the dynamic method call to call all visible methods of the dynamic type, whereas with the static method call, you can call only the visible methods of the static type.
    Note
    Functional methods cannot only be called with CALL METHOD, but also at operand positions.
    rewards points if answer was helpful,
    Regards,
    Tejas

  • Error on Calling Methods Using an Object of a Class

    I keep getting the error cannot resolve variable addStud . I can't figure out why. I've created objects of classes before this way, then called methods within that class like this and it worked fine. I can't discern any difference between the syntax of the program that worked successfully and this one. I commented the parts where the error is when I tried to send a variable to a method in the class Recieve of which addStud is an object of. If you can see something that I can't I'd appreciate it. I've checked the obvious things like making sure the class name and method name is spelled the same way in both my frame and the class file.
    import java.awt.event.*;
    import java.awt.*;     /* Used by IntroTest3.java. */
    import javax.swing.*;
    public class RegFrame extends JInternalFrame
    {   // Begin class RegFrame
    static final int xOffset = 30, yOffset = 30;
         private JLabel nameLabel, displayLabel;  
         private JTextField nameField;
         private JTextArea displayText;
         private JButton addButton;
         private String name;
         private int numStu;
    public RegFrame() {     // Begin RegFrame constructor  
                  super(" Register a New Student ",
                  true, //resizable
                  true, //closable
                  true, //maximizable
                  true);//iconifiable
            //...Create the GUI and put it in the window...
            //...Then set the window size or call pack...
            setSize(400,300);        //Set the window's location.
            setLocation(xOffset, yOffset);
            Container content = getContentPane();
            setBackground(Color.white);
            content.setBackground(Color.white);
            content.setLayout( new FlowLayout());
      //*   CREATE LABELS AND TEST ENTRY FIELDS FOR REGISTERING A NEW STUDENT       *
            *  HERE IS WHERE OBJECT OF RECIEVE IS CREATED *
         Recieve addStud = new Recieve();
         nameLabel = new JLabel(" Enter student name: ");
         nameField = new JTextField(20);
         content.add ( nameLabel );
         content.add ( nameField );
         addButton = new JButton( "Add Student" );
         content.add( addButton );
         addButton.addActionListener(
              new ActionListener()
         { // Open ActionListener
              public void actionPerformed (ActionEvent e)
                   getInput();
         } // Close ActionListener
        }   // End RegFrame Constructor
    // get input
        private void getInput()
              numStu++;
              name = nameField.getText();
              JOptionPane.showMessageDialog( null, "NAME: "  + name + "\n"
                    + "Student number:"+ numStu );
                    addStud.addName( name );   /** <--- HERE IS ERROR **/
    } // End class RegFrame;This is the class:
    public class Recieve
    { // Begin class Recieve
        private double stAssign[];
        private double stLab[];   
        private double stProject[];
        private double stQuiz[];
        private double stTest[];
        private String stNames[];       
        int snc;  
    public Recieve ()
            stAssign = new double[10];
            stLab = new double[10];
            stProject = new double[10];
            stQuiz = new double[10];
            stTest = new double[10];
            stNames = new String[10];
            snc = 0;    // Student Name Counter      
    public void addName (String stName)
            stNames[snc] = stName;
            snc++;
    } // End class Recieve

    1- Add the following class variable declaration for RegFrame:
    private Recieve addStud;2- Change in the RegFrame constructor:
    addStud = new Recieve();

  • USING CALL METHOD

    Dear Experts,
      I am using below piece of code in my program to control color of excel sheet while downloading same way I need to select the rows of R and need to format the cells
    with currency with 2 decimal places.
    Can any one please give me code for this.
    Thanks in advance
    karthik
    *Color of Records .
        DESCRIBE TABLE it_display LINES rec_lin .
        grid_end  =  rec_lin + 5 . "  .
        CLEAR : start , end .
        CONCATENATE  'A'  head_pos  INTO start .
        CONCATENATE  'T' grid_end  INTO end .
        CONDENSE start  NO-GAPS .
        CONDENSE end  NO-GAPS .
        CALL METHOD OF excel 'Range' = range
                           EXPORTING #1 = start   #2 = end.
        CALL METHOD OF range 'Select' = select.
        GET PROPERTY OF excel 'Selection' = selection .
        CALL METHOD OF selection 'Font' = font .
        SET PROPERTY OF font 'ColorIndex' =  '41'   .

    Hi,
    tried following code:
    data: value type string.
    DATA: event      TYPE REF TO if_htmlb_data,
              tv_event   type ref to cl_htmlb_event_tableview .
    event = cl_htmlb_manager=>get_event( request ).
    IF event IS NOT INITIAL AND event->event_name = htmlb_events=>tableView.
      tv_event ?= event.
    CASE event->event_server_name.
    when 'MyEventRowSelection'.
    value = tv_event->GET_CELL_VALUE(
    row_index = tv_event->selectedrowindex
    column_index = 2
    But VALUE is empty.
    Plz let me know the mistake in the syntax or elsewhere.

  • How to use the catalog in our own Web Dynpro program?

    Hi Expert,
    How to access MDM catalog and bring the product data back to a our own Web Dynpro program?

    Hi  Masa,
    The Catalog Search UI of SRM that is referred to as UI as aforementioned is a page which is capable of the selection of catalog items is linked from the shopping cart creation.
    Our biz requirement content two scenarioes to processing the purchase requirement.
    A.  Create shopping cart via the catalog (PR) --> SRM PO Process --> SUS(PO and Invoice) 
    This is the standard SRM purchase scenario and we have already implemented that.
    B. Create a requirement document via the catalog (This document is same with the SC but very simple, and we create this function by the own web dynpro program) --> transfer the requirement document to other purchasing system(none SAP)  in our intranet.
    So the key problems we faced are below:
    1. How to connect to the catalog search UI from our own web dynpro program.
    ( If we connect the catalog via the MDM ABAP API, that will make the catalog serach UI could not be used;
    Also  it has been failed to simulate the function of SC's connection to the catalog;
    So we decide to link the catalog serach UI via the URL, the linkage is "http://<J2EEserver:J2EEport>/SRM-MDM/SRM_MDM?sap-locale=EN&HOOK_URL=&mask=&namedSearch=General&username=&password=&catalog=<Repository Name>&server=&datalanguage=EN". )
    2. How to transfer the catalog item data to our own web dynpro program.
    If we link the catalog search UI by URL, we can not find any good method to transfer the catalog item data to our own program.

  • Calling URL when click on buttons using web dynpro - ABAP

    Hi All,
    I am new to web dynpro application development and i am facing issue when i try to test my application.
    simple require when i click on button i should direct the to one of url say 'http://www.google.co.in/' my application is activate with no error but when i test the application i am getting below error , can someone please provide me the solution or way out.
    The URL http://ides47:8062/sap/bc/webdynpro/sap/zwa_calling_url/ was not called due to an error.
    Note
    The following error text was processed in the system N6Q : Access via 'NULL' object reference not possible.
    The error occurred on the application server IDES47_N6Q_62 and in the work process 0 .
    The termination type was: RABAX_STATE
    The ABAP call stack was:
    Method: IF_WDR_CONTEXT_MENU_HANDLER~CONTEXT_MENU_CALLED of program CL_WDR_INTERNAL_WINDOW_ADAPTERCP
    Method: IF_WDR_CONTEXT_MENU_HANDLER~CONTEXT_MENU_CALLED of program CL_WDR_INTERNAL_WINDOW_ADAPTERCP
    Method: IF_WDR_ADAPTER_EVENT_HANDLER~HANDLE_EVENT of program CL_WDR_CONTEXT_MENU_HANDLER===CP
    Method: IF_WDR_CLIENT~GET_CLIENT_UPDATES of program CL_WDR_CLIENT_SSR=============CP
    Method: EXECUTE of program CL_WDR_MAIN_TASK==============CP
    Method: IF_HTTP_EXTENSION~HANDLE_REQUEST of program CL_WDR_MAIN_TASK==============CP
    Method: EXECUTE_REQUEST_FROM_MEMORY of program CL_HTTP_SERVER================CP
    Function: HTTP_DISPATCH_REQUEST of program SAPLHTTP_RUNTIME
    Module: %_HTTP_START of program SAPMHTTP
    HTTP 500 - Internal Server Error
    Thanks,
    Parab

    Hi ,
    It seesms something you are missing. It would be easy for us if you could paste your code which you have written in the Action of Button.
    Sample code for your reference :
    METHOD onactionget_url .
    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.
    lo_api_component  = wd_comp_controller->wd_get_api( ).
    lo_window_manager = lo_api_component->get_window_manager( ).
    CALL METHOD lo_window_manager->CREATE_EXTERNAL_WINDOW
      EXPORTING
        URL            = 'http://www.google.co.in/'
        MODAL          = ABAP_FALSE
        HAS_MENUBAR    = ABAP_TRUE
        IS_RESIZABLE   = ABAP_TRUE
        HAS_SCROLLBARS = ABAP_TRUE
        HAS_STATUSBAR  = ABAP_TRUE
        HAS_TOOLBAR    = ABAP_TRUE
        HAS_LOCATION   = ABAP_TRUE
      RECEIVING
        WINDOW         = lo_window.lo_window->open( ).
    ENDMETHOD.

  • Syntax for how to call method of one comp in other comp     wd java.

    Let us assume,
    there is method1 in view1 comp1.
    tell me syntax for calling method 1 in view2 comp2
    thanks in advance.
    Edited by: madhu1011 on Nov 9, 2011 11:31 AM

    Hi Madhu,
    This is the situation:
    comp1-> method 1 , view1
    comp2-> view2
    You need to access method1  in view2 of comp2.
    For that, do the following steps:
    1.) First create a method (for eg: method1) in comp1 (under implementation of view1).
            eg: public void method1(){
                    <......some logic...>
    2.)Save the meta data.
    3.) In comp2, you will find an option called used components. In that right click and add the component comp2. (Carefully select comp1 itslef).
    4.)Save the meta data.
    5.) Then go to view2 of comp2 and take implementaion part and right the following logic in wddoinit() (or any other standard or custom method).
    wdThis.wdGetComp2Interface().getMethod("method1"); 
    By this way, we can access the method1 of comp1 in comp2.
    Regards,
    Jithin

  • Why do we use cl_gui_cfw= flush method in Object Oriented ALV programming

    Dear Friends,
    Please solve my query regarding control framework. Why do we use cl_gui_cfw=>flush method in Object Oriented ALV programming. I studied and found that this method transfers automation queue to Front end.  But I could not find any further update on this.
    Thanks & Regards
    Amit Sharma

    Generally this is to restrict the traffic b/w frontend and backend. This means that every operation in Control Framework should be first buffered in the backend and synchronized with the frontend at certain points (one of this point is calling synchronization method cl_gui_cfw=>flush ). This explicit order of synchronization is due to RFC call needed for every communication b/w front/back end. So to avoid to many RFC calls we do it only at certain time.
    Please refer [Automation Queue|http://help.sap.com/saphelp_wp/helpdata/en/9b/d080ba9fc111d2bd68080009b4534c/frameset.htm]. I think it explains the concept quite well.
    Regards
    Marcin

  • Error while using  CALL METHOD

    I am getting a error while using CALL METHOD cl_ssf_xsf_utilities=>get_bds_graphic_as_bmp
    The error is class "CL_SSF_XSF_UTILITIES is unknown. How to correct that?? please help I am new to object oriented programming??
    Edited by: priya singh on Nov 18, 2008 2:14 PM

    This is my code.
    REPORT ZSAVE_FUNCTION .
    D A T A D E C L A R A T I O N S *
    DATA: v_bitmap TYPE xstring, "graphic data
    v_file TYPE string, "file name
    v_length TYPE i. "length of binary file
    DATA: BEGIN OF it_bitmaps OCCURS 0,
    object TYPE tdobjectgr, "object
    name TYPE tdobname, "name
    id TYPE tdidgr, "id
    tdbtype TYPE tdbtype, "graphic type
    END OF it_bitmaps.
    DATA: itab TYPE TABLE OF x.
    *class cl_ssf_xsf_utilities definition.
        public section.
      methods : get_bds_graphic_as_bmp
    DATA: L_GRAPHIC_XSTR TYPE XSTRING.
    *method cl_ssf_xsf_utilities
    S E L E C T I O N - S C R E E N *
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME.
    PARAMETERS: p_object TYPE tdobjectgr, "object
    p_btype TYPE tdbtype, "graphic type
    p_name TYPE tdobname, "name
    p_id TYPE tdidgr. "id
    SELECTION-SCREEN END OF BLOCK b1.
    SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME.
    PARAMETERS: p_file TYPE rlgrap-filename. "file name
    SELECTION-SCREEN END OF BLOCK b2.
    *A T S E L E C T I O N - S C R E E N O N V A L U E - R E Q U E S T *
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_name.
    *-- Creating f4 help for the parameters
    PERFORM get_f4_object_name.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
    *-- Getting the current value entered
    PERFORM get_current_value.
    *-- Value Request Functionality For Input File Name
    PERFORM f4_value_request.
    S T A R T O F - S E L E C T I O N *
    START-OF-SELECTION.
    *--Getting the graphic as a BMP file
    PERFORM get_graphic_bmp.
    *--Convert the Xstring format to binary format
    PERFORM convert_to_binary.
    *--Download the graphic
    PERFORM download_graphic.
    *& Form get_current_value
    Get the current file path entered
    FORM get_current_value .
    DATA: BEGIN OF li_dynp_value_tab OCCURS 0.
    INCLUDE STRUCTURE dynpread.
    DATA: END OF li_dynp_value_tab.
    DATA: l_program_name LIKE d020s-prog,
    l_dynpro_number LIKE d020s-dnum.
    l_program_name = sy-cprog.
    l_dynpro_number = sy-dynnr.
    REFRESH li_dynp_value_tab.
    li_dynp_value_tab-fieldname = 'P_FILE'.
    APPEND li_dynp_value_tab.
    CALL FUNCTION 'DYNP_VALUES_READ'
    EXPORTING
    dyname = l_program_name
    dynumb = l_dynpro_number
    TABLES
    dynpfields = li_dynp_value_tab
    EXCEPTIONS
    invalid_abapworkarea = 04
    invalid_dynprofield = 08
    invalid_dynproname = 12
    invalid_dynpronummer = 16
    invalid_request = 20
    no_fielddescription = 24
    undefind_error = 28.
    IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE 'S' NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    READ TABLE li_dynp_value_tab INDEX 1.
    p_file = li_dynp_value_tab-fieldvalue.
    ENDFORM. " get_current_value
    *& Form f4_value_request
    Provinding the f4 for the given path
    FORM f4_value_request .
    *-- if the file is to be downloaded to presentation server
    CALL FUNCTION '/SAPDMC/LSM_F4_FRONTEND_FILE'
    EXPORTING
    pathname = p_file
    CHANGING
    pathfile = p_file
    EXCEPTIONS
    canceled_by_user = 1
    system_error = 2
    OTHERS = 3.
    IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE 'S' NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    ENDFORM. " f4_value_request
    *& Form GET_GRAPHIC_BMP
    Get the graphic as a BMP file
    FORM get_graphic_bmp.
    CALL METHOD cl_ssf_xsf_utilities=>get_bds_graphic_as_bmp
    EXPORTING
    p_object = p_object
    p_name = p_name
    p_id = p_id
    p_btype = p_btype
    RECEIVING
    p_bmp = L_GRAPHIC_XSTR
    EXCEPTIONS
    not_found = 1
    internal_error = 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.
    ENDIF.
    ENDFORM. " GET_GRAPHIC_BMP
    *& Form CONVERT_TO_BINARY
    Converting the xstring to binary format
    FORM convert_to_binary .
    CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
    EXPORTING
    buffer = v_bitmap
    IMPORTING
    output_length = v_length
    TABLES
    binary_tab = itab.
    ENDFORM. " CONVERT_TO_BINARY
    *& Form DOWNLOAD_GRAPHIC
    Download the graphic
    FORM download_graphic .
    v_file = p_file.
    CONCATENATE p_file '.BMP' INTO v_file.
    CALL FUNCTION 'GUI_DOWNLOAD'
    EXPORTING
    bin_filesize = v_length
    filename = v_file
    filetype = 'BIN'
    TABLES
    data_tab = itab
    EXCEPTIONS
    file_write_error = 1
    no_batch = 2
    gui_refuse_filetransfer = 3
    invalid_type = 4
    no_authority = 5
    unknown_error = 6
    header_not_allowed = 7
    separator_not_allowed = 8
    filesize_not_allowed = 9
    header_too_long = 10
    dp_error_create = 11
    dp_error_send = 12
    dp_error_write = 13
    unknown_dp_error = 14
    access_denied = 15
    dp_out_of_memory = 16
    disk_full = 17
    dp_timeout = 18
    file_not_found = 19
    dataprovider_exception = 20
    control_flush_error = 21
    OTHERS = 22.
    IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    ENDFORM. " DOWNLOAD_GRAPHIC
    *& Form GET_F4_OBJECT_NAME
    Get F4 values for object names
    FORM get_f4_object_name .
    DATA: dynpfld_mapping TYPE STANDARD TABLE OF dselc WITH HEADER LINE,
    return_tab TYPE STANDARD TABLE OF ddshretval WITH HEADER LINE.
    *--Selecting the values to be provided as f4 help
    SELECT tdobject
    tdname
    tdid
    tdbtype
    FROM stxbitmaps
    INTO TABLE it_bitmaps.
    *--To update the values in the remaining fields
    dynpfld_mapping-fldname = 'F0001'.
    dynpfld_mapping-dyfldname = 'P_OBJECT'.
    APPEND dynpfld_mapping.
    dynpfld_mapping-fldname = 'F0002'.
    dynpfld_mapping-dyfldname = 'P_NAME'.
    APPEND dynpfld_mapping.
    dynpfld_mapping-fldname = 'F0003'.
    dynpfld_mapping-dyfldname = 'P_ID'.
    APPEND dynpfld_mapping.
    dynpfld_mapping-fldname = 'F0004'.
    dynpfld_mapping-dyfldname = 'P_BTYPE'.
    APPEND dynpfld_mapping.
    *--Providing f4 help with the selected values
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
    retfield = 'TDOBNAME'
    dynpprog = sy-repid
    dynpnr = sy-dynnr
    dynprofield = 'P_NAME'
    value_org = 'S'
    TABLES
    value_tab = it_bitmaps
    dynpfld_mapping = dynpfld_mapping
    EXCEPTIONS
    parameter_error = 1
    no_values_found = 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.
    ENDIF.
    ENDFORM. " GET_F4_OBJECT_NAME

  • Call a external vendor catalog - OCI In ECC using web dynpro

    Hello Everyone,
    We have a requirement to call a OCI External Catalog in ME51n Transaction in ECC, that is working fine.
    Now we need to create a Web dynpro ABAP Application which performs the Task of ME51n Transaction along with OCI Integration.
    So far i have create a small Web dynpro ABAP application to check does OCI Catalog can be integrated in ECC using web dynpro ABAP.
    My Screen Consit of a single Button UI, on click of the button i am calling the External Catalog, from the catalog i select all the materials and click on submit finally we need to bring all the selected materials to get displayed ina table.
    Half of the Development is done i.e i am able to call the catalog but not able to receive the selected materials.
    following are the details-
    1. I check in SRM first how the Ctalogs are been called, i found 2 Services responsible for the same in SICF transaction -
    Inbound HLDR and Outbound HLDR which uses handler class as SAPSRM_CL_CH_WD_INBOUND_HDLR and SAPSRM_CL_CH_WD_OUTBOUND_HDL, so i copied the same classes into ECC and created the same SICF Service.
    Contn. in next post

    2.In my Web Dynpro ABAP application i have a Inbound plug in my window in the  handler method of the inbound plug i fill a table lt_parameters of  TYPE tihttpnvp, it has 2 columns name and value
    In this table i fill following entries-
    Name-CATALOG_URL
    Value-https://XXXXXXXX.com/invoke/BVProcess.SAPOCI/processCatalogRequest
    Name-USERNAME
    Value-XXXXXXXX
    Name-PASSWORD
    Value-XXXXXXXX
    NAME  = 'HOOK_URL'.
    VALUE = 'http:/XXXXX.hostederp.local:8000/sap/ZOTC_CAT/Zinbound_hdlr'."?TARGET_URL= {Appdress of the WDA Apllication}
    NAME  = 'OCI_VERSION'.
    VALUE = '4.0'.
    NAME  = 'OPI_VERSION'.
    VALUE = '1.0'.
    NAME  = 'returntarget'.
    VALUE = _top
    also in this inbound plug handler method i fill a lv_url variable of type string with-
    lv_url = 'http://XXXXXX.hostederp.local:8000/sap/ZOTC_CAT/Zoutbound_hdlr?sap-client=100&sap-language=E'.
    3. finally from the handler method of the inbound plug i call a Suspend plug p[assing the above two variables i.e
    lt_parameters and  lv_url.
    wd_this->fire_zw_suspend_plg( url =    lv_url   i_parameter_tab = lt_parameters ).
    4. Using above i cam able to call the catalog and select the materials.
    5. Now if i Finally clcik on submit on the catalog it should return the materials to the WDA Application.
    For WDA Application to accept the Materials i have created a resume plug in which i am using -
    wdr_task=>server->request->get_form_fields( CHANGING fields = lt_fields ). to get all the selected materials into lt_fields.
    6. But unfortunately i am unable to receive the selected materials in lt_fields.
    I think i am missing something in Hook URL or some other parameter.
    Please help, ur comments and suggestions are welcome.
    Regards,
    Akash Rana

  • Call transaction VA01 or VA03 and skip first screen using Web dynpro

    Hello Experts,
    I am calling the standard transactions using Web dynpro via ITS.
    I am able to reach to the initial screen of the standard transactions say VA03 and populate the sales order number through Web dynpro.
    My requirement is to skip the first screen of the transaction.
    I tried passing the screen number in the URL link but still it is showing the initial screen.
    Please suggest me solution for this.
    Thanks and Regards,
    Rahul Sinha

    Hello Rahul,
    Did you follow the ITS Wiki article?
    https://wiki.sdn.sap.com/wiki/pages/viewpage.action?pageId=22375
    Edgar

Maybe you are looking for

  • Filename from complete file path

    Hi,    can anybody let me know the method to get the filename from the complete filepath( this path includes both directory as well as filename) regards. venkat.

  • How to include processing time in the  LogFormat in httpd.conf of OAS

    Hi, I want to add processing time parameter in the LogFormat of the HTTP requests in Application server logs file. i tried to edit the httpd.conf file which orginally is as below LogFormat "%h %l %u %t \"%r\" \"%{Cache-Control}i\" CC \"%{Cache-Contro

  • About solaris 7 web browser

    Hi, fine; I just install solaris 7 for x86,system auto into cde interface.I found explorer's name is hostjava and netscape not open when I open web browser. Please tell me how to do about it. Thang you

  • My mac is running slow. Can i take it in to get wiped out

    My mac is running slow. and it won't let me update some things. Can i take it to a mac store for them to "clean" my mac?

  • Host Down Messages

    We are running GroupWise 7.0.2. All mail seems to be going in and out just fine, but we receive hundreds of the following messages every day. MSG ##### Detected error on SMTP command MSG ##### Command: sacog.org MSG ##### Response: 450 Host down (sac