Data from field symbol into an internal table or workarea

Hi Experts,
I have field symbol in which i get the data. I want to get this data into an internal table of type any or into an work area. How is this possible.
My declaration for field symbol is as follow:
FIELD-SYMBOLS: <l_t_data> TYPE any.
DATA l_r_data TYPE REF TO data.
    CREATE DATA l_r_data type STANDARD TABLE OF (l_local_tab).
    ASSIGN l_r_data->* TO <l_t_data>.
I get the data in this field symbol <l_t_data>. by passing into a funtion module. and I get the data into it. Now i have to assign the values of this field symbol to any internal table or to a work are how do i do it. Please help.
Regards,
Prashant.

Not exactly sure what you need here, but.....
FIELD-SYMBOLS: <l_t_data> TYPE TABLE.   "<<-- Change this
FIELD-SYMBOLS: <l_s_data> TYPE ANY.      "<<---Add This
DATA l_r_data TYPE REF TO data.
CREATE DATA l_r_data type STANDARD TABLE OF (l_local_tab).
ASSIGN l_r_data->* TO <l_t_data>.
Loop at <l_t_data> assigning <l_s_data>.
* Do what ever using <l_s_data>
Endloop.
Regards,
Rich Heilman
Edited by: Rich Heilman on Feb 28, 2008 2:42 PM

Similar Messages

  • How to Copy data from field symbol to Dynamic Internal Table

    Hi,
    I want to copy the data between two dynamic Internal tables . Following is the code were I have data in the field symbol wanted to transfer it to the other Internal table :
    REPORT  ztest.
    DATA:
           gd_dref          TYPE REF TO data,
           gd_dref1          TYPE REF TO data.
    FIELD-SYMBOLS:  <fs1>   TYPE any,
                               <fs_wa> TYPE any,
                                <field>    TYPE any,                  
                                <fs_wa1> TYPE ANY TABLE.  * Contains data from p_src
    *Copy data from p_src to p_dest*
    PARAMETERS: p_src LIKE dd02l-tabname .    * Name of Dynamic Internal table *
                             p_dest LIKE dd02l-tabname .  * Name of Dynamic Internal table*
    *DATA : lt_csks LIKE p_dest WITH HEADER LINE.
    START-OF-SELECTION.
      CREATE DATA gd_dref TYPE (p_src).
      CREATE DATA gd_dref1 TYPE TABLE OF (p_src).
       ASSIGN gd_dref->* TO <fs_wa>.
       ASSIGN gd_dref1->* TO <fs_wa1>.
       SELECT * FROM (p_src) INTO TABLE <fs_wa1>.
    *Write out data from FIELD SYMBOLS TO Table.
       loop at <fs_wa1> into <fs_wa>.
         do.
           assign component  sy-index
              of structure <fs_wa> to <field>.
           if sy-subrc <> 0.
           exit.
           endif.
           if sy-index = 1.
             write:/ <field>.
           else.
           write: / <field>.
           endif.
         enddo.
       endloop.
    *Need Logic To Copy the Data to p_dest table from <fs_wa1>.
    *p_dest is a table having a similar structure to table p_src .
    *Need Logic To Copy the Data to p_dest table from <fs_wa1>.
    EXIT.
    Thanks in Advance.

    try this...
    I have extended your source code and just used vbak/vbap as an example as they have some common fields like vbeln/erdat etc which corresponds with your requirement of 'similar structure' i.e. shared/common fields in both.
    Cheers...
    report  ztest.
    data:
      gd_dref type ref to data,
      gd_dref1 type ref to data,
      gd_dref_str type ref to data,
      gd_dref_tab type ref to data.
    field-symbols:
      <fs1> type any,
      <fs_wa> type any,
      <fs1_dest_str> type any,
      <fs_dest_tab> type any table,
      <field> type any,
      <fs_wa1> type any table.
    * contains data from p_src
    *Copy data from p_src to p_dest*
    parameters: p_src like dd02l-tabname default 'vbak',
    * name of dynamic internal table *
                p_dest like dd02l-tabname default 'vbap'.
    * name of dynamic internal table*
    *data : lt_csks like p_dest with header line.
    start-of-selection.
      create data gd_dref type (p_src).
      create data gd_dref1 type table of (p_src).
      assign gd_dref->* to <fs_wa>.
      assign gd_dref1->* to <fs_wa1>.
      select * from (p_src) into corresponding fields of table <fs_wa1>
      up to 3 rows
      where vbeln ne space.
      create data gd_dref_str type (p_dest).
      create data gd_dref_tab type standard table of (p_dest).
      assign gd_dref_str->* to <fs1_dest_str>.
      assign gd_dref_tab->* to <fs_dest_tab>.
    *write out data from field symbols to table.
      loop at <fs_wa1> into <fs_wa>.
        " break-point here - can see vbeln/waers/create date/ etc move over to new structure
        " the 'common' fields of your structures - the same will happen. if they not the same name you will have to do an
        " explicit move i.e. if fieldname = xyz ....move fieldxyz to new field123....after the move-corre
        break-point.
        move-corresponding <fs_wa> to <fs1_dest_str>.
        insert <fs1_dest_str> into table <fs_dest_tab>.
    **    do.
    **      assign component  sy-index
    **         of structure <fs_wa> to <field>.
    **      if sy-subrc <> 0.
    **        exit.
    **      endif.
    **      if sy-index = 1.
    **        write:/ <field>.
    **      else.
    **        write: / <field>.
    **      endif.
    **    enddo.
      endloop.
      " write out some dest data from the dest table build from previous loop
      loop at <fs_dest_tab> assigning <fs1_dest_str>.
        do.
          assign component sy-index of structure <fs_wa> to <field>.
          if sy-subrc <> 0.
            exit.
          endif.
          if sy-index = 1.
            write:/ <field>.
          else.
            write: / <field>.
          endif.
        enddo.
      endloop.

  • How to extract data from info cube into an internal table using ABAP code

    HI
    Can Anyone plz suggest me
    How to extract data from info cube into an internal table using ABAP code like BAPI's or function modules.
    Thankx in advance
    regds
    AJAY

    HI Dinesh,
    Thankq for ur reply
    but i ahve already tried to use the function module.
    When I try to Use the function module RSDRI_INFOPOV_READ
    I get an information message "ERROR GENERATION TEST FRAME".
    can U plz tell me what could be the problem
    Bye
    AJAY

  • Are field symbols and Dynamic internal tables consistant?

    Hi,
    Are field symbols and Dynamic internal tables
    always consistent?
    In my program I m creating a dynamic itab and assignig values to it using <FS>, sometimes the program fails to execute assign <Fs> statement...
    this happens once in 3 to 4 runs
    any solution...
    I have proper clear and refresh statements in program.
    Thanks,
    Hardik

    Anurag,
    Thanks for a quick reply. Here I am sending a small piece of my code.
    MOVE-CORRESPONDING OUTTAB TO DYNTAB.
          CLEAR IT_UDATE.
          CLEAR : T_KBETR .
          READ TABLE IT_UDATE WITH KEY UDATE = OUTTAB-UDATE.
          CONCATENATE 'DYNTAB-KBETR' IT_UDATE-CO_POS INTO T_KBETR.
          ASSIGN (T_KBETR) TO <FS> .
          SUBRC5 = SY-SUBRC .
          IF SUBRC5 = 0 .
              <FS> =  OUTTAB-KBETR .
          ENDIF .
    read statement will always return CO_POS .
    while debuging this code a few times
    <b>ASSIGN (T_KBETR) TO <FS> .</b>
    returns sy-subrc = 4
    and that was leading the program to short dump earlier.
    now, as I have a check DYNTAB-KBETR holds no value on display.
    this happens very few times. (most of the times report is displaying desired output)
    Thanks,
    Hardik

  • Join data from a file with an internal table

    Hi to everybody!!
    I need help, I don't know how to join two differents data, one of them is internal...
    This select fill my itab
        SELECT PERNR PERID VORNA NACHN  FROM PA0002 APPENDING TABLE itab_tabla
            WHERE
            PA0002~BEGDA <= SY-DATUM AND
            PA0002~ENDDA >= SY-DATUM AND
            PERID  = G_PERID.
         ENDLOOP.
    Now I have to insert inside the table more data that pass from a file...but I don't know how to join this... can anybody help me?
    Thanks a lot
    Regards,
    Rebeca

    HI,
    you will need to upload the file by Using the FM GUI_UPLOAD.
    this will take the data from the file to an internal table that you will have to declare.
    once you get the data in to your table,you can merge both the tables in to another final table or in the 1st internal table if all the fields are there and modify the table.so the table will have the records of both the tables.
    after you get the data in your second table"
    loop at itab2.
    move: <field 1> to itab1.
              <field 2> to itab1.
    modify itab1.
    endloop.

  • Reading the data from field symbol internal table //

    Hi,
    There are 2 internal tables defined as Fieldsymbols (type any) and I need to retrive data from second internal table based on a field value in first internal table.
    Let's assue the name internal table 1 is <it_itab1>, 2nd internal table name is <it_itab2> and the work areas are <wa_itab1> and <wa_itab2>.
    The existing logic :
    LOOP at <it_itab1> ASSIGNING <wa_itab1>.
      ASSIGN COMPONENT 'XYZ' OF STRUCTURE <wa_itab1> TO l_field6.
      LOOP AT <it_itab2> ASSIGNING <wa_itab2>.
        ASSIGN COMPONENT 'XYZ' OF STRUCTURE <wa_itab2> TO <p_field7>.
        IF <p_field7> = l_field6.
    do the required business.
        ELSE.
          *     do the required business.
        ENDIF.
      ENDLOOP.
    ENDLOOP.
    The requirement of reading second internal table was achieved by putting loop on the internal table but its giving considerable effect on performance !!
    Is there any way to use READ statement in my case OR any way of putting WHERE condition on loop statement of second internal table ??
    Thank you !!

    Use the below Logic.
    Loop at Itab1 into wa_itab1.
        Loop at itab2 into wa_itab2 where p_field7 = wa_itab1-xyz or I_field6.
    do the required business.
        endloop.
        Loop at itab2 into wa_itab2 where p_field7 <> wa_itab1-xyz or I_field6.
    do the required business.
        endloop.
    endloop.
    Hope it is useful...

  • How to read data in correct format from EXCEL file into an internal table??

    Hi Experts,
    My requirement is to upload data from an excel file on presentation server into an internal table on <b>SRM</b> server.
    I used 'GUI_UPLOAD' function module to achieve the same but all the the data is getting uploaded in # only.I had set in the 'HAS_FIELD_SEPARATOR' to 'X' to overcome this problem.
    But all the efforts are in vain. The function module 'ALSM_EXCEL_TO_INTERNAL_TABLE' doesn't exist on SRM Server and I am not getting any other function module having similar functionality available on SRM server.
    I have written the following code:-
    TYPES: BEGIN OF ty_addr_loc,
             userid    TYPE xubname,      "User Id
             addr_code TYPE char4,        "3 Digit Site Location Code/4 Digit
                                                       "Alternate Address
             loc_id    TYPE bbp_location, "Indicator: Address is standard address
            END OF ty_addr_loc.
    *Retrieving file name
    parameters: p_file type rlgrap-filename.
      DATA:
        Local variable holding file name
          l_file TYPE string,
        Local Variable holding the file type,
          l_type TYPE filetype VALUE 'ASC',
        Local Variable holding the field separator
          l_sep  TYPE char01,
          i_tab type standard table of ty_addr_loc.
    Clearing local variables
      CLEAR:
            l_file,
            l_sep.
    Initializing the local variables
      MOVE p_file TO l_file.
      l_sep = 'X'.
      CALL FUNCTION 'GUI_UPLOAD'
        EXPORTING
          filename                      = l_file
          filetype                      = l_type
          has_field_separator           = l_sep
       HEADER_LENGTH                 = 0
       READ_BY_LINE                  = 'X'
       DAT_MODE                      = ' '
       CODEPAGE                      = ' '
       IGNORE_CERR                   = ABAP_TRUE
       REPLACEMENT                   = '#'
       CHECK_BOM                     = ' '
       VIRUS_SCAN_PROFILE            =
       NO_AUTH_CHECK                 = ' '
    IMPORTING
       FILELENGTH                    =
       HEADER                        =
        TABLES
          data_tab                     = i_tab
       EXCEPTIONS
         file_open_error               = 1
         file_read_error               = 2
         no_batch                      = 3
         gui_refuse_filetransfer       = 4
         invalid_type                  = 5
         no_authority                  = 6
         unknown_error                 = 7
         bad_data_format               = 8
         header_not_allowed            = 9
         separator_not_allowed         = 10
         header_too_long               = 11
         unknown_dp_error              = 12
         access_denied                 = 13
         dp_out_of_memory              = 14
         disk_full                     = 15
         dp_timeout                    = 16
         OTHERS                        = 17
      IF sy-subrc <> 0.
      Throwing an information message
        MESSAGE i003. "Data Upload Failed
        LEAVE LIST-PROCESSING.
      ENDIF.
    Please tell me a way out. I have to make a delivery urgently.
    Thanks in advance,
    Swati Gupta

    Hi
    Try the FM <b>KCD_EXCEL_OLE_TO_INT_CONVERT</b>
    Sample:
      call function 'KCD_EXCEL_OLE_TO_INT_CONVERT'
           exporting
                filename                = i_filename
                i_begin_col             = l_begin_col
                i_begin_row             = l_begin_row
                i_end_col               = l_end_col
                i_end_row               = l_end_row
           tables
                intern                  = xt_intern
           exceptions
                INCONSISTENT_PARAMETERS = 201
                UPLOAD_OLE              = 201.
      if sy-subrc <> 0.
        e_subrc = sy-subrc.
        exit.
      endif.
    <b>reward if Helpful.</b>

  • How to fetch data from bseg based  on 2 internal tables in 1 select query?

    hi,
    i have bukrs and belnr in one internal table and bukrs and vbeln in another internal table..now if i select from bseg twice using for all entries for fields bukrs vbeln and bukrs belnr twice in 2 select statements its fine..but since bseg is a huge table i want to use select only once..but the problem is that none of the belnrs in the one internal table will have vbeln in another internal table....ie if vbeln is selected from bseg based on belnr in 1 internal table non eof those vbeln will be equal to vbeln on another internal tables..in this scenario even if i take all data from two internal tables into 1 single internal table and then use for all entries on vbeln and belnr of that table ..but i think this will not work because and AND operator will not work because no record will satisfy both vbeln and belnr conditions..even if i use OR operator if the 1st condition satisfies the select clause will not enter into the second clause and all the records will not be fetched...Please help how should i tackle this..

    Hi vijaya,
    no simple select statement solution so far.
    As BSEG is a huge table you should try to get the full key values into another internal table first.
    SAP avoids direct selections from BSEG.
    Pleas consider the use of one of the secondary index tables first:
          BSAD : Accounting: Secondary Index for Customers (Cleared Items)
          BSAK : Accounting: Secondary Index for Vendors (Cleared Items)
          BSAS : Accounting: Secondary Index for G/L Accounts (Cleared Item
          BSEC : One-Time Account Data Document Segment
          BSEG : Accounting Document Segment
          BSID : Accounting: Secondary Index for Customers
          BSIK : Accounting: Secondary Index for Vendors
          BSIS : Accounting: Secondary Index for G/L Accounts
    you may include
          BKPF : Accounting Document Header
    for restrictions about time and document type.
    The last step is a FOR ALL ENTRIES selection from BSEG providing the full key values.
    Although you may have even more selects, the overall performance will be much better.
    Regards,
    Clemens

  • Accessing the variable in field symbol of nested internal table

    Hi,
    I am unable to access the variable in field symbol.
    The data in field symbol has nested structure. We need to access a variable in nested structure.
    Please find the code below:
          LOOP AT <i_fincorp> into <fs_fincorp>.
            l_madefor = <FS_FINCORP>-data_UI-ZZ0010.
          ENDLOOP.
    datatype of <i_fincorp> is type any table and <fs_fincorp> is type any.
    there is a structure 'data_ui' in <i_fincorp> and we need value of field 'ZZ0010' in data_ui structure.
    But, we are getting syntax error for statement in loop stating "There is no component like 'data_ui' in <fs_fincorp>".
    Can anyone please help me solving this issue.
    Regards,
    Santosh

    So simply access it dynamically
    data: nested_field type c length 50.
    field-symbols <nested_field> type any.
    "build the nested field name dynamically
    concatenate
           'DATA_UI'    "first give structure name
           'ZZ0010'  "then give field name (all in uppercase!)
    into nested_field
    separated by '-'.  "now you have DATA_UI-ZZ0010
    "so assing this nested field
    LOOP AT <i_fincorp> into <fs_fincorp>.
       assign component (nested_field) of structure <fs_fincorp> into <nested_field>. 
    ENDLOOP.
    Regards
    Marcin

  • Read data from xml files and  populate internal table

    Hi.
    How to read data from xml files into internal tables?
    Can u tell me the classes and methods to read xml data..
    Can u  explain it with a sample program...

    <pre>DATA itab_accontextdir TYPE TABLE OF ACCONTEXTDIR.
    DATA struct_accontextdir LIKE LINE OF itab_accontextdir.
    DATA l_o_error TYPE REF TO cx_root.
    DATA: filename type string ,
                 xmldata type xstring .
    DATA: mr      TYPE REF TO if_mr_api.
    mr = cl_mime_repository_api=>get_api( ).
    mr->get( EXPORTING  i_url     = 'SAP/PUBLIC/BC/xml_files_accontext/xml_accontextdir.xml'
                  IMPORTING  e_content = xmldata ).
    WRITE xmldata.
    TRY.
    CALL TRANSFORMATION id
          SOURCE XML xmldata
          RESULT shiva = itab_accontextdir.
      CATCH cx_root INTO l_o_error.
    ENDTRY.
    LOOP AT itab_accontextdir INTO struct_accontextdir.
        WRITE: / struct_accontextdir-context_id,
               struct_accontextdir-context_name,
               struct_accontextdir-context_type.
        NEW-LINE.
        ENDLOOP.</pre>
    <br/>
    Description:   
    In the above code snippet I am storing the data in an xml file(you know xml is used to store and transport data ) called 'xml_accontextdir.xml' that is uploaded into the MIME repository at path 'SAP/PUBLIC/BC/xml_files_accontext/xml_accontextdir.xml'.
    The below API is used to read a file in MIME repo and convert it into a string that is stored in ' xmldata'. (This is just a raw data that is got by appending the each line of  xml file).
    mr = cl_mime_repository_api=>get_api( ).
    mr->get( EXPORTING  i_url     = 'SAP/PUBLIC/BC/xml_files_accontext/xml_accontextdir.xml'
                  IMPORTING  e_content = xmldata ).
        Once the 'xmldata' string is available we use the tranformation to parse the xml string that we have got from the above API and convert it into the internal table.
    <pre>TRY.
    CALL TRANSFORMATION id
          SOURCE XML xmldata
          RESULT shiva = itab_accontextdir.
      CATCH cx_root INTO l_o_error.
    ENDTRY.</pre>
    Here the trasnsformation 'id ' is used to conververt the source xml 'xmldata' to resulting internal table itab_accontextdir, that have same structure as our xml file 'xml_accontextdir.xml'.  In the RESULT root of the xml file has to be specified. (In my the root is 'shiva'). 
    Things to be taken care:
    One of the major problem that occurs when reading the xml file is 'format not compatible with the internal table' that you are reading into internal table.  Iin order to get rid of this issue use one more tranformation to convert the data from the internal table into the xml file.    
    <pre>TRY.
          CALL TRANSFORMATION id
            SOURCE shiv = t_internal_tab
            RESULT XML xml.
        CATCH cx_root INTO l_o_error.
      ENDTRY.
      WRITE xml.
      NEW-LINE.</pre>
    <br/>
    This is the same transformation that we used above but the differnce is that the SOURCE and RESULT parameters are changed the source is now the internal table and result is *xml *string. Use xml browser that is available with the ABAP workbench to read the xml string displayed with proper indentation. In this way we get the format of xml file to be used that is compatable with the given internal table. 
    Thank you, Hope this will help you!!!
    Edited by: Shiva Prasad L on Jun 15, 2009 7:30 AM
    Edited by: Shiva Prasad L on Jun 15, 2009 11:56 AM
    Edited by: Shiva Prasad L on Jun 15, 2009 12:06 PM

  • How to Down load Data in Application server into the Internal Table

    hi freinds,
    iam having a file in the application server.
    now i need to send the data in the file to the internal table.
    is there any Function Module?
    i need with out using the OPEN DATA SET and CLOSE DATA SET Keywords.
    is there any possible?
    Regard's,
    Ranjith.

    Hi,
    There is no other option for uploading the data from the application server to the internal table without using OPEN DATASET and CLOSE DATASET. Even if you find the FM internal logic in FM uses these keywords to read the data from Application server.

  • How to read data from field symbol containing Table

    I defined a field symbols for reading output of a BRF plus rule however since fielk symbol is of type any
    I cannot read its contents
    Any inputs are highly appreciated
    Please see attachment explaining problem

    Thanks a lot for your help
    However It did not work for me as it started giving error incompatible types
    Here is my code
    constants:lv_function_id type if_fdt_types=>id value '3440B5B078B21EE3BC9EB53C42F84A45'.
    data:lv_timestamp type timestamp,
          lt_name_value type abap_parmbind_tab,
          ls_name_value type abap_parmbind,
          lr_data type ref to data,
          lv_counter type i value 0,
          lr_target type ref to data,
          lx_fdt type ref to cx_fdt,
          lo_trace type ref to if_fdt_trace,
          lo_lean_trace type ref to if_fdt_lean_trace,
          la_z_string type if_fdt_types=>element_text,
          lv_role_name  type grac_role_name,
          lv_result type string.
    field-symbols <la_any> type any.
    field-symbols <role_name> type grac_s_od_role_detail.
    field-symbols <system> type string.
       types:
        begin of ys_access ,
                  role_name type  string,
                  system_name   type string,
                end of ys_access .
      types:
        yt_access type table of ys_access .
    field-symbols: <access_item> type table,
                    <ls_req_access> type ys_access.
    data con_name type if_fdt_types=>element_text.
    data ls_any type ys_access.
    * All method calls within one processing cycle calling the same function must use the same timestamp.
    * For subsequent calls of the same function, we recommend to use the same timestamp for all calls.
    * This is to improve the system performance.
    * If you are using structures or tables without DDIC binding, you have to declare the respective types
    * by yourself. Insert the according data type at the respective source code line.
    * GET TIME STAMP FIELD lv_timestamp.
    * Process a function and record trace data, passing context data objects via a name/value table.
    * Prepare function processing:
    ls_name_value-name = 'Z_STRING'.
    la_z_string = 'P1'.
    get reference of la_z_string into lr_data.
    ls_name_value-value = lr_data.
    insert ls_name_value into table lt_name_value.
    * Create the data to store the result value after processing the function
    * You can skip the following call, if you already have
    * a variable for the result. Please replace also the parameter
    * EA_RESULT in the method call CL_FDT_FUNCTION_PROCESS=>PROCESS
    * with the desired variable.
      cl_fdt_function_process=>get_data_object_reference( exporting iv_function_id      = lv_function_id
                                                                    iv_data_object      = '_V_RESULT'
                                                                    iv_timestamp        = lv_timestamp
                                                                    iv_trace_generation = abap_true
                                                          importing er_data             = lr_data ).
      assign lr_data->* to <la_any>.
      try.
          cl_fdt_function_process=>process( exporting iv_function_id = lv_function_id
                                                      iv_timestamp   = lv_timestamp
                                                      iv_trace_mode  = if_fdt_constants=>gc_trace_mode_lean
                                                     "iv_trace_mode  = if_fdt_constants=>gc_trace_mode_lean_required
                                            importing ea_result      = <la_any>
                                                      eo_trace       = lo_trace
                                            changing  ct_name_value  = lt_name_value ).
          lo_lean_trace ?= lo_trace.
          lo_lean_trace->save( ).
          catch cx_fdt into lx_fdt.
    * You can check CX_FDT->MT_MESSAGE for error handling.
      endtry.
    * Get context values after processing:
      cl_fdt_function_process=>get_context_value( exporting  iv_function_id = lv_function_id
                                                             iv_trace_generation = abap_true
                                                             iv_timestamp   = lv_timestamp:
                                                             iv_data_object = '3440B5B078B21EE3BC9EFF599C110ADD' "Z_STRING
                                                   importing ev_data             = lv_result ). " Suggested variable: la_z_string
      create data lr_target type grac_s_od_role_detail.
    *  assign <la_any> to <role_name>.
      assign lr_target->* to <la_any>.
       loop at lt_name_value into ls_name_value.
        if ls_name_value-name cs 'RESULT'.
          assign ls_name_value-value  to <la_any>.
            ls_any = ls_name_value-value  .
        endif.
        endloop.
        access_item = <la_any>.
    * assign ( )<la_any> to <access_item>.
    * assign component 1 of structure <la_any> to <rolename>.
    *   assign <la_any> to <ls_req_access>.
    * lr_target = <la_any>.
    * assign lr_target->* to <role_name>.
    * lv_role_name = <role_name>.
      lv_result = lv_result.

  • Transfer data from XI message interafce to internal table

    my code is like this..
    TYPES: BEGIN OF xxx,
            vbeln            TYPE vbrk-vbeln,
          END OF xxx.
    Data yyy TYPE TABLE OF xxx.
    i have an XI mesage interface where i have an internal table which holds 10 numbers(itab). i want those to be transferref to my internal table in the proxy class. how do i do that. i am done upto this part..
    LOOP AT itab into cstr
    where cstr is a string to hold the individual values of itab for transfer
    ENDLOOP

    resolved

  • What is the best way to get data from a spreadsheet into an HTML table?

    I am using libreoffice, and I have it set to collate all the information I enter and output it to a simple table within the program like this:
    http://imageshack.us/a/img717/5144/spreadsheeta.jpg
    I want to get this information after sorting it and put it into the following html table within dreamweaver:
    http://imageshack.us/a/img28/8872/htmls.jpg
    what is the best method for getting the info from A to B?

    before:
    <table id="tbl-m">
              <tr class="tbl-hd">
                <td class="tbl-pos-width">pos</td>
                <td class="tbl-team-width">team</td>
                <td class="tbl-p-w-d-l-p">pld</td>
                <td class="tbl-p-w-d-l-p">won</td>
                <td class="tbl-p-w-d-l-p">drwn</td>
                <td class="tbl-p-w-d-l-p">lost</td>
                <td class="tbl-p-w-d-l-p">pts</td>
              </tr>
              <tr class="tbl-row-b">
                <td class="tbl-pos-width">1</td>
                <td class="tbl-team-width">Team Name 1</td>
                <td class="tbl-p-w-d-l-p">0</td>
                <td class="tbl-p-w-d-l-p">0</td>
                <td class="tbl-p-w-d-l-p">0</td>
                <td class="tbl-p-w-d-l-p">0</td>
                <td class="tbl-p-w-d-l-p">0</td>
              </tr>
              <tr class="tbl-row-a">
                <td class="tbl-pos-width">2</td>
                <td class="tbl-team-width">Team Name 2</td>
                <td class="tbl-p-w-d-l-p">0</td>
                <td class="tbl-p-w-d-l-p">0</td>
                <td class="tbl-p-w-d-l-p">0</td>
                <td class="tbl-p-w-d-l-p">0</td>
                <td class="tbl-p-w-d-l-p">0</td>
              </tr>
              <tr class="tbl-row-b">
                <td class="tbl-pos-width">3</td>
                <td class="tbl-team-width">Team Name 3</td>
                <td class="tbl-p-w-d-l-p">0</td>
                <td class="tbl-p-w-d-l-p">0</td>
                <td class="tbl-p-w-d-l-p">0</td>
                <td class="tbl-p-w-d-l-p">0</td>
                <td class="tbl-p-w-d-l-p">0</td>
              </tr>
              <tr class="tbl-row-a">
                <td class="tbl-pos-width">4</td>
                <td class="tbl-team-width">Team Name 4</td>
                <td class="tbl-p-w-d-l-p">0</td>
                <td class="tbl-p-w-d-l-p">0</td>
                <td class="tbl-p-w-d-l-p">0</td>
                <td class="tbl-p-w-d-l-p">0</td>
                <td class="tbl-p-w-d-l-p">0</td>
              </tr>
              <tr class="tbl-row-b">
                <td class="tbl-pos-width">5</td>
                <td class="tbl-team-width">Team Name 5</td>
                <td class="tbl-p-w-d-l-p">0</td>
                <td class="tbl-p-w-d-l-p">0</td>
                <td class="tbl-p-w-d-l-p">0</td>
                <td class="tbl-p-w-d-l-p">0</td>
                <td class="tbl-p-w-d-l-p">0</td>
              </tr>
              <tr class="tbl-row-a">
                <td class="tbl-pos-width">6</td>
                <td class="tbl-team-width">Team Name 6</td>
                <td class="tbl-p-w-d-l-p">0</td>
                <td class="tbl-p-w-d-l-p">0</td>
                <td class="tbl-p-w-d-l-p">0</td>
                <td class="tbl-p-w-d-l-p">0</td>
                <td class="tbl-p-w-d-l-p">0</td>
              </tr>
              <tr class="tbl-row-b">
                <td class="tbl-pos-width">7</td>
                <td class="tbl-team-width">Team Name 7</td>
                <td class="tbl-p-w-d-l-p">0</td>
                <td class="tbl-p-w-d-l-p">0</td>
                <td class="tbl-p-w-d-l-p">0</td>
                <td class="tbl-p-w-d-l-p">0</td>
                <td class="tbl-p-w-d-l-p">0</td>
              </tr>
              <tr class="tbl-row-a">
                <td class="tbl-pos-width">8</td>
                <td class="tbl-team-width">Team Name 8</td>
                <td class="tbl-p-w-d-l-p">0</td>
                <td class="tbl-p-w-d-l-p">0</td>
                <td class="tbl-p-w-d-l-p">0</td>
                <td class="tbl-p-w-d-l-p">0</td>
                <td class="tbl-p-w-d-l-p">0</td>
              </tr>
              <tr class="tbl-row-b">
                <td class="tbl-pos-width">9</td>
                <td class="tbl-team-width">Team Name 9</td>
                <td class="tbl-p-w-d-l-p">0</td>
                <td class="tbl-p-w-d-l-p">0</td>
                <td class="tbl-p-w-d-l-p">0</td>
                <td class="tbl-p-w-d-l-p">0</td>
                <td class="tbl-p-w-d-l-p">0</td>
              </tr>
              <tr class="tbl-row-a">
                <td class="tbl-pos-width">10</td>
                <td class="tbl-team-width">Team Name 10</td>
                <td class="tbl-p-w-d-l-p">0</td>
                <td class="tbl-p-w-d-l-p">0</td>
                <td class="tbl-p-w-d-l-p">0</td>
                <td class="tbl-p-w-d-l-p">0</td>
                <td class="tbl-p-w-d-l-p">0</td>
              </tr>
              <tr class="tbl-row-b">
                <td class="tbl-pos-width">11</td>
                <td class="tbl-team-width">Team Name 11</td>
                <td class="tbl-p-w-d-l-p">0</td>
                <td class="tbl-p-w-d-l-p">0</td>
                <td class="tbl-p-w-d-l-p">0</td>
                <td class="tbl-p-w-d-l-p">0</td>
                <td class="tbl-p-w-d-l-p">0</td>
              </tr>
              <tr class="tbl-row-a">
                <td class="tbl-pos-width">12</td>
                <td class="tbl-team-width">Team Name 12</td>
                <td class="tbl-p-w-d-l-p">0</td>
                <td class="tbl-p-w-d-l-p">0</td>
                <td class="tbl-p-w-d-l-p">0</td>
                <td class="tbl-p-w-d-l-p">0</td>
                <td class="tbl-p-w-d-l-p">0</td>
              </tr>
              <tr class="tbl-row-b">
                <td class="tbl-pos-width">13</td>
                <td class="tbl-team-width">Team Name 13</td>
                <td class="tbl-p-w-d-l-p">0</td>
                <td class="tbl-p-w-d-l-p">0</td>
                <td class="tbl-p-w-d-l-p">0</td>
                <td class="tbl-p-w-d-l-p">0</td>
                <td class="tbl-p-w-d-l-p">0</td>
              </tr>
              <tr class="tbl-row-a">
                <td class="tbl-pos-width">14</td>
                <td class="tbl-team-width">Team Name 14</td>
                <td class="tbl-p-w-d-l-p">0</td>
                <td class="tbl-p-w-d-l-p">0</td>
                <td class="tbl-p-w-d-l-p">0</td>
                <td class="tbl-p-w-d-l-p">0</td>
                <td class="tbl-p-w-d-l-p">0</td>
              </tr>
              <tr class="tbl-row-b">
                <td class="tbl-pos-width">15</td>
                <td class="tbl-team-width">Team Name 15</td>
                <td class="tbl-p-w-d-l-p">0</td>
                <td class="tbl-p-w-d-l-p">0</td>
                <td class="tbl-p-w-d-l-p">0</td>
                <td class="tbl-p-w-d-l-p">0</td>
                <td class="tbl-p-w-d-l-p">0</td>
              </tr>
              <tr class="tbl-row-a">
                <td class="tbl-pos-width">16</td>
                <td class="tbl-team-width">Team Name 16</td>
                <td class="tbl-p-w-d-l-p">0</td>
                <td class="tbl-p-w-d-l-p">0</td>
                <td class="tbl-p-w-d-l-p">0</td>
                <td class="tbl-p-w-d-l-p">0</td>
                <td class="tbl-p-w-d-l-p">0</td>
              </tr>
            </table>
    after:
    <table>
              <tr>
                <td>Pos</td>
                <td>Team</td>
                <td>Pld</td>
                <td>Won</td>
                <td>Drwn</td>
                <td>Lost</td>
                <td>Pts</td>
              </tr>
              <tr>
                <td>1</td>
                <td>Team 1</td>
                <td>1</td>
                <td>1</td>
                <td>1</td>
                <td>1</td>
                <td>1</td>
              </tr>
              <tr>
                <td>2</td>
                <td>Team 2</td>
                <td>1</td>
                <td>1</td>
                <td>1</td>
                <td>1</td>
                <td>1</td>
              </tr>
              <tr>
                <td>3</td>
                <td>Team 3</td>
                <td>1</td>
                <td>1</td>
                <td>1</td>
                <td>1</td>
                <td>1</td>
              </tr>
              <tr>
                <td>4</td>
                <td>Team 4</td>
                <td>1</td>
                <td>1</td>
                <td>1</td>
                <td>1</td>
                <td>1</td>
              </tr>
              <tr>
                <td>5</td>
                <td>Team 5</td>
                <td>1</td>
                <td>1</td>
                <td>1</td>
                <td>1</td>
                <td>1</td>
              </tr>
              <tr>
                <td>6</td>
                <td>Team 6</td>
                <td>1</td>
                <td>1</td>
                <td>1</td>
                <td>1</td>
                <td>1</td>
              </tr>
              <tr>
                <td>7</td>
                <td>Team 7</td>
                <td>1</td>
                <td>1</td>
                <td>1</td>
                <td>1</td>
                <td>1</td>
              </tr>
              <tr>
                <td>8</td>
                <td>Team 8</td>
                <td>1</td>
                <td>1</td>
                <td>1</td>
                <td>1</td>
                <td>1</td>
              </tr>
              <tr>
                <td>9</td>
                <td>Team 9</td>
                <td>1</td>
                <td>1</td>
                <td>1</td>
                <td>1</td>
                <td>1</td>
              </tr>
              <tr>
                <td>10</td>
                <td>Team 10</td>
                <td>1</td>
                <td>1</td>
                <td>1</td>
                <td>1</td>
                <td>1</td>
              </tr>
              <tr>
                <td>11</td>
                <td>Team 11</td>
                <td>1</td>
                <td>1</td>
                <td>1</td>
                <td>1</td>
                <td>1</td>
              </tr>
              <tr>
                <td>12</td>
                <td>Team 12</td>
                <td>1</td>
                <td>1</td>
                <td>1</td>
                <td>1</td>
                <td>1</td>
              </tr>
              <tr>
                <td>13</td>
                <td>Team 13</td>
                <td>1</td>
                <td>1</td>
                <td>1</td>
                <td>1</td>
                <td>1</td>
              </tr>
              <tr>
                <td>14</td>
                <td>Team 14</td>
                <td>1</td>
                <td>1</td>
                <td>1</td>
                <td>1</td>
                <td>1</td>
              </tr>
              <tr>
                <td>15</td>
                <td>Team 15</td>
                <td>1</td>
                <td>1</td>
                <td>1</td>
                <td>1</td>
                <td>1</td>
              </tr>
              <tr>
                <td>16</td>
                <td>Team 16</td>
                <td>1</td>
                <td>1</td>
                <td>1</td>
                <td>1</td>
                <td>1</td>
              </tr>
            </table>

  • Field symbols and delete internal table.

    Hi,
    I wish to implement <fs> in this case:
    LOOP AT intable ASSIGNING <fs> WHERE condition
    IF condition1.
        DELETE intable
    ANDLOOP
    I know that if the condition1 is verified, the <fs> will be unassigned but in this case I lose the loop.
    Any Idea? ... Or is it impossible to handle?
    Thanks in advance.
    Regards,
         Giovanni

    If you know the standard table name in the start routine , then you can create a dynamic structure after adding a field flag, then you can use that as 
      call function 'LVC_FIELDCATALOG_MERGE'
        exporting
          i_structure_name = p_table
        changing
          ct_fieldcat      = i_fcat
        exceptions
          others           = 1.
      if sy-subrc = 0.
        loop at i_fcat assigning <fcat>.
          <fcat>-tabname = p_table.
          <fcat>-fieldname = 'FLAG'
          ....  " after giving other attributes for the flag field
         append <fcat> to i_fcat.  
        endloop.
        call function 'LVC_FIELDCAT_COMPLETE'
          changing
            ct_fieldcat = i_fcat
          exceptions
            others      = 1.
      endif.
      call method cl_alv_table_create=>create_dynamic_table
        exporting
          it_fieldcatalog = i_fcat
        importing
          ep_table        = i_content.
      if sy-subrc = 0.
        assign i_content->* to <fs>.
      endif.

Maybe you are looking for