Including structure in TYPES-- urgent

hi
this is an itab with header line
data: begin of xdb_mchb occurs 0.
        include structure mchb.
data:   vrfmg      like v01fdk-vrfmg.
data:   cuobj      like inob-cuobj.
data:   lifnr      like mkol-lifnr.
data:   sobkz      like mkol-sobkz.
data:   lobm_bprio like bfstock-lobm_bprio.
data: end of xdb_mchb.
and i want to define an explicit work area  so i have done it like this :
types :       BEGIN OF ts_xdb_mchb ,
       <b>include structure mchb,</b>
        vrfmg      TYPE v01fdk-vrfmg,
        cuobj      TYPE inob-cuobj,
        lifnr      TYPE mkol-lifnr,
        sobkz      TYPE mkol-sobkz,
        lobm_bprio TYPE bfstock-lobm_bprio,
       END OF ts_xdb_mchb.
but i m getting error. as ""," expected after "INCLUDE"."
can we include structure in TYPES please let me know..
thnx<b></b><b></b><b></b><b></b>

Hi neha,
After INCLUDE don't put " , " instead put " . "
So that you can errors.
It will work try.OK
types : BEGIN OF ts_xdb_mchb ,
             vrfmg TYPE v01fdk-vrfmg,
             cuobj TYPE inob-cuobj,
             lifnr TYPE mkol-lifnr,
             sobkz TYPE mkol-sobkz,
             lobm_bprio TYPE bfstock-lobm_bprio,
             <b>include structure mchb.</b>
END OF ts_xdb_mchb.
If helps, reward.
regards,
V.Raghavender.

Similar Messages

  • How to include structure in Types Definition ???

    Hello All,
          I want a declaration like this in BSP :-
    DATA : BEGIN OF imkop OCCURS 100.
                   INCLUDE STRUCTURE mkop.
    DATA :   waers LIKE mepro-waers.      
    DATA : END OF imkop.
    <b>In BSP: Type Definitions</b>
    I wrote like this :-
    Types : BEGIN OF imkop.
                    INCLUDE STRUCTURE mkop.
    Types :   waers type mepro-waers.      
    Types : END OF imkop. 
                   I'm getting an error saying that I can't use structures in this .
    Now what should I do ?
    Can anyone help me out ?
    Regards,
    Deepu.K

    deepu,
    we can declare structures as below.
    DATA:  event_data      TYPE REF TO cl_htmlb_event.
    TYPES: BEGIN OF row_iid_type,
           row_iid  TYPE hap_row_iid,
           END OF row_iid_type.
    DATA:
           t_row             TYPE STANDARD TABLE OF row_iid_type,
           t_row_wa          TYPE row_iid_type,
           t_message  TYPE STANDARD TABLE OF bal_s_msg .
    DATA:
           lw_body_element   TYPE hap_s_body_elements,
           lw_body_column    TYPE hap_s_body_columns,
           lw_body_cell      TYPE hap_s_body_cells,
           lw_return         TYPE bal_s_msg,
           warning TYPE i.
    regards,
    manasa

  • Include structure in TYPES declaration

    Hello All:
    Many forum posts have discussed similar topics, but I couldn't exactly find one answering my requirement. Apologies if I have missed out reading some.
    Instead of creating a type as below (as suggested in few forum posts)
    TYPES begin of types ty_itab
                         include type BISEG
                         xxxx type xxx
                         xxxx type xxx
                End of types ty_itab
    I need to create the type with include structure after the additonal fields.
    TYPES begin of types ty_itab
                         <fld1> type <ty1>
                         <fld2> type <ty2>
                         include type <struc>
                End of types ty_itab
    Can someone give the right syntax?
    Please help,
    Fred.

    Hello Fred
    If you are using the extended syntax you should not encounter any problems:
    TYPES: begin of types ty_itab.
    TYPES:                     <fld1> type <ty1>.
    TYPES:                     <fld2> type <ty2>.
                         include type <struc>.
    TYPES: End of types ty_itab
    Regards
      Uwe

  • Include structure problem

    Hi,
    I'm trying to compile simple construction in ECC 60:
    types: begin of t_bbseg.
             include structure bbseg.
    types: end of t_bbseg.
    I have compilation error:
    "The type "SI_BBSEG" is unknown"
    Is anyone had something like this before?
    We are NetWeaver 2004S Unicode enabled.
    Thank you,
    Ihar

    If you are trying to include BSEG as a structure in the TYPE, use the TYPE keyword instead
    types: begin of t_bbseg.
    include type bseg.
    types: end of t_bbseg.
    REgards,
    Rich Heilman

  • Error on extended check for types include structure statements

    Hi All ,
                  On Extended check im getting error :
    Program:  ZFIR_VALUATE_OBSOLETE_STOCK  Include:  ZFIR_VALUATE_OBSOLETE_STOCK_F  Row:   1205
    The current ABAP command is obsolete
    Within classes and interfaces, you can only use "TYPE" to refer to ABAP Dictionary
    types, not "LIKE" or "STRUCTURE".
    Internal Message Code: MESSAGE G/B
    (The message cannot be hidden using pseudo-comment "#EC .., bzw. durch SET
    EXTENDED CHECK OFF/ON)
    The error is in below line :
    TYPES: BEGIN OF t_fttax.
              INCLUDE STRUCTURE fttax.
      TYPES: END OF t_fttax.
    and fttax is a dictionary strucuture . i made internal table and work area using it .
    DATA: i_fttax TYPE STANDARD TABLE OF t_fttax,
            wa_fttax TYPE t_fttax.
    Need Help ,what i should do to remove this error ?
    Regards

    declare as :
    DATA: i_fttax TYPE STANDARD TABLE OF fttax,
               wa_fttax TYPE fttax.
    No need to declare as :
    TYPES: BEGIN OF t_fttax.
              INCLUDE STRUCTURE fttax.
      TYPES: END OF t_fttax.

  • Table type with include structure

    Hi All,
    How to declare a table type with include structure
    i am declaraing it in the following way its giving epc check of obselete statement,
    could any one tell me how to declare a table type and internal table for the following code.
    DATA:BEGIN OF TY_OUTPUT OCCURS 0.
    DATA:PS_PSP_PNR TYPE EKKN-PS_PSP_PNR.
    INCLUDE STRUCTURE ST_ZCDTT0005.
    DATA:END OF TY_OUTPUT.
    Thanks in advance.

    Hi
    TYPES: BEGIN OF TY_OUTPUT,
             PS_PSP_PNR TYPE EKKN-PS_PSP_PNR.
             INCLUDE STRUCTURE ST_ZCDTT0005.
    TYPES: END OF TY_OUTPUT.
    TYPES: TY_T_OUTPUT TYPE TABLE OF TY_OUTPUT.
    Max

  • In a server proxy how can I use a INCLUDE STRUCTURE?

    Hi people!!, how can I put an internal table with an INCLUDE statement in a server proxy in abap. If I put the next code the system present me this error: Within classes and interfaces, you can only use "TYPE" to refer to ABAP     , Dictionary types, not "LIKE" or "STRUCTURE".
    The problem is that I need the STRUCTURE to make a APPEND.
    Thanks for the help.
    DATA: BEGIN OF bdc_tab .
            INCLUDE STRUCTURE bdcdata.
    DATA: END OF bdc_tab.

    Hi Carlos,
    Yes. It mainly accepts TYPE statements.
    You can use this as:
    DATA: BDC_LINE type bdcdata.
    DATA: BDC_TAB type table of bdcdata.
    When you want to use,
    Fill the BDC_LINE.
    Then:
    Append BDC_LINE to BDC_TAB.
    Or:
    Loop at BDC_TAB into BDC_LINE.
    Cheers,
    Bhanu

  • Extended syntax check for include structure

    Hello Everyone,
    While declaring the internal table as:
    TYPES: BEGIN OF t_data.
            INCLUDE STRUCTURE mara.
    TYPES: END   OF t_data.
    DATA: it_data TYPE table of t_data.
    When performing extended check, i get following error:
    The current ABAP command is obsolete and problematic, especially so in ABAP
    Objects
    Within classes and interfaces, you can only use "TYPE" to refer to ABAP Dictionary
    types, not "LIKE" or "STRUCTURE".
    I am using 4.7 version.
    Any clue how to avoid this error during extended check.
    Regards,
    Tarun

    Tarun,
    With WAS 6.20 you should not declare internal tables with header line or using the old syntax as they are not compatible with OO ABAP.
    So, you either declare a TYPE the way you have done, in case you want additional fields apart from the INCLUDE structure, or declare the table directly like the way I have shown.
    Good thing, you can even specify the type of internal table that you want to create using this - STANDARD, SORTED, HASH. These tables will help you with the performance issues.
    regards,
    Ravi
    Note : Please mark the helpful answers

  • Selection-screen (field from .Include structure)

    Hi all,
    I have a selection screen with several select-options. One of the select-option is
    select-options: s_vornr for afvc-vornr.
    Where 'vornr' is a .Include structure field in the table 'afvc'. Now my question is, in selection screen when I click on the box for this particular select-option I dont see the circle(from where we can select the existing input values) at the end of the box.
    Why is it so and how can get that circle option at the end of the box by sticking to the same table and field(afvc-vornr).
    Waiting for your help.
    Thanks

    hi,
    the field do not have nay value range with it.
    you can put the F4 help by using
    At Selection-Screen on Value-request <select-option>. event.
    e.g.
    DATA :  rt_values TYPE STANDARD TABLE OF type_values,
              rs_values TYPE type_values,
              rt_fields TYPE STANDARD TABLE OF type_fields,
              rs_fields TYPE type_fields.
      CLEAR    : rs_values,rs_fields.
      REFRESH  : rt_values,rt_fields.
    Creation of selection list
      rs_fields-tabname     = 'AFVC'.
      rs_fields-fieldname   = 'VORNR
      rs_fields-selectflag  = ' '.      
      APPEND rs_fields TO rt_fields.
       SELECT vornr form AFVC
                     INTO  TABLE t_vornr.
      SORT t_vornr.
      DELETE ADJACENT DUPLICATES FROM t_vornr.
      LOOP AT t_vornr INTO s_vornr.
        rs_values =  s_vornr-vornr.
        APPEND rs_values TO rt_values.
        CLEAR rs_values.
        ENDLOOP.
    FUNCTION 'HELP_VALUES_GET_WITH_TABLE'                   EXPORTING
          fieldname    = 'AFVC'
          tabname      = 'VORNR
          titel        = 'Counting
        IMPORTING
          select_value = <select-opion>
        TABLES
          fields       = rt_fields
          valuetab     = rt_values.
    amit
    Message was edited by: Amit Khare

  • Problem with primary/secondary keys in table with included structures

    Dear ABAPers,
    we have a structure which is supposed to be included in the definition of several tables.
    The problem is the following:
    depending on the application table that includes this structure, 3 or 4 fields of that structure may
    or may not be necessary to enhance the table key. As far as I know included structures can only
    completely be marked as keys. Therefore I suggested to split up the structure into two parts,
    one part with the possible candidates that may become key fields, and the rest, and of course
    a structure that unites both of these substructures. So when it comes to reusing this structure
    the developer would have the choice to select the structure with all of the fields in case no field
    is needed as additional key, or the developer would have to implement both of the substructures
    separately with the option to mark the key-part of it as key in his table.
    But unfortunetaly this suggestion of mine was refused as being too complicated and I am supposed
    to define all the fields in one flat structure and to "enhance" the primary keys (that always will exist)
    by secondary keys.
    Does anybody know how that is supposed to work without defining double indexes?
    I cannot activate a table without having primary keys defined and any unique secondary index would
    allways include all of the primary keys.
    Thanks in advance for you help
    (I'm sorry that you cannot be granted reward points for just reading the extensive problem description)
    regards
    Andreas

    Dear Rob,
    since your answer was helpful and since it was the only one I will grant you full points on that.
    Thanks again for your input. In case other developers should look this thread up being confronted
    with the same kind of problem, here is how we solved it:
    We added an artificial primary key (a number of type NUMC 8) to the table which is supposed to
    include the structure. This key alone takes care of the uniqueness of eacht entry.
    All the others fields that we want to have available for a fast direct access, including the ones
    from the included structure, are put together in a secondary index.
    best regards
    Andreas

  • Best Approach to handle include structure during SPPD

    Hello Experts.
    I'm facing this problem:
    A Standard SAP table includes a structure with a standard SAP field.
    Now, a customer field was added to this structure using a repair (god knows why).
    example:
    structure st.
    temp type c
    ztemp type c.
    table tb
    include  st.
    Now as a part of the upgrading process, this include is supposed to be deleted from the table by sap.
    In transaction SPDD i saw the structure itself and the table, both under yellow lights (Without Modification Assistant).
    I tried sap proposal for the table - turning the include into an append- and the system generated the new append without the customer field.  not only that, but when i press the ' BACK' button, i had to go through a pop-up asking me wether i want to reset to original or not.
    Then, when i did the same process to the structure itself, and the same thing happend. but now, somehow (i must have lost track) the customer filed appeared as append in the structure:
    example:
    table tb
    append ztb
      include st
        temp type c
    append zst
       ztemp type c.
    To make things worse, the new zst sturcture contain itself.
    Of course half of the object could not be activated,
    Since i don't wont to loose any data, I have doubts whether to go on or to re-upgrade the system.
    What is the best way to handle such a situation?
    Best Regards.
    Motty.

    I assume you are using ODP.NET since you have posted this question in ODP.NET forum. OracleConnection.ClearAllPools() may be of help in scenario 1. You should call it after calling OracleConnection.Close().

  • Include structure and extra fields in the same Internal Table

    Hi developers,
    im trying to declare an internal table with include structure and extra fields,
    something like this:
    data: BEGIN OF it_loans occurs 0,
          include structure zthrca006,   
          status(10),
          pernr   like pa0001-pernr,
          sname   like pa0001-pernr,
          tipomov(20),
          monto   like zthrca006-monto,
    data: END of it_loans.
    zthrca006 is huge so i dont want to type everithing.

    What is the issue?
    data: BEGIN OF it_loans occurs 0.
                 include structure zthrca006.
    data :     status(10),
    data :     pernr like pa0001-pernr.
    data :     sname like pa0001-pernr.
    data :     tipomov(20).
    data :     monto like zthrca006-monto,.
    data:  END of it_loans.
    Regards,
    Ravi
    Note - Please mark all the helpful answers

  • Reg:Include structure in a ztable

    hi Gurus,
       I  created a structure which contians field types,sub-structures&table types ,now i want to include this structure to a ztable.I am encountering with an error .
    Some Error are mention below:-
    1)Select a shorter name for REASON_FOR_CHANGE
    2)SECTION is a reserved word (Select another field name)
    3)Field ILID: Structured type ZDCAGS_ILID cannot be used in DB table ZDCAGT_TSK_CNSLT
    4) Field TEXT: Structured type ZDCAGT_TLINE cannot be used in DB table ZDCAGT_TSK_CNSLT
    5)Field VARIAN: Structured type ZDCAGS_ILID cannot be used in DB table ZDCAGT_TSK_CNSLT
    6)Field REASON_FOR_CHANGE: Structured type ZDCAGT_TLINE cannot be used in DB table ZDCAGT_TSK_CNSLT
    7)Error in code generation for creating table ZDCAGT_TSK_CNSLT in the DB
    and the environment is ECC 6.40.
    please suggest if any.
    thanks in advance,
    Ramesh

    Hi Ramesh,
    I have some Solutions,
    1. Reason_for_change - Its field name means Give a shoet name.
    2. Section is reserved for SAP. So Select another word.
    3. The structure of the three fields are differed. So You can't use this Fields.
    Check this..
    Thanks.
    Reward If Helpful.

  • Include structure

    Hi all
    I have this code to give dynamic table name in select statement.
    Is there a way the include structure tak in the value from my parameter value like name1?
    DATA <b>name1</b>(10) TYPE c VALUE 'ZSTUDGARY'.
    DATA: BEGIN OF wa OCCURS 0.
           INCLUDE STRUCTURE <b>ZSTUDGARY</b>.
    DATA:  END OF wa.
    SELECT *
    INTO wa
    FROM (name1) CLIENT SPECIFIED.
    WRITE: / wa-eyear, wa-contact.
    ENDSELECT.

    I think you are looking for somethign like this. Please check this code
    REPORT ztest_gopi_dynamic.
    TYPE-POOLS : abap.
    FIELD-SYMBOLS: <dyn_table> TYPE STANDARD TABLE,
                   <dyn_wa>,
                   <dyn_field>.
    DATA: dy_table TYPE REF TO data,
          dy_line  TYPE REF TO data,
          xfc TYPE lvc_s_fcat,
          ifc TYPE lvc_t_fcat.
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME.
    PARAMETERS: p_table(30) TYPE c DEFAULT 'T001'.
    SELECTION-SCREEN END OF BLOCK b1.
    START-OF-SELECTION.
      PERFORM get_structure.
      PERFORM create_dynamic_itab.
      PERFORM get_data.
      PERFORM write_out.
    *       FORM get_structure                                            *
    FORM get_structure.
      DATA : idetails TYPE abap_compdescr_tab,
             xdetails TYPE abap_compdescr.
      DATA : ref_table_des TYPE REF TO cl_abap_structdescr.
    * Get the structure of the table.
      ref_table_des ?=
          cl_abap_typedescr=>describe_by_name( p_table ).
      idetails[] = ref_table_des->components[].
      LOOP AT idetails INTO xdetails.
        CLEAR xfc.
        xfc-fieldname = xdetails-name .
        xfc-datatype  = xdetails-type_kind.
        xfc-inttype   = xdetails-type_kind.
        xfc-intlen    = xdetails-length.
        xfc-decimals  = xdetails-decimals.
        APPEND xfc TO ifc.
      ENDLOOP.
    ENDFORM.
    *       FORM create_dynamic_itab                                      *
    FORM create_dynamic_itab.
    * Create dynamic internal table and assign to FS
      CALL METHOD cl_alv_table_create=>create_dynamic_table
                   EXPORTING
                      it_fieldcatalog = ifc
                   IMPORTING
                      ep_table        = dy_table.
      ASSIGN dy_table->* TO <dyn_table>.
    * Create dynamic work area and assign to FS
      CREATE DATA dy_line LIKE LINE OF <dyn_table>.
      ASSIGN dy_line->* TO <dyn_wa>.
    ENDFORM.
    *       FORM get_data                                                 *
    FORM get_data.
    * Select Data from table.
      SELECT * INTO TABLE <dyn_table>
                 FROM (p_table).
    ENDFORM.
    *       FORM write_out                                                *
    FORM write_out.
    * Write out data from table.
      LOOP AT <dyn_table> INTO <dyn_wa>.
        DO.
          ASSIGN COMPONENT  sy-index
             OF STRUCTURE <dyn_wa> TO <dyn_field>.
          IF sy-subrc <> 0.
            EXIT.
          ENDIF.
          IF sy-index = 1.
            WRITE:/ <dyn_field>.
          ELSE.
            WRITE: <dyn_field>.
          ENDIF.
        ENDDO.
      ENDLOOP.
    ENDFORM.
    Regards
    Gopi

  • Include structure in smartform

    I am trying to define types in smartform Global->Types.
    1---types: BEGIN OF tvbdpr1.
            INCLUDE STRUCURE vbdpr.----
    vbdpr is view
          types: END OF tvbdpr1.
    it gives error:
    "." or "IF FOUND." expected after "STRUCURE".
    BUT when i define below there is no error
    types: BEGIN OF tkomv1.
            INCLUDE STRUCTURE komv.-------it is table
    types: END OF tkomv1.
    any help thanks
    ismail

    It was spelling error, thanks

Maybe you are looking for

  • Arching purchase order document

    Hello, We would like to archive the output message and the edition of forms from the purchase order. I have parameter the object type : - BUS2012 :it is recommanded but doesn't work well - and the EKKO : it is obsolete but works well, the problem is

  • Print settings on 3880 missing

    I am using Lion OS and have not been able to set color controls, or choose paper settings on my Epson 3880. We've uninstalled, reinstalled the driver software 5-6 times. Deleted the printer, reinstalled the printer. Repaired permissions, Reset the pr

  • Multitouch Trackpad issues in Chrome and Firefox

    In both Chrome and Firefox, when I do the 3-finger swipe from right to left to go back a page, the window hides instead. The 3-finger swipe works the way it is supposed to in other programs including safari. The trackpad also functions as normal in a

  • Sensor Error during Apple Service Diagnostics

    I've been having problems with my early 2009 mac pro freezing and having to hard reboot.  I ran Apple Service Diagnostics and the test fails during Sensor tests: Temp (TNOD) - (MacPro) IOH or (iMac or mac mini) MCP, Tdiode (test 1) - Sensor Reads Wit

  • Uploading the contents of file into  custom table

    Hi , I have a req where in i want to put the contents of the file into the Z table . I have taken a file upload UI element and in that i have taken 4 attributes as file name f, file type ,file size and file contents and binded this file contents to t