HR ABAP-Data objects

Dear All,
In HR how to write data objects from ABAP/4 program to ABAP/4 memory.
Please let me know the statements required.
Regards,
Ravi.

Hello,
In HR you pass the data to cluster (pcl1,pcl2,pcl3,pcl4) and its corresponding data cluster
example
export  pcl3 al  to ( your data). here pcl3 is cluster and al corresponding data cluster of pcl3
then do import
Edited by: pratyush v on Feb 4, 2009 10:26 AM
Edited by: pratyush v on Feb 4, 2009 10:34 AM

Similar Messages

  • Difference b/w DATA TYPE and DATA OBJECT & differences b/w TYPE and LIKE

    hai
    can any one say the differences between Data type and Data Object.
    And also differences between TYPE and LIKE
    thanks
    Gani

    hi,
    _Data Types and Data Objects_
          Programs work with local program data – that is, with byte sequences in the working memory. Byte sequences that belong together are called fields and are characterized by a length, an identity (name), and – as a further attribute – by a data type. All programming languages have a concept that describes how the contents of a field are interpreted according to the data type.
          In the ABAP type concept, fields are called data objects. Each data object is thus an instance of an abstract data type. There are separate name spaces for data objects and data types. This means that a name can be the name of a data object as well as the name of a data type simultaneously.
    Data Types
       As well as occurring as attributes of a data object, data types can also be defined independently. You can then use them later on in conjunction with a data object. The definition of a user-defined data type is based on a set of predefined elementary data types. You can define data types either locally in the declaration part of a program using the TYPESstatement) or globally in the ABAP Dictionary. You can use your own data types to declare data objects or to check the types of parameters in generic operations.
         All programming languages distinguish between various types of data with various uses, such as ….. type data for storing or displaying values and numerical data for calculations. The attributes in question are described using data types. You can define, for example, how data is stored in the repository, and how the ABAP statements work with the data.
    Data types can be divided into elementary, reference, and complex types.
    a. Elementary Types
    These are data types of fixed or variable length that are not made up of other types.
    The difference between variable length data types and fixed length data types is that the length and the memory space required by data objects of variable length data types can change dynamically during runtime, and that these data types cannot be defined irreversibly while the data object is being declared.
    Predefined and User-Defined Elementary Data Types
    You can also define your own elementary data types in ABAP using the TYPES statement. You base these on the predefined data types. This determines all of the technical attributes of the new data type. For example, you could define a data type P_2 with two decimal places, based on the predefined data type P. You could then use this new type in your data declarations.
    b.  Reference Types
    Reference types are deep data types that describe reference variables, that is, data objects that contain references. A reference variable can be defined as a component of a complex data object such as a structure or internal table as well as a single field.
    c. Complex Data Types
    Complex data types are made up of other data types. A distinction is made here between structured types and table types.
    Data Objects
          Data objects are the physical units with which ABAP statements work at runtime. The contents of a data object occupy memory space in the program. ABAP statements access these contents by addressing the name of the data object and interpret them according to the data type.. For example, statements can write the contents of data objects in lists or in the database, they can pass them to and receive them from routines, they can change them by assigning new values, and they can compare them in logical expressions.
           Each ABAP data object has a set of technical attributes, which are fully defined at all times when an ABAP program is running (field length, number of decimal places, and data type). You declare data objects either statically in the declaration part of an ABAP program (the most important statement for this is DATA), or dynamically at runtime (for example, when you call procedures). As well as fields in the memory area of the program, the program also treats literals like data objects.
            A data object is a part of the repository whose content can be addressed and interpreted by the program. All data objects must be declared in the ABAP program and are not persistent, meaning that they only exist while the program is being executed. Before you can process persistent data (such as data from a database table or from a sequential file), you must read it into data objects first. Conversely, if you want to retain the contents of a data object beyond the end of the program, you must save it in a persistent form.
    Declaring Data Objects
          Apart from the interface parameters of procedures, you declare all of the data objects in an ABAP program or procedure in its declaration part. These declarative statements establish the data type of the object, along with any missing technical attributes. This takes place before the program is actually executed. The technical attributes can then be queried while the program is running.
         The interface parameters of procedures are generated as local data objects, but only when the procedure is actually called. You can define the technical attributes of the interface parameters in the procedure itself. If you do not, they adopt the attributes of the parameters from which they receive their values.
    ABAP contains the following kinds of data objects:
    a.  Literals
    Literals are not created by declarative statements. Instead, they exist in the program source code. Like all data objects, they have fixed technical attributes (field length, number of decimal places, data type), but no name. They are therefore referred to as unnamed data objects.
    b.  Named Data Objects
    Data objects that have a name that you can use to address the ABAP program are known as named objects. These can be objects of various types, including text symbols, variables and constants.
    Text symbols are pointers to texts in the text pool of the ABAP program. When the program starts, the corresponding data objects are generated from the texts stored in the text pool. They can be addressed using the name of the text symbol.
    Variables are data objects whose contents can be changed using ABAP statements. You declare variables using the DATA, CLASS-DATA, STATICS, PARAMETERS, SELECT-OPTIONS, and RANGESstatements.
    Constants are data objects whose contents cannot be changed. You declare constants using the CONSTANTSstatement.
    c.  Anonymous Data  Objects
    Data objects that cannot be addressed using a name are known as anonymous data objects. They are created using the CREATE DATAstatement and can be addressed using reference variables.
    d.  System-Defined Data Objects
    System-defined data objects do not have to be declared explicitly - they are always available at runtime.
    e.  Interface Work Areas
    Interface work areas are special variables that serve as interfaces between programs, screens, and logical databases. You declare interface work areas using the TABLES and NODESstatements.
    What is the difference between Type and Like?
    Answer1:
    TYPE, you assign datatype directly to the data object while declaring.
    LIKE,you assign the datatype of another object to the declaring data object. The datatype is referenced indirectly.
    Answer2:
    Type is a keyword used to refer to a data type whereas Like is a keyword used to copy the existing properties of already existing data object.
    Answer3:
    type refers the existing data type
    like refers the existing data object
    reward if useful
    thanks and regards
    suma sailaja pvn

  • Data types and Data object

    Can Any one give me Clear definition of Data type and Data objects.
    Concept i know clearly.. but unable to explain it..
    Regards,
    Prasanna

    Data consists of strings of bytes in the memory area of the program. A string of related bytes is called a field. Each field has an identity (a name) and a data type. All programming languages have a concept that describes how the contents of a field are interpreted according to the data type.
             In the ABAP type concept, fields are called data objects. Each data object is an instance of an abstract data type. Data types in ABAP are not just attributes of fields, but can be defined in their own right. There are separate name spaces for data objects and data types. This means that a name can at the same time be the name of a data   object as well as the name of a data type.
    <b>Data Types:</b>
                     As well as occurring as attributes of a data object, data types can also be defined independently. The definition of a user-defined data type is based on a set of predefined elementary data types. You can define data types either locally in the declaration part of a program (using the TYPES statement) or globally in the ABAP Dictionary. You can use your own data types to declare data objects or to check the types of parameters in generic operations.
             Data types can be divided into elementary, reference, and complex types
    <b>Data objects:</b>
                      Data objects are the physical units with which ABAP statements work at runtime. Each ABAP data object has a set of technical attributes, which are fully defined at all times when an ABAP program is running. The technical attributes of a data object are its length, number of decimal places, and data type. ABAP statements work with the contents of data objects and interpret them according to their data type. You declare data objects either statically in the declaration part of an ABAP program (the most important statement for this is DATA), or dynamically at runtime (for example, when you call procedures). As well as fields in the memory area of the program, the program also treats literals like data objects.
    ABAP contains the following kinds of data objects
      Literals
       Named Data Objects
      Predefined Data Objects
      Dynamic Data Objects

  • Data types and data objects

    diff b/w data types and data objects

    hi prasanth,
    Data Types and Data Objects
    Programs work with local program data – that is, with byte sequences in the working memory. Byte sequences that belong together are called fields and are characterized by a length, an identity (name), and – as a further attribute – by a data type. All programming languages have a concept that describes how the contents of a field are interpreted according to the data type.
    In the ABAP type concept, fields are called data objects. Each data object is thus an instance of an abstract data type. There are separate name spaces for data objects and data types. This means that a name can be the name of a data object as well as the name of a data type simultaneously.
    Data Types
    Data types are templates for creating data objects. Data types can be defined independently in the ABAP program or in the ABAP Dictionary. As attributes of a data object, data types can also exist in a non-independent state. Data types do not use any memory space for work data, but may require memory for administration information.
    As well as occurring as attributes of a data object, data types can also be defined independently. You can then use them later on in conjunction with a data object. The definition of a user-defined data type is based on a set of predefined elementary data types. You can define data types either locally in the declaration part of a program using the TYPESstatement) or globally in the ABAP Dictionary. You can use your own data types to declare data objects or to check the types of parameters in generic operations.
    All programming languages distinguish between various types of data with various uses, such as ….. type data for storing or displaying values and numerical data for calculations. The attributes in question are described using data types. You can define, for example, how data is stored in the repository, and how the ABAP statements work with the data.
    Data types can be divided into elementary, reference, and complex types.
    a. Elementary Types
    These are data types of fixed or variable length that are not made up of other types.
    The difference between variable length data types and fixed length data types is that the length and the memory space required by data objects of variable length data types can change dynamically during runtime, and that these data types cannot be defined irreversibly while the data object is being declared.
    Predefined and User-Defined Elementary Data Types
    You can also define your own elementary data types in ABAP using the TYPES statement. You base these on the predefined data types. This determines all of the technical attributes of the new data type. For example, you could define a data type P_2 with two decimal places, based on the predefined data type P. You could then use this new type in your data declarations.
    b. Reference Types
    Reference types are deep data types that describe reference variables, that is, data objects that contain references. A reference variable can be defined as a component of a complex data object such as a structure or internal table as well as a single field.
    c. Complex Data Types
    Complex data types are made up of other data types. A distinction is made here between structured types and table types.
    Data Objects
    A data object is an instance of a data type and occupies as much memory space as its type specifies. An ABAP program only works with data that is available as content of data objects. Data objects are either created implicitly as named data objects, or exanonymous data objects using CREATEDATA.
    Data objects are the physical units with which ABAP statements work at runtime. The contents of a data object occupy memory space in the program. ABAP statements access these contents by addressing the name of the data object and interpret them according to the data type.. For example, statements can write the contents of data objects in lists or in the database, they can pass them to and receive them from routines, they can change them by assigning new values, and they can compare them in logical expressions.
    Each ABAP data object has a set of technical attributes, which are fully defined at all times when an ABAP program is running (field length, number of decimal places, and data type). You declare data objects either statically in the declaration part of an ABAP program (the most important statement for this is DATA), or dynamically at runtime (for example, when you call procedures). As well as fields in the memory area of the program, the program also treats literals like data objects.
    A data object is a part of the repository whose content can be addressed and interpreted by the program. All data objects must be declared in the ABAP program and are not persistent, meaning that they only exist while the program is being executed. Before you can process persistent data (such as data from a database table or from a sequential file), you must read it into data objects first. Conversely, if you want to retain the contents of a data object beyond the end of the program, you must save it in a persistent form.
    Declaring Data Objects
    Apart from the interface parameters of procedures, you declare all of the data objects in an ABAP program or procedure in its declaration part. These declarative statements establish the data type of the object, along with any missing technical attributes. This takes place before the program is actually executed. The technical attributes can then be queried while the program is running.
    The interface parameters of procedures are generated as local data objects, but only when the procedure is actually called. You can define the technical attributes of the interface parameters in the procedure itself. If you do not, they adopt the attributes of the parameters from which they receive their values.
    ABAP contains the following kinds of data objects:
    a. Literals
    Literals are not created by declarative statements. Instead, they exist in the program source code. Like all data objects, they have fixed technical attributes (field length, number of decimal places, data type), but no name. They are therefore referred to as unnamed data objects.
    b. Named Data Objects
    Data objects that have a name that you can use to address the ABAP program are known as named objects. These can be objects of various types, including text symbols, variables and constants.
    Text symbols are pointers to texts in the text pool of the ABAP program. When the program starts, the corresponding data objects are generated from the texts stored in the text pool. They can be addressed using the name of the text symbol.
    Variables are data objects whose contents can be changed using ABAP statements. You declare variables using the DATA, CLASS-DATA, STATICS, PARAMETERS, SELECT-OPTIONS, and RANGESstatements.
    Constants are data objects whose contents cannot be changed. You declare constants using the CONSTANTSstatement.
    c. Anonymous Data Objects
    Data objects that cannot be addressed using a name are known as anonymous data objects. They are created using the CREATE DATAstatement and can be addressed using reference variables.
    d. System-Defined Data Objects
    System-defined data objects do not have to be declared explicitly - they are always available at runtime.
    e. Interface Work Areas
    Interface work areas are special variables that serve as interfaces between programs, screens, and logical databases. You declare interface work areas using the TABLES and NODESstatements.
    regards,
    sravanthi

  • How to process XML into ABAP data?

    Hi,
       I have a string variable which content is a xml file. Then how to extract data from it into corresponding ABAP data objects like internal table or structure?
       Thanks a lot!

    HI Long
    check this code which converts xml to bap internal table using DOM
    REPORT  Z_XML_TO_TABLE.
      TYPE-POOLS: ixml.
      TYPES: BEGIN OF t_xml_line,
              data(256) TYPE x,
            END OF t_xml_line.
      DATA: l_ixml            TYPE REF TO if_ixml,
            l_streamfactory   TYPE REF TO if_ixml_stream_factory,
            l_parser          TYPE REF TO if_ixml_parser,
            l_istream         TYPE REF TO if_ixml_istream,
            l_document        TYPE REF TO if_ixml_document,
            l_node            TYPE REF TO if_ixml_node,
            l_xmldata         TYPE string.
      DATA: l_elem            TYPE REF TO if_ixml_element,
            l_root_node       TYPE REF TO if_ixml_node,
            l_next_node       TYPE REF TO if_ixml_node,
            l_name            TYPE string,
            l_iterator        TYPE REF TO if_ixml_node_iterator.
      DATA: l_xml_table       TYPE TABLE OF t_xml_line,
            l_xml_line        TYPE t_xml_line,
            l_xml_table_size  TYPE i.
      DATA: l_filename        TYPE string.
      PARAMETERS: pa_file TYPE char1024 DEFAULT 'c:\temp\orders_dtd.xml'.
    Validation of XML file: Only DTD included in xml document is supported
      PARAMETERS: pa_val  TYPE char1 AS CHECKBOX.
      START-OF-SELECTION.
      Creating the main iXML factory
        l_ixml = cl_ixml=>create( ).
      Creating a stream factory
        l_streamfactory = l_ixml->create_stream_factory( ).
        PERFORM get_xml_table CHANGING l_xml_table_size l_xml_table.
      wrap the table containing the file into a stream
        l_istream = l_streamfactory->create_istream_itable( table =
    l_xml_table
                                                        size  =
    l_xml_table_size ).
      Creating a document
        l_document = l_ixml->create_document( ).
      Create a Parser
        l_parser = l_ixml->create_parser( stream_factory = l_streamfactory
                                          istream        = l_istream
                                          document       = l_document ).
      Validate a document
        IF pa_val EQ 'X'.
          l_parser->set_validating( mode = if_ixml_parser=>co_validate ).
        ENDIF.
      Parse the stream
        IF l_parser->parse( ) NE 0.
          IF l_parser->num_errors( ) NE 0.
            DATA: parseerror TYPE REF TO if_ixml_parse_error,
                  str        TYPE string,
                  i          TYPE i,
                  count      TYPE i,
                  index      TYPE i.
            count = l_parser->num_errors( ).
            WRITE: count, ' parse errors have occured:'.
            index = 0.
            WHILE index < count.
              parseerror = l_parser->get_error( index = index ).
              i = parseerror->get_line( ).
              WRITE: 'line: ', i.
              i = parseerror->get_column( ).
              WRITE: 'column: ', i.
              str = parseerror->get_reason( ).
              WRITE: str.
              index = index + 1.
            ENDWHILE.
          ENDIF.
        ENDIF.
      Process the document
        IF l_parser->is_dom_generating( ) EQ 'X'.
          PERFORM process_dom USING l_document.
        ENDIF.
    *&      Form  get_xml_table
      FORM get_xml_table CHANGING l_xml_table_size TYPE i
                                  l_xml_table      TYPE STANDARD TABLE.
      Local variable declaration
        DATA: l_len      TYPE i,
              l_len2     TYPE i,
              l_tab      TYPE tsfixml,
              l_content  TYPE string,
              l_str1     TYPE string,
              c_conv     TYPE REF TO cl_abap_conv_in_ce,
              l_itab     TYPE TABLE OF string.
        l_filename = pa_file.
      upload a file from the client's workstation
        CALL METHOD cl_gui_frontend_services=>gui_upload
          EXPORTING
            filename   = l_filename
            filetype   = 'BIN'
          IMPORTING
            filelength = l_xml_table_size
          CHANGING
            data_tab   = l_xml_table
          EXCEPTIONS
            OTHERS     = 19.
        IF sy-subrc <> 0.
          MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                     WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        ENDIF.
      Writing the XML document to the screen
        CLEAR l_str1.
        LOOP AT l_xml_table INTO l_xml_line.
          c_conv = cl_abap_conv_in_ce=>create( input = l_xml_line-data
    replacement = space  ).
          c_conv->read( IMPORTING data = l_content len = l_len ).
          CONCATENATE l_str1 l_content INTO l_str1.
        ENDLOOP.
        l_str1 = l_str1+0(l_xml_table_size).
        SPLIT l_str1 AT cl_abap_char_utilities=>cr_lf INTO TABLE l_itab.
        WRITE: /.
        WRITE: /' XML File'.
        WRITE: /.
        LOOP AT l_itab INTO l_str1.
          REPLACE ALL OCCURRENCES OF cl_abap_char_utilities=>horizontal_tab
    IN
            l_str1 WITH space.
          WRITE: / l_str1.
        ENDLOOP.
        WRITE: /.
      ENDFORM.                    "get_xml_table
    *&      Form  process_dom
      FORM process_dom USING document TYPE REF TO if_ixml_document.
        DATA: node      TYPE REF TO if_ixml_node,
              iterator  TYPE REF TO if_ixml_node_iterator,
              nodemap   TYPE REF TO if_ixml_named_node_map,
              attr      TYPE REF TO if_ixml_node,
              name      TYPE string,
              prefix    TYPE string,
              value     TYPE string,
              indent    TYPE i,
              count     TYPE i,
              index     TYPE i.
        node ?= document.
        CHECK NOT node IS INITIAL.
        ULINE.
        WRITE: /.
        WRITE: /' DOM-TREE'.
        WRITE: /.
        IF node IS INITIAL. EXIT. ENDIF.
      create a node iterator
        iterator  = node->create_iterator( ).
      get current node
        node = iterator->get_next( ).
      loop over all nodes
        WHILE NOT node IS INITIAL.
          indent = node->get_height( ) * 2.
          indent = indent + 20.
          CASE node->get_type( ).
            WHEN if_ixml_node=>co_node_element.
            element node
              name    = node->get_name( ).
              nodemap = node->get_attributes( ).
              WRITE: / 'ELEMENT  :'.
              WRITE: AT indent name COLOR COL_POSITIVE INVERSE.
              IF NOT nodemap IS INITIAL.
              attributes
                count = nodemap->get_length( ).
                DO count TIMES.
                  index  = sy-index - 1.
                  attr   = nodemap->get_item( index ).
                  name   = attr->get_name( ).
                  prefix = attr->get_namespace_prefix( ).
                  value  = attr->get_value( ).
                  WRITE: / 'ATTRIBUTE:'.
                  WRITE: AT indent name  COLOR COL_HEADING INVERSE, '=',
                                   value COLOR COL_TOTAL   INVERSE.
                ENDDO.
              ENDIF.
            WHEN if_ixml_node=>co_node_text OR
                 if_ixml_node=>co_node_cdata_section.
            text node
              value  = node->get_value( ).
              WRITE: / 'VALUE     :'.
              WRITE: AT indent value COLOR COL_GROUP INVERSE.
          ENDCASE.
        advance to next node
          node = iterator->get_next( ).
        ENDWHILE.
      ENDFORM.                    "process_dom
    regards
    kishore
    reward if helpful

  • Difference Between Data Type and Data Object

    Difference Between Data Type and Data Object

    hi magesh
    <u><b>Data types</b></u> can be divided into
    elementary,
    reference, and
    complex types.
    <u><b>Elementary Types</b></u>
    Elementary types are the smallest indivisible unit of types. They can be grouped as those with fixed length and those with variable length.
    <u><b>Fixed-Length Elementary Types</b></u>
    There are eight predefined types in ABAP with fixed length:
    <u><b>Four character types:</b></u>
    Character (C),
    Numeric character (N),
    Date (D),
    and Time (T).
    <b>One hexadecimal type:</b>
    Byte field (X).
    <b>Three numeric types:</b>
    Integer (I),
    Floating-point number (F)
    and Packed number (P).
    <u><b>Variable-Length Elementary Types</b></u>
    There are two predefined types in ABAP with variable length:
    STRING for character strings
    XSTRING for byte strings
    Reference Types
    <b>Reference types</b>
    describe data objects that contain references (pointers) to other objects (data objects and objects in ABAP Objects).
    <u><b>Data Types</b></u>
    1) As well as occurring as attributes of a data object, data types can also be defined independently.
    2)You can then use them later on in conjunction with a data object.
    3) The definition of a user-defined data type is based on a <b>set of predefined elementary data types.</b>
    4) You can define data types <b>either locally in the declaration part of a program</b> using the TYPESstatement) or <b>globally in the ABAP</b> Dictionary.
    5) You can use your own data types to declare data objects or to check the types of parameters in generic operations.
    <u><b>Data Objects</b></u>
    1)<b>Data objects</b> are the physical units with which ABAP statements work at runtime.
    2) The contents of a data object occupy memory space in the program.
    3) <b>ABAP statements access these contents by addressing the name of the data object</b> and interpret them according to the data type..
    4) For example, statements can write the contents of data objects in lists or in the database, they can pass them to and receive them from routines, they can change them by assigning new values, and they can compare them in logical expressions.
    5) Each <b>ABAP data object has a set of technical attributes</b>, which are fully defined at all times when an ABAP program is running (field length, number of decimal places, and data type).
    6) You <b>declare data objects</b> either <b>statically in the declaration part</b> of an ABAP program (the most important statement for this is DATA), or <b>dynamically at runtime</b> (for example, when you call procedures).
    7) As well as fields in the memory area of the program, the program also treats literals like data objects.
    hope this helps u,
    reward points if useful
    Ginni

  • How to retrieve the BRF+  function result data object of type table in ABAP

    Hi,
    I am calling a BRF+ function from Abap....If the result data object of the function is element then i am able to get the value back in ABAP...Suppose the result data object of the function is of table type,I couldnt retrieve the value....Can you please help me how to retrieve the table data object value of the function from abap....
    Regards,
    Dheepak.

    Hi,
    Thanks carsten and Tiwari for your reply...
    Tiwari,
    I understand that if i know the data type of the result data object which i am going to get i can declare it my ABAP program and get the values....But i am developing a generic program which calls the various BRF+ functions based on the function id...So i am not aware what is the data type of the result data object....so is there a any way to handle this situation...Please advice...
    Carsten,
    I used the GET_DATA_OBJECT_STRUCTURE method of class CL_FDT_FUNCTION_PROCESS to get the data object structure...i am able to get whether it is an element or structure or internal table...
    But is there any way to get the data type of the object...For example if it is going to be an element of type BELNR_D,is it possible to get the BELNR_D value in my program...Please advice...
    Thanks,
    Dheepak.

  • The data object "BSEG" does not have a component called "ZZREGION"

    Hi Friends,
    Getting ABAP runtime error while doing MIGO-Goods receipt .
    The data object "BSEG" does not have a component called "ZZREGION".
    Regards
    Ashu

    check/activate  table bseg in se11
    A.

  • ABAP Data to XML file

    Hi,
    I have read this weblog
    /people/patrick.baer/blog/2005/02/24/abap-serialization--part-i-quick-n-easy and tried to serialize ABAP data into XML format.
    In fact, I have copied the exact code from this weblog, but somehow this file is not visible in my pc.
    DATA example_data TYPE spfli.
    select single * from spfli into example_data.
    DATA xml_utils TYPE REF TO if_ixml.
    xml_utils = cl_ixml=>create( ).
    DATA xml_stream_factory TYPE REF TO if_ixml_stream_factory.
    xml_stream_factory = xml_utils->create_stream_factory( ).
    DATA xml_output_stream TYPE REF TO if_ixml_ostream.
    xml_output_stream = xml_stream_factory->create_ostream_uri( system_id =
    'file://c:test.xml' ).
    try.
    CALL TRANSFORMATION id
    SOURCE data_node = example_data
    RESULT XML xml_output_stream.
    catch cx_sy_conversion_base64 CX_SY_CONV_ILLEGAL_DATE_TIME.
    write 'there is an exception'.
    endtry.
    This part of the code, I have also changed to :
    xml_stream_factory->create_ostream_uri( system_id =
    'file://test.xml' ).
    and still the file is not visible.
    I presume three reasons:
    a) Looking in the wrong place
    b) Some configuration, I am not doing properly
    c) Something else has to be done, to write a file to system
    Any help on this regard, is highly appreciated.
    Next issue being, how robust is the approach of serializing ABAP data into XML format, so that a third party system can pick up this data and do a comparison ?
    Some parameters that I am looking for in this regards are:
    a) Error Validation (can XML data be incorrectly written into a file/while transmitting this data some errors can creep in. If so, how do I rectify it. As far as I know, this data can only be written to Presentation Server or using FTP ,transported to required destination. Is there any other approach ? )
    b) Security
    Would be great if you could drop some hints for the above procedure.
    Regards,
    Subramanian V.

    I think you are perhaps overestimating the capabilities of the osteam object.  If you want to write the XML to a file the easiest thing to do is render it an ostream_itable (internal ABAP table).  Then you can download it your PC with the GUI_DOWNLOAD function:
    parameter: ifile type file_table-filename obligatory
               default 'c:issue.xml'.
    ****Temp File name for function module call.
    data: ifilename type string.
      move ifile to ifilename.
      create object issue
         exporting
           id     = id
           create_mode = abap_false.
      data: g_ixml type ref to if_ixml,
             g_stream_factory type ref to if_ixml_stream_factory,
             xslt_err type ref to cx_xslt_exception,
             g_encoding type ref to if_ixml_encoding,
             ostream type ref to if_ixml_ostream.
      constants:  line_length type i value 4096.
      types:      line_t(line_length) type x,
                  table_t type standard table of line_t.
      data: restab type table_t.
      constants:
    * encoding for download of XML files
        encoding     type string value 'utf-8'.
      data: ressize type i.
      try.
          g_ixml = cl_ixml=>create( ).
          g_stream_factory = g_ixml->create_stream_factory( ).
          g_encoding = g_ixml->create_encoding( character_set = encoding
            byte_order = 0 ).
          refresh restab.
          ostream =
            g_stream_factory->create_ostream_itable( table = restab ).
          ostream->set_encoding( encoding = g_encoding ).
          call transformation id_indent
            source     asap_issue = issue
            result xml restab
            options
            data_refs = 'embedded'.
          ressize = ostream->get_num_written_raw( ).
        catch cx_xslt_exception into xslt_err.
          data: s type string.
          s = xslt_err->get_text( ).
      endtry.
      call function 'GUI_DOWNLOAD'
        exporting
          bin_filesize = ressize
          filename     = ifilename
          filetype     = 'BIN'
        tables
          data_tab     = restab
        exceptions
          others       = 1.
      call method cl_gui_frontend_services=>execute
         exporting
           document               = ifilename
    *    APPLICATION            =
    *    PARAMETER              =
    *    DEFAULT_DIRECTORY      =
    *    MAXIMIZED              =
    *    MINIMIZED              =
    *    SYNCHRONOUS            =
        exceptions
          cntl_error             = 1
          error_no_gui           = 2
          bad_parameter          = 3
          file_not_found         = 4
          path_not_found         = 5
          file_extension_unknown = 6
          error_execute_failed   = 7
          others                 = 8.
    As far as a different system, once you have the data serialized into a string or internal table you have lots of possibilites.  If the other system is an SAP system you could send the data via RFC.  You could always write the XML string to the server file system (via open dataset, transfer to dataset).  You can then FTP the file (using built in SAP FTP functionality) just about anywhere.
    What are you looking for as far as robust and secure.  The XML serializer is built in the ABAP Kernel and quite robust.  As far as secure- the data isn't secure at all.  The data is written into a simple string (if written into the file system or your pc - it is a text or binary file that can easily be read by just about anything).  Serializing to XML in and of itself isn't going to provide any security.

  • ABAP Development Objects

    Hi experts,
    is it possible to hide abap workbench objects so that they are not visible through SE80 or other transactions?
    I know the possibility to hide ABAP source code but what I mean is to hide whole TADIR objects?
    Example given, a Function Group is hidden so that it cannot be found through se80 or other objects like BW transformations etc.?
    Best regards,

    Hello colleagues,
    This is a valid question and deserves serious answer.
    It can have two possible answers: Yes its posible or no its not.
    I personally don´t want to hide any repository object. If its possible to hide abap source code, it might be possible to hide Repository objects too?Intention might be to hide programs that could lead to data leaks etc.
    Best regards,

  • Creation of SIMPLE TRANSFORMATIO(ST)for deserialisation of XML - ABAP data.

    Hi friends,
    I m supposed to convert data in XML format in a SAP table into ABAP data in another internal table.For that pupose i wish to write a SIMPLE TRANSFORMATION(ST) code.Can anybody tell were and how this ST code is created.One of these entries of XML data is as follows--
    - <?xml version="1.0" ?> <!DOCTYPE xs:schema (View Source for full doctype...)> - <xs:schema targetNamespace="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://www.w3.org/1999/xhtml" finalDefault="" blockDefault="" elementFormDefault="unqualified" attributeFormDefault="unqualified"> - <xs:annotation> - <xs:documentation>
    XML Schema instance namespace
    See the XML Schema Recommendation for an introduction
    <hr /> $Date: 2001/03/16 20:25:57 $
    $Id: XMLSchema-instance.xsd,v 1.4 2001/03/16 20:25:57 ht Exp $ </xs:documentation> </xs:annotation> - <xs:annotation> - <xs:documentation> -
    This schema should never be used as such: the XML Schema Recommendation forbids the declaration of attributes in this namespace
    </xs:documentation> </xs:annotation> <xs:attribute name="nil" /> <xs:attribute name="type" /> <xs:attribute name="schemaLocation" /> <xs:attribute name="noNamespaceSchemaLocation" /> </xs:schema>
    I will be extreamly thankful if anybody can help.
    Thank you.

    ST is create from transaction SE80
    SE80->edit object->more->transformation
    ST is available only from WAS6.40
    for more on ST check out this blog series
    /people/tobias.trapp/blog/2005/05/04/xml-processing-in-abap-part-1 - part I
    /people/tobias.trapp/blog/2005/05/17/xml-processing-in-abap-part-2 - ii
    /people/tobias.trapp/blog/2005/05/20/xml-processing-in-abap-part-3 - iii
    /people/tobias.trapp/blog/2005/05/27/xml-processing-in-abap-part-4 - iv
    /people/tobias.trapp/blog/2005/06/15/xml-processing-in-abap--part-5 - v
    /people/tobias.trapp/blog/2005/12/08/xml-processing-in-abap--part-6 - vi
    Regards
    Raja

  • Mapping from xsd:date to ABAP dates (yyyy-mm-dd)

    Hi there,
    I've an automated activity that calls an ABAP web service in our SAP ERP.
    In my BPM data object I've a date in format xsd:date which should be passed as web service parameter.
    I've tried to use
    (Data_Object/Requestor/FromDate) cast as date
    but this causes an error when calling the web service.
    If I put a fix value like "2011-03-17" it works.
    How can I do the conversion?
    Another general question:
    From a practical point of view, isn't it better to call web services in the WebDynpro itself instead of creating an automated activity?
    An advantage would be the direct response of the web service which then could be handled in the user interface.

    Thank you!
    >
    Mirza Baig wrote:
    > For manipulating dates you will have to write an EJB function and using date formatter and then call it during input or output mapping, on why the date value is getting reduced by 1 day refer to the following sap note:
    I've tried that by adding EJB function under Process Modelling->functions.
    Building of the product works, but running the application I get the following errors:
    Error occurs while the EJB Object Factory trying to resolve JNDI reference Reference Class Name: EJB Reference
    Error occurs while the EJB Scheme Context Factory trying to resolve an EJB with scheme ejb:/interfaceName=xxx.com.leaverequestproduct.pr.pm.formatDate.impl.FormatDateImplBeanLocal. Check server's trace files for more details.
    I don't know how to solve this.
    Maybe you can help me on this...

  • Data type and Data object

    Hi Friends,
            What is the difference between Data type and Data object?
    Best Regards,
    VRV Singh

    hi
    good
    Each ABAP program define its own data types using the statement.
    TYPES dtype TYPE type ...
    and declare its own variables or instance attributes of classes using the statement
    DATA var {TYPE type} ...
    Within the program or a class, you can also define local data types and variables within procedures. Local variables in procedures obscure identically-named variables in the main program or class.
    When creating data types and data objects, there are a number of naming convention that also apply for other local program definitions, such as procedures. These are described in detail in the keyword documentation.
    The Additions TYPE and LIKE
    The additions TYPE type and LIKE dobj are used in various ABAP statements. The additions can have various meanings, depending on the syntax and context.
    ·        Definition of local types in a program
    ·        Declaration of data objects
    ·        Dynamic creation of data objects
    ·        Specification of the type of formal parameters in subroutines
    ·        Specification of the type of formal parameters in methods
    ·        Specification of the type of field symbols
    Constructing New Data Types
    The TYPE addition allows you to construct new data types in the TYPES, DATA; CONSTANTS; and STATICSstatements. In the TYPES statement, these are local data types in the program. In the other statements, they are attributes of new data objects, meaning that the newly defined data types are not free-standing. Rather, they are linked to database objects.This means that you can refer to them using the LIKEaddition, but not using TYPE.
    To construct new data types, the addition TYPE can be used with the following type constructors:
    ·        Construction of reference types
    REF TO type|dobj
    ·        Construction of structured data types
    BEGIN OF struc_type.
    END OF struc_type.
    ·        Construction of table types
    tabkind OF linetype
    These data types only exist during the runtime of the ABAP program.
    Referring to Known Data Types or Data Objects
    Using the additions TYPE or LIKE in the TYPESstatement, local data types in a program can be referred to known data types or data objects. This is mainly the case with user-defined elementary data types. If you declare variables using the additions TYPE type or LIKE dobj with statement DATA, the data type of var is already fully defined before the declaration is made.
    The known types or data that are referred to must be visible at the point where the data type or variable is declared.
    A known data type can be any of the following:
    ·        A predefined ABAP type to which you refer using the TYPE addition
    ·        An existing local data type in the program to which you refer using the TYPE addition
    ·        The data type of a local data object in the program to which you refer using the LIKE addition
    ·        A data type in the ABAP Dictionary to which you refer using the TYPE addition. To ensure compatibility with earlier releases, it is still possible to use the LIKE addition to refer to database tables and flat structures in the ABAP Dictionary. However, you should use the TYPE addition in new programs.
    The LIKE addition takes its technical attributes from a visible data object. As a rule, you can use LIKE to refer to any object that has been declared using DATA or a similar statement, and is visible in the current context.  The data object only has to have been declared. It is irrelevant whether the data object already exists in memory when you make the LIKE reference.
    ·        In principle, the local data objects in the same program are visible. As with local data types, there is a difference between local data objects in procedures and global data objects. Data objects defined in a procedure obscure other objects with the same name that are declared in the global declarations of the program.
    ·        You can also refer to the data objects of other visible ABAP programs. These might be, for example, the visible attributes of global classes in class pools. If a global class cl_lobal has a public instance attribute or static attribute attr, you can refer to it as follows in any ABAP program:
    DATA dref TYPE REF TO cl_global.
    DATA:  f1 LIKE cl_global=>attr,
           f2 LIKE dref->attr.
    You can access the technical properties of an instance attribute using the class name and a reference variable without first having to create an object. The properties of the attributes of a class are not instance-specific and belong to the static properties of the class.
    http://help.sap.com/saphelp_nw2004s/helpdata/en/fc/eb2ff3358411d1829f0000e829fbfe/content.htm
    thanks
    mrutyun^

  • ABAP Shared Objects - External Reference

    Hi,
    I am using ABAP SHared Objects (SHMA and SHMM) as data persistence between 2 BSP Applications
    I want to create a generic Root class with one attribute that is TYPE REF TO OBJECT. The idea is to store any class instance in this attribute of the Root class so as to AVOID creating a seperate Shared AREA for each Class...
    WHen I try to put this generic Root Class in the shared area via detach_commit(), it gives a exception that there are External references in the Shared area which should be closed first
    Does this mean u cannot have a instance variable as an attribute in your ROOT Class.
    Thanks
    SAP User

    Hi,
    Go through the below code, it's working fine....
    *& Report  Z13708_ABAPOBJECTS_INHER
    REPORT  Z13708_ABAPOBJECTS_INHER.
          CLASS C1 DEFINITION
    CLASS C1 DEFINITION.
      PUBLIC SECTION.
        data: var1 type ref to object.
        METHODS: METH1.
    ENDCLASS.                    "C1 DEFINITION
          CLASS C1 IMPLEMENTATION
    CLASS C1 IMPLEMENTATION.
      METHOD METH1.
        WRITE: / 'This is a method one'.
      ENDMETHOD.                                                "METH1
    ENDCLASS.                    "C1 IMPLEMENTATION
          CLASS C2 DEFINITION
    CLASS C2 DEFINITION.
      PUBLIC SECTION.
        METHODS: METH2.
    ENDCLASS.                    "C2 DEFINITION
          CLASS C2 IMPLEMENTATION
    CLASS C2 IMPLEMENTATION.
      METHOD METH2.
        WRITE: / 'This is a method two'.
      ENDMETHOD.                                                "METH2
    ENDCLASS.                    "C2 IMPLEMENTATION
    START-OF-SELECTION.
      DATA REF1 TYPE REF TO C1.
      DATA REF2 TYPE REF TO C2.
      CREATE OBJECT REF2.
      ref1->var1 ?= ref2.
    Regards,
    Azaz Ali.

  • Data object error in SCreen painter?

    Hi friends,
                   I want to save the data in a table that is present on the screen when i click save this is my requirement.
    My table name is ZSDF
    work area- DATA:WA_WSST TYPE ZSDF.
    DATA declarations -
    Radiobuttons - data:radiobutton1 TYPE C,
                                  radiobutton2 type c.
    DATA:  WS(35) TYPE C,   " entry present for ws
                RADIO TYPE C,
                X TYPE C.
    PBO
    CAse WA_WSST-WS.
    when '1'.
    radiobutton1 = 'X'.
    when '2'.
    radiobutton2 = 'X'.
    PAI
    CASE SY-UCOMM.
    When 'ZRADIO'.
    if radiobutton1 = 'X'.
    WA_WSST-Radio = '1'.
    WA_WSST-WS = 'option one'.
    elseif radiobutton2 = 'X'.
    WA_WSST-Radio = '2'.
    WA_WSST-WS = 'option two'.
    endif.
    When 'SAVE'.
    WA_WSST-DESCRIPTION = DESCRIPTION.
    WA_WSST-WS = WS.
    WA_WSST-WSNO = WSNO.
    WA_WSST-EMPID = EMPID.
    WA_WSST-REQNO = REQNO.
    insert into ZSDF values WA_WSST.
    Hope you got my code--- in WA_WSST-WS option one or option two has to store according to the choice.
    The ERROR i am getting is
    The data object "WA_WSST" does not have a component called "RADIO".
    Please can you help me is this error..

    Hi,
    Does your table is haveing the field called 'RADIO'?
    If No,  that is the reason it is giving error.Because your work are is having the structure of your table ZSDF.
      WA_WSST-Radio = '2'.
    One more doubt have written the CASE statement code in ABAP editor or directly in flow logic editor.
    IF flow logic editor.Pls. declare  module under PAI and PBO and write code there.
    EX; 
    In Flow logic editor.
    PROCESS BEFORE OUTPUT.
      MODULE init_screen_100.
    PROCESS AFTER INPUT.
      MODULE user_command_0100.
    IN ABAP EDITOR
    MODULE init_screen_100 OUTPUT.
      CLEAR input.
      radio1 = 'X'.
      CLEAR: radio2, radio3.
    ENDMODULE.
    MODULE user_command_0100 INPUT.
      output = input.
      box1 = radio1.
      box2 = radio2.
      box3 = radio3.
      IF exit NE space.
      LEAVE PROGRAM.
    ENDIF.
    ENDMODULE.
    Pls. reward if useful....

Maybe you are looking for