How to copy the structure of a Field Symbol?

Hi,
          I have a requirement where in a dynamic Internal table is supposed to be created. I have created that dynamic table using the class method cl_alv_table_create=>create_dynamic_table. Here I have a structure in the field symbol. My requirement is how do I create a internal table with the structure that is there in the field symbol?...
and i'm unable to refer to the field that is dynamically created in the field symbol.
Like,
<gfs_tab>-pernr = itab-pernr.
in the above stmt the field pernr is created in the field symbol dynamically.
Thanks,
Deepak.

Hi Matt,
            my objective is to create an internal table with structure that i have obtained in <gfs_tab> .
other than the pernr, there are many fields dynamically generated.
say if I have generated the following structure in <gfs_tab> :
pernr            ename1            day1             day2                 day3
then I want to create an internal table with the above structure so that my internal table will have fields:
1) pernr
2) ename1
3) day1
4) day2
5) day3
for each execution of the report there will be different structure generated in <gfs_tab> depending upon the inputs that I give.
Thanks,
Deepak.

Similar Messages

  • How to check the length of a field symbol value

    hi all,
    i have a problem with string function, i have assined  table fields to  a field symbol in a loop i want check the length of the assigned fields symbol value  in every loop . i have written like ,,,,,len = strlen( <fs>). then i am getting the length of the field label what i ahve assigned to fiels symbol not the field value lenght ,
    please advise me on this,
    thanks,
    sre

    I think you're on the right track.  This should work:
    data: len type i.
    data: begin of itab OCCURS 1,
            a type string value '1',
            b type string value '12',
            c type string value '123',
          end of itab.
    FIELD-SYMBOLS: <fs> type ANY.
    do 3 times.
      assign component sy-index of STRUCTURE itab to <fs>.
      len = strlen( <fs> ).
    enddo.

  • How to update the value inside a field symbol ?

    ASSIGN COMPONENT 'MENGE' OF STRUCTURE <fs_line> TO <fs_field>.
    <fs_field> = itab_stpo-menge.
    COLLECT <fs_line> INTO <fs_table>.
    .processing some code......
    ASSIGN COMPONENT 'MENGE' OF STRUCTURE <fs_line> TO  <fs_field>.
    <fs_field> = ( itab_stpo-menge * itab_plpo-vgw03 ).
    COLLECT <fs_line> INTO <fs_table>.
    Hi, guys,
    May i know is there a way to update the value in inside a field symbol?
    I feel hard to figure out the way to solve this situation. Kindly give me some help or perhaos tell me other altenative way to do it also can.
    Thanks in advance.
    Edited by: Jiansi Lim on Apr 25, 2008 8:09 PM

    hi check this...
    For a structured data object s, you can use the statement
    ASSIGN COMPONENT comp OF STRUCTURE s TO FS.
    Here the comp is the component name or its index number in the structure.
    Find the following sample code -
    DATA: BEGIN OF LINE,
    COL1 TYPE I VALUE '11',
    COL2 TYPE I VALUE '22',
    COL3 TYPE I VALUE '33',
    END OF LINE.
    DATA COMP(5) VALUE 'COL3'.
    FIELD-SYMBOLS: <F1>, <F2>, <F3>.
    ASSIGN LINE TO <F1>.
    ASSIGN COMP TO <F2>.
    DO 3 TIMES.
    ASSIGN COMPONENT SY-INDEX OF STRUCTURE <F1> TO <F3>.
    WRITE <F3>.
    ENDDO.
    ASSIGN COMPONENT <F2> OF STRUCTURE <F1> TO <F3>.
    WRITE / <F3>.
    The output is:
    11 22 33
    33
    I need to update one field in Internal table
    regards,
    venkat

  • How to copy the corresponding values other fields in  Search help

    Hi All,
    My selection screen contains 5 fields. three are obligatory parameters, one date field and one select option.
    All are from the same table . I had created search help for one field .
    when I'll click the hit list of the search help I want the corresponding values to get copied to other fields in the selection screen, as my hit list contain values for all those fields.
    How Can I copy those values.
    Please help me on this.

    Hi,
    Please try this.
    In the search help set the export parameter for the other fields also.
    Thanks
    Naren

  • Copy the structure of a table to another with another table name.

    how to copy the structure of a table to another with another table name.
    ie. i want a emp table with same values/structure to be copied to another table called my_employee.
    how can this be done?

    create table my_emp as select * from emp;
    If you do not want the data to be copied then do the following:
    create table my_emp as select * from emp
    where 1=2;
    Avanti.

  • How to find the structure fields data in database tables?

    how to find the structure fields data in database tables?

    Your question doesn't appear to be Web Dynpro ABAP related. Please only post questions in this forum if they are directly Web Dynpro ABAP related.  There are several other more general ABAP related forums.

  • Copy the structures in a query

    hi,
      Can we copy the structure of one query to another query ?
       If so, please let me know how to do it.
    Thanks in advance.

    Hi,
    If the queries in question are on the same Infoprovider, then you can save the structure as a global structure and use it in both the queries.
    If the queries will be on different InfoProviders, then you would need to copy at the query level using RSZC.
    Hope this helps...

  • HOW TO INCLUDE A STRUCTURE  ELIMINATING MANDT FIELD.

    HI GURUS,
                      I AM INCLUDING A STRUCTURE ZFT057_MSC_SRVHD. BUT IT IS GIVING AN ERROR THAT
    IT_MANDT HAS ALREADY BEEN DECLARED. IS THERE ANY ALTERNATE OPTION TO INCLUDE THE STRUCTURE ELIMINATING MANDT FIELD FROM IT.

    Hi Patil,
    i just tried it.
    do this.
    go to se11 --> create a structure --> from main menu go to Edit > include> copy components then u'll get all the fields in the structure . here delete the fields which u don;t want to get repeated.
    now again try edit --> include --> insert the new structure or table and execute.
    thanks & regards,
    kat.

  • How to find the Ranges for a field ?

    Hello All,
               Can anyone tell me how to find the ranges for a field.
    <b>1</b>, i.e say I want the Ranges Structure for the field LIFNR.
        The ranges structure for this is "<b>RANGE_LIFNR</b>".
        This I used in my Program since I know it previously.
        But now I want the ranges structure for the field <b>VBELN (Delivery Document).</b>
        I  don't know what is it !!!!!
    <b>2</b>, Is there any procedure to know the ranges structure for a particular field ?
    Regards,
    Deepu.K

    Hi Deepu,
    Using 'Where used list' you can able to find out RANGES tables.
    For VEBLN range table is --> CRM_AC_ASSIGN_VBELN
    If you using a program defined as shown below.
    DATA: r_vbeln type ranges of vbeln.
    The above statement also creates ranges structure in Runtime.
    Procedure finding range table structures
    go to SE37 -> Enter domain or dataelement value
    Go to where used list --> search for 'Structures'
    After getting all structure  --> Click 'SEARCH' butoon in tool bar --> Search for 'RANGES' word
    You can get all ranges tables in the search window
    If helps plz reward points.
    Regards
    Bhupal Reddy

  • How to access a field of a structure with a field symbol?

    Dear all,
    Currently I'm trying to access the fields of a structure (called "ls_tbl") dynamicly. The code looks as follows (of course the field symbols are defined correctly ;-):
        ASSIGN lv_f1 TO <lv_f1>.
        ASSIGN lv_f2 TO <lv_f2>.
        lv_pp = ls_tbl-(<lv_f1>).
        lv_pt = ls_tbl-(<lv_f2>).
    Unfortunatly I get the following error message:
    <<The data object "LS_TBL" does not have a component called "".>>          
    I really do not understand why ABAP is trying to interpret the field symbol name as a string. Does anybody have a clue how to access the field of ls_tbl with the help of a field symbol?
    Many thanks!!!

    Hi ,
    Please check the below sample code .
    data : begin of st_table,
                myfiledname type c value '1',
                myfiledname1 type c value '2',
           end of st_table .
    data : lv_filedname(11) type c value 'MYFILEDNAME'
    filed-symbols : <fs> type any,
                    <fs_table> type any.
    assign st_table to <fs_table>.
    Assign lv_filedname to <fs> .
    assign component <fs> of structure <fs_table> to lv_pp.
    Regards,
    Ratheesh BS

  • How to copy the photo with file name at window 7 and search specific one in iphone 4s?

    How to copy the photo with file name at window 7 and search specific one in iphone 4s?

    Clendenen02 wrote:
    2) It would be equally helpful if there was something that would take the name of the picture file and spotlight comment, copy and paste it to a movie file's comments with the same name but obviously has different extention. For an example
    In a Pictures folder
    Name: Dark Knight, The.jpeg       Comment: (2008) Genre: Action...             <- copy comment
    In a Movie Folder
    Name: Dark Knight, The.m4v       Comment:                                               <- paste 
    and do this for all 700 files
    This Bash script will do it.
    Edit "PicDir" and "MovDir" to the location of your Folders
    (Note: The comment is written to the m4v file using xattr, so the Spotlight comment field appears blank in Finder, but the comment metadata is still indexed by Spotlight (If you add a Spotlight comment from Finder, it is stored both as an extended attribute and in a .DS_Store file)
    #!/bin/bash
    PicDir=$HOME/Desktop/Pictures
    MovDir=$HOME/Desktop/Movies
    for f in $PicDir/*
    do
         if [ ! -d "$f" -a "${f##*.}" == "jpeg" ]; then
              comment=$(mdls -raw -name kMDItemFinderComment "$f")
              if [[ $comment != "(null)" ]]; then
                   picname=${f##*/}
                   movname=${picname%.*}.m4v
                   if [ -e "$MovDir"/$movname ]; then
                         xattr -w com.apple.metadata:kMDItemFinderComment "\"$comment\"" "$MovDir"/$movname
                   fi
              fi
         fi
    done

  • How to copy the text from textfield to jlist(please help me)..

    hi to all,i am making chat application , in my program user enters ip in the text field to connect to other computer.whenever user wants to send the message ,he has to enter ip in the text field , all i want to do is to copy the ip from text field to jlist , so user does'nt enter same ip every time , he can just select from the jlist . please help me in this ,can u tell me code for that , i would be thankful to u
    Thankyou
    Naresh

    You've asked a lot of questions the last few days. I think its time you do some reading. The Swing tutorial titled "Creating a GUI Using JFC/Swing: has sections on every component and example code of how to use them. You can even download the entire tutorial and all the example from the following link:
    http://java.sun.com/docs/books/tutorial/
    Here's the link specific link to the section on "Using Lists"
    http://java.sun.com/docs/books/tutorial/uiswing/components/list.html

  • How to copy the same address for multiple contacts in Address Book?

    Hi! I got a question, I didn't find an answer for yet.
    How to copy the post address from one contact to another, without manual entering. I mean if I have one contact with already entered post address, can I just copy it someway at once to another contact?
    I don't want cards to merge, I need separate contacts, that may have different phones, e-mails, but the same post address. Please, advise.

    Thanks! yes, this is a solution I'm following now. But I was wondering about the similar way as it is made in Daylite or Contactizer - you create company with name and post address first, and then can create a contact for that company. And company name and post address will appear in contact name.
    I just wonder why such a simple and useful solution isn't available in Address Book as default.
    I know there are many scripts written for Address Book. Maybe there is something for this purpose?

  • How to copy the data in a cube to another cube

    Hi ,I created one cube by copying.Now I want the data available in earlier cube to Copied Cube.Plz can any one help in this.
    Thanx in Advacnce
    Vasu

    You can use the export datasource option to copy the data.
    Another option is:
    The steps for copying the contents of one cube to another:
    1. Go to Manage -> Recontruct of the new cube.
    2. Select the "selection button"(red , yellow, blue diamond button).
    3.In the selection screen you can give the technical name of the old cube, requests ids you want to load, from & to date.
    4.Execute and the new cube would be loaded.
    Its all that easy!!!!!!
    Refer this link:
    Copying the structure of an Infocube

  • How to print the value of a field of  type FLTP

    hi experts,
    pls tell me how to print the value of a field of  type FLTP. i.e in decimal format not in exponential format.
    thankyou.
    krishna

    Hi ,
    I dont think in Floating point u can able to go for the decimal point display as it is for the minimum precission display..
    Define the variable as the 'packed' type and then u can able to define the decimal point...
    Cheers,
    SImha.

Maybe you are looking for

  • My creative Zen Sleek is frozen can anyone he

    I was trying to add more songs to my Zen Sleek but it won't work kept saying there was an error and try restarting the Zen well I did but then it wouldnt connect to my computer it was just saying that the device was not dectected then to top it all o

  • Unwanted image size change when moving a image it's Tab to another Tab in CC 2014

    Hi, I opened a photo with a physical size 16"w 36"h. Since role paper comes in 24" width, I proceeded with expanding the canvas size to 24"w, height is unchanged at 36". Then I opened two photos in separate tabs in Photoshop, changed the image sizes

  • Updated payment details due to a new debit card

    I've recently changed debit cards and was told by my bank that all Direct debits wold be transferred over to this new card. However a payment was never taken from my new card and could not be taken from my old card and now I can't use any of my adobe

  • Serious Malfunctio​n with Curve 9220 since the time it has been bought

    Had bought a blackberry curve 9220 in March 2013. Since the time it has been bought, there were network related issues. In October, this phone got switched off by its own too. FInally after showng up at the service center they got this fixed. Within

  • PO vendor partner role through ALE/IDOCs

    We have ALE/IDOC interface with vendor. The requirement is PO will be sent to the ordering vendor and invoice should be received with PI vendor. We are using stardard message types for purchase order (outbound) and INVOIC (inbound). Could you please