Determine class type of Generic Parameter (not via getGenericSuperclass()!)

I need to know the class type of a generic Parameter. Please imagine this class:
class MyGenericClass<T>
}In cases where other classes derived from MyClass and defined the generic parameter (like MyDerivedClass extends MyGenericClass<String>),
this snippets works just fine:
(Class<T>) ((ParameterizedType) getClass().getGenericSuperclass()).getActualTypeArguments()[0];But now I have no inheritance but the definition of the type parameter via instantiation:
MyGenericClass<String> entity = new MyGenericClass<String>();The method "getGenericSuperclass()" does not suit my needs because it does not target the actual class. Nor can "getTypeParameters() " help me...
After countless trying to retrieved the type information, I still have no clue how to determine for that case that (in my example) the type parameter
is a 'String'.
Does anyone know the solution?

Serethos_0 wrote:
Sure I could pass the class type itself as parameter to be stored in 'exportClassType'. But I only tried to adapt the idea used e.g. in Generic DAOs
as descibed here: [http://community.jboss.org/wiki/GenericDataAccessObjects]. The big difference is, that in the Generic DAO example the typed
information is available within the class definition ..
Besides that I am open for any other suggestion!I would recommend passing around the Class object as you say.
Some might suggest that you make MyGenericClass abstract, forcing any instantiation to be like this:
MyGenericClass<String> entity = new MyGenericClass<String>() {};That would indeed cause the String type parameter to be available at runtime, since you're creating an anonymous inner class. But it leads to a convoluted and extremely statically expensive instantiation pattern. Using the class object is a better solution IMO.

Similar Messages

  • J2EE debugger cannot determine class type

    Hi,
    when i try to remote debug servlets, jsps or enterprisebeans, i always get the source code finder window popup writing:
    "the source of the type 'ocm.sap.internal.jcmsystool.SystoolProcessor' could not be shown as the type was not found."
    I tried to pack the web project into a jar and add it explicitely to the source code searchlist, but even that did not help.
    i use nwds 2.0.15
    thanks in advance, joerg.

    Joerg,
    In this window check what jar/zip/dirs are used for source lookup.
    With remote debugging it is common to setup debug configuration for project A, then use it for debugging project B. And debugger is unable to find sources of B in A (that is defined via configuration)
    VS

  • What type of generic delta to use and what field?

    Dear BW Gurus,
    I am creating a generic datasource based on a view BSAK and BSIK (Accounts Payable tables). I am not able to determine what type of generic delta (numeric pointer, calender day or timestamp) should i use and what field in the table should it that be based on? All or any help is greatly appreciated.
    Thanks
    Raj

    CALDAY on field BLDAT (in both tables) seem an obvious candidate.
    Added - You will need help from functional people (or you can try it in ABAP forum) to determine which date field is updated with the system date when these tables are updated with SAP txns (some hint can be had by looking at the data)- the fields of interest would be -
    BUDAT
    BLDAT
    CPUDT
    It is almost certain that CALDAY is the only option you have for delta type, and one of these three fields will have to be chosen.
    Message was edited by: Ajay Das

  • Post Goods Issue - error : Class type does not exist - Message no. VK662

    Hi,
    I am trying to do Post Goods Issue and getting this error: Class type does not exist
    When double click on the error, it shows it is a message no vk662.
    Any help to resolve it is appreciated. Thanks in advance.
    -Sri

    Sri
    There is a problem in batch determination.
    The batch you assigned to the material does not have a class or if it has a class, that class does not exist.
    Display the batch from the delivery item  using MSC3N and go into the Classification tab. You should have a class of class type 22.  See if that class exists in CL03 and its status in basic data tab. Work on these lines and revert.
    Hope this helps.

  • The types of the parameter field and parameter field current values are not compatible.----

    HI,
    I am attempting to set report parameters in my .jsp code via URL parameters.
    I am able to set the report name, server connection dynamically however when attempting to set the Parameters I receive:
    com.crystaldecisions.sdk.occa.report.lib.ReportSDKParameterFieldException: The types of the parameter field and parameter field current values are not compatible.---- Error code:-2147213303 Error code name:invalidParameterField
    The parameter on the report is a String Type, named for this example p1.
    The value that p1 represents is LERAD
    My code:
    String stringValue = request.getParameter("p1");
    CRJavaHelper.addDiscreteParameterValue( clientDoc, "","p1", stringvalue);
    returns the above mentioned error.
    I have tried:
    String stringValue = (String)request.getParameter("p1");
    which returns the above error
    And;
    String stringValue = new String(request.getParameter("p1")).toString();
    which returns
    java.lang.NullPointerException
    java.lang.String.<init>(Unknown Source)
    org.apache.jsp.callReport_jsp._jspService(callReport_jsp.java:105)
    org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
    I notice that the CRjavaHelper.java declares this addDiscreteParameterValue as accepting an Object type for the newValue.
    Any ideas???

    Hi,
    nevermind.
    case sensitivty strikes again.
    my URL param was P1 ( case sensitive)

  • Type for SENDER parameter in Class Method

    Hi all,
    I have an import parameter declared in a Class method .
    in SE38 program i want to retrieve through export parameter .
    But i am not able to figure how to defind the type of SENDER parameter . Please suggest if my perception is wrong or the point that i am missing here .
    Regards,
    Ry.

    Hi Vijay,
    Thank you for your reply . the problem i am having is the functionlaity of this report is it displays three grids and when ever i double click on a grid it should identify the particluar grid . i have highlighted in bold where i am encountering the problem. i am enclosing the class details and the report source code. Please suggest after going through it . thanks in advance.
    Class details that i have created :
    the class has a method handle_double_event with event handler double_click of CL_GUI_ALV_GRID . i have defined this in the method section.
    in public section section :
    public section.
      types GO_GRID1 type ref to CL_GUI_ALV_GRID .
      class-methods HANDLE_DOUBLE_CLICK
        for event DOUBLE_CLICK of CL_GUI_ALV_GRID
        importing
          ES_ROW_NO
          E_COLUMN
          E_ROW
          SENDER .
    in handle_double_event code :
    DATA:
      go_grid1         TYPE REF TO cl_gui_alv_grid,
      go_grid2         TYPE REF TO cl_gui_alv_grid,
      go_grid3         TYPE REF TO cl_gui_alv_grid.
    DATA:
      gt_knb1          TYPE STANDARD TABLE OF knb1,
      gt_vbak          TYPE STANDARD TABLE OF vbak,
      gt_vbap          TYPE STANDARD TABLE OF vbap.
      define local data
        DATA:
          ls_knb1      TYPE knb1,
          ls_vbak      TYPE vbak,
          ls_vbap      TYPE vbap.
       DATA: es_row_no type lvc_s_roid,
             e_column  type lvc_s_col,
             e_row     type lvc_s_row.
        *CASE sender. - here when i double click on the first grid go_grid1 it should go inside the go_grid1 . but it is not entering .*
          WHEN 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( 'ORDERS' ).
          WHEN go_grid2.
            READ TABLE gt_vbak INTO ls_vbak INDEX e_row-index.
            CHECK ( ls_vbak-vbeln 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( 'ORDER_DET' ).
          WHEN go_grid3.
            READ TABLE gt_vbap INTO ls_vbap INDEX e_row-index.
            CHECK ( ls_vbap-matnr IS NOT INITIAL ).
            SET PARAMETER ID 'MAT' FIELD ls_vbap-matnr.
            CALL TRANSACTION 'MM02' AND SKIP FIRST SCREEN.
          WHEN OTHERS.
            RETURN.
        ENDCASE.
    endmethod.
    Code for the Report that is accessing the class.
    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_splitter_2    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_cell_left     TYPE REF TO cl_gui_container,
      go_cell_right    TYPE REF TO cl_gui_container,
      go_grid1         TYPE REF TO cl_gui_alv_grid,
      go_grid2         TYPE REF TO cl_gui_alv_grid,
      go_grid3         TYPE REF TO cl_gui_alv_grid,
      list             type ref to zcl_eventhandler,
      es_row_no        type lvc_s_roid,
      e_column         type lvc_s_col,
      e_row            type lvc_s_row,
      sender(8)        type c.
    DATA:
      gt_knb1          TYPE STANDARD TABLE OF knb1,
      gt_vbak          TYPE STANDARD TABLE OF vbak,
      gt_vbap          TYPE STANDARD TABLE OF vbap.
    PARAMETERS  :  p_bukrs TYPE ekko-bukrs default '1000'.
    START-OF-SELECTION.
      create object list.
      SELECT        * FROM  knb1 INTO TABLE gt_knb1
             WHERE  bukrs  = p_bukrs.
    Create docking container
      CREATE OBJECT go_docking
        EXPORTING
          parent                      = cl_gui_container=>screen0
          ratio                       = 50
        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              = 1
          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_left.
          container = go_cell_top.
      CALL METHOD go_splitter->get_container
        EXPORTING
          row       = 1
          column    = 2
        RECEIVING
          container = go_cell_right.
    Create 2nd splitter container
      CREATE OBJECT go_splitter_2
        EXPORTING
         parent            = go_cell_left
          parent            = go_cell_top
          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_2->get_container
        EXPORTING
          row       = 1
          column    = 1
        RECEIVING
          container = go_cell_top.
      CALL METHOD go_splitter_2->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.
      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.
      CREATE OBJECT go_grid3
        EXPORTING
          i_parent          = go_cell_right
        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.
          CALL METHOD ZCL_EVENTHANDLER=>HANDLE_DOUBLE_CLICK
            EXPORTING
              ES_ROW_NO = ES_ROW_NO
              E_COLUMN  = E_COLUMN
              E_ROW     = E_ROW
              SENDER.
    Set event handler
      SET HANDLER: list->handle_double_click FOR go_grid1.
      SET HANDLER: list->handle_double_click FOR go_grid2.
      SET HANDLER: list->handle_double_click FOR go_grid3.
    Display data
      CALL METHOD go_grid1->set_table_for_first_display
        EXPORTING
          i_structure_name = 'KNB1'
        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.
      REFRESH: gt_vbak.
      CALL METHOD go_grid2->set_table_for_first_display
        EXPORTING
          i_structure_name = 'VBAK'
        CHANGING
          it_outtab        = gt_vbak
        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.
      REFRESH: gt_vbap.
      CALL METHOD go_grid3->set_table_for_first_display
        EXPORTING
          i_structure_name = 'VBAP'
        CHANGING
          it_outtab        = gt_vbap
        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:
    *PROCESS BEFORE OUTPUT.
    MODULE STATUS_0100.
    *PROCESS AFTER INPUT.
    MODULE USER_COMMAND_0100.
    END-OF-SELECTION.
    *&      Form  CUSTOMER_SHOW_ORDERS
          text
    -->  p1        text
    <--  p2        text
    FORM customer_show_orders .
    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  vbak INTO TABLE gt_vbak
             WHERE  kunnr  = ls_knb1-kunnr.
      REFRESH: gt_vbap.
    ENDFORM.                    " CUSTOMER_SHOW_ORDERS
    *&      Form  ORDER_SHOW_DETAILS
          text
    -->  p1        text
    <--  p2        text
    FORM order_show_details .
    define local data
      DATA:
        ld_row      TYPE i,
        ls_vbak     TYPE vbak.
      CALL METHOD go_grid1->get_current_cell
        IMPORTING
          e_row = ld_row.
      READ TABLE gt_vbak INTO ls_vbak INDEX ld_row.
      CHECK ( syst-subrc = 0 ).
      SELECT        * FROM  vbap INTO TABLE gt_vbap
             WHERE  vbeln  = ls_vbak-vbeln.
    ENDFORM.                    " ORDER_SHOW_DETAILS
    *&      Module  STATUS_0100  OUTPUT
          text
    MODULE STATUS_0100 OUTPUT.
    SET PF-STATUS 'STATUS_0100'.  " contains push button "ORDERS"
    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.
    Refresh display of detail ALV list
      CALL METHOD go_grid3->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.
    move sy-ucomm to gd_okcode.
    CASE gd_okcode.
        WHEN 'BACK' OR
             'END'  OR
             'CANC'.
          SET SCREEN 0. LEAVE SCREEN.
      User has pushed button "Display Orders"
        WHEN 'ORDERS'.
          PERFORM customer_show_orders.
        WHEN 'ORDERS_DET'.
          PERFORM order_show_details.
        WHEN OTHERS.
      ENDCASE.
      CLEAR: gd_okcode.
    endmodule.
    Regards,
    Ry

  • Class type 013: class SAP_KKR_CLASS is not valid today

    Dear Sir,
              At the time of production order saved one error comes i.e. Class type 013: class SAP_KKR_CLASS is not valid today.
               Thanks
               Parag

    Hi ,
    The error message  is issued because of your customizing or
    class missing in your system.
    You have two options to resolve the problem depending on your business
    requirement in Controlling:
    1) If you required classification in controlling, you need to generate
    class SAP_KKR_CLASS via OKQ3.
    2) If you don't require classification in controlling, you could
    deactivate 'Classification' indicator for the order type via OPJH.
    More infos on this issue can be found in the mentioned note 356327.
    best regards

  • Tutorial for make a non-generic type class from a generic type interface

    Hi there,
    How can I make a non-generic type class from a generic type interface?
    I appreciate if somebody let me know which site can help me.
    Regards
    Maurice

    I have a generic interface with this signature
    public interface IELO<K extends IMetadataKey>
    and I have implemented a class from it
    public class CmsELOImpl<K extends IMetadataKey> implements IELO<K>, Cloneable, Serializable
    then I have to pass class of an instance CmsELOImpl to AbstractJcrDAO class constructor whit below signature
    public abstract class AbstractJcrDAO<T> implements JcrDAO<T> {
    public AbstractJcrDAO( Class<T> entityClass, Session session, Jcrom jcrom ) {
              this(entityClass, session, jcrom, new String[0]);
    So I have made another class extended from AbstractJcrDAO. Below shows the code of this class and itd constructor
    public class ELODaoImpl extends AbstractJcrDAO<CmsELOImpl<IMetadataKey>> {
         public ELODaoImpl( Session session, Jcrom jcrom ) {
         super(CmsELOImpl.class , session , jcrom, MIXIN_TYPES);
    and as you see in its constructor I am calling the AbstractJcrDAO constructor by supper method
    then I got this error on the line of super method
    The constructor AbstractJcrDAO(class<CmsELOImpl>, session, Jcrom, String[]) is undefined.
    as I know java generics are implemented using type erasure. This generics are only
    in the java source file and not in the class files. The generics are only used by the compiler and
    they are erased from the class files. This is done to make generics compatible with (old) non generics java code.
    As a result the class object of AbstractJcrDAO<CmsELOImpl<IMetadataKey>>
    is AbstractJcrDAO.class. The <CmsELOImpl<IMetadataKey>> information is
    not available in the class file. As far as I understand it, I am looking a way
    to pass <CmsELOImpl<IMetadataKey>>, if it is possible at all.
    Maurice

  • Error in IS-AFS "Class Type not Active"

    Hiii,
    I am getting an Error while doing GR for batch (023) managed material "Class Type not active: Error ID: VK 663.
    Please throw some light.
    Regards,
    Kumar

    Hi Kumar,
    We are also facing the same problem.
    Have you fixed it? if so could you please pass-on the solution/useful informtion..
    Thanks in advance..
    Regards,
    Siva

  • Adobe Premier Elements 8 - Generic failure.  This type of file is not...

    Hi all,
    So the problem is this. When trying to add media to a project (two .avi files from a dv camera). When pushing add media, then it asks where is the file.
    When you search for the file(s) then it says "Generic failure. This type of file is not supported or the codec required is not installed."
    This just appeared, yeasterday everything was fine. I tryied to download codec packs etc and tryied to convert the files to .wmv .mov and so on but nothing helped.
    Help needed please.

    Hi,
    Camcorder type I dont know yet, because its not my computer or camera. Working on it to find out.
    But that I know that the video was transferred using 1394 port.
    Computer has the latest version of Quicktime. OS is Windows XP SP3. i7 processor (the computer is Dell E6410).
    And space it has enough

  • Class type has not been defined in Customizing as allowed for variant confi

    Hi,
    I want to use class type 200 in the varient configuration, but following error is showing so please reply me .
    Class type 200 cannot be used for materials
    Message no. CU731
    Diagnosis
    This class type has not been defined in Customizing as allowed for variant configuration.
    Procedure
    Choose a class type which is allowed for variant configuration.
    Thanks

    Thanks for ur reply.
    please help me regarding my requirements
    I will have to use the varient configuration. In this scenario multilevel BOM BOMis present & for every level varient is present.
    so how to map this scenario, so that it should pop up at the time of sales order creation. i.e. it should ask that which varient should be used at all the levels in the BOM.
    Thanks & Regards.
    Abhi

  • Class type not defined for this object type

    Hi Friends,
    Could u please guide me ?..We have a requirement to extract some data from classification system.
    This is related with class type 023 - Batch
    I want to use the following parameters in CTBW.
    basis datasource :Z_BATCH_ATTR
    class type : 023
    object table :MCHA
    Datasource type : ATTR
    I am getting an error "Class type not defined for this object type" when i enter the above entries in CTBW.
    The only way I'm being able to make this work is changing object table from MCHA to MCH1.
    This solution does not fit me bacause MCH1 table dont have Plant as Key, and I need it.
    Do you know what should I do to solve this?
    Thanks in advance

    Hi,
    I believe we have to use the list of standard "Basis DataSource", as I'm also stuck with the same issue. Let me know what Basis Data source you selected in this case.
    As I'm trying to extract Batch attributes from "AUSP" Table.
    I have given class type= 023
    Obj Table= AUSP
    But not sure which "basis datasource" I need to select.
    Thanks,
    Satish

  • Class type 022 is not defined for object for BATMAS

    Hi Experts,
    while creaitng the LSMW for batch classification,I faced the error during IDOC processing as "Class type 022 is not defined for object".I am using
    Business Object      BUS1001002
    Method               SAVEREPLICA
    Message Type         BATMAS
    Basic Type           BATMAS03
    Pleas guide how to resolve the error.
    Also ,as I intend to make LSMW for batch classifications.Is this the correct way.
    Please guide on this also.
    Regards.

    Hello Jass,
    Symptom
    The BATMAS03 basis type (message type BATMAS) /FB BAPI_BATCH_REPLICATE  cannot transfer any classification information. Please review note 1070634.
    First Option :
    You should first transfer the batmas and then the clfmas idoc.
    Second Option :
    You could create the batch together with classification. Normally the problem is the missing CUOBJ_BM in table MCH1. It is not necessary in all situations that the field have to be filled, but it can be in some cases (And it is better to store the right  information in the corresponding fields). Especially when you transfer batch/classification information in other system the field have to be filled.
    The way to create the batch TOGETHER with classification by using BATMAS IDOC is to set the following parameters correctly :-
    set E1BPBATCHCTRL-DOCLASSIFY to X and fill the segments with relevant classification information
    E1BP3060_ALLOCATION
    E1BP3060_VALUATION_CHAR
    E1BP3060_VALUATION_CURR
    E1BP3060_VALUATION_NUM
    In this case the field mch1-cuobj_bm should be filled with correct CUOBJ. You can also use function module BAPI_BATCH_SAVE_REPLICA to create batches together with classification.
    Hope this information helps
    Regards
    Amber

  • Class type 022 is not defined for object for batmas in LSMW idoc

    Hi Experts,
    while creaitng the LSMW for batch classification,I faced the error during IDOC processing as "Class type 022 is not defined for object".I am using
    Business Object BUS1001002
    Method SAVEREPLICA
    Message Type BATMAS
    Basic Type BATMAS03
    Pleas guide how to resolve the error.
    Also ,as I intend to make LSMW for batch classifications.Is this the correct way.
    Please guide on this also.
    Regards.

    Hi,
    Go to TCode OMCE and check the batch level.
    If batch is activated at material/client level then use class type 023, if it is at plant level the class type 022.

  • IDOC error 639 IDoc & and determined transport type & do not match

    Hello,
    can you help me with this issue?
    An idoc is stuck beacuase of this error:
    IDoc & and determined transport type & do not match
    Message no. IHC_IDOC639
    What does it mean? how can I fix thiss issue in order to re-process the idoc?
    Thank You

    Hi,
    is SAPNET note 784881 implemented? If no, implement it and try again.
    BR Christian

Maybe you are looking for

  • How can I Deleting an Apple ID ?

    In this moment I have 2 Apple ID-es because: When I made this Apple ID , I didn't know, how can I make an Apple ID to use only for free applications - I don't want to give my personal data on Internet (Bank Card - serial number, security code, etc.)

  • Averages in a query using a variable with Replacement Path: Replacement wit

    I have two queries. Query1 has a handful of characteristics, one of which is used in a formula where I used replacement path in order to be able to use it in some calculated key figures. I also have a couple of key figures that are not calculated and

  • Score Report available in MCP site

    The location where I do my tests sometimes can't print the score report and when print its completely unreadable. Would be nice to have access to report in MCP site. to Save PDF´s and my my history. We also need some improvements on MCP site, its slo

  • Installing Lightroom 4 on a second laptop

    I purchased Lightroom 4 a few years ago and would like to install it on a second computer for my own personal use.  How can I do this?  I believe that I downloaded the program from the adobe website, so I do not have a disc.  Even if I did, I'm putti

  • Setting a Clip Poster Frame

    Is there a way to set a poster frame for a clip? It would be very useful to actually see an images instead of 50 solid blue clips.