Skip to Content
author's profile photo Former Member
Former Member

ABAP

for a structure how to represent the component's field details during programming

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Dec 03, 2007 at 12:41 PM

    Hi Rekha,

    You might get more detailed answers in the ABAP forum. In any case, let me give you some details.

    If you have a structure, you can reference the fields of that structure using the name of the variable for that structure, followed by a dash and then followed by the technical name of the field.

    For example, if you have a structure that is defined as:

    types: begin of ty_sample,
                     field1 type string,
                     field2 type dats,
             end of ty_sample.
    

    Then you can define a variable with the the same components as this structure using an ABAP code similar to the ff:

    data: w_data type ty_sample.

    You can then reference the first field, by saying

    w_data-field1.

    Hope this helps.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.