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

Fill Table with OO concept

Hi,

There is a way to something like the code below with using abap method etc...

lw_act-langauge = 'EN'.
    lw_act-role_id = 'ADM'.
    lw_act-role_desc = 'XXXXr'.
    APPEND lw_act TO lt_a.
    lw_act-langauge = 'EN'.
    lw_act-role_id = 'MANA'.
    lw_act-role_desc = 'YYYYY'.
    APPEND lw_act TO lt_a.
    lw_act-langauge = 'EN'.
    lw_act-role_id = 'REQ'.
    lw_act-role_desc = 'TTTTTT'.
    APPEND lw_act TO lt_a.
    lw_act-langauge = 'EN'.
    lw_act-role_id = 'REV'.
    lw_act-role_desc = 'BBBBB'.
    APPEND lw_act TO lt_a.

Regards

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    Posted on Jan 13, 2009 at 10:51 PM

    huh? No, that is the way you should do it. You could do it using a field symbol as well.

    FIELD-SYMBOLS: <lw_act> LIKE LINE OF lt_a.
    
    APPEND INITIAL LINE TO lt_a ASSIGNING <lw_act>.
    <lw_act>-langauge = 'EN'.
    <lw_act>-role_id = 'ADM'.
    <lw_act>-role_desc = 'XXXXr'.
    
    APPEND INITIAL LINE TO lt_a ASSIGNING <lw_act>.
    <lw_act>-langauge = 'EN'.
    <lw_act>-role_id = 'MANA'.
    <lw_act>-role_desc = 'YYYYY'.

    Regards,

    Rich Heilman

    Edited by: Rich Heilman on Jan 13, 2009 5:51 PM

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      HI Rich,

      Thanks,

      By the way i buy your book it's great!!!,

      I have background in C++ and for now i start little bit on abap OO so it's help.

      If i have some questions how can i get you? 😊

      Best Regards

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.