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

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

Similar Messages

  • Can i use OEM to automaticaly fill tables with data ?

    Hi currently, i have tables that contains data on our databases such as the characteristics of the servers where these DB are stored, the user enter these data manually via an interface. I know that OEM has these information, i want to use it to automatically fill the tables with it. Is that doable ?

    Apparently you know nothing of OEM architecture. The obvious would be to look up documentation, sadly you belong to the majority of people here refusing to read any documentation.
    OEM comes in the flavors Grid Control (monitoring multiple databases) and Database Control (monitoring one database).
    OEM needs a repository. Using Grid Control this is located in a separate database, and each server has the Intelligent Agent installed to collect information from that server, provided the database is registered against grid control.
    Using Database Control, the repository is in the monitored database.
    Having OEM 'feed' your 'repository' would be about the poorest solution you can implement. Converting your 'repository' in views on the OEM schema would be the only viable solution, as Grid Control automatically has the most recent info.
    And obviously, for those who read, the OEM info is in the SYSMAN schema.
    Sybrand Bakker
    Senior Oracle DBA

  • Filling tables with XML data

    Hi!!
    I need help with this!! I don't know the right way to implement such a problem!
    Here is the scenario:
    I do have a number of tables (relations) created in MS Access and I do have an XML document now what I'm looking for is to fill these tables with data from the XML document!
    Here are the tables that I have (IDs are auto numbered fields)
    Table Name: datee
    Fields:
    1- datee_ID
    2- datee_day
    3- datee_month
    4- datee_year
    Table Name: paragraph
    Fields:
    1- paragraph_ID
    2- paragraph_String
    Table Name: month
    Fields:
    1- month_ID
    2- month_String
    Table Name: notee
    Fields:
    1- notee_ID
    2- notee_to
    3- notee_from
    4- notee_heading
    5- notee_datee_day
    6- notee_datee_month
    7- notee_datee_year
    Table Name: year
    Fields:
    1- year_ID
    2- year_String
    Table Name: day
    Fields:
    1- day_ID
    2- day_String
    Table Name: to
    Fields:
    1- to_ID
    2- to_String
    Table Name: from
    Fields:
    1- from_ID
    2- from_String
    Table Name: heading
    Fields:
    1- heading_ID
    2- heading_String
    Table Name: notee_paragraph
    Fields:
    1- notee_paragraph_ID
    2- notee_ParentID
    3- notee_paragraph_String
    Here is the XML document
    <notee>
    <to>Jane</to>
    <from>Tom</from>
    <heading>Reminder</heading>
    <paragraph>Hi</paragraph>
    <paragraph>Don�t be late!</paragraph>
    <datee>
    <day>13</day>
    <month>May</month>
    <year>2004</year>
    </datee>
    <to>Mark</to>
    <from>Ed</from>
    <heading>Invitation</heading>
    <paragraph>Hello</paragraph>
    <paragraph>Please come</paragraph>
    <paragraph>Take care</paragraph>
    <datee>
    <day>14</day>
    <month>March</month>
    <year>2004</year>
    </datee>
    </notee>
    I used DOM to parse the XML document but my only problem is in finding an algorithm that I should follow to fill in these tables!! so HOW!! I'm a bit confused??
    Any help or advice will be highly appreciated!

    For each of your elements, build a class representing the object. All your classes should have a method
    to create an instance of the class from an XML node (i.e. public static Object fromXML(Node)), and also
    a 'full constructor' (with parameters for all members of the class.
    Then, build utility classes to hold the table access.
    Short example for table DATEE:
    public class Datee {
       private int id;
       private byte day, month, year;
       public Datee(int id, byte day, byte month, byte year) {
          this.id = id;
          this.day = day;
          this.month = month;
          this.year = year;
       public static Object fromXML(Node node) {
          NamedNodeMap attributes = node.getAttributes();
          String strid = attributes.getNamedItem("id").getNodeValue();
          String strday = attributes.getNamedItem("day").getNodeValue();
          String strmonth = attributes.getNamedItem("month").getNodeValue();
          String stryear = attributes.getNamedItem("year").getNodeValue();
          try {
             id = Integer.parseInt(strid);
             day = Integer.parseInt(strday);
             month = Integer.parseInt(strmonth);
             year = Integer.parseInt(stryear);
          catch(Exception e) {
          return new Datee(id, day, month, year);
    }Its of course the simplest example. If instance contains other object instances, just use its fromXML() method to create it.
    Hope this helped,
    Regards.

  • Fast method to fill Table with ring controls from index

    Dear Users,
    I have a rather big table that contains one row with ring control cells.
    Teh table is filled from a few arrays before usage and the user is supposed change the value of certain cells by selecting the ring items.
     I have 2 questions:
    1.) is there a fast way to fill the ring items (value list ) of a complete column ?
         All cells should have the same ring elements.
         (The function InsertTableCellRangeRingItem() is rather slow...)
    2.) is there a fast way to fill the column using an array of ring indices ?
         I have an array of indeces present that I want to use to fill the whole column at one.
         Using SetTableCellValFromIndex() is rather slow. I would need a function SetTableCellRangeValFromIndex
         Is there any possibility ?
    Thanks for your help !!!

    This is the LabVIEW board. You probably want CVI or Measurement Studio.
    Try to take over the world!

  • Very Important Scenario - Filling Tables with Data

    Hi,
    For my current project, the custom (z) staged table will be filled every night with data, based on data and calculations on the previous day's material movements, for the company code selected on the selection screen (via a scheduled job that runs by using a variant.)
    My question is this: Say the process is executed for one company code. Then an hour later , or at the same time, another process for a different company code is executed? What if the company code is entered twice?
    What should i do in such situations? Where do the i fill the data for another company code? What if the company code is entered twice?
    Points will be rewarded and all responses will be greatly appreciated.

    Do you want the duplicate company code to overwrite the first one?  If you want to do that then just do a read on the table for the company code.  If it exists (sy-subrc) then you can overwrite the data.  If not then you could always use a timestamp and the company code as the key.  That would allow for multiple records of the same company code.
    Regards,
    Davis

  • Breakout table (fill table with matching data from another table)

    Hi
    I've been trying to study old discussions about breakout tables. I feel I'm close, but still no cigar :-)
    In plain english, I'm trying to autocreate rows with data on a table, based on matching values from another table. E.g. have a table to display all rows where type = AssetX
    I have attached a screenshot of my "master table" called Assets:
    I'm looking to prefill Asset name, Total from this table and populate a new table called e.g. Greenhouse
    Where I'd be adding more data (date, income, expense).
    Any help whould be greatly appreciated.
    Thanks!

    Hi,
    Here is a Sample Query.
    Update Emp A
    Set Sal = (Select Sal from emp b where
    a.empno = b.empno)
    where empno in (select empno from emp);
    Regards,
    Ganesh R
    null

  • FM: SRM_TOOLS_LOG_SENDMAIL - filling table with emails

    Team,
    The FM SRM_TOOLS_LOG_SENDMAIL has following parameters:
    I_RECIPIENTS_SMTP_AD  <b>TYPE</b> BCSY_SMTPA 
    I_TEXT                              <b>TYPE</b> BCSY_TEXT  
    -How do I append and pass emails.
    -How do I append and pass text.
    -I know I have to declare data first but I don't know how...
    BCSY_SMTPA  is Line Type AD_SMTPADR?
    BCSY_TEXT     is Line Type  SOLI?
    Thanks.

    Team,
    I want to know how to declare above Types.
    Thanks

  • How to fill internal table with no data in debugging mode

    Hi all,
             I modified one existing program.Now I want to test it.I am not given test data.So in the middle of my debugging, I found that one internal table with no data.My problem is how to fill that internal table with few records in that debugging mode just as we change contents in debugging mode.If I want to proceed further means that internal table must have some records.
    Please I dont know how to create test data so I am trying to create values temporarily in debugging mode only.
    Thanks,
    Balaji

    Hi,
    In the debugging do the following..
    Click the Table button..
    Double click on the internal table name..
    Then in the bottom of the screen you will get the buttons like CHANGE, INSERT, APPEND, DELETE..
    Use the APPEND button to insert records to the internal table..
    Thanks,
    Naren

  • Fill many entries in a table with SM30?

    Hi
    We have created a table which we can maintain in SM30, but now we want to fill it with 10 000 entries. Too long in SM30...
    How can we fill the table quickly without coding ABAP? We are in SRM system, so we don't have se16n transcation.
    Is it possible to fill with a LSMW or anything else?
    Thank you for your help.
    Regards,
    Peggy.

    hi,
    Try LSMW
    (OR)
    Please enter in the EXcel file and upload .
    Please check with SAP ABAP Team for uploading the same which is easy.
    Regards
    G.Ganesh Kumar

  • Filling dynamic internal table with data from other internal table

    Hi Friends,
    My problem is that i have already built a dynamic internal table
    (class int_table->create) but now i want to fill it with data from other internal table.
    The dynamic table column name and the field value of the data filled internal table are same, but how to access that column name, since i cant hard code it anyway.
    Like if my werks field value is '8001'. I want to place it under the column 8001 of dynamic table, Can anybody help me in this regard?
    Awarding points is not a problem for even giving a slight hint.
    Best Regards

    Hi
    See this
    Dynamic internal table is internal table that we create on the fly with flexible column numbers.
    For sample code, please look at this code tutorial. Hopefully it can help you
    Check this link:
    http://www.****************/Tutorials/ABAP/DynamicInternaltable/DynamicInternalTable.htm
    Sample code:
    DATA: l_cnt(2) TYPE n,
    l_cnt1(3) TYPE n,
    l_nam(12),
    l_con(18) TYPE c,
    l_con1(18) TYPE c,
    lf_mat TYPE matnr.
    SORT it_bom_expl BY bom_comp bom_mat level.
    CLEAR: l_cnt1, <fs_dyn_wa>.
    Looping the component internal table
    LOOP AT it_bom_expl INTO gf_it_bom_expl.
    CLEAR: l_cnt1.
    AT NEW bom_comp.
    CLEAR: l_cnt, <fs_dyn_wa>, lf_mat.
    For every new bom component the material data is moved to
    temp material table which will be used for assigning the levels
    checking the count
    it_mat_temp[] = it_mat[].
    Component data is been assigned to the field symbol which is checked
    against the field of dynamic internal table and the value of the
    component number is been passed to the dynamic internal table field
    value.
    ASSIGN COMPONENT c_comp_list OF STRUCTURE <fs_dyn_wa> TO
    <fs_check>.
    <fs_check> = gf_it_bom_expl-bom_comp.
    ENDAT.
    AT NEW bom_mat.
    CLEAR l_con.
    ENDAT.
    lf_mat = gf_it_bom_expl-bom_mat.
    Looping the temp internal table and looping the dynamic internal table
    *by reading line by line into workarea, the materialxxn is been assigned
    to field symbol which will be checked and used.
    LOOP AT it_mat_temp.
    l_nam = c_mat.
    l_cnt1 = l_cnt1 + 1.
    CONCATENATE l_nam l_cnt1 INTO l_nam.
    LOOP AT <fs_dyn_table2> ASSIGNING <fs_dyn_wa2>.
    ASSIGN COMPONENT l_nam OF STRUCTURE <fs_dyn_wa2> TO <fs_xy>.
    ENDLOOP.
    IF <fs_xy> = lf_mat.
    CLEAR lf_mat.
    l_con1 = l_con.
    ENDIF.
    Checking whether the material exists for a component and if so it is
    been assigned to the field symbol which is checked against the field
    of dynamic internal table and the level of the component number
    against material is been passed to the dynamic internal table field
    value.
    IF <fs_xy> = gf_it_bom_expl-bom_mat.
    ASSIGN COMPONENT l_nam OF STRUCTURE <fs_dyn_wa> TO <fs_check>.
    CLEAR l_con.
    MOVE gf_it_bom_expl-level TO l_con.
    CONCATENATE c_val_l l_con INTO l_con.
    CONDENSE l_con NO-GAPS.
    IF l_con1 NE space.
    CONCATENATE l_con1 l_con INTO l_con SEPARATED BY c_comma.
    CLEAR l_con1.
    l_cnt = l_cnt - 1.
    ENDIF.
    <fs_check> = l_con.
    l_cnt = l_cnt + 1.
    ENDIF.
    ENDLOOP.
    AT END OF bom_comp.
    At end of every new bom component the count is moved to the field
    symbol which is checked against the field of dynamic internal table
    and the count is been passed to the dynamic internal table field
    value.
    ASSIGN COMPONENT c_count OF STRUCTURE <fs_dyn_wa> TO <fs_check>.
    <fs_check> = l_cnt.
    INSERT <fs_dyn_wa> INTO TABLE <fs_dyn_table>.
    ENDAT.
    ENDLOOP.
    Reward if useful
    Anji

  • Fill dynamic internal table with data from another dynamic table

    Hi,
    I have a huge dynamic table with a few columns and need to fill another dynamic table with some of the columns, that are also existing in the other one. I first know at runtime, which fields the smaller table contains.
    Until now, I did it that way:
      LOOP AT <it_tab_structure> ASSIGNING <wa_tab_structure>.
        LOOP AT lt_comp_full INTO ls_comp_full.
          ASSIGN COMPONENT ls_comp_full-name OF STRUCTURE <structure> TO <column>.
          ASSIGN COMPONENT ls_comp_full-name OF STRUCTURE <wa_tab_structure> TO <value>.
          <column> = <value>.
        ENDLOOP.
        APPEND <structure> TO <table>.
      ENDLOOP.
    lt_comp_full contains the columns of the second table, that have to be filled.
    This is taking a very long time, as there can be a lot of columns in the source table and the source table contains at least 100000 records.
    Is there therefore any way to fill the other table faster?
    Thank you & best regards,
    Michael

    Hey Sharath,
    thank you for your answer! Unfortunately I don't have a 7.4 system here, but your example pointed out, that I can also use move-corresponding from one structure to the other, which I thought, was not possible. I'm trying out, if this makes it faster now.
    I'll let you all know, if this made the deal.
    Thank you & best regards,
    Michael & Arne

  • Fill internal table with mutliple entries for nested structure

    Dear ABAP Experts,
    I have a question related to fill internal tables with nested structures.
    I have a structure like this:
    BEGIN OF proto,
              sicht TYPE ysicht,
              version TYPE FAGLFLEXA-RVERS,
              BEGIN OF kons,
    kon TYPE YKONSEINHEIT,
              END OF kons,
              jahr TYPE CHAR04,
    END OF proto.
    Now I need to fill this structure with values (over an internal table), but how can I achieve that I save multiple datas für element "kon" für one single entry of structure "proto"?
    An example could be:
    sicht = '01'
    version = '100'
    kon = 1001 (first entry)
    kon = 1002 (second entry)
    usw... (n entry)
    jahr = '2008'
    Thanks in advance for every helpful answer.
    Regards
    Thomas

    BEGIN OF proto,
               sicht TYPE ysicht,
               version TYPE FAGLFLEXA-RVERS,
               kons TYPE STANDARD TABLE OF YKONSEINHEIT WITH NON-UNIQUE KEY TABLE_LINE,
               jahr TYPE CHAR04,
    END OF proto.
    DATA: ls_proto TYPE proto,
          lt_proto TYPE STANDARD TABLE OF proto,
          ls_kon
    ls_proto-sicht = '01'.
    ls_proto-version = '100'
    INSERT '1001' INTO TABLE ls_proto-kons.
    INSERT '1002' INTO TABLE ls_proto-kons.
    ls_proto-jahr = '2008'.
    INSERT ls_proto INTO TABLE lt_proto
    If you're going to use a more complicated inner table with several components, then you need to define a type for those components. 
    matt

  • Fill JCO.Table with Model from TableView

    Hi all,
    i need to fill a JCO.Table to save some data in a BAPI. I already have the data in form of a DefaulTableViewModel.
    Is there a simple way to fill the table with this data, or do I have to loop through the model and fill the table row by row?
    Kind regards
    Francisco

    Hi Francisco,
    there is no method which does it for you. I'm not that experienced in this field, but I think it seems hard to create the correct metadata from a HTMLB TableViewModel (for example the data field internal length as well as field types).
    Also have a look here: JCO.table creation...
    As you may have realized, the other way round - having a JCO.Table, creating a TableViewModel - works via HTMLB JCOTableViewModel.
    Hope it helps
    Detlev

  • Fill a table with a genil object

    Hello,
    I will fill a custom table with the class CL_CRM_GENIL_GEN_TABLE_OBJ. Could anyone explain me how to fill a table with this class?
    Thank and regards,
    Harris

    Hello,
    Thank you very much so far.
    I followed the instructions in the above link.
    I'm a little bit confused how to fill the table with values. The class CL_CRM_GENIL_GEN_OBJ offers me the method "Save". I can imagine, to use this method to fill my table with values.
    Could anyone describe how to proceed if I want to fill my table.
    Thank you very much so far.
    Best regards,
    Harris

  • Fastest way to fill an InDesign table with data

    Hello,
    I have to fill several InDesign tables with the content of my database.
    I have the database in memory and fill the cells in two Loops (For Each row..., For Each col...).
    But it is so slow! Is there a faster way?
    Here a code snippet of the solution today:
                For Each row In tableRecord
                    Dim inDRow = table.Rows.AsEnumerable().ElementAt(intRow)
                    For Each content In row
                        Dim cell = inDRow.Cells.AsEnumerable().ElementAt(content.Index)
                        cell.Contents = content.Value
                    Next
                    intRow+=1
                Next
    Thank you for help!
    Best regards
    Harald

    Hi, Harald!
    "This should be faster: table.Contents=Array. Or not?"
    Surprisingly is was not. It was slower. A lot slower.
    The array was gathered by (here ExtendScript(JavaScript) dummy code) :
    myArray = myTable.contents;
    Then I did operate on the array. Not on the table object or its cell objects. No direct access to InDesign's DOM objects. Just the built array.
    My text file was written by populating it with a string of the array:
    myString = myArray.join("separatorString");
    separatorString was something that was never used as contents in the table.
    Something like "§§§"…
    After importing the text file I used the convertToTable() method providing the separatorString as separator for the first and second argument with the number of columns as third argument. The number of columns was known from my original table.
    var myNewTable = myText.convertToTable("separatorString", "separatorString", myNumberOfColumns);
    Alternatively you could also remove the table after building the array and assign "myString" as contents for the insertionPoint of the removed table in the story. I think I tested that as well, but do not know, if there is a difference in speed opposed to placing a text file with the same contents (I think it was, but not I'm not sure anymore). So I ended up with:
    1. Contents of table to Array
    2. Array manipulation
    3. Array to String
    4. Write String as file
    5. Remove table
    6. Place file at InsertionPoint of (now removed) table
    Also to note: This was in InDesign CS5 with a very large table.
    Things could have changed in InDesign versions with 64-Bit support.
    But I did not test that yet. The customer I wrote this script for is still on CS5.
    Uwe

Maybe you are looking for

  • The difference between "ipsec-isakmp dynamic" and "ipsec-isakmp profile" cyrpto map configs

    The IOS documentation for the crypto map command gives the syntax as crypto map [ipv6] map-name seq-num [ ipsec-isakmp [ dynamic dynamic-map-name | discover | profile profile-name ] ] I have a 881w ISR. In what different situations do we use the ipse

  • Powermac G5 wont boot. Please help!!!

    my PowerMac G5 wont boot, power suply or graphics card? When i press the power button is the chime and then after a while (fem minutes) the fans start revving up, all with a black screen........

  • Lost Purchased Songs... NEED HELP!! A.S.A.P

    So yesterday i bought 7 songs from iTunes and today i wanted to sync those songs onto my iPod. The problem is i can't find the songs anywhere in my library. Can anyone help me find them?

  • Can't finish Downloading "Homeland"

    In Itunes, I paid for and started streaming ( through my Apple TV) the TV series Homeland. Mostly this went well. ( I have a hard wired connection). However when I go to the last episde, it kept stopping about 4 minues in, len just "spinning wheel" a

  • "Pentax Corporation" vs. "Pentax" for Lens Correction

    I have a Pentax camera. Lens correction only displays me a few lenses. I found out that it only displays the lenses for the camera brand "Pentax Corporation" and not for "Pentax" in the raw converter. In "Filters->Lens Correction" I can change it. Is