Internal table in ABAP  memory

HI experts,
Is it possible to put the internal
table in the memory in such a way that
that I can access the content
of it in my function calls?
Thanks for your reply.
best regards,
rose

Hai
Program 1
report  zImport_0001.
data: itab type table of string with header line.
field-symbols: <fs> type table.
itab = 'This is the line 1'.  append itab.
itab = 'This is the line 2'.  append itab.
assign itab[] to <fs>.
export <fs> to memory id 'ZSRITEST'.
submit zsri_0002 and return.
Program 2
REPORT zImport_0002 .
data: itab type table of string with header line.
field-symbols: <fs> type table.
data: wa type string.
assign itab[] to <fs>.
import <fs> from memory id 'ZSRITEST'.
loop at <fs> into wa.
write:/ wa.
endloop.
Thanks & regards
Sreeni
Message was edited by: Sreenivasulu Ponnadi

Similar Messages

  • How to pass data between two internal sessions using ABAP memory?

    Hi,
    How to pass data between two internal sessions using ABAP memory?
    It would be fine if you could explain with an example.
    And also let me clear about the data passing between two main sessions and two external sessions with specific examples.
    Thanks.

    Hi ,
      check the example.
    Reading Data Objects from Memory
    To read data objects from ABAP memory into an ABAP program, use the following statement:
    Syntax
    IMPORT <f1> [TO <g 1>] <f 2> [TO <g 2>] ... FROM MEMORY ID <key>.
    This statement reads the data objects specified in the list from a cluster in memory. If you do not use the TO <g i > option, the data object <f i > in memory is assigned to the data object in the program with the same name. If you do use the option, the data object <f i > is read from memory into the field <g i >. The name <key> identifies the cluster in memory. It may be up to 32 characters long.
    You do not have to read all of the objects stored under a particular name <key>. You can restrict the number of objects by specifying their names. If the memory does not contain any objects under the name <key>, SY-SUBRC is set to 4. If, on the other hand, there is a data cluster in memory with the name <key>, SY-SUBRC is always 0, regardless of whether it contained the data object <f i >. If the cluster does not contain the data object <f i >, the target field remains unchanged.
    In this statement, the system does not check whether the structure of the object in memory is compatible with the structure into which you are reading it. The data is transported bit by bit. If the structures are incompatible, the data in the target field may be incorrect.
    PROGRAM SAPMZTS1.
    DATA TEXT1(10) VALUE 'Exporting'.
    DATA ITAB LIKE SBOOK OCCURS 10 WITH HEADER LINE.
    DO 5 TIMES.
      ITAB-BOOKID = 100 + SY-INDEX.
      APPEND ITAB.
    ENDDO.
    EXPORT TEXT1
           TEXT2 FROM 'Literal'
      TO MEMORY ID 'text'.
    EXPORT ITAB
      TO MEMORY ID 'table'.
    SUBMIT SAPMZTS2 AND RETURN.
    SUBMIT SAPMZTS3.
    The first part of this program is the same as the example in the section Saving Data Objects in Memory. In the example, the programs SAPMZTS1 and SAPMZTS2 are called using SUBMIT. You can create and maintain the programs called using the SUBMIT statement by double-clicking their names in the statement. For further information about the SUBMIT statement, refer to Calling Executable Programs (Reports)
    Example for SAPMZTS2:
    PROGRAM SAPMZTS2.
    DATA: TEXT1(10),
          TEXT3 LIKE TEXT1 VALUE 'Initial'.
    IMPORT TEXT3 FROM MEMORY ID 'text'.
    WRITE: / SY-SUBRC, TEXT3.
    IMPORT TEXT2 TO TEXT1 FROM MEMORY ID 'text'.
    WRITE: / SY-SUBRC, TEXT1.
    Example for SAPMZTS3:
    PROGRAM SAPMZTS3.
    DATA JTAB LIKE SBOOK OCCURS 10 WITH HEADER LINE.
    IMPORT ITAB TO JTAB FROM MEMORY ID 'table'.
    LOOP AT JTAB.
      WRITE / JTAB-BOOKID.
    ENDLOOP.
    The output is displayed on two successive screens. It looks like this:
    and
    The program SAPMZTS2 attempts to read a data object TEXT3 from the data cluster "text", which does not exist. TEXT3 therefore remains unchanged. The existing data object TEXT2 is placed in TEXT1. In both cases, SY-SUBRC is 0, since the cluster "text" contains data.
    The program SAPMZTS3 reads the internal table ITAB from the cluster "table" into the internal table JTAB. Both tables have the same structure, namely that of the ABAP Dictionary table SBOOK.
    Pls. reward if useful.....

  • Internal table in ABAP Query

    Hi all,
    Can we use internal table in ABAP/SAP Query (Infoset - SQ02)? If yes, Pls guide me on the same.
    Thanks in advance
    Regards
    Madhumathi A

    to my knowledge u can't use internal tables in ABAP query...it is a mix of tables...

  • 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

  • Internal table in shared memory

    I'm using an internal table in a shared memory area. Depending on the existance of rows i would like to modify these rows or appending new rows.
    So i need read and write access.
    I tried to use attach_for_write( ) but after that i cannot read the table, sy-subrc is always 4.
    So i tried to read the table with attach_for_read( ) first. I can read it, and the result is now sy-subrc = 0.
    But after attaching the table via attach_for_write i'm unable to modify the table, how can i do this?

    myshmhandle = zca_shm_repstat_area=>attach_for_update( ).
    CREATE OBJECT myroot AREA HANDLE myshmhandle.
    read table myshmhandle->root->it_stat with key mandt = sy-mandt report = sy-repid
      ASSIGNING <p>.
    if sy-subrc = 0.
        <p>-freq    = wa_stat-freq + 1.
        <p>-ldate   = sy-datum.
        <p>-ltime   = sy-uzeit.
        <p>-userid  = sy-uname.
        ins = abap_false.
      else.
        wa_stat-mandt   = sy-mandt.
        wa_stat-report  = sy-repid.
        wa_stat-freq    = 1.
        wa_stat-ldate   = sy-datum.
        wa_stat-ltime   = sy-uzeit.
        wa_stat-userid  = sy-uname.
        ins = abap_true.
        append wa_stat to myroot->it_stat.
      endif.
    myshmhandle->set_root( myroot ).
    myshmhandle->detach_commit( ).
    Running the first time, everyting is ok. Running the second time the read will give back sy-subrc = 0 and <p> contains the correct values. after running to the end the table has no rows at all and is inconsitent I cant see what i'm doing wrong.

  • Internal table in ABAP Server Proxy

    Hi Experts,
        I have developed a JDBC to ABAP Proxy scenario.
    I have a problem. In my ABAP server proxy I have to import the values into an internal table and pass them to a BAPI for GR creation.
    I get an error like. OCCURS 0 is not allowed in OO concept.
    Can anyone give me examples on declaring internal table in an ABAP Proxy(OO Concept).
    Thanks
    AK

    Hi
    Check this out.
    http://help.sap.com/saphelp_nw70/helpdata/EN/fc/eb3660358411d1829f0000e829fbfe/frameset.htm
    Cheers

  • Generating an XML Document from an internal table in ABAP

    Good day to all of you;
    With ABAP, in the R/3 system, I'm trying to figure out a way to accomplish the following:
    1) SELECT a set of Purchase Order data into an internal table.
    2) Generate an XML document, containing the above data, using a specific schema.
    I've been playing around with function module SAP_CONVERT_TO_XML_FORMAT which has the following interface:
    CALL FUNCTION 'SAP_CONVERT_TO_XML_FORMAT'
          EXPORTING
          I_FIELD_SEPERATOR    = ''
          I_LINE_HEADER        = ''
            I_FILENAME           = v_fname
          I_APPL_KEEP          = ''
          I_XML_DOC_NAME      = v_docname
          IMPORTING
            PE_BIN_FILESIZE      = v_byte
          TABLES
            I_TAB_SAP_DATA       = i_SapData
          CHANGING
            I_TAB_CONVERTED_DATA = i_XMLData
          EXCEPTIONS
            CONVERSION_FAILED    = 1
            OTHERS               = 2.
    I'm uncertain as to whether or not the Export parameter, I_XML_DOC_NAME refers to some schema or definition and therefore have been excluding it.  In doing so, the generated XML document seems to use the field name/type information from my itab for the tags.
    If this function module requires an XML Document Name, how do I create one and where do I store it in R/3?  If this is not the recommended solution, is anyone familiar with a way to load an XML schema, retrieve some data then have SAP generate an XML document using the schema?
    Many thanks for any help available.
    T

    Hai Phillips
    Try with the following Code
    This program exports an internal table to an XML file.
    Report ZPRUEBA_MML_13 *
    Export an internal table to XML document *
    NO BORRAR ESTE CODIGO *
    REPORT ZPRUEBA_MML_13.
    PANTALLA SELECCION *
        PARAMETERS: GK_RUTA TYPE RLGRAP-FILENAME.
    PANTALLA SELECCION *
    TYPE TURNOS *
    TYPES: BEGIN OF TURNOS,
        LU LIKE T552A-TPR01,
        MA LIKE T552A-TPR01,
        MI LIKE T552A-TPR01,
        JU LIKE T552A-TPR01,
        VI LIKE T552A-TPR01,
        SA LIKE T552A-TPR01,
        DO LIKE T552A-TPR01,
    END OF TURNOS.
    TYPE TURNOS *
    TYPE SOCIO *
    TYPES: BEGIN OF SOCIO,
        NUMERO LIKE PERNR-PERNR,
        REPOSICION LIKE PA0050-ZAUVE,
        NOMBRE LIKE PA0002-VORNA,
        TURNOS TYPE TURNOS,
    END OF SOCIO.
    TYPE SOCIO *
    ESTRUCTURA ACCESOS *
    DATA: BEGIN OF ACCESOS OCCURS 0,
        SOCIO TYPE SOCIO,
    END OF ACCESOS.
    ESTRUCTURA ACCESOS *
    START OF SELECTION *
    START-OF-SELECTION.
        PERFORM LLENA_ACCESOS.
        PERFORM DESCARGA_XML.
    END-OF-SELECTION.
    END OF SELECTION *
    FORM LLENA_ACCESOS *
    FORM LLENA_ACCESOS.
    REFRESH ACCESOS.
    CLEAR ACCESOS.
    MOVE: '45050' TO ACCESOS-SOCIO-NUMERO,
                  'MOISES MORENO' TO ACCESOS-SOCIO-NOMBRE,
                  '0' TO ACCESOS-SOCIO-REPOSICION,
                  'T1' TO ACCESOS-SOCIO-TURNOS-LU,
                  'T2' TO ACCESOS-SOCIO-TURNOS-MA,
                  'T3' TO ACCESOS-SOCIO-TURNOS-MI,
                  'T4' TO ACCESOS-SOCIO-TURNOS-JU,
                  'T5' TO ACCESOS-SOCIO-TURNOS-VI,
                  'T6' TO ACCESOS-SOCIO-TURNOS-SA,
                  'T7' TO ACCESOS-SOCIO-TURNOS-DO.
    APPEND ACCESOS.
    CLEAR ACCESOS.
    MOVE: '45051' TO ACCESOS-SOCIO-NUMERO,
                  'RUTH PEÑA' TO ACCESOS-SOCIO-NOMBRE,
                  '0' TO ACCESOS-SOCIO-REPOSICION,
                  'T1' TO ACCESOS-SOCIO-TURNOS-LU,
                  'T2' TO ACCESOS-SOCIO-TURNOS-MA,
                  'T3' TO ACCESOS-SOCIO-TURNOS-MI,
                  'T4' TO ACCESOS-SOCIO-TURNOS-JU,
                  'T5' TO ACCESOS-SOCIO-TURNOS-VI,
                  'T6' TO ACCESOS-SOCIO-TURNOS-SA,
                  'T7' TO ACCESOS-SOCIO-TURNOS-DO.
    APPEND ACCESOS.
    ENDFORM.
    FORM LLENA_ACCESOS *
    FORM DESCARGA_XML *
    FORM DESCARGA_XML.
    DATA: L_DOM TYPE REF TO IF_IXML_ELEMENT,
                  M_DOCUMENT TYPE REF TO IF_IXML_DOCUMENT,
                  G_IXML TYPE REF TO IF_IXML,
                  W_STRING TYPE XSTRING,
                  W_SIZE TYPE I,
                  W_RESULT TYPE I,
                  W_LINE TYPE STRING,
                  IT_XML TYPE DCXMLLINES,
                  S_XML LIKE LINE OF IT_XML,
                  W_RC LIKE SY-SUBRC.
    DATA: XML TYPE DCXMLLINES.
    DATA: RC TYPE SY-SUBRC,
    BEGIN OF XML_TAB OCCURS 0,
                  D LIKE LINE OF XML,
    END OF XML_TAB.
    CLASS CL_IXML DEFINITION LOAD.
    G_IXML = CL_IXML=>CREATE( ).
    CHECK NOT G_IXML IS INITIAL.
    M_DOCUMENT = G_IXML->CREATE_DOCUMENT( ).
    CHECK NOT M_DOCUMENT IS INITIAL.
    WRITE: / 'Converting DATA TO DOM 1:'.
    CALL FUNCTION 'SDIXML_DATA_TO_DOM'
    EXPORTING
                  NAME = 'ACCESOS'
                  DATAOBJECT = ACCESOS[]
    IMPORTING
                  DATA_AS_DOM = L_DOM
    CHANGING
                  DOCUMENT = M_DOCUMENT
    EXCEPTIONS
                  ILLEGAL_NAME = 1
                  OTHERS = 2.
    IF SY-SUBRC = 0.
                  WRITE 'Ok'.
    ELSE.
                  WRITE: 'Err =',
                  SY-SUBRC.
    ENDIF.
    CHECK NOT L_DOM IS INITIAL.
    W_RC = M_DOCUMENT->APPEND_CHILD( NEW_CHILD = L_DOM ).
    IF W_RC IS INITIAL.
                  WRITE 'Ok'.
    ELSE.
                  WRITE: 'Err =',
                  W_RC.
    ENDIF.
    CALL FUNCTION 'SDIXML_DOM_TO_XML'
    EXPORTING
                  DOCUMENT = M_DOCUMENT
    IMPORTING
                  XML_AS_STRING = W_STRING
                  SIZE = W_SIZE
    TABLES
                  XML_AS_TABLE = IT_XML
    EXCEPTIONS
                  NO_DOCUMENT = 1
                  OTHERS = 2.
    IF SY-SUBRC = 0.
                  WRITE 'Ok'.
    ELSE.
                  WRITE: 'Err =',
                  SY-SUBRC.
    ENDIF.
    LOOP AT IT_XML INTO XML_TAB-D.
                  APPEND XML_TAB.
    ENDLOOP.
    CALL FUNCTION 'WS_DOWNLOAD'
    EXPORTING
                  BIN_FILESIZE = W_SIZE
                  FILENAME = GK_RUTA
                  FILETYPE = 'BIN'
    TABLES
                  DATA_TAB = XML_TAB
    EXCEPTIONS
                  OTHERS = 10.
    IF SY-SUBRC <> 0.
                  MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                  WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    ENDFORM.
    FORM DESCARGA_XML *
    Thanks & regards
    Sreenivasulu P

  • How to convert xml file into internal table in ABAP Mapping.

    Hi All,
    I am trying with ABAP mapping. I have one scenario in which I'm using below xml file as a sender from my FTP server.
    <?xml version="1.0" encoding="UTF-8" ?>
    - <ns0:MTO_ABAP_MAPPING xmlns:ns0="http://Capgemini/Mumbai/sarsingh">
      <BookingCode>2KY34R</BookingCode>
    - <Passenger>
      <Name>SARVESH</Name>
      <Address>THANE</Address>
      </Passenger>
    - <Passenger>
      <Name>RAJESH</Name>
      <Address>POWAI</Address>
      </Passenger>
    - <Passenger>
      <Name>CARRON</Name>
      <Address>JUHU</Address>
      </Passenger>
    - <Flight>
      <Date>03/03/07</Date>
      <AirlineID>UA</AirlineID>
      <FlightNumber>125</FlightNumber>
      <From>LAS</From>
      <To>SFO</To>
      </Flight>
      </ns0:MTO_ABAP_MAPPING>
    AT the receiver side I wnat to concatenate the NAME & ADDRESS.
    I tried Robert Eijpe's weblog (/people/r.eijpe/blog/2005/11/21/xml-dom-processing-in-abap-part-ii--convert-an-xml-file-into-an-abap-table-using-sap-dom-approach)
    but couldnt succeed to convert the xml file into internal table perfectly.
    Can anybody help on this. 
    Thanks in advance!!
    Sarvesh

    Hi Sarvesh,
    The pdf has details of ABAP mapping. The example given almost matches the xml file you want to be converted.
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/xi/3.0/how to use abap-mapping in xi 3.0.pdf
    Just in case you have not seen this
    regards
    Vijaya

  • How do we Use Internal table in Global Memory  ?

    Hi All ,
        Can anyone help me with how to create and use an internal table in SAP global memory ?
    Regards,
    Ranjita

    Hi,
    Try with GET PARAMETER AND SET PARAMETER
    Refer the below link,
    Export Import Internal tables across two z programs
    Regards,
    Vijay

  • Using Internal Table in ABAP OO.

    Hi,
         I am using a internal table, I am calling a FM, which require Internal table as its parameter. Since Internal table with header line is not supported in ABAP OO. How to attain this.
    Thanq For Ur time.
    Cheers,
    Sam

    Hi,
    Please look at my example below.
    TYPES: BEGIN OF t_vbak,
              vbeln TYPE vbak-vbeln,
              posnr TYPE vbap-posnr,
              erdat TYPE vbak-erdat,
              ernam TYPE vbak-ernam,
              auart TYPE vbak-auart,
              kunnr TYPE vbak-kunnr,
              vkgrp TYPE vbak-vkgrp,
             END OF t_vbak.
    DATA: gt_vbak     TYPE STANDARD TABLE OF t_vbak,
          gt_vbak_dum LIKE gt_vbak.
    *CLASS DEFINITIONS
    *       CLASS lcl_get_so DEFINITION
    CLASS lcl_get_so DEFINITION.
      PUBLIC SECTION.
        METHODS: get_sales_orders
                    EXPORTING
                       ex_vbak LIKE gt_vbak.
    ENDCLASS.                    "lcl_get_so DEFINITION
    *CLASS IMPLEMENTATIONS
    *       CLASS lcl_get_so IMPLEMENTATION
    CLASS lcl_get_so IMPLEMENTATION.
      METHOD get_sales_orders.
        SELECT vbak~vbeln vbap~posnr vbak~erdat
               vbak~ernam vbak~auart vbak~kunnr
               vbak~vkgrp
          FROM vbak
         INNER JOIN vbap
            ON vbak~vbeln = vbap~vbeln
          INTO TABLE gt_vbak
         WHERE vbak~erdat IN s_erdat
           AND vbak~ernam IN s_ernam
           AND vbak~auart IN s_auart
           AND vbak~vkgrp IN s_vkgrp
           AND vbak~kunnr = p_kunnr.
        IF NOT gt_vbak[] IS INITIAL.
          ex_vbak[] = gt_vbak[].
        ELSE.
          MESSAGE i000 WITH 'No data found for given criteria'.
          LEAVE TO SCREEN 0.
        ENDIF.
      ENDMETHOD.                    "get_sales_orders
    ENDCLASS.                    "lcl_get_so IMPLEMENTATION
    * START-OF-SELECTION                           *
    START-OF-SELECTION.
      DATA: o_get_so         TYPE REF TO lcl_get_so.
      CREATE OBJECT: o_get_so.
    *Get sales orders
        CALL METHOD o_get_so->get_sales_orders
          IMPORTING
            ex_vbak = gt_vbak_dum.
    Hope it helps...
    Please award points if it helps...

  • Declaring the internal table in ABAP objects

    Hi every1,
    Please any one let me know how to declare an internal table in class (ABAP objects). Bcos i am new to this classes.
    help me out.
    Regards,
    Madhavi

    Hi,
    Check this example..
    TYPES: BEGIN OF TYPE_DATA,
                   MATNR TYPE MATNR,
                   WERKS TYPE WERKS_D,
                 END OF TYPE_DATA.
    DATA: T_DATA TYPE STANDARD TABLE OF TYPE_DATA.
    DATA: WA_DATA TYPE TYPE_DATA.
    Adding rows to the internal table.
    WA_DATA-MATNR = 'AA'.
    APPEND WA_DATA TO T_DATA.
    Processing the interna table
    LOOP AT T_DATA INTO WA_DATA.
    ENDLOOP.
    Thanks,
    Naren

  • I want to call components of an internal table in ABAP-Objects!!!!

    Hy all,
    I am trying to call the component my_query_info-compuid. But if I do it that way like shown below I get a Syntax error message.
    "MY_QUERY_INFO" is a table without a header line and therefore has no component called "COMPUID".
    And in Classes and OO its forbidden to declare internal tables with header lines and I also tried it?!
    I hope you can give me some help.
    DATA: my_query_info TYPE STANDARD TABLE OF
                                       rrmx_s_query_info
                                       WITH DEFAULT KEY
                                        INITIAL SIZE 0.
    METHOD get_queries_from_wb.
        CALL FUNCTION 'RRMX_WORKBOOK_QUERIES_GET'
          EXPORTING
            i_workbookid   = obj_id
            i_objvers      = 'A'
          IMPORTING
            e_t_query_info = my_query_info.
        SELECT *
        FROM rsrrepdir
        INTO table long_query_info
        WHERE compuid = my_query_info-compuid.
      ENDMETHOD.                    "get_queries_from_wb

    Hello Peter
    Fortunately ABAP-OO does no longer allow to use header lines which are only good for spoiling programs.
    Below you find my suggestion for OO-compatible coding:
    DATA: my_query_info TYPE STANDARD TABLE OF rrmx_s_query_info
                                     WITH DEFAULT KEY,
              ls_query          LIKE LINE OF my_query_info.
    METHOD get_queries_from_wb.
    CALL FUNCTION 'RRMX_WORKBOOK_QUERIES_GET'
    EXPORTING
    i_workbookid = obj_id
    i_objvers = 'A'
    IMPORTING
    e_t_query_info = my_query_info.
    "SELECT *
    "FROM rsrrepdir
    "INTO table long_query_info
    "WHERE compuid = my_query_info-compuid.
    IF ( my_query_info IS NOT INITIAL ).
       SELECT * FROM rsrepdir INTO TABLE long_query_info
         FOR ALL ENTRIES IN my_query_info
         WHERE compuid = my_query_info-compuid.
    ENDIF.
    " Or:
    LOOP AT my_query_info INTO ls_query.
      SELECT * FROM rsrrepdir APPENDING TABLE long_query_info
        WHERE compuid = ls_query-compuid.
    ENDLOOP.
    ENDMETHOD. "get_queries_from_wb
    Regards
       Uwe

  • Conversion of internal tables from ABAP to XML and Viceversa

    Hi ,
    I am writing a BAPI to pick the data from SAP system which gives its output to a .NET application. So, i designed XSD and i want the output of the BAPI according to that XSD rather than in the form of normal internal tables.
    Can any one please tell me what is the best way to do this ?
    I know very little about the simple transformations that are available in ABAP. Do we need to write our own transformation for the conversion of the internal tables to required XML format or do we already have transformations which take the internal tables and XSD to generate the XML required ?
    Also for again converting the XML document to ABAP do we need to write a new transformation ?
    Reward points are assured for all the replies.
    Regards,
    Srinivas.

    to convert internal table to xml format you could use CALL TRANSFORMATION key word
    data: xml_out type string .
    call transformation (`ID`)
                  source output = youritab
                  result xml xml_out.
    instead of ID (xslt program) you can desing your own xslt program to generate the xml in the desired format. ID is the standard delivered one

  • Longest length of a data type in an internal table in abap

    Hi everyone,
    I have a requirement for a client in which i want to read a standard text from SO10 which can be up to 5000 words, store that into an internal table & display it in an excel sheet in a single column in a single field.
    I have tried declaring my field as:
    field(65535) TYPE c,
    edidd-sdata,
    char1024,
    /SDF/CCM_XSTRING, etc. But the field does not store morre than 128 characters.
    Im attaching a screen shot of my final requirement.
    can anybody help in this regard??

    Hi Vinnet,
    Declare field with string type and use below sample code to display in a single row or colum.
    CONSTANTS: "Char
                   lc_char1 TYPE char2 VALUE '"' ,
                AT NEW esnum.                               "#EC AT_LOOP_WH
                  CONCATENATE lc_char1 l_string
                              INTO l_string
                              SEPARATED BY space.
                ENDAT.
                CONCATENATE l_string <field_name>
                            INTO l_string
                            SEPARATED BY space.
    *           Check for last line item to get payment note
                AT END OF esnum.                            "#EC AT_LOOP_WH
                  CONCATENATE l_string lc_char1
                              INTO l_string
                              SEPARATED BY space.
                ENDAT.
    reward if it helpfull.

  • Convert an internal table from ABAP to an xml file on the Unix server

    I'm trying to convert an internal table to an xml file.  This file will be downloaded to a unix server.  Can someone help?

    Hello Linda,
    You can combine the code given by Mahalakshmi with something like this:
    CALL FUNCTION 'FILE_GET_NAME'
          EXPORTING
            logical_filename = 'YOUR_LOGICAL_FILE_NAME
            parameter_1      = l_file_name_xml
          IMPORTING
            file_name        = l_file_server
          EXCEPTIONS
            file_not_found   = 1
            OTHERS           = 2.
        IF sy-subrc = 0.
          TRY.
            OPEN DATASET l_file_server FOR OUTPUT. "<IN TEXT MODE> <ENCODING DEFAULT>.
          ENDTRY.
          IF sy-subrc = 0.
          LOOP AT lt_xml INTO ls_xml.
            TRANSFER ls_xml TO l_file_server.
          ENDLOOP.
          CLOSE DATASET l_file_server.
    ENDIF.
    ENDIF.
    You need to have the server path defined (look at the paths with tcode AL11) and the file logical name with tcode FILE
    Best regards,
    Andri

Maybe you are looking for