SUB TYPES É POSSIVEL ?

GOSTÁRIA DE SABER SE ALGUEM JA USOU UMA DECLARAÇÃO PARECIDA COM ESSA E SABE ME DIZER SE FUNCIONA
TYPES: BEGIN OF Y_TABELA
     TYPES:  BEGIN OF Y_SUB_TABELA_1,
                                           INCLUDE STRUCTURE "TABELA STANDARD"
                       ENF OF Y_SUB_TABELA_1,
                    BEGIN OF Y_SUB_TABELA_2,
                       ENF OF Y_SUB_TABELA_2,
              ENF OF Y_TABELA.
CASO POSSIVEL O ACESSO A SUB TABELAS FICA COMO ?
EX
T_TABELA                                    TYPE Y_TABELA OCCURS 0,
T_TABELA-SUB_TABELA_1        TYPE Y_TABELA-SUB_TABELA_1 OCCURS 0.
USANDO FIELD-SYMBOL
  <F_TABELA-SUB_TABELA_1>     TYPE Y_TABELA-SUB_TABELA_1
ESTÁ CORRETO ? NÃO CONSIGO ATRIBUIR O FIELD SYMBOL PARA UMA SUB_TABELA
O EDITOR ABAP DIZ QUE NÃO TEM O MESMO TIPO, OU QUE A TABELA NÃO TEM COMPONENTES CHAMADOS SUB_TABELA
ISSO TUDO É POSSIVEL ?

Boa tarde,
Desculpe pela Caixa Alta,
sim como type ANY ele permite, mais posteriormente a isso o editor dava erro quando eu queria atribuir um valor a uma destas sub-tabelas, por exemplo :  surgiram alguns erros, e então acabei desistindo e usando WA com append normalmente, lembro me que usando CASTING ele so permite se tiver um TYPE Generico como N, I, C, Etc. e não ANY.
De qualquer forma obrigado!

Similar Messages

  • Sequence creation for Super Type and Sub Type (Parent-Child)

    Data Model is structured with Super Type-Sub Type Concept.When data is being inserted in the Super Type table, I will be using a sequence Supertype.NEXTVAL as Primary Key.Now the same sequence will be the Primary Key for Sub Type table also. Can I use Supertype.CURRVAL during insertion in Sub Type table?
    If Yes, I have lot of records being created in Super Type table within a second. So before data is being inserted in Subtype table there may be chance of a row being inserted in Super Type table and if I use Supertype.CURRVAL it may lead to wrong data.
    How can I make sure that Supertype Primary Key is being inserted as Primary key in sub type table?

    What happens when you try it? Something like:
    session1> select t_seq.nextval from dual;
       NEXTVAL
         40061
    session2> select t_seq.nextval from user_objects;
       NEXTVAL
         40062
         40063
         40064
         <snip>
         40270
         40271
         40272
    211 rows selected.
    session1> select t_seq.currval from dual;
       CURRVAL
         40061john

  • How to Add Values in INVOICE SUB-TYPE field at the Invoice Header Forms

    Hello,
    Does any body knows how could I add/modify values in the INVOICE SUB-TYPE field at the Invoice Header Forms?. This values are related to the Globalization, in this case for the Chilean Localizations.
    Thanks,
    Alejandro R.

    It gives any error or just does nothing?
    Have you tried making another simple form with just one block and one or two items?
    You can do this type of testing in these conditions.
    Which version of forms are you using?

  • Handling pop up of sub type HR_MAINTAIN_MASTERDATA function module

    Hi All,
    I am using HR_MAINTAIN_MASTERDATA for creating employee it's working fine but i am not able to handle pop up for sub type.
    For example sub type for Address it gives me pop up with values 1 Permamant address 2 Office address etc.
    Anybody know how to handle such pop up in function module. How to provide values to sub type.
    Thanks in advance.

    Hi,
    <li>Instead of using HR_MAINTAIN_MASTERDATA function module, you can use HR_INFOTYPE_OPERATION, because HR_MAINTAIN_MASTERDATA is used inside HR_INFOTYPE_OPERATION.
    <li>Check the sample program .
    REPORT  ztest_notepad .
    DATA:p0006  TYPE STANDARD TABLE OF p0006 WITH HEADER LINE.
    DATA:return LIKE  bapireturn1.
    p0006-pernr = '00001234'.
    p0006-subty = '2'.
    p0006-endda = '99991231'.
    p0006-begda = sy-datum.
    p0006-anssa = '2'.
    p0006-name2 = 'xyz'.
    p0006-stras = 'Street 64'.
    p0006-ort01 = 'US'.
    p0006-pstlz = '560634'.
    APPEND p0006.
    CLEAR  p0006.
    LOOP AT p0006.
      CALL FUNCTION 'HR_EMPLOYEE_ENQUEUE'
        EXPORTING
          number = p0006-pernr.
      CALL FUNCTION 'HR_INFOTYPE_OPERATION'
        EXPORTING
          infty         = '0006'
          number        = p0006-pernr
          subtype       = p0006-subty
          validityend   = p0006-endda
          validitybegin = p0006-begda
          record        = p0006
          operation     = 'INS'
          tclas         = 'A'
        IMPORTING
          return        = return.
      IF  return IS INITIAL.
        WRITE 'Successfully records created'.
      ENDIF.
      CALL FUNCTION 'HR_EMPLOYEE_DEQUEUE'
        EXPORTING
          number = p0006-pernr.
    ENDLOOP.
    Thanks
    Venkat.O

  • Handling pop up of sub type HR_MAINTAIN_MASTERDATA

    Hi All,
    I am using HR_MAINTAIN_MASTERDATA for creating employee it's working fine but i am not able to handle pop up for sub type.
    For example sub type for Address it gives me pop up with values 1 Permamant address 2 Office address.
    Anybody know how to handle such pop up in function module. How to provide values to sub type.
    Thanks in advance.

    HI R P,
    The field SUBTY is there as an export parameter for function module you mentioned.
    Please pass the value for that field when you call the FM in your program.
    Hope this helps
    Ajay

  • How to create the sub type field in hr abap infotype

    hi ,
        how to create the sub type field in hr abap infotype.
    regards,
    venkat.

    Try like this also
    creating of infotype please follow these steps ...
    Step 1: Create Infotypes
    i. Goto Transaction PM01 – To create Infotypes:
    ii. Enter the Infotype Number and say create all.
    iii. The following message would display:
    i. PSnnnn Does not exist. How do you want to proceed?
    iv. Click
    v. A maintain Structure screen appears.
    Fill in the short text description and the PS structure of the Infotype.
    Since the fields Personnel No, Employee Begin Date, End Date, Sequential Number,Date of Last Change, Name of user who changed the object are available in the PAKEY and PSHD1 structure, define the PSnnnn structure with only the fields you required.
    vi. Once the PS Structure is created, save and activate the structure.
    vii. In the initial screen of PM01, now click on .
    Create a new entry for the infotype.
    Fill in the values as mentioned below and save.
    Infotype Characteristics:
    Infotype Name of the infotype_ Short Text: __Short Description________
    *General Attributes :
    Time constraint = 1
    Check Subtype Obligatory
    Display and Selection:
    Select w/ start = 3 “Valid record for entered data
    Select w/ end = 5 “Records with valid dates within the period entered
    Select w/o date = 6 “Read all records
    Screen header = 02 “Header ID
    Create w/o end = 1 “Default value is 31.12.9999
    Technical Data:
    Single screen = 2000
    List screen = 3000; List Entry Checked.
    viii. In the initial screen of PM01, now click on .
    Choose the infotype entry in the list.
    Fill in the values as mentioned below and save.
    Technical Attributes:
    In tab section,
    The following attribute values are given:
    Applicant DB Tab = PAnnnn “Infotype Name
    Subtype field = SUBTY
    Subtype table = T591A
    Subty.text tab. = T591S
    Time cnstr.tab. = T591A
    Prim. /Sec. = I Infotype
    Period/key date = I Interval
    and .
    ix. Infotype Screen Modification:
    Edit Screen 2000 from PM01 for the Infotype.
    ABAP Editor for the Infotype Program MPnnnn00 will be displayed.
    Click . Flow Logic will be displayed. There string coding of your own logic.
    Regards
    Pavan

  • How to define a Sub Type in IT0717

    Hi Experts,
    Currently working on Benefit point account.
    could some one tell me how to define a Sub Type for IT717.
    how do i configure.
    Appreciate your response.
    Regards
    Raj

    Hi,
    I have created the subtype in the table you specified.
    But unable to see the created subtypes for IT552 in PA30.
    Appreciate your further inputs.
    Regards
    Rajesh.N.S

  • Add a foriegn key constraint to to a sub type on an object table

    Hi,
    I'm trying to set up a new table of an object type in our DB at work and on it I want to create a foreign key constraint on one of the attributes of one of the sub types
    The table is called documents and is a table of document_ot
    Definition:
    create or replace
    TYPE document_ot AS OBJECT (
    -- ATTRIBUTES
    created_date DATE,
    created_by VARCHAR2( 32 ),
    doc_id NUMBER,
    -- CONSTRUCTORS
    ) NOT INSTANTIABLE NOT FINAL;
    This type is extended by the type funding_certificates_ot
    create or replace
    TYPE funding_certificate_ot UNDER document_ot (
    -- ATTRIBUTES
    fc_prefix VARCHAR2( 2 ),
    fc_sequence NUMBER,
    fc_suffix VARCHAR2( 1 ),
    fc_pr_id NUMBER,
    -- CONSTRUCTORS
    -- METHODS
    ) NOT FINAL;
    I want to add a constraint to the to documents table that says that the funding_certificate_ot column fc_pr_id references pr_id in the table payruns.
    I've managed to create an index on the fc_pr_id column using:
    CREATE INDEX fc_pr_idx
    ON documents d (treat (value(d) as funding_certificate_ot).fc_pr_id);
    The code I thought I'd use for the foreign key constraint would be:
    ALTER TABLE documents d
    ADD CONSTRAINT doc_pr_fk FOREIGN KEY
    treat (value(d) as funding_certificate_ot).fc_pr_id
    REFERENCES payruns
    (pr_id)
    ENABLE;
    But that doesn't work - would someone be able to give me the correct syntax please?
    Many thanks

    Hi,
    I'm trying to set up a new table of an object type in our DB at work and on it I want to create a foreign key constraint on one of the attributes of one of the sub types
    The table is called documents and is a table of document_ot
    Definition:
    create or replace
    TYPE document_ot AS OBJECT (
    -- ATTRIBUTES
    created_date DATE,
    created_by VARCHAR2( 32 ),
    doc_id NUMBER,
    -- CONSTRUCTORS
    ) NOT INSTANTIABLE NOT FINAL;
    This type is extended by the type funding_certificates_ot
    create or replace
    TYPE funding_certificate_ot UNDER document_ot (
    -- ATTRIBUTES
    fc_prefix VARCHAR2( 2 ),
    fc_sequence NUMBER,
    fc_suffix VARCHAR2( 1 ),
    fc_pr_id NUMBER,
    -- CONSTRUCTORS
    -- METHODS
    ) NOT FINAL;
    I want to add a constraint to the to documents table that says that the funding_certificate_ot column fc_pr_id references pr_id in the table payruns.
    I've managed to create an index on the fc_pr_id column using:
    CREATE INDEX fc_pr_idx
    ON documents d (treat (value(d) as funding_certificate_ot).fc_pr_id);
    The code I thought I'd use for the foreign key constraint would be:
    ALTER TABLE documents d
    ADD CONSTRAINT doc_pr_fk FOREIGN KEY
    treat (value(d) as funding_certificate_ot).fc_pr_id
    REFERENCES payruns
    (pr_id)
    ENABLE;
    But that doesn't work - would someone be able to give me the correct syntax please?
    Many thanks

  • Validating sub type field

    Hi Experts,
                     Iam new to HR Abap programming environment. My requirement is :   In 15 infotype, there is a LTA sub type ( leave travel allowance ). whenever user enters that LTA amount, it must be validated with  Exemption Amount ( which exists in  Infotype 582 in subtype LTA ). also, LTA amount should not exceed more than exemption amount.
    Please give me some suggestions of how to approach in this regard.
    Your suggestions are appreciated.
    thanking you in advance
    regards
    Murali Krishna T

    Hi ,
    We can achieve this by using Dynamic actions. When you save the data , this dynamic action will be triggered. In that you can configured a form .In that form you can write a code to validate LTA amount.
    Dynamic actions can be configured in the table T588Z.GO to maintenance view of T588Z and in that maintain entry for Info type 0015  and give a form name and Program name in which that form is written. Then write a  program and write a form in that. Program type can be subroutine pool. In that form you write a code for your requirement. You can find more document on dynamic actions in SDN.
    Hope this information will help you.
    Thanks and Regards,
    Narendra.Somarouthu

  • Creation of sub-types

    Hi Guy's,
    Please explain me how to create the Sub-types in ABAP-HR.
    Thanks,
    Sai.

    Hello Sai.
    Transaction SWO1 which is nothing but Business Object Builder.
    Enter the "Object/Interface Type" and then click on "Subtype".
    Hope that's usefull.
    Good Luck & Regards.
    Harsh Dave

  • Enhacmnet and addition of new sub types

    Hi SAP gurus
    1) I want to add one more subtype in the infotype 28 Internal mediacl services.The sub type will be named as Family history and and in all aspect it would be same as other sub type like 0001. In this sub type i want to add three Fields
    A) Diabitic in whch only specifiv values will be entered which will yes or no
    B) Hyper tension in whch only specifiv values will be entered which will yes or no
    So on .............
    2) And i also want to modify the existing sub types like in sub type 0001 under the field <b>Phys.constitution</b> i want to store some fixed values like <b>blood group</b>.
    I also want to add one more field <b>Veins</b> which will also have specific values like Yes/No
    How can i do this
    Please help in this regard its really urgent. reward point guranted for helping solutions.

    New Subtypes can be added via SM30/31 by maintaining V_T591A for 0028.
    Infotype can be enhanced using TCode PM01.
    Pl search the forumon how to enhance the Infotype. there are quitea few helpful threads on this issue.
    ~Suresh

  • Error in ESS Mandatory field for Address(0006)  Sub type 1

    Hi Experts ,
           I configured certain fields as mandatory fields in the tables  V_T588MFPROPC &  V_T588MFPROPS for Address(0006) sub type 1. It is working fine in my development system and quality system . The same configuration is moved to production , it showing the error "fill all required fields" . Aprat from th V_T588MFPROPC &  V_T588MFPROPS any other table to configure for mandatory filed.
    with regards
    Renjith

    Hi Renjith ,
    Kindly check the below,
    1. check the badi implementation of HRXSS_PER_BEGDA
    2. Check whether the note 1044777 is implemented in system
         1044777 -   Inconsistency in date handling of ESS PersInfo
    3. Also this may be because of back end data also, try to create a new set of data with all the required fields and try to   edit     the same in portal because most of this issue may occur because of data.
    Regards,
    Meera

  • Business Rules on super-sub types

    We are currently in the process of modeling business rules. We have some super-subtype entities in our datamodel. We also have business rules on the super-type as wella as the sub-types.
    What name for these BR's should we use, more specific which entity short-name: the entity-short-name of the type (super or sub) the rule applies to OR the entity-short-name of the (technical) to be implemented table?
    How will Headstart deal with these names when transforming the BR's to technical BR's and how will the CAPI-creation utility deal with this?
    Geert

    The business rules transformer should correctly handle the super/sub type rules. It assumes that your super/sub
    type entities are mapped to a single table with a discriminator column. You can name the rules using the correct
    super/sub entity name and the transformer will determine the table each is mapped to (all the same table). The
    transformer will add a condition to the Trigger When clause for subtype rules so that they are only triggered on rows
    where the subtype is of the correct type.
    Regards,
    Lauri

  • Is it possible to create sub-type of siteConfiguration in SiteRepository

    I am trying to create sub-type of 'siteConfiguration', but the OOTB Site Repository configurations doesn't allow except one type of siteConfiguration. Have anyone tried this and it worked out???

    Why do you want to subtype, why can't you just extend the OOTB siteConfiguration
    I don't really know if ATG allow subtyping siteConfiguration and how its going to work with multiple siteConfiguration type, but I would suggest you to extend the siteConfiguration if that is something which works for your requirement.

  • How to delete sub types in a wage type

    hi experts,
    how to delete the subtypes in a wage type . with out deleting the wage type but it should not display in the wage type list

    Hi Deepti,
    Its not deletions, I think u need restriction based on the employee sub group and personnel sub area.
    For this u have to do the following settigns
    1. Maintain grouping for Employee sub grp in table  V_503_G
    2.Maintain the grouping for Personnel Sub area in table V_001P_K
    3. Then go to the table V_511_B and double click on the wage type, u will be able to view 0 to 9 for EES, & PS
    In step 2 & 3 what ever the groupings u have maintained under that number maintain the value '1' and remaining field leave blank. So that the wage type will apllicable and visible to those EES & PS only
    If you don't want for any EES & PS then maintain all the numbers with blank in the table V_511_B. That will not display in the list.
    Never try to delet the wage type, it leads to errors
    Kumar

Maybe you are looking for

  • Reading attributes of different context nodes

    Hello, I want to read attributes of BP_DATA/TaxNumberList Node: BUILHEADER from Node BUILTAXNUMBER. I have tried all without success. In GENIL Browser they are not related. What can i do? Best Regards JM

  • Problem in ABAP trial version installation

    Hi All, I installed ABAP Trial Version, which was not properly installed, so I uninstalled SAP Application server form my desktop. When i try to it install again, it pop me up  a message displaying "an instance of NSP database is already exist, remov

  • Webdynpro ABAP code

    Hi, Any doc available to create webdynpro application using ABAP

  • Object is not an instance of declaring class

    Hi All, I am having an issue with reflection invoking a method. I have looked up the error I am getting but cannot see why my code is throwing it. As I understand it, the error thinks I am invoking a method on the wrong instance of an expected object

  • ISync fails - what to do with this error message?

    I set my iMac to autosync everyday at a certain time. I realized that the last sync was 7/27/06, and when I go to Sync tab in the .Mac system preferences, I get the following ".Mac Sync Error" message exactly as follows: "* -[NSKeyedUnarchiver initFo