How to define a generic structured type (deep structure) w/o LIKE

Hi,
I have been trying to define a generic structured type that would include a component (field) of type "table type".
Look at my type [ty_compatibilite].  It is the structured type that needs to have a component called "mobile" which needs to be an internal table.  I have tried to create a genereic table type called tt_mobile (based on ty_mobile) but that did not work. I have not been able to avoid using the LIKE command to make it work.
Any suggestions on how I could define my component "mobile" without using a "LIKE"... ?
Here is my code:
TYPES: BEGIN OF ty_mobile,
          ref_mob_sfr    TYPE zmobil,
          ref_mrq_sfr    TYPE zmarq,
          type_compat    TYPE zsea_comp_type,
       END OF ty_mobile.
TYPES: tt_mobile TYPE STANDARD TABLE OF ty_mobile.
DATA: lit_mobiles TYPE STANDARD TABLE OF ty_mobile.
TYPES : BEGIN OF ty_compatibilite,
          cod_ean        TYPE ean11,
          lib_art        TYPE maktx,
          compat_all_mrq TYPE zsea_comp_gen,
*          mobile        TYPE tt_mobile,
          mobile         LIKE lit_mobiles,
        END OF ty_compatibilite.
TYPES : tt_compatibilite   TYPE STANDARD TABLE OF ty_compatibilite.

define key or use default one:
TYPES: tt_mobile TYPE STANDARD TABLE OF ty_mobile with DEFAULT KEY.
If you don't specify key the type is treated as generic

Similar Messages

  • How to define a data carrier type "archive" in DMS

    Hi, experts.
    In order to intgerate DMS and ArchiveLink(Check in origin with ArchiveLink), i want to define a data carrier type "archive" in DC20.
    I have already defined a content repository 'Z2' in OAC0, but i can't enter 'Z2' into the field-data carrier,
    error message: You cannot use data carrier Z2 - try displaying possible entries
    Message no. V&021
    and the only possible entries is 'MA'
    which type content repository could be used as data carrier type 'archive",
    or there are some steps that i missed?
    Here are parameters of 'MA' and 'Z2':
    MA     ARCHLINK     SAP System Database     0046     ma
    Z2     ARCHLINK     HTTP content server                     0046     Test
    Thanks.

    Hi,
    Let me refresh your message with your Permission.
    i think iam also in the same confusion, any suggestion regarding this is eagerly welcome.
    i have some specific senario in DMS where the Client needs to store the DMS Original Files in SAP Archive Server through SAP Archive ink,
    here if i configure a part of Archive Server, so as to store the Original application files of DMS,
    say ZDMS_Arch01, ZDMS_Arch02, ZDMS_Arch03.
    ie.. if i configure Archive server as a Storing medium for DMS Original Files, will it appear as an Option to be selected for storing the original application files,
      just like as we get the list of storage catagories to store the Originals like DMS_C1_ST or any content server Storage catagory (clicking Check in original, in CV01N transaction
    any one who have configured this please Clarify.
    Regards
    Sathish

  • How to define an itab based from a structure inside a class

    Hello Experts,
    How can I define an internal table based from a structure that
    is declared inside a class?I want to define it in the START-OF-SELECTION event.
    I'll create a scenario below:
    *       CLASS lcl_main DEFINITION
    CLASS lcl_main DEFINITION ABSTRACT.
      PUBLIC SECTION.
        TYPES: BEGIN OF t_vbak,
              vbeln TYPE vbak-vbeln,
              erdat TYPE vbak-erdat,
              ernam TYPE vbak-ernam,
              auart TYPE vbak-auart,
              kunnr TYPE vbak-kunnr,
              vkgrp TYPE vbak-vkgrp,
             END OF t_vbak.
    ENDCLASS.                    "lcl_main DEFINITION
    START-OF-SELECTION.
    *Here i want to define an internal table based from the structure T_VBAK.
    Hope you could help me out here guys. Thank you and take care!

    .

  • How to define MDM real data type in ABAP ?

    Hi,
    I want to fetch MDM Repository data using MDM API .
    I am strugling as one field in MDM is of real type .
    Please tell me how I could define Real data type field in ABAP ?
    Thanks.
    Sandesh

    I recently had a Real type added to a repository I'm working on and noticed a dump in the API itself when trying to fetch data from that field. I'm running 5.5 so you may be experiencing a different issue. I haven't resolved the issue yet as it isn't a priority but I will most likely move to a string field and just ensure that the field has its decimal rule respected logically.

  • How to define field of number type in ecs file

    Hi B2B Experts,
    I need some help. In the detail record of my ecs file, i need to define a filed as number. Basically the data coming in the data file is a dollar amount. It is a number type.
    The number length maximum length is 6, The spec file says that field should be like below....
    9(04)V99
    The data came in the text file as 013100, so according to the business it is like 131.00 but as i defined the field as string, it is taking it as 13100. I want to define that field as a number type and it should consider keeping that number with two digits precision i.e.,decimal part. Please help me in this regard.
    I believe i should define the type as number and the i dont know what to keep for the format ?
    Thanks,
    N

    Naresh,
    What are your requirements? If I understood it correctly, you will be getting data without decimal and you want B2B to add decimal accordingly. If this is the case then I don't think it should be done at B2B rather this should be performed at middleware.
    Please let us know your exact requirement if I interpreted it incorrectly.
    Regards,
    Anuj

  • How to define OMJJ for movment type

    Hello, In OMJJ - against we set the account grouping with following Movement Type - Special Stock Indicator - Movement - Consumption Posting - Transaction key.  What is the relationship between special stock indicator, consumption posting and account assingment category.
    Abhay - 9819175185

    Hi
    If you want to manage stock separately pertaining to Consignment or Pipe Line Material or Project Stock etc, you need to maintain the Special Stock Indicator.
    Indicator for Consumption Posting is used to post GR agains Purchase Orders. It is derived based on the Account Assignment Category maintained in the Purchase Order.
    Account Assignment Category determines which  account assignment details are required for an Item in the Purchase Order (ex Cost Center etc).
    Srikanth Munnaluri

  • How to extract a generic Datasource (Typ: Hier) in SAP 7.0?

    Hi at all,
    could me anyone help ?
    I am very grateful for any response.

    Hi,
    Yes it uses 3.x dataflow.
    Check the hierrachy datasources for eg which ends with hier ...like attr,txt etc.
    You can find them in RSA5 and activate
    In case of Generic ones you need to create in RSO2 .
    Check following thread as well
    BW Customer hierarchy datasource
    Thanks and regards
    Kiran

  • Mapping problem - flat structure to deep structure

    Hi there
    We aren't able to figure out how to convert a flat XML to a deep XML. Here is the problem.
    Source structure ( a - 1 to unbounded and b - 0 to unbounded)
    <a>
    <b>
    <b>
    <a>
    <b>
    <a>
    <a>
    We want to convert this to a target structure that would look like this -
    <a>
        <b></b>
        <b></b>
        <b></b>
    <a>
       <b></b>
    <a>
    <a>
    What's the best way of achieving this result? We've looked at all the node functions but maybe we are missing something. Any help would be greatly appreciated.
    Thanks
    Salil

    Hi Salil,
    you should solve your problem by using the CONTENT CONVERSION in your sender adapter. You can use the "How to... use the content conversion module with the XI 3.0 J2EE".
    Look here:
    http://help.sap.com/saphelp_nw70/helpdata/en/2c/181077dd7d6b4ea6a8029b20bf7e55/content.htm
    (Can you give me some points if my answer has been useful? Thanks!)
    Regards.
    Gabriele.

  • How to work with deep structure

    Hi !
    I wanted to ask how to loop, modify, append tables located in deep structures. Deep structures i mean, structures consist of columns which are tables ( usualy exists in user-exit). Please give examples and reference help to this subject.
    Thanks
    Moshe

    Hi
    TYPES: T_TYBSEG TYPE STANDARD TABLE OF BSEG.
    DATA: BEGIN OF T_DOCUMENTS,
            HEADER LIKE BKPF,
            ITEMS  TYPE T_TYBSEG,
          END   OF T_DOCUMENTS.
    DATA: T_BSEG TYPE T_TYBSEG,
          T_BKPF TYPE STANDARD TABLE OF BKPF WITH HEADER LINE.
    Append data:
    SELECT * FROM BKPF INTO TABLE T_BKPF WHERE ....
    LOOP AT T_BKPF.
      MOVE-CORRESPONDING T_BKPF TO T_DOCUMENTS-HEADER.
       SELECT * FROM BSEG INTO TABLE T_BSEG where ....
    Here it uses the table t_bseg to append the items to T_DCOUMENTS-ITEMS: it's very import to clear this table before appending records.
    If you don't clear the internal table you'll append several times the same records.
       REFRESH T_DOCUMENTS-ITEMS.
       APPEND LINES OF T_BSEG TO T_DOCUMENTS-ITEMS.
       APPEND T_DOCUMENTS.
    ENDLOOP.
    Read DATA:
      LOOP AT T_DOCUMENTS.
        LOOP AT T_DOCUMENTS-ITEMS INTO BSEG.
        ENDLOOP.
      ENDLOOP.
    OR
      READ TABLE T_DOCUMENTS (WITH KEY ...) (INDEX <INDEX>).
      IF SY-SUBRC = 0.
         LOOP AT T_DOCUMENTS-ITEMS INTO BSEG.
         ENDLOOP.  
      ENDIF.
    Modify
      LOOP AT T_DOCUMENTS.
        LOOP AT T_DOCUMENTS-ITEMS INTO BSEG.
          IF BSEG-GJAHR = '2005'.
            BSEG-GJAHR = '2006'.
          ENDIF.
          MODIFY T_DOCUMETS-ITEMS FROM BSEG.
        ENDLOOP.
      ENDLOOP.
    So if you use this type of structure the table haven't an headerline, so you always use a workarea to read an update the data.
    Max
    Message was edited by: max bianchi

  • How to define an new New transaction type in SRM Environment?

    Hi All,
    There is a situation where in I have to add anew transaction type and link it to the existing process.
    If I am going to
    SPRO->SRM->SRM Server -> Cross appl.Basic Setting ->
    Define transaction type
    It gives me an un editable screen.
    My question is how to define a new transaction type here
    Kindly Let me know if there is any way to do it through ABAP .
    Thanks And Regards,
    Rupesh

    When you have gone through the path you describe you end up with a screen with a line for "define transaction types". To the left of the line are two icons - one to execute the function (the execute icon) and one with documentation (the text icon). Click on the documentation icon.
    Rob

  • Access deep structures from tableView model binding

    Hi,
    I have a problem with accessing a deep structure component from a tableView control.
    The structure is defined like this:
    structure project_data
        main_data type structure
        data_table1 type table
        data_table2 type table
    end structure
    The deep structure project_data is an attribute of my model class.
    When I have a table attribute, it can directly be accessed by using table="//model/table_data" in the tableView.
    What do I have to write in my table attribute to access the deep structure directly via model binding.
    table="//model/project_data.table_data" doesn't work, it throws a bsp exception.
    Thanks in advance!

    So there is no direct way of doing this?
    But why does it work for textEdits like this: value="//model/project_data.main_data-description"
    What would I have to do in the interface methods to get it work, or is it simpler to just add the elements of the deep structure directly to my model class?

  • Problem with deep structure in Adobe Forms

    Hi ,
    I am converting smartform into adobe forms. While converting the program code in the code initialization of the smart forms also get transformed to adobe forms the problem is my internal table is of type deep structure while passing it through the tables parameter i am getting error in adobe forms .But while passing the internal table through import parameter its not giving error.The same code works fine with smartforms. I dont know why its not taking the structure of internal table in adobe forms properly .It happens only for deep strucure formal normal tables it works fine in table parameters .If any one has come across this scenario please share your ideas.
    Best Regards,
    Sreeram

    If I were you, I would never do this through any program. The only secure, reliable way is to rewrite everything by your own hands. Even if we could argue, your way works as well (and could be faster at the beginning), at the firt moment you will be asked to perform any tiny change in this "imported" thing, you will cry your eyes out (and understand why it is the only useful way to rewrite everything manually).
    regards Otto

  • Source and destination are deep structures.. can't seem to map the detail table

    So, both my source data structure and my destination structure are very similarly built:
    They both have a HEADER and BODY component. The HEADER has the standard AIF fields (MSGGUID, NS, IFNAME, IFVER).
    I have defined the BODY as a deep structure composed of a Header Structure + a Detail Table. Each row in the BODY has a structure with a few header fields, then a table of detail data attached to it.
    In my Structure Mappings, I've created 2 rows:
    The first to map BODY-HEADER to my header structure.
    The second to map BODY-DETAILS to my details table. Here, I've chosen "Indirect Mapping".
    Selecting that row and navigating to "Define Field Mappings", I choose my destination table (DTL) and enter the Sub-table from my source structure.
    At this point, I only have 1 action - to save the data in Ztables. I'm seeing that the header data is passed in fine. But there aren't any detail lines coming through.
    Any ideas?
    thanks alot.
    RP.

    Christoph,
    In your reply, I only have the ability to perform the First Structure Mapping (please see the below screenshots):
    Source Structure; BODY
    Destination Structure: BODY
    Field Mapping:
    1. Field in Dest.Struc=HDR, Sub-Table = SCH_HEADER
    2. Field in Dest.Struc=DTL,  Sub Table = SCH_DETAILS
    I presume I'm following your suggestion, but when I try to create the other two structure mappings, I only have HEADER or BODY as available options to choose from: I've attached screenshots of the F4 dropdown of the Source Structure and also the Destination Structure fields.
    I believe this is because my Interface Definition is defined as a HEADER and BODY:
    Source Data Structure
    Destination Data Structure

  • Flat structure,deep structure, and info structure

    hi,
    What is meant by flat ,deep ,info structures what is difference among them?

    Flat structure:
    If you have a structure with list of fields on it and You can have a structure with in the structure included
    Deep structure:
    If you have tabletype(internal table) included in the
    structure
    Flat structures contain only elementary data types with a fixed length (no internal tables, reference types, or strings).
    The term deep structure can apply regardless of whether the structure is nested or not
    The technical difference between deep structures and all others is as follows.
    When you create a deep structure, the system creates a pointer in memory that points to the real field contents or other administrative information.
    When you create a flat data type, the actual field contents are stored with the type in memory. Since the field contents are not stored with the field descriptions in the case of deep structures, assignments, offset and length specifications and other operations are handled differently from flat structures

  • Generic class for deep cloning

    How can I write generic class for deep cloning instead of implementing cloneable for each and every object

    Yes, probably you'd need to use reflection. Though, generic deep copy brings up some issues not readily resolvable at run-time, such as, for example, does the object you want to copy refer to a shared or synchronized resource, such as a db connection? If so, by making a new, say, DBConnection object, you then take up a db connection that you really don't need or want to take up (db conns being scarce in many I.T. shops that own a limited number of Oracle or SQL Server, etc. db conn. licenses). Also, many classes these days are getting written that use "obj = classname.newInstance()" (with their constructors made private so you can't use "new SomeObject()") instead of the more commonsense and traditional "obj = new SomeObject()". [Hey, can anyone explain why it might be preferable to use "classname.newInstance()" at times over "new SomeObject()"?  I can't to this day tell why it might be better or why some hacks have started doing this.]
    I am not saying either that you couldn't do it or that you shouldn't. In fact, if you wrote a really good generic deep copy class, it may very well suit your needs 95+% of the time. It'd be a great programming exercise that would likely result in something very useful to someone somewhere (yourself included), and would get you to really learn the reflect package, time generally well-spent. I also can see how it'd be a great exercise in writing recursive calls (if for example you'd like no limit to the depth of objects created within your deep-copied object). You may need to supply a few caveats for use, such as that there's no guarantee that objects within the object to be copied that don't have public constructors can be copied, and that objects that hold other objects that are limited in availablity due to their very natures, such as db connections, may not get fully copied. Another one may be that no object can be copied as long as a thread created and run from it is executing at the time the copy is done (because you couldn't guarantee the to-be-copied object instance's data or object reference state), or that perhaps in some cases, certain kinds of method-level (ie, what's officially called by Sun, "automatic") variables declared and used within, for example, blocks of code within methods, may not have their values copied correctly if they are not visible to the reflect pkg objects (though I'd have to look into that one myself to be sure it would be an issue).
    Doing a search on "deep copy" or "deep clone" on java.sun.com as well as on the 'net reveals surprisingly little except suggestions for using object serialization to do all the dirty work for you.
    I am surprised there isn't a kind of virtual working group trading ideas on the topic and trying collaboratively to come up with a good, solid generic deep copy class as a public service for all the Java brethren. Does anyone know of one? And if not, wanna start one?

Maybe you are looking for

  • How to upload ABAP roles in Portal 6.0 N/W ABAP + Java

    Hi , I have portal 6.0. How can i see the ABAP roles in portal. I know there is some backend system need to configured. please write step by step. I can create users in portal which is replicated in ABAP. i have gone thru some forums but did not get

  • Resume is driving me crazy.

    I like resume and I have been using it for a while after installing Lion. However, recently it has been failing to open the last windows that I have been working on. The most annoying is Safari. No matter how I go about closing Safari, or whether I t

  • FINDER keeps restarting itself.

    ok, I wrote before about the issues I'm having with FINDER. I have since realised that if I am on my Finder/Desktop window showing the desktop - it keeps restarting itself every 10-15 seconds. If I have a window open (such as looking in Folder Conten

  • Need your help

    Hi,     We have created a new key combination for a delivery type which is delvry type/shippingpoint/shiptoparty. And our client has maintained the customer master with vendor as a forwarding agent(CR).Now when creating the condition record in vv22 s

  • When starting Firefox, I get Javascript error, something about a babelfish something or other.

    After closing 3 or 4 error messages, Firefox opens but I just get a page that says Restore Session with the Firefox icon. Bookmarks do nothing nor does the address bar work. Re-installing and rebooting has not helped.