Call dynpro with global class

Is there any posibility to call a dynpro with a method of a global class?
regards, Anja

Hi,
you cannot define a screen within a class pool. Therefore, you can not call a screen from a method of a global class.
A way around this could be to define the screen within a function group and then call a function module. This will also work with a cross perform on a subroutine that calls the screen.
Regards Rudi

Similar Messages

  • Local class - global class

    Hi Friends,
      Can a local class make friend with global class???
      for example i have a local class in se38 editor and this local class should access the private attribute of global class which is there in se24.
    Deepak

    HI Deepak
       Yo can define your ABAP Unit test class as a friend of the global class to be tested in the local class definition include of your global class. So, you have to add a line of code like
    CLASS <name of global class to be tested> DEFINITION LOCAL FRIENDS <name of local ABAP Unit class> in the include where the definition of local ABAP Unit Class is in. Then you can call the private methods of your global class in the local abap unit class methods.
    just refer these links
    http://help.sap.com/saphelp_nw2004s/helpdata/en/ec/d9ab291b0b11d295400000e8353423/content.htm
    local class -> global class
    Regards Rk

  • Saving global classes / packages

    Hi,
    I created a package inside se80 with global classes and I want to save this package or/and the global classes to disc (for other projects).
    How can I achieve this?
    I know the report REPTRAN but this tool saves all my global classes (in all packages) with odd filenames. Is it possible to do this without using the transport organizer and without copy/paste the hole code by hand?
    Cu
    Alex

    I suggest that you should read this New to Java material, as these forums are an especially inefficient way of learning the basics of Java. Most people (including myself) are not willing to write in sufficient detail for the material to be understandable by someone who doesn't have any knowledge of Java.
    http://java.sun.com/learning/new2java/index.html

  • Is it possible to call a subscreen/modal dialog box from the global class

    Hi,
    Is it possible to call a subscreen or modal dialog box from the global class ..
    or is there any option to display a pop screen or subscreen in order to get the values from user which as to be implemented
    in the global class..
    thanks and regards,
    Poornima.

    Hi Poornima,
    you should follow Uwe's suggestion. The only alternative I can imagine is dynamic document in a dialog container. But I don't know any standardized classes to make use with minimum effort. Have a look at report DD_ADD_FORM_INPUT. Here they put the input field in a container control in a screen; you can put the container control on a dialog container (CL_GUI_DIALOGBOX_CONTAINER).
    We will not get rid of any screen for the time being, but if your application is started from any screen, the DIALOGBOX_CONTAINER can start from there.
    Regards,
    Clemens

  • The Web Dynpro application was called up with the wrong URL parameters

    Hi all,
    I am using the systems below:
    ERP STACK :16
    EHP : 4
    EHP SP Stack :4
    EA-HR * : 604(SP12)
    SAP-HR * :604(SP12)
    XSS JAVA components : SAP ESS 603 SP05
    SAP MSS 600 SP16
    PCUI_GP 603 SP05
    Business Package : BP ERP05 ESS 1.41 SP04
    BP ERP05 MSS 1.41 SP04
    BP ERP05 COMMON PARTS 1.41 SP04
    I am getting below error after clicking on the appraisal document:
    App. Called Up Incorrectly
    The Web Dynpro application was called up with the wrong URL parameters.
    Note
    Enter the URL parameters and their use.
    You can find more information on the functions that you can perform in the catalog for appraisal templates in the Implementation Guide (IMG) for Objective Setting and Appraisals under Edit Forms.
    I already applied the below notes also:
    1468466 Performance Management Launchpad Configuration
    1463821 Performance Management Portal Configuration
    1416756 OBN Configuration in Performance Management
    1408243 Configuration for object-based navigation
    Plz advise me??
    Thanks,
    Anumit

    can you paste the exact error. also you can take a HTTP trace and see which resourse or UWL is being launched!

  • Calling a object of class from other class's function with in a package

    Hello Sir,
    I have a package.package have two classes.I want to use object of one class in function of another class of this same package.
    Like that:
    one.java
    package co;
    public class one
    private String aa="Vijay";  //something like
    }main.java:
    package co;
    import java.util.Stack;
    public class main extends Stack
    public void show(one obj)
    push(obj);
    public static void main(String args[])
    main oo=new main();
    }when I compile main class, Its not compile.
    Its give error.can not resolve symbol:
    symbol: class one
    location: class co.main
    public void show(one obj)
                              ^Please help How that compile "Calling a object of class from other class's function with in a package" beacuse I want to use this funda in an application

    kumar.vijaydahiya wrote:
    .It is set in environment variable.path=C:\bea\jdk141_02\bin;.,C:\oraclexe\app\oracle\product\10.2.0\server\bin;. command is:
    c:\Core\co\javac one.javaIts compiled already.
    c:\Core\co\javac main.javaBut it give error.
    Both java classes in co package.Okay, open a command prompt and execute these two commands:
    // to compile both classes:
    javac -cp c:\Core c:\Core\co\*.java
    // to run your main-class:
    java -cp c:\Core co.main

  • Calling Instance Method in a Global Class

    Hi All,
    Please can you tell me how to call a instance method created in a global class in different program.
    This is the code which I have written,
    data: g_cl type ref to <global class>.
    call method g_cl -> <method name>
    I am not able to create Create object <object>.
    It is throwing the error message " Instance class cannot be called outside...."
    Please can anybody help me..
    *Text deleted by moderator*
    Thanks
    Sushmitha

    Hi susmitha,
    1.
    data: g_cl type ref to <global class>.
    2.
    Create object <object>.
    3.
    call method g_cl -> <method name>.
    if still you are getting error.
    then first check that method level and visibility in se24.
    1.if  level is static you can not call it threw object.
    2. if visibility is protected or private then you can not  call it directly.
    If still you are facing same problem please paste the in this thread so that i can help you better.
    Regards.
    Punit
    Edited by: Punit Singh on Nov 3, 2008 11:54 AM

  • Global class event handler not called

    I am having a problem where I created a function module that instatiates an application log class. This application log class has methods ON_* for public events of other classes.
    The function module then processes its routines and as a result some of these events are raised. Ex: The function module creates a Purchase order and in that class I have a public even PO_CREATED that is raised upon succesfull creation of the PO. The global class APPLICATION_LOG I created has a method ON_PO_CREATED for event PO_CREATED of class ZCL_MAT_PO.
    I put a break point in the APPLICATION LOG method but is os not called.
    ANy idea of what Iam doing wrong or missing?
    Thanks,
    Leo

    Hi Leo, did you set the handler method?
    SET HANDLER <method_name> FOR <object>.
    Regards,
    Rich Heilman

  • Call global class exception to report prog

    Hi expert,
            In  global class, i write a method in that one exception can be raised. that exception can be called in
    report program. please can you help me.
    Thank you,
    dinesh.

    Hello Dinesh
    If your method has just exceptions defined in its signature and NOT exception classes then you can handle them like you do for function module exceptions.
    However, I assume your method has one or more exception classes defined in its signature. Then you can use the TRY...CATCH...ENDTRY block:
    " Here we are in your report:
    DATA: lo_error    TYPE REF TO cx_root.
    DATA: ld_msg    TYPE bapi_msg.
    TRY.
      CALL METHOD go_myclass->method_with_exceptionclass( ).  " e.g. ZCX_MY_EXCEPTION
    CATCH zcx_my_exception INTO lo_error.
       ld_msg = lo_error->get_longtext( ).
      MESSAGE ld_msg   TYPE 'I'.
    ENDTRY.
    Regards
      Uwe

  • How to call a Derived call fucntion with a base class object ?

    Hi all
    i am working on a JNI interface to Java, and in the process of simulating a C++ behaviour in java
    so i need some help form you people, in this regard.
    here is a c++ code, i need a equivalent fucntionality in java , to put it one word, the question is
    how to implement the dynamic_cast functionality in java, as java also has virtual fucntions, i think
    this should be possible, if it is not, what is the alternative
    class Base
    public:
         Base()
         ~Base()
         virtual void F1()
              cout<<"The BASE::F1() is called"<<endl;
         virtual void F2()
              cout<<"The BASE::F2() is called"<<endl;
    class Derived : public Base
    public:
         Derived()
         ~Derived()
         virtual  void F3()
              cout<<"The Derived::F3() is called"<<endl;
         virtual void F4()
              cout<<"The Derived::F4() is called"<<endl;
    Base * GetDerived()
         return new Derived();
    int _tmain(int argc, _TCHAR* argv[])
         Base *ptr = NULL;
                    ptr  = GetDerived();
         Derived *dPtr = dynamic_cast<Derived *>(ptr);
                    dPtr->F3();
    }regards
    pradish

    Just to clarify a point that I consider important--the distinction between references and objects:
    Your subject is: How to call a Derived call fucntion with a base class object ? The answer to that is: You cannot. It is completely impossible in Java. If you have a base class object, the derivced class' methods are not present. On the other hand, if you have a compile-time reference of the parent type, but at runtime it happens to point to an instance of the derived class, then, as pointed out, you can cast the reference. (Note that casting does not apply to objects.)

  • Event handling in global class (abap object)

    Hello friends
    I have 1 problem regarding events in abap object... how to handel an event in global class in se24 .
    Regards
    Reema jain.
    Message was edited by:
            Reema Jain

    Hello Reema
    The following sample report shows how to handle event in principle (see the § marks)..
    The following sample report show customer data ("Header"; KNB1) in the first ALV list and sales areas ("Detail"; KNVV) for the selected customer (event double-click) in the second ALV list.
    *& Report  ZUS_SDN_TWO_ALV_GRIDS
    REPORT  zus_sdn_two_alv_grids.
    DATA:
      gd_okcode        TYPE ui_func,
      go_docking       TYPE REF TO cl_gui_docking_container,
      go_splitter      TYPE REF TO cl_gui_splitter_container,
      go_cell_top      TYPE REF TO cl_gui_container,
      go_cell_bottom   TYPE REF TO cl_gui_container,
      go_grid1         TYPE REF TO cl_gui_alv_grid,
      go_grid2         TYPE REF TO cl_gui_alv_grid,
      gs_layout        TYPE lvc_s_layo.
    DATA:
      gt_knb1          TYPE STANDARD TABLE OF knb1,
      gt_knvv          TYPE STANDARD TABLE OF knvv.
    "§1. Define and implement event handler method
    "     (Here: implemented as static methods of a local class)
    *       CLASS lcl_eventhandler DEFINITION
    CLASS lcl_eventhandler DEFINITION.
      PUBLIC SECTION.
        CLASS-METHODS:
          handle_double_click FOR EVENT double_click OF cl_gui_alv_grid
            IMPORTING
              e_row
              e_column
              es_row_no
              sender.
    ENDCLASS.                    "lcl_eventhandler DEFINITION
    *       CLASS lcl_eventhandler IMPLEMENTATION
    CLASS lcl_eventhandler IMPLEMENTATION.
      METHOD handle_double_click.
    *   define local data
        DATA:
          ls_knb1      TYPE knb1.
        CHECK ( sender = go_grid1 ).
        READ TABLE gt_knb1 INTO ls_knb1 INDEX e_row-index.
        CHECK ( ls_knb1-kunnr IS NOT INITIAL ).
        CALL METHOD go_grid1->set_current_cell_via_id
          EXPORTING
    *        IS_ROW_ID    =
    *        IS_COLUMN_ID =
            is_row_no    = es_row_no.
    *   Triggers PAI of the dynpro with the specified ok-code
        CALL METHOD cl_gui_cfw=>set_new_ok_code( 'DETAIL' ).
      ENDMETHOD.                    "handle_double_click
    ENDCLASS.                    "lcl_eventhandler IMPLEMENTATION
    START-OF-SELECTION.
      SELECT        * FROM  knb1 INTO TABLE gt_knb1
             WHERE  bukrs  = '1000'.
    * Create docking container
      CREATE OBJECT go_docking
        EXPORTING
          parent                      = cl_gui_container=>screen0
          ratio                       = 90
        EXCEPTIONS
          OTHERS                      = 6.
      IF sy-subrc <> 0.
    *   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    * Create splitter container
      CREATE OBJECT go_splitter
        EXPORTING
          parent            = go_docking
          rows              = 2
          columns           = 1
    *      NO_AUTODEF_PROGID_DYNNR =
    *      NAME              =
        EXCEPTIONS
          cntl_error        = 1
          cntl_system_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.
    * Get cell container
      CALL METHOD go_splitter->get_container
        EXPORTING
          row       = 1
          column    = 1
        RECEIVING
          container = go_cell_top.
      CALL METHOD go_splitter->get_container
        EXPORTING
          row       = 2
          column    = 1
        RECEIVING
          container = go_cell_bottom.
    * Create ALV grids
      CREATE OBJECT go_grid1
        EXPORTING
          i_parent          = go_cell_top
        EXCEPTIONS
          OTHERS            = 5.
      IF sy-subrc <> 0.
    *   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    "§2. Set event handler (after creating the ALV instance)
      SET HANDLER: lcl_eventhandler=>handle_double_click FOR go_grid1.  " Or:
    " SET HANDLER: lcl_eventhandler=>handle_double_click FOR all instances.
      CREATE OBJECT go_grid2
        EXPORTING
          i_parent          = go_cell_bottom
        EXCEPTIONS
          OTHERS            = 5.
      IF sy-subrc <> 0.
    *   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    * Display data
      gs_layout-grid_title = 'Customers'.
      CALL METHOD go_grid1->set_table_for_first_display
        EXPORTING
          i_structure_name = 'KNB1'
          is_layout        = gs_layout
        CHANGING
          it_outtab        = gt_knb1
        EXCEPTIONS
          OTHERS           = 4.
      IF sy-subrc <> 0.
    *   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      gs_layout-grid_title = 'Customers Details (Sales Areas)'.
      CALL METHOD go_grid2->set_table_for_first_display
        EXPORTING
          i_structure_name = 'KNVV'
          is_layout        = gs_layout
        CHANGING
          it_outtab        = gt_knvv  " empty !!!
        EXCEPTIONS
          OTHERS           = 4.
      IF sy-subrc <> 0.
    *   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    * Link the docking container to the target dynpro
      CALL METHOD go_docking->link
        EXPORTING
          repid                       = syst-repid
          dynnr                       = '0100'
    *      CONTAINER                   =
        EXCEPTIONS
          OTHERS                      = 4.
      IF sy-subrc <> 0.
    *   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    * NOTE: dynpro does not contain any elements
      CALL SCREEN '0100'.
    * Flow logic of dynpro (does not contain any dynpro elements):
    *PROCESS BEFORE OUTPUT.
    *  MODULE STATUS_0100.
    *PROCESS AFTER INPUT.
    *  MODULE USER_COMMAND_0100.
    END-OF-SELECTION.
    *&      Module  STATUS_0100  OUTPUT
    *       text
    MODULE status_0100 OUTPUT.
      SET PF-STATUS 'STATUS_0100'.  " contains push button "DETAIL"
    *  SET TITLEBAR 'xxx'.
    * Refresh display of detail ALV list
      CALL METHOD go_grid2->refresh_table_display
    *    EXPORTING
    *      IS_STABLE      =
    *      I_SOFT_REFRESH =
        EXCEPTIONS
          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.
      ENDIF.
    ENDMODULE.                 " STATUS_0100  OUTPUT
    *&      Module  USER_COMMAND_0100  INPUT
    *       text
    MODULE user_command_0100 INPUT.
      CASE gd_okcode.
        WHEN 'BACK' OR
             'END'  OR
             'CANC'.
          SET SCREEN 0. LEAVE SCREEN.
    *   User has pushed button "Display Details"
        WHEN 'DETAIL'.
          PERFORM entry_show_details.
        WHEN OTHERS.
      ENDCASE.
      CLEAR: gd_okcode.
    ENDMODULE.                 " USER_COMMAND_0100  INPUT
    *&      Form  ENTRY_SHOW_DETAILS
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM entry_show_details .
    * define local data
      DATA:
        ld_row      TYPE i,
        ls_knb1     TYPE knb1.
      CALL METHOD go_grid1->get_current_cell
        IMPORTING
          e_row = ld_row.
      READ TABLE gt_knb1 INTO ls_knb1 INDEX ld_row.
      CHECK ( syst-subrc = 0 ).
      SELECT        * FROM  knvv INTO TABLE gt_knvv
             WHERE  kunnr  = ls_knb1-kunnr.
    ENDFORM.                    " ENTRY_SHOW_DETAILS
    Regards
    Uwe

  • Error while usind Private Method of a global class

    HI All..
    I created a global class (ZLINE_GLOBAL) which has TOT_DATA private method. I have to call this private method in my report, I know that using Friend class we can do this.
    But it is not working and showing the same error  "  METHOD "TOT_DATA" is unknown or Private or Public..
    code i tried is
    CLASS c2 DEFINITION DEFERRED.
    CLASS ZLINE_GLOBAL DEFINITION FRIENDS c2.
      PUBLIC SECTION.
        METHODS : m1.
      PRIVATE SECTION.
        METHODS: m2.
    ENDCLASS.
    CLASS ZLINE_GLOBAL IMPLEMENTATION .
      METHOD m1.
        WRITE : 'Public Method C1'.
      ENDMETHOD.                    "M1
      METHOD m2.
        WRITE : 'Private Method C1'.
      ENDMETHOD.
    ENDCLASS.
    CLASS c2 DEFINITION FRIENDS ZLINE_GLOBAL.  "my friends are here, allow them access to my (C2's) private components
      PUBLIC SECTION.
        METHODS :m3.
    ENDCLASS.
    CLASS c2 IMPLEMENTATION.
      METHOD m3.
        DATA : obj TYPE REF TO ZLINE_GLOBAL.
        CREATE OBJECT obj.
        CALL METHOD obj->TOT_DATA.    "here Iam calling Private method of global class
      ENDMETHOD.                    "M3
    ENDCLASS.
    START-OF-SELECTION.
      DATA obj_c2 TYPE REF TO c2.
      CREATE OBJECT obj_c2.
      obj_c2->m3( ).
    can anybody help me on this..
    Murthy

    Hi Murthy,
    Replace TOT_DATA with M2, you do not have any method by name "TOT_DATA" in your code.
    CLASS c2 DEFINITION DEFERRED.
    CLASS ZLINE_GLOBAL DEFINITION FRIENDS c2.
      PUBLIC SECTION.
        METHODS : m1.
      PRIVATE SECTION.
        METHODS: m2.
    ENDCLASS.
    CLASS ZLINE_GLOBAL IMPLEMENTATION .
      METHOD m1.
        WRITE : 'Public Method C1'.
      ENDMETHOD.                    "M1
      METHOD m2.
        WRITE : 'Private Method C1'.
      ENDMETHOD.
    ENDCLASS.
    CLASS c2 DEFINITION FRIENDS ZLINE_GLOBAL.  "my friends are here, allow them access to my (C2's) private components
      PUBLIC SECTION.
        METHODS :m3.
    ENDCLASS.
    CLASS c2 IMPLEMENTATION.
      METHOD m3.
        DATA : obj TYPE REF TO ZLINE_GLOBAL.
        CREATE OBJECT obj.
        CALL METHOD obj->M2.    "here Iam calling Private method of global class
      ENDMETHOD.                    "M3
    ENDCLASS.
    START-OF-SELECTION.
      DATA obj_c2 TYPE REF TO c2.
      CREATE OBJECT obj_c2.
      obj_c2->m3( ).
    Regards,
    Chen

  • How to use global classes and display returned data?

    Hello experts,
    I have the following code in a program which accesses a global class (found in the class library). It executes one it's static methods. What I would like to do is to get hold of some elements of the returned data. How do I do that please?
    Your help is greatly appreciated.
    ***Use global class CL_ISU_CUSTOMER_CONTACT
    DATA: o_ref TYPE REF TO CL_ISU_CUSTOMER_CONTACT.
    DATA: dref_tab LIKE TABLE OF O_ref.
    DATA: begin OF o_ref2,
    CONTACTID               TYPE CT_CONTACT,
    P_INSTANCES             TYPE string,
    P_CONTEXT               TYPE CT_BPCCONF,
    P_CONTROL               TYPE ISU_OBJECT_CONTROL_DATA,
    P_DATA                  TYPE BCONTD,         "<<<=== THIS IS A STRUCTURE CONTAINING OTHER DATA ELEMENTS
    P_NOTICE                TYPE EENOT_NOTICE_AUTO,
    P_OBJECTS               TYPE BAPIBCONTACT_OBJECT_TAB,
    P_OBJECTS_WITH_ROLES    TYPE BAPIBCONTACT_OBJROLE_TAB,
    end of o_ref2.
    TRY.
        CALL METHOD CL_ISU_CUSTOMER_CONTACT=>SELECT  "<<<=== STATIC METHODE & PUBLIC VISIBILITY
          EXPORTING
           X_CONTACTID = '000001114875'   "Whatever value here
          RECEIVING
            Y_CONTACTLOG = o_ref
    ENDTRY.
    WHAT I WOULD LIKE TO DO IS TO MOVE o_ref TO o_ref2 and then display:
    1) P_DATA-PARTNER
    2) P_DATA-ALTPARTNER
    How can I do this please?

    I now have the following code. But when I check for syntax I get different error. They are at the end of the list.
    Here is the code the way it stands now:
    ================================================
    ***Use global class CL_ISU_CUSTOMER_CONTACT
    DATA: oref TYPE REF TO CL_ISU_CUSTOMER_CONTACT.
    DATA: dref_tab LIKE TABLE OF oref.
    DATA: begin OF oref2,
    CONTACTID TYPE CT_CONTACT,
    P_INSTANCES TYPE string,
    P_CONTEXT TYPE CT_BPCCONF,
    P_CONTROL TYPE ISU_OBJECT_CONTROL_DATA,
    P_DATA TYPE BCONTD,      "THIS IS A STRUCTURE CONTAINING OTHER DATA ELEMENTS
    P_NOTICE TYPE EENOT_NOTICE_AUTO,
    P_OBJECTS TYPE BAPIBCONTACT_OBJECT_TAB,
    P_OBJECTS_WITH_ROLES TYPE BAPIBCONTACT_OBJROLE_TAB,
    end of oref2.
    TRY.
    CALL METHOD CL_ISU_CUSTOMER_CONTACT=>SELECT     " STATIC METHODE & PUBLIC VISIBILITY
    EXPORTING
    X_CONTACTID = '000001114875' "Whatever value here
    RECEIVING
    Y_CONTACTLOG = oref
    ENDTRY.
    field-symbols: <FS1>      type any table,
                   <wa_oref2> type any.
    create data dref_tab type handle oref.   " <<===ERROR LINE
    assign dref->* to <FS1>.
    Loop at <FS1> assigning  <wa_oref2>.
    *use <wa_orfe2> to transfer into oref2.
    endloop.
    write: / 'hello'.
    =========================================
    Here are the errors I get:
    The field "DREF" is unknown, but there is a field with the similar name "OREF" . . . .
    When I replace itr by OREF I get:
    "OREF" is not a data reference variable.
    I then try to change it to dref_tab. I get:
    "DREF_TAB" is not a data reference variable.
    Any idea? By the way, must there be a HANDLE event for this to work?
    Thanks for your help.

  • Declaration of Rabge table Paramater in Global class method

    Hi Friends,
    I have created a Global class with a method GET_DATA.
    In that method,i have written the like  :
    select * from kna1 into table it_kna1where kunnr in S_kunnr.
    But, I am getting the error with Range table S_KUNNR.
    Kindly, Let me know how I should Declare S_KUNNR in parameter list of GET_DATA,  what should be its associated data type?
    Regards,
    Xavier.p
    Edited by: Xavier on Jul 16, 2009 3:50 PM

    1) Create a Public Type for ranges. You can do it in SE11 or in SE24. I generally prefer doing it in SE24.
    Go to Types Tab
    Declare your range type
    TYPES: ty_r_kunnr type range of kna1-kunnr.
    2) Use this type to declare your method's parameters:
    IR_KUNNR TYPE TY_R_KUNNR
    3) When calling the method you can do like:
    CALL METHOD O_REF->GET_dATA
      EXPORTING
        IR_KUNNR = S_KUNNR[].
    Regards,
    Naimesh Patel

  • Dynamic ALV: but with globally available dynamic table type

    Hello,
    I would like to create a dynamic node for a ALV and dynamic table types to fill and the ALV.
    The ALV data can be changed so I need to read it again.
    I have read all the threads about dynamic node create and i have no problem with it. I can create a structure and a table dynamically. thats also no issue for me.
    But. I fill the ALV data in a method and read it in another method to save the changes in a data base table.
    Thats also no problem
    So where i need your help? I currently create the dynamic table and structure in both methods. That works, but why do the same thing twice?
    I cant figure out by myself how to create a dynamic table/structure in a global way, so the dynamic table/structure is created once and then available in the whole WD4A view.
    I tried is with a class type in se24 with reference to CL_ABAP_STRUCTDESCR but I cant make that run, because to access the type I created an attribute in se24 with reference to the class type that I now try in instance and fill in the method. But ABAP thinks that my attribute is not compatible anymore.
    Any idea how to make a dynamic table globally available? That must be an ABAP god who can answer this question, hehe. So imagin me falling on my knees for the one who has an answer that really works
    Kind regards,
    Hendrik

    This doesn't seem too difficult really. For a dynamic table you just need to declare the internal table as TYPE REF TO DATA.
    Just more this declaration to the attributes of your Component Controller. So for instance in my component controller I have an attribute called i_data with the RefTo column checked and the associated type = DATA.
    So now I could do the following:
      create data wd_this->idata type table of (tablename).
    Or however you are dynamically creating the table - maybe with TYPE HANDLE instead.
    The point is that your dynamic table is now global to your entire component and you can read and write to it from different methods.
    Is this what you were looking for?  Without knowing more about your existing coding, it is difficult to say more.

Maybe you are looking for

  • Oracle 11g spatial query

    An Oracle 11g spatial database with 5 features in it. A doughnut, triangle, line, trapezium, pentagon. I want to query what coordinates of features exist in a rectange box including the last point that intersects the rectangle box. It really difficul

  • Error Install SAP Netweaver ABAP Trial Version 7.01

    Hello everyone,   I'm trying to install SAP Netweaver ABAP Trial Version 7.01.   My operating system is Windows XP Professional.   I have 3 GB of RAM and 80 GB of free space.    Unfortunately, the installation process is stuck in:    Phase 18 of 27  

  • Media recovery issue

    Hello Why is media recovery is faster than, normal DML,DDL,etc? In production database, It took 1 hour to rebuild indexes and move some objects to diffrent tablespace. However, When I apply the archivelog of these changes to standby, it took about 20

  • Bridge CS3 JavaScript Reference Guide?

    Approximately two years ago I downloaded the Bridge JavaScript Reference Guide for CS2 as a PDF file (3.5 MB) from Adobe's website. Now I am looking for the respective scripting reference for Bridge CS3---but I cannot find one. I found several User M

  • How do I see "Macintosh HD" in Lion?

    Hi, By default, there is now "Macintosh HD" in the sidebar of Finder in Lion, and I don't know how to get to it? Anyone know? Thanks.