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

Similar Messages

  • Access global data of report in global class methods?

    Hi all,
    I have defined one global class in SE24 and i am using methods of this class in report program.
    Can i access global data of my report program in class methods directly without declaring it as IMPORT
    parameter?
    Thanks,
    Apita

    Hi,
    Well, now you did confuse me: first you asked about using global data of a report program in global class (created in SE24), and the answer is: no, you can't directly access the global data of another program in a method of global class (yes, you should pass them via importing parameters), and you shouldn't even consider using indirect means of doing so via special form of ASSIGN statement reserved for internal use by SAP. The ASSIGN will not work if someone reuses the global class elsewhere in the system without loading your report. Don't ever program such atrocious dependencies in global class...
    And now you ask about the use "in method implementation in report program"..? Just to be sure - you can't program the implementation of a global class method in a report program.
    You can program a local class inheriting from a global class and redefine/re-implement methods of such global super-class in a report program. Global data of report program, including the selection screen, would be directly accessible to such local class. It would still not be a good idea to use this access:
    Conversely, within an encapsulated unit, that is, within a class, you should avoid accessing more global data directly. Within methods, you should generally modify attributes of the class only. Write access to global data outside the class is not recommended. Accessing data in this way should only be done using specially marked methods, if at all. The use of methods of a class should not evoke any side effects outside the class itself.
    cheers
    Jānis
    Message was edited by: Jānis B

  • Exporting Tables from BSP to Class Methods

    Afternoon Everybody,
    in true SAP OSS Message style I post this question on it's own thread to enable maximum value from the reward points.
    Question:
    I have a BSP, in an event in my BSP I call a method in my class.
    I have mastered Exporting parameters to the methods from the BSP and Importing parameters back to the BSP from the methods, but now, I need so Export a table to the method and I don't know how to.
    Also, in combination with this, when I create the method I am able to setup the importing parameters, but how can create/define the importing table ?
    If this is not clear I will add more info.
    Thanks for your help,
    Tomas.

    Tomas,
    The key to problem is always to learn a few "nice" things defined in the system. So let me see. The first problem you have is that methods are declared of the form:
    method <parm> <direction> TYPE [REF TO] <t>
    parm = the name of the paramter
    direction = IMPORTING|EXPORTING|CHANGING|RETURNING
    t = type of parm
    However, in this type it is not possible to write that you want "type of table". You can only use predefined types (either internal or indictionary).
    Having said this, most people with extensive ABAP experience before the OO-wave, tend to use character types all the time. However, we nearly always use only type string. And exactly for this type there is a type string_table.
    So the code would be:
    <u>Declaration:</u>
      method lines changing type string_table
    <u>Calling:</u>
      DATA: t TYPE string_table.
      APPEND 'Hello' TO t.
      APPEND 'World' TO t.
      class=>method( CHANGING lines = t ).
    <u>Method Implementation:</u>
      DATA: line LIKE LINE OF lines.
      LOOP AT lines INTO line.
        TRANSLATE line TO UPPER CASE.
        MODIFY lines FROM line. " write back
      ENDLOOP.
    <u>Better Method Implementation (works directly on row):</u>
      FIELD-SYMBOLS: <line> LIKE LINE OF lines.
      LOOP AT lines ASSIGNING <line>.
        TRANSLATE <line> TO UPPER CASE.
      ENDLOOP.
    These two types <b>string</b> and <b>string_table</b> goes a long way. The other two types that I often use are <b>ihttpvnp</b> and <b>Tihttpvnp</b> (table): they are good for name/value pairs of strings.
    Now is the time that you should invest 30 minutes reading each time that you run into a problem. You have the framework, just check up on one aspect each time. (I usually use online help, for example to understand MODIFY for writing this text.)

  • Access arrayobject from class method

    Hi,
    Can anyone tell me how to access the variables in an object array from a static method of the same class?
    In another class i create a object array
    MyClass[][] myObjectArray = new MyClass[3][3]
    In MyClass there is a declaration:
    public int myInt = 1
    and a class method:
    public static myMethod(){
    int intVar = "this is where i would like to read the value of myInt for each object, something like myObjectArray[0][0].myInt + myObjectArray[1][2].myInt, but it does not work"
    I guess something with "this" or "super", but dont know how.
    Thanks,
    /Thomas

    It should obviously be impossible to access any Instance
    in a class-method.
    You could pass it as an parameter though:
    public static void myMethod(MyClass[][] myCl)

  • Global Class that returns an internal table

    Hello,
       Is it possible to create a global class (under class builder) that returns an internal table like we used to do in a function module?
        e.g. call function '<Function module name>'
                        tables = i_tab.
    Thanks,
    Jeffrey

    Hi Jeffrey,
      Yeah u can do that by specifying importing parameters
      to method.You can give table type for the parameters.
    Thanks&Regards,
    Siri.

  • Passing internal table to a method of a Global Class

    Hi All,
    I have to pass a Select option (SO_RANGE) as a IMPORT parameter to a method of a global Class (while calling that method from a executable program).
    what Reference type should I give, while defining the IMPORT parameter for that method of class. 
    SO_RANGE have structure of type (SIGN, OPTION, LOW and HIGH)
    Regards,
    Pankaj.

    You first need to define a type for range.
    for that goto->public section of your class and put following under TYPES
    TYPES : tr_matnr type range of mara-matnr .
    now you can use this tr_matnr in global class to define input parameter and in your program to define a variable .
    In your program define variable as
    DATA data_mat TYPE Classname=>tr_matnr
    To define workarea type use following.
    TYPES : t_matnr TYPE LINE OF tr_matnr .

  • Select option in global class

    Hi,
    I want to add one data dictionary field as select option in a global class. I am trying to declare as table type. But i missed out something and it is not working. Could anybody help me out in this.
    Regards,
    Krishna.

    Hello Krishna
    You may have a look at table type RSELOPTION (line type RSDSSELOPT).
    Alternatively, you can use a trick to "import" select-options for a selection screen into your class:
    How to pass a select-options to a class method
    Passing select-options value in method
    Regards
      Uwe

  • How to give a value range in export parameter (global class)

    hi all,
    I have created a class-method called get_po_date. In this i had export parameter as qmfe-qmnum. If i give qmfe-qmnum in import parameter in class, i am able to give only one value at one time, but i need a range of values at a time. Instead of qmfe-qmnum in associated type, i have given 'LXHME_RANGE_C12' ( a range table for char 12 ). the thing is i wanted to select this range in select-options. but still iam getting <b>not type compatible syntax error</b>. can any body solve my problem,
    feel free to ask if any confusion with my question.
    Best Regards,
    abhilash.

    Hello Abhilash
    Instead of using a specific range (where field LOW and HIGH are of type QMNUM) you can use a <b>generic </b>select option (of type <b>RSDSSELOPT</b>). Have a look at the following sample report <b>ZUS_SDN_SELOPTIONS</b>.
    *& Report  ZUS_SDN_SELOPTIONS
    REPORT  zus_sdn_seloptions.
    TABLES: qmfe.
    DATA:
      gt_data          TYPE STANDARD TABLE OF qmfe,
      gt_data_x        TYPE STANDARD TABLE OF qmfe,
      gt_selopt        TYPE rseloption,  " generic table type for selopts
      gs_selopt        TYPE rsdsselopt.
    START-OF-SELECTION.
      SELECT        * FROM  qmfe INTO TABLE gt_data
             WHERE ( qmnum BETWEEN '000000000001' AND '000000000500' ).
      gs_selopt-sign   = 'I'.
      gs_selopt-option = 'BT'.
      gs_selopt-low    = '000000000001'.
      gs_selopt-high   = '000000000500'.
      APPEND gs_selopt TO gt_selopt.
      SELECT * FROM qmfe INTO TABLE gt_data_x
        WHERE ( qmnum IN gt_selopt ).
      IF ( gt_data = gt_data_x ).
        WRITE: 'Selected data are equal.'.
      ELSE.
        WRITE: 'Selected data are NOT equal.'.
      ENDIF.
    END-OF-SELECTION.
    Since RSDSSELOPT and RSELOPTION are global DDIC objects they can be used in <i>public </i>methods.
    Regards
      Uwe

  • Declaring the internal table in ABAP objects

    Hi every1,
    Please any one let me know how to declare an internal table in class (ABAP objects). Bcos i am new to this classes.
    help me out.
    Regards,
    Madhavi

    Hi,
    Check this example..
    TYPES: BEGIN OF TYPE_DATA,
                   MATNR TYPE MATNR,
                   WERKS TYPE WERKS_D,
                 END OF TYPE_DATA.
    DATA: T_DATA TYPE STANDARD TABLE OF TYPE_DATA.
    DATA: WA_DATA TYPE TYPE_DATA.
    Adding rows to the internal table.
    WA_DATA-MATNR = 'AA'.
    APPEND WA_DATA TO T_DATA.
    Processing the interna table
    LOOP AT T_DATA INTO WA_DATA.
    ENDLOOP.
    Thanks,
    Naren

  • Major global classes used in abap objects

    Hi,
    I am new to the abap objects and till now i am to understand that the role of the global classes are important in the abap object program. I had tried to search on the net but i was not able to get the desired result.
    I want to know which are the major global classes which are used in the ABAP objects.
    Plzz provide me guidelines for it.

    Ricx,
       It depends on your requirement.
    For alv's we use these global classes. For Webdynpro related alv we use different global classes.
    CL_GUI_ALV_GRID (List Viewer)
    CL_GUI_ALV_GRID_BASE (Basis Class for ALV grid)
    CL_GUI_ALV_TREE (ALV Tree Control)
    CL_GUI_ALV_TREE_SIMPLE (Simple ALV Tree)
    CL_ALV_TABLE_CREATE (Dynamic Creation of ALV Data Table)
    CL_ALV_TREE_BASE (Basis Class ALV Tree Control)
    CL_CK_ALVTREE_NKEY_2_OBJECT (Converter Node Key Object)
    CL_ALV_EVENT_DATA (Changing Data Container for Events)
    CL_ALV_EVENT_TOOLBAR_SET (ALV Context menu)
    Regards,
    Arun.

  • 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

  • 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.

  • SELECT-OPTIONS in global class definitions

    I'd like to 'type' selection ranges inside a global class created with SE24.
    For example:
    The data element PRODH_D (Product hierarchy) has no range structure or range table in SE11.
    Before I go to the trouble of defining the structure and table type in SE11, I'd like to define them in my global class and then use the 'type' for selection parameters.
    For example:
    types: begin of ty_kunnr_select,
             sign(1)    type c,
             option(2)  type c,
             low        type kunnr,
             high       type kunnr,
           end of ty_kunnr_select.
    data: st_kunnr_range type ty_kunnr_select.
    data: ta_kunnr_range type standard table of ty_kunnr_select.
    I've tried entering the code in multiple areas of the global class. I can get the code to compile just fine. But, when I try to use the type with a parameter definition of a method it won't compile.
    Does anyone know how to do this?

    Hi,
    Create a TYPE-POOL and store in it your global fields. At your "Properties" screen(SE24) add your type pool. Then you can use your types.
    If you find the answers helpful, please assign reward points.
    Svetlin
    Message was edited by: Svetlin Rusev

  • Best practice for selection-screen in global classes

    Hello everyone,
    I have build several selection screens (overall 150+ select options / parameters) some time ago and want to reuse some of them within a global class encapsulating a ALV grid. Is there an easy way to forward the values of a selection screen into my class?
    I have thought of a function module (in the function group which contains the dynpros) to extract the values. Is this a state-of-the-art approach?
    Thanks in advance,
    Alej

    Hi Uwe,
    correct me if I'm wrong: I remember RS_REFRESH_FROM_SELECTOPTIONS not doing the job perfectly, what ever it was, maybe
    'RS_REFRESH_FROM_SELECTOPTIONS' reads only the main selection screen of a report; it will not give you SELECTION-SCREEN BEGIN OF SCREEN ... contents.
    At least it is good for extracting the names of all SELECT-OPTIONS and PARAMETERS. Then use a dynamic assign like
    data:
      lv_assign type string
    field-symbols:
      <selopt> type table.
    CONCATENATE '('IM_CALLING_PROGRAM')' SELNAME INTO lv_assign.
    assign (lv_assign) to <selopt>.
    This not only enables you to use but also to modify the select-options on the screen as you want or need.
    I know since 10 or more years SAP warns to use the dynamic ASSIGN. But it works perfectly and will probably never be changed.
    Regards,
    Clemens

  • Create Events in Global Class

    Hi,
    I used this link for create Events in Global Class through SE24.....
    [http://sapabapnotes.blogspot.com/]
    I do same steps as given in this link....but it show some syntax error when i check it...
    Error : "IT_LFA1" is not an internal table - the "OCCURS n" specification is missing...
    Where i define it...
    Plz tell me wat can i do...
    Thanks...
    Edited by: Prince Kumar on Jan 25, 2008 12:25 PM
    Edited by: Prince Kumar on Jan 25, 2008 12:46 PM

    Hi,
    Thanks for reply....
    I create a table type with structure LFA1....
    Plz tell me that in the interface tab....wat i write....
    Plz clear...
    thanks....

Maybe you are looking for

  • My calendar in 10.8.2 never finishes updating and new entries are not syncing to cloud

    When i open the Calendar app and choose to refresh my calendars the 'Calendar -- Updating...' message at the top of the calendar window never goes away and the new entries on my computer do not make it to the cloud.  Additionaly new entries on the cl

  • Time for a wish list

    Hi team, may I submit here my wish list of nice-to-see-in-the-(near)-future? 1. Copy chart series (take one existing series and duplicate it, so that I can save some boring and error prone typing of similar queries. 2. Accept items like &ITEM. in all

  • Difference between Oracle BPEL PM and SOA server suite

    Dear Experts, Right now I am having JDeveloper 10.1.3.4 & Oracle BPEL PM Server 10.1.3.1 with me. Is that two enough to build Business Rules Engine with BPEL process & Human Task Also I having very big question that Oracle BPEL PM Server and SOA serv

  • Listening to ipod touch in car- bluetooth or FM?

    hello, i would like to listen to 3rd gen i-touch in the car. I have a motorola HF850 car hands free kit (bought from carphone warehouse) and hoped this would pair with the touch, but no luck. Have tried performing 'device discovery' on car kit, bluet

  • VB create Groupwise Appointment

    With the following VB code, I can popup a new groupwise appointment window and initialize most of the fields. However, I can not figure out HOW TO set the value for START and END Date/Time. Please help!!!!!!!!!! Set olApp = CreateObject("GroupWiseCom