Extract SAP BW Data into XML

Hi Gurus,
Could anyone please tell me
How to extract data in SAP BW (ODS or Infocube) into XML File.

Hi All,
thanx alot for your help.
finally i got my solution.
I have written ABAP code and converted ODS data into XML.
Hope  it will help you all.....
REPORT  ZCONVERT_TO_XML                         .
TABLES: /BIC/AZHSO0400.
PARAMETERS: GK_RUTA TYPE RLGRAP-FILENAME .
DATA: ITAB LIKE /BIC/AZHSO0400 OCCURS 1 WITH HEADER LINE.
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.
DATA: BEGIN OF XML_TAB OCCURS 0,
          D LIKE LINE OF XML,
      END OF XML_TAB.
START-OF-SELECTION.
  PERFORM GET_DATA.
  PERFORM CONVERT_XML.
*PERFORM CONVERT_XML.
*&      Form  GET_DATA
      text
-->  p1        text
<--  p2        text
FORM GET_DATA .
  SELECT * FROM /BIC/AZHSO0400 INTO TABLE ITAB.
ENDFORM.                    " GET_DATA
*&      Form  CONVERT_XML
      text
-->  p1        text
<--  p2        text
FORM CONVERT_XML .
  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               = 'ITAB'
      DATAOBJECT         = ITAB[]
  CONTROL            =
   IMPORTING
     DATA_AS_DOM        = L_DOM
   CHANGING
     DOCUMENT           = M_DOCUMENT
  TYPE_HANDLE        =
   EXCEPTIONS
     ILLEGAL_NAME       = 1
     OTHERS             = 2
  IF SY-SUBRC = 0.
    WRITE:/ 'OK'.
  ELSE.
    WRITE: 'ERR = ', SY-SUBRC.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  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
  PRETTY_PRINT        = ' '
   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
  FIELDNAMES                    =
   EXCEPTIONS
  FILE_OPEN_ERROR               = 1
  FILE_WRITE_ERROR              = 2
  INVALID_FILESIZE              = 3
  INVALID_TYPE                  = 4
  NO_BATCH                      = 5
  UNKNOWN_ERROR                 = 6
  INVALID_TABLE_WIDTH           = 7
  GUI_REFUSE_FILETRANSFER       = 8
  CUSTOMER_ERROR                = 9
  NO_AUTHORITY                  = 10
     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.                    " CONVERT_XML
Thanks and Regards,
P.Madhusudhan Raju,

Similar Messages

  • Why we need to conver Context  Node data into XML file----Export to Excel

    Hi All,
    Let me clarify my dought........today i have gone through the concept of  "Exporting Context Data Using the Webdynpro Binary cache" in SAP Online Help.
    From the SAP Online Help pdf document, i have found that, the context node data has been converted first in to XML file,after that file had been stored in the web dynpor binary cache...bla....bla.........
    Here my qtn is why they had converted context node data into XML file. With out doing that can not we export context node data to excel file..?
    Regards
    Seshu
    Edited by: Sesshanna D on Dec 19, 2007 7:25 AM

    Hi Sesshanna,
    it is not neccessary to do that but xml has the advantage, that it can be easily transformed into every output format that might occur in later project stages.
    If it's simply about blowing out some Excel, I suggest using an OSS library such as jexcelAPI or Jakarta POI and building the Excel how you need it.
    regards,
    Christian

  • Methods in bapi used to convert data into XML

    Methods in bapi used to convert data into XML,
    how to implement those also,
    points will be rewarded
    Thank you,
    Regards,
    Jagrut BharatKumar Shukla

    Hi
    Check this
    http://www.sap-img.com/abap/sample-xml-source-code-for-sap.htm
    https://forums.sdn.sap.com/click.jspa?searchID=2889167&messageID=3406594
    Reward points for useful Answers
    Regards
    Anji

  • How to Convert internal table data into xml and xml data into internal tab

    Hi Guys,
          I have a requirement  that  i have to convert the internal table data into xml format and viceversa . for my requirement  i came to know that i have to use Transformations concept.  i done the converting the data from internal table into xml data by using standard Tranformations. My Question is 
    1) Can i use same Transformation to convert the xml data into abap internal table. if it is possible then how ???
    2) Is it possible using the standard Transformation  or I have to go for XSLT approach
    Please help me out from this guys,
    Thanks and Regards
    Koti

    Hi Koti,
    This is possible. There is a link. With the help of this link you can convert ABAP data to XML and vice versa.
    Link: http://www.heidoc.net/joomla/index.php?option=com_content&view=article&id=15:sapxslt&catid=22:sap-xslt&Itemid=31

  • How to download internal table data into xml file?

    Hi,
    Experts,
    I have downloaded internal table data into XLS format using GUI_DOWNLOAD Function module, But i didn't Know how to download internal table data into XML format please post some ideas/inputs on this issue.
    Thank you,
    Shabeer ahmed.

    check this
    data : gd_repid type sy-repid.
    GD_REPID = SY-REPID.
    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.
    data : l_element           type ref to if_ixml_element,
           xml_ns_prefix_sf     type string,
           xml_ns_uri_sf        type string.
    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.
    CALL FUNCTION 'SDIXML_DATA_TO_DOM'
    EXPORTING
       NAME = 'REPAIRDATA'
       DATAOBJECT = IT_FINAL_LAST1[]
    IMPORTING
       DATA_AS_DOM = L_DOM
    CHANGING
       DOCUMENT = M_DOCUMENT
    EXCEPTIONS
       ILLEGAL_NAME = 1
       OTHERS = 2.
    CHECK NOT L_DOM IS INITIAL.
    W_RC = M_DOCUMENT->APPEND_CHILD( NEW_CHILD = L_DOM ).
    *Start of code for Header
    * namespace
    t_mnr = sy-datum+4(2).
    CALL FUNCTION 'IDWT_READ_MONTH_TEXT'
      EXPORTING
        LANGU         = 'E'
        MONTH         = t_mnr
    IMPORTING
       T247          = wa_t247
    concatenate sy-datum+6(2)
                wa_t247-ktx
                sy-datum(4) into t_var1.
    concatenate sy-uzeit(2)
                sy-uzeit+2(2)
                sy-uzeit+4(2) into t_var2.
    clear : xml_ns_prefix_sf,
            xml_ns_uri_sf.
    l_element  = m_document->get_root_element( ).
    xml_ns_prefix_sf = 'TIMESTAMP'.
    concatenate t_var1 t_var2 into xml_ns_uri_sf separated by space.
    clear : t_var1,
            t_var2,
            t_mnr,
            wa_t247.
    l_element->set_attribute( name  = xml_ns_prefix_sf
                              namespace = ' '
                              value = xml_ns_uri_sf ).
    clear : xml_ns_prefix_sf,
            xml_ns_uri_sf.
    xml_ns_prefix_sf  = 'FILECREATOR'.
    xml_ns_uri_sf    =   'SAP'.
    l_element->set_attribute( name  = xml_ns_prefix_sf
                              namespace = ' '
                              value = xml_ns_uri_sf ).
    clear : xml_ns_prefix_sf,
            xml_ns_uri_sf.
    xml_ns_prefix_sf  = 'CLAIMGROUP'.
    xml_ns_uri_sf    = '1'.
    l_element->set_attribute( name  = xml_ns_prefix_sf
                              namespace = ' '
                              value = xml_ns_uri_sf ).
    clear : xml_ns_prefix_sf,
            xml_ns_uri_sf.
    xml_ns_prefix_sf  = 'CLAIMTYPES'.
    xml_ns_uri_sf    = 'W'.
    l_element->set_attribute( name  = xml_ns_prefix_sf
                              namespace = ' '
                              value = xml_ns_uri_sf ).
    *End of Code for Header
    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.
    LOOP AT IT_XML INTO XML_TAB-D.
    APPEND XML_TAB.
    ENDLOOP.
    *Start of Code for File name
    concatenate p_file
                '\R'
                '000_119481'
                sy-datum+6(2) sy-datum+4(2) sy-datum+2(2)
                sy-uzeit(2)   sy-uzeit+2(2) sy-uzeit(2) '.xml' into p_file.
    *End of Code for File name
    CALL FUNCTION 'WS_DOWNLOAD'
    EXPORTING
      BIN_FILESIZE = W_SIZE
      FILENAME = p_file
      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.

  • Can any body tell me how to pull SAP-CRM data into BW

    Hi BW guru`s,
    Does anybody tell me how to pull SAP-CRM data into BW.
    Is there any configuaration setings takes place in CRM system or BW system?
    Provide few of CRM datasources names (Transaction data Datasources)
    Please explain indetail and give some examples.
    Thanks in advance,
    venkat

    Hi.......
    SAP CRM uses BW Adapter to extract data from SAP CRM and send it to SAP Business Information Warehouse and SAP NetWeaver Business Intelligence. For mBDocs, BW Adapter extracts objects for CRM business transactions and CRM billing use the BAdI CRM_BWA_MFLOW. However, in releases prior to SAP CRM 2005, after using transaction code RSA5 to activate business content in SAP CRM, you must use transaction code BWA5 to activate the business content for the BW Adapter.
    Check this link :
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f2910623-0c01-0010-de8f-d1926988a986
    Hope this helps you.........
    Regards,
    Debjani........

  • SSM 7.0 - Copy SAP BI data into PAS or Create Dim. Model viewing BI Data

    I am using SSM 7.0 with SAP BI.  Is there some best practice / direction / comments on making a decision between:
    #1 - Duplicate SAP BI data into PAS Dimensional Model
    - Create an InfoCube in SAP BI
    - Create the model connection required by BI Connection
    - Copy the required SAP BW/BI InfoCube information into a PAS Model using the BI Connector
    - Create KPIs based on this model connection
    or
    #2 - Make SAP BI data visible in PAS Dimensional Model (no data stored in PAS)
    - Create an InfoCube in SAP BI
    - Create a Dimensional Model based on this InfoCube using a Link ID and the SCHEMA commands
    - Create a model connection to make data in InfoCube available in SSM
    - Create KPIs based on this model connection
    My thinking is that if the volume of data is low then not actually having to go to the trouble of duplicating the data in SSM would work well - with the benefit that the information is updated as soon as the SAP BI InfoCube is updated.
    (At the moment I have tried #2 but so far not failed to create an KPIs - I am wondering if the Key Figures in the InfoCube need to use a particular naming standard)

    Hi Mark,
    See the link below for a Best practice document that is available here in SDN. Although you can use queries that already exist in BW, it is usually better to create new queries adjusted to the kind of information you want to provide in SM. There are a few rules you need to follow when creating such queries, but there is actually no naming convention for its Key-Figures.
    [Best Practiceu2026 The BI Connector in SSM 7.0|https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/701b8da0-3135-2b10-929d-936e43164b06]
    Hope this helps!
    Ricardo

  • Getting Data INTO XML

    I'm trying to create a class to build an XML file from data that I'm setting inside the class. I'm using a ContentHandler to put the data into a SAXParser. Now I need to use a transformer to put the data into XML. My problem is, it's calling for an InputSource as a SAXSource and I'm not sure how to get the data from the ContentHandler to an InputSource. Can anyone help me with this? I've tried the tutorial and it wasn't much help.
    Linda Shaffer

    You are sending a stream of SAX events to your ContentHandler? By which I mean, you are calling its startElement() method and so on? If so, then here's some code that I use to transform that virtual XML via XSLT:TransformerHandler handler = // a TransformerHandler using that XSLT
    handler.setResult(new StreamResult(whereverYourOutputGoes));
    SAXParserFactory spf = SAXParserFactory.newInstance();
    XMLReader reader = spf.newSAXParser().getXMLReader();
    reader.setContentHandler(handler);
    reader.setProperty("http://xml.org/sax/properties/lexical-handler", handler);
    reader.setFeature("http://xml.org/sax/features/namespaces", true);
    reader.setFeature("http://xml.org/sax/features/namespace-prefixes", false);That's all. The TransformerHandler object is the one on which you should be calling startDocument() and so on; as soon as you call endDocument(), the transformation and output will take place.
    If you aren't transforming, just outputting, then use an identity TransformerHandler.

  • Extract the classification data into internal table

    Hi all,
    I having requirement to extract classification data for material number.
    1) Provide the selection option for material number (MATNR).
    2) Based on the material number, then extract all that data into internal table as below layout. My problem is how to retrieve the following data from different table based on the MATNR (material number).
    Please provide the sample code for select the following data. Thanks.
    Classification table
    OBJEK  (from AUSP table)
    MAFID (from AUSP table)
    KLART (from AUSP table)
    CLASS  (from KLAH table)
    ATWRT (from AUSP table)
    MSEHI  (from CABN table)
    OBTAB (check if class type=002, set it as “MARA”)
    STDCL (from KSSK table)

    Hi,
    if I understand, you´re trying to get information from the classification system for the material. You can use the following code:
    DATA: clases LIKE TABLE OF sclass WITH HEADER LINE,
          datos LIKE TABLE OF clobjdat WITH HEADER LINE.
    CALL FUNCTION 'CLAF_CLASSIFICATION_OF_OBJECTS'
         EXPORTING
              class              = 'DESK'               "clase a buscar
              classtype          = '001'                "tipo de la clase
              features           = 'X'
              language           = sy-langu
              object             = 'PM00A000C055'       "Material
              objecttable        = 'MARA'
              key_date           = sy-datum
              initial_charact    = 'X'
              change_service_clf = 'X'
         TABLES
              t_class            = clases
              t_objectdata       = datos
         EXCEPTIONS
              no_classification  = 1
              no_classtypes      = 2
              invalid_class_type = 3
              OTHERS             = 4.
    loop at datos.
    endloop.

  • How to write data into xml through web service

    Hi,
      I have a requirement to write the data into xml through a web service .send me related links and sample code if any.

    hi kiran,
      write the data into xml : We need suitable set of java Beans for handling WebService Data.
       However, there are cases when you may prefer an alternate mapping, or when there just isn't a well-defined mapping for your particular schema construct (xsd:choice is a common example). For these cases, IBM® WebSphere® has introduced a new feature called Custom Data Binding that allows you to integrate alternate data binding technologies like JAX-B, EMF/SDO and XML beans, as well to define your own XML schema to Java mappings. This article provides an overview of the technology and how you can get started integrating it into your application.
    GO THru THis Links :
    http://www-128.ibm.com/developerworks/websphere/library/
    techarticles/0601_gallardo/0601_gallardo.html.
    Hope It Helps.
    Thanks
    Varun CN

  • Outbound oracle data into xml file

    Hi Odie,
    Your previous inputs for xml inbound was working fine, in the similar way now I need outbound the oracle apps data into .xml file format. For that I've written one sample script like this. I thought of making use of the utl_file option in Oracle apps.
    declare
    l_log_handle UTL_FILE.FILE_TYPE;
    l_log_name varchar2(50);
    l_path_2 varchar2(40);
    l_global_file varchar2(50);
    l_time number:=1;
    cursor cur1 is
    select xmltype(cursor(select * from fnd_menus where rownum <101)) a from dual;
    --select menu_id from fnd_menus where rownum<100;
    begin
    BEGIN
    SELECT DECODE (INSTR (VALUE, ','),
    0, VALUE,
    SUBSTR (VALUE, 1, (INSTR (VALUE, ',', 1)) - 1)
    INTO l_path_2
    FROM v$parameter
    WHERE NAME = 'utl_file_dir';
    EXCEPTION
    WHEN OTHERS THEN
    dbms_output.put_line('Error while getting Unix Path ' || SQLERRM);
    END;
    l_log_name := 'XGBIZ_'||TO_CHAR (SYSDATE, 'YYMMDD')||l_time;
    l_log_name := CONCAT(l_log_name,'.xml');
    l_global_file := l_log_name;
    l_log_handle := UTL_FILE.FOPEN(l_path_2,l_log_name,'W');
    for cur2 in cur1 loop
    UTL_FILE.PUT_LINE(l_log_handle, cur2);
    end loop;
    utl_file.fclose_all;
    EXCEPTION
    WHEN UTL_FILE.INVALID_OPERATION THEN
    dbms_output.put_line('Invalid Operation For '|| l_global_file);
    UTL_FILE.FCLOSE_ALL;
    WHEN UTL_FILE.INVALID_PATH THEN
    dbms_output.put_line('Invalid Path For '|| l_global_file);
    UTL_FILE.FCLOSE_ALL;
    WHEN UTL_FILE.INVALID_MODE THEN
    dbms_output.put_line('Invalid Mode For '|| l_global_file);
    UTL_FILE.FCLOSE_ALL;
    WHEN UTL_FILE.INVALID_FILEHANDLE THEN
    dbms_output.put_line('Invalid File Handle '|| l_global_file);
    UTL_FILE.FCLOSE_ALL;
    WHEN UTL_FILE.WRITE_ERROR THEN
    dbms_output.put_line('Invalid Write Error '|| l_global_file);
    UTL_FILE.FCLOSE_ALL;
    WHEN UTL_FILE.READ_ERROR THEN
    dbms_output.put_line('Invalid Read Error '|| l_global_file);
    UTL_FILE.FCLOSE_ALL;
    WHEN UTL_FILE.INTERNAL_ERROR THEN
    dbms_output.put_line('Internal Error');
    UTL_FILE.FCLOSE_ALL;
    WHEN OTHERS THEN
    dbms_output.put_line('Other Error '||'SQL CODE: '||SQLCODE||' Messg: '||SQLERRM);
    UTL_FILE.FCLOSE_ALL;
    end;
    when running this script I am getting error
    ERROR at line 30:
    ORA-06550: line 30, column 2:
    PLS-00306: wrong number or types of arguments in call to 'PUT_LINE'
    ORA-06550: line 30, column 2:
    PL/SQL: Statement ignored
    if in the cursor declaration happen to use 'select menu_id from fnd_menus ' a plain record then it is successfully creating.
    If tried again revert to actual select statement ' select xmltype(cursor(select * from fnd_menus where rownum <101)) a from dual'
    then its erring out as above said.
    Please give me your valuable inputs in this regard.
    Thanks & Regards
    Nagendra

    Hi,
    There are multiple ways to generate XML documents from relational data.
    Here are some :
    -- SQL/XML functions : XMLElement, XMLAgg, XMLAttributes etc.
    -- DBMS_XMLGEN package
    select dbms_xmlgen.getXML('SELECT * FROM scott.emp')
    from dual;-- XMLType constructor over a REF CURSOR (the one you chose)
    select xmlserialize(document
             xmltype(
               cursor(
                 select *
                 from scott.emp
             as clob
    from dual;-- From a DBUriType
    select xmlserialize(document
             dburitype('/SCOTT/EMP').getXML()
             as clob
    from dual;-- From XQuery using ora:view function
    select xmlserialize(document
             xmlquery('<ROWSET>{ora:view("SCOTT","EMP")}</ROWSET>' returning content)
             as clob indent size = 1
    from dual;If a column is NULL in the result set, those methods (except XMLElement) won't create the corresponding element.
    There's an option available for the XQuery method, but only in version 11.2.
    So if you want to output empty elements, you'll have to use DBMS_XMLGEN with setNullHandling method :
    DECLARE
    ctx   DBMS_XMLGEN.ctxHandle;
    v_out CLOB;
    rc    SYS_REFCURSOR;
    BEGIN
    OPEN rc FOR
      SELECT *
      FROM scott.emp
    ctx := DBMS_XMLGEN.newContext(rc);
    DBMS_XMLGEN.setNullHandling(ctx, DBMS_XMLGEN.EMPTY_TAG);
    v_out := DBMS_XMLGEN.getXML(ctx);
    DBMS_XMLGEN.closeContext(ctx);
    CLOSE rc;
    DBMS_XSLPROCESSOR.clob2file(v_out, 'TEST_DIR', 'test_out.xml');
    END;
    I thought of making use of the utl_file option in Oracle apps.You could, but you might find DBMS_XSLPROCESSOR.clob2file procedure more convenient for that (see above).
    All you have to do is serializing the XML in a CLOB variable, and call the procedure.
    WHERE NAME = 'utl_file_dir';The "utl_file_dir" init. parameter is deprecated since 10g, use directory objects instead.

  • How to Extract Huge SAP HR Data into Excel?

    Dear Experts & Gurus,
    Need your Valuable suggestions regarding this scenario.
    I need to extract entire SAP HR data, modules are OM,PA,TM,PY and PD into Excel sheets because our clients are migrating to other ERP. The data volume is very huge, as they are using SAP since 14years. Can we use se16 to extract the data , will it able to handle in extracting the data from HR Tables or any other standard ways to extract this huge data without any dumps or errors .
    Appreciate if you provide some useful suggestions or tips  for this scenario.
    Thank you.
    Regards
    Vicky

    Dear Liran,
    Thanks a lot for your valuable suggestions.its really given an brief idea now.
    First:
    What's the purpose of this data download?
    Do you wish to transfer the data from SAP into the new ERP system? Or do you need the download as a backup?
    Yes , Transfer the data from SAP to New ERP system, it is not for Backup.
    IDOCS/ALE from SAP to New ERP?
    Second
    I think Payroll results stored in cluster tables, so here we need Abaper to write program. For OM , PA and TM can we extract via Se16/ Se16n .
    Thank you very much in advance.
    Regards
    Vicky

  • Extract BI Query data into a file

    Guys,
    I need to extract BI Query Data to a csv or a flat file and place it in Application Server.
    I tried using RSCRM_BAPI, but i get a pop-up message "Invalid file path".
    Any help would be highly appreciated.
    thanks, Ravi

    Hi,
    Give correct Path in Application Server Use AL11 to see the path, take authorizations on AL11 and set it.
    https://websmp103.sap-ag.de/~sapdownload/011000358700004400232004E/HowToRSCRM_BAPI.pdf
    Re: Running Quaries automatically and saving them in as a Excel file in Server
    Re: Data transfer to external systems
    Re: Loading from a Custom R/3 Table
    Re: How can I schedule my Bex report to execute in background
    Re: How can I insert the RSCRM_BAPI into Process chain?
    Thanks
    Reddy

  • How to extract Hierarchical Master data into flatfile

    Hello Experts,
    I have a requirement to extract Master data (Texts, Attr, Hierarchies)  of all Info Objects pertaining to a given Infocube ( say BoxA)
    I am aware that I can manually dump the data / use infospoke to get data into flatfile without hassle in case of texts/attributes.
    (1)But I doubt it for hierchical data. In case of hierarchical data I have to create an ABAP code to extract master data.
    Below is the link I got when I am searching SDN.
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/0403a990-0201-0010-38b3-e1fc442848cb?quicklink=index&overridelayout=true
    But I didnt understand it the mechanism behind the extraction.
    Can anyone please give me a detailed explanation on how to do it or some other reference documents.
    Note: I am going to use that master data and import that again into different box ( say BoxB) and there is no connection between two systems (BoxA and BoxB).
    Thanks.
    Edited by: saptrain on Mar 18, 2010 12:24 AM
    Edited by: saptrain on Mar 18, 2010 12:32 AM
    Edited by: saptrain on Mar 18, 2010 4:18 AM

    Hi,
    You can use the Program Z_SAP_HIERARCHY_DOWNLOAD to download as flat file. Upload this flat file into another system.
    Regards
    Arnab

  • Exporting xmltype table data into xml/txt file

    I want to export data stored in oracle as xmltype table into xml format file.
    I want to use alternatives to the method shown below as my xml file is large.
    set long 10000000
    spool c:\\StudentXMLJan08.xml
    SELECT
    XMLElement("Student",
    XMLForest(s.studentid "studentid",
    s.firstname "firstname",
    s.lastname "surname"),
    XMLElement("enrollments",
    (SELECT XMLAGG(
    XMLForest(sc.coursecode "courseid"))
    FROM studentcourse sc
    WHERE sc.studentid = s.studentid
    and sc.is_approved='Y'
    and sc.takenyear='2008'
    and sc.takenterm='1')))
    FROM student s
    where s.statuscode in (select studentstatuscode from studentstatus where studentstatusactive=1)
    order by s.studentid;
    spool off
    please help, thank you

    How's this one for size
    SQL> create or replace view DEPARTMENT_XML of xmltype
      2  with object id
      3  (
      4    'DEPARTMENT'
      5  )
      6  as
      7  select xmlElement
      8         (
      9           "Departments",
    10           (
    11             select xmlAgg
    12                    (
    13                      xmlElement
    14                      (
    15                      "Department",
    16                      xmlAttributes( d.DEPARTMENT_ID as "DepartmentId"),
    17                      xmlElement("Name", d.DEPARTMENT_NAME),
    18                      xmlElement
    19                      (
    20                        "Location",
    21                        xmlForest
    22                        (
    23                           STREET_ADDRESS as "Address", CITY as "City", STATE_PROVINCE as "State",
    24                           POSTAL_CODE as "Zip",COUNTRY_NAME as "Country"
    25                        )
    26                      ),
    27                      xmlElement
    28                      (
    29                        "EmployeeList",
    30                        (
    31                          select xmlAgg
    32                                 (
    33                                   xmlElement
    34                                   (
    35                                     "Employee",
    36                                     xmlAttributes ( e.EMPLOYEE_ID as "employeeNumber" ),
    37                                     xmlForest
    38                                     (
    39                                       e.FIRST_NAME as "FirstName", e.LAST_NAME as "LastName", e.EMAIL as "EmailAddre
    ss",
    40                                       e.PHONE_NUMBER as "Telephone", e.HIRE_DATE as "StartDate", j.JOB_TITLE as "Job
    Title",
    41                                       e.SALARY as "Salary", m.FIRST_NAME || ' ' || m.LAST_NAME as "Manager"
    42                                     ),
    43                                     xmlElement ( "Commission", e.COMMISSION_PCT )
    44                                   )
    45                                 )
    46                            from HR.EMPLOYEES e, HR.EMPLOYEES m, HR.JOBS j
    47                           where e.DEPARTMENT_ID = d.DEPARTMENT_ID
    48                             and j.JOB_ID = e.JOB_ID
    49                             and m.EMPLOYEE_ID = e.MANAGER_ID
    50                        )
    51                      )
    52                    )
    53                  )
    54             from HR.DEPARTMENTS d, HR.COUNTRIES c, HR.LOCATIONS l
    55            where d.LOCATION_ID = l.LOCATION_ID
    56              and l.COUNTRY_ID  = c.COUNTRY_ID
    57           )
    58         )
    59    from dual
    60  /
    View created.
    SQL> create or replace trigger DEPARTMENT_DML
      2  instead of INSERT or UPDATE or DELETE
      3  on DEPARTMENT_XML
      4  begin
      5    null;
      6  end;
      7  /
    Trigger created.
    SQL> declare
      2    cursor getDepartments is
      3      select ref(d) XMLREF
      4        from DEPARTMENT_XML d;
      5    res boolean;
      6    targetFolder varchar2(1024) :=  '/public/Departments';
      7  begin
      8    if dbms_xdb.existsResource(targetFolder) then
      9       dbms_xdb.deleteResource(targetFolder,dbms_xdb.DELETE_RECURSIVE_FORCE);
    10    end if;
    11    res := dbms_xdb.createFolder(targetFolder);
    12    for dept in getDepartments loop
    13      res := DBMS_XDB.createResource(targetFolder || '/Departments.xml', dept.XMLREF);
    14    end loop;
    15  end;
    16  /
    PL/SQL procedure successfully completed.
    SQL> select path
      2    from path_view
      3   where equals_path(RES,'/public/Departments/Departments.xml') = 1
      4  /
    PATH
    /public/Departments/Departments.xml
    SQL> select xdburitype('/public/Departments/Departments.xml').getXML()
      2    from dual
      3  /
    XDBURITYPE('/PUBLIC/DEPARTMENTS/DEPARTMENTS.XML').GETXML()
    <Departments>
      <Department DepartmentId="60">
        <Name>IT</Name>
        <Location
    SQL> quit
    Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    C:\Temp>ftp localhost
    Connected to mdrake-lap.
    220- mdrake-lap
    Unauthorised use of this FTP server is prohibited and may be subject to civil and criminal prosecution.
    220 mdrake-lap FTP Server (Oracle XML DB/Oracle Database) ready.
    User (mdrake-lap:(none)): SCOTT
    331 pass required for SCOTT
    Password:
    230 SCOTT logged in
    ftp> cd /public/Departments
    250 CWD Command successful
    ftp> ls -l
    200 EPRT Command successful
    150 ASCII Data Connection
    -rw-r--r--   1 SCOTT    oracle         0 NOV 10 20:18 Departments.xml
    226 ASCII Transfer Complete
    ftp: 71 bytes received in 0.01Seconds 7.10Kbytes/sec.
    ftp> get Departments.xml -
    200 EPRT Command successful
    150 ASCII Data Connection
    <Departments><Department DepartmentId="60"><Name>IT</Name><Location><Address>2014 Jabberwocky Rd</Address><City>Southlak
    e</City><State>Texas</State><Zip>26192</Zip><Country>United States of America</Country></Location><EmployeeList><Employe
    e employeeNumber="103"><FirstName>Alexander</FirstName><LastName>Hunold</LastName><EmailAddress>AHUNOLD</EmailAddress><T
    elephone>590.423.4567</Telephone><StartDate>2006-01-03</StartDate><JobTitle>Programmer</JobTitle><Salary>9000</Salary><M
    anager>Lex De Haan</Manager><Commission></Commission></Employee><Employee employeeNumber="105"><FirstName>David</FirstNa
    me><LastName>Austin</LastName><EmailAddress>DAUSTIN</EmailAddress><Telephone>590.423.4569</Telephone><StartDate>2005-06-
    25</StartDate><JobTitle>Programmer</JobTitle><Salary>4800</Salary><Manager>Alexander Hunold</Manager><Commission></Commi
    ssion></Employee><Employee employeeNumber="106"><FirstName>Valli</FirstName><LastName>Pataballa</LastName><EmailAddress>
    VPATABAL</EmailAddress><Telephone>590.423.4560</Telephone><StartDate>2006-02-05</StartDate><JobTitle>Programmer</JobTitl
    e><Salary>4800</Salary><Manager>Alexander Hunold</Manager><Commission></Commission></Employee><Employee employeeNumber="
    107"><FirstName>Diana</FirstName><LastName>Lorentz</LastName><EmailAddress>DLORENTZ</EmailAddress><Telephone>590.423.556
    7</Telephone><StartDate>2007-02-07</StartDate><JobTitle>Programmer</JobTitle><Salary>4200</Salary><Manager>Alexander Hun
    old</Manager><Commission></Commission></Employee><Employee employeeNumber="104"><FirstName>Bruce</FirstName><LastName>Er
    nst</LastName><EmailAddress>BERNST</EmailAddress><Telephone>590.423.4568</Telephone><StartDate>2007-05-21</StartDate><Jo
    bTitle>Programmer</JobTitle><Salary>6000</Salary><Manager>Alexander Hunold</Manager><Commission></Commission></Employee>
    </EmployeeList></Department><Department DepartmentId="50"><Name>Shipping</Name><Location><Address>2011 Interiors Blvd</A
    ddress><City>South San Francisco</City><State>California</State><Zip>99236</Zip><Country>United States of America</Count
    ry></Location><EmployeeList><Employee employeeNumber="120"><FirstName>Matthew</FirstName><LastName>Weiss</LastName><Emai
    lAddress>MWEISS</EmailAddress><Telephone>650.123.1234</Telephone><StartDate>2004-07-18</StartDate><JobTitle>Stock Manage
    r</JobTitle><Salary>8000</Salary><Manager>Steven King</Manager><Commission></Commission></Employee><Employee employeeNum
    ber="122"><FirstName>Payam</FirstName><LastName>Kaufling</LastName><EmailAddress>PKAUFLIN</EmailAddress><Telephone>650.1
    23.3234</Telephone><StartDate>2003-05-01</StartDate><JobTitle>Stock Manager</JobTitle><Salary>7900</Salary><Manager>Stev
    en King</Manager><Commission></Commission></Employee><Employee employeeNumber="121"><FirstName>Adam</FirstName><LastName
    Fripp</LastName><EmailAddress>AFRIPP</EmailAddress><Telephone>650.123.2234</Telephone><StartDate>2005-04-10</StartDate><JobTitle>Stock Manager</JobTitle><Salary>8200</Salary><Manager>Steven King</Manager><Commission></Commission></Employee
    <Employee employeeNumber="124"><FirstName>Kevin</FirstName><LastName>Mourgos</LastName><EmailAddress>KMOURGOS</EmailAddress><Telephone>650.123.5234</Telephone><StartDate>2007-11-16</StartDate><JobTitle>Stock Manager</JobTitle><Salary>5800<
    /Salary><Manager>Steven King</Manager><Commission></Commission></Employee><Employee employeeNumber="123"><FirstName>Shan
    ta</FirstName><LastName>Vollman</LastName><EmailAddress>SVOLLMAN</EmailAddress><Telephone>650.123.4234</Telephone><Start
    Date>2005-10-10</StartDate><JobTitle>Stock Manager</JobTitle><Salary>6500</Salary><Manager>Steven King</Manager><Commiss
    ion></Commission></Employee><Employee employeeNumber="128"><FirstName>Steven</FirstName><LastName>Markle</LastName><Emai
    lAddress>SMARKLE</EmailAddress><Telephone>650.124.1434</Telephone><StartDate>2008-03-08</StartDate><JobTitle>Stock Clerk
    </JobTitle><Salary>2200</Salary><Manager>Matthew Weiss</Manager><Commission></Commission></Employee><Employee employeeNu
    mber="127"><FirstName>James</FirstName><LastName>Landry</LastName><EmailAddress>JLANDRY</EmailAddress><Telephone>650.124
    .1334</Telephone><StartDate>2007-01-14</StartDate><JobTitle>Stock Clerk</JobTitle><Salary>2400</Salary><Manager>Matthew
    Weiss</Manager><Commission></Commission></Employee><Employee employeeNumber="126"><FirstName>Irene</FirstName><LastName>
    Mikkilineni</LastName><EmailAddress>IMIKKILI</EmailAddress><Telephone>650.124.1224</Telephone>
    <StartDate>2002-06-07</St
    artDate><JobTitle>Public Relations Representative</JobTitle><Salary>10000</Salary><Manager>Neena Kochhar</Manager><Commi
    ssion></Commission></Employee></EmployeeList></Department></Departments>226 ASCII Transfer Complete
    ftp: 40392 bytes received in 0.08Seconds 480.86Kbytes/sec.
    ftp>

Maybe you are looking for

  • 10.6.8 unusable after Security Update

    I've talked to The AppleWorks group but without resolution: my iMac with 10.6.8 ran well until the latest Security Update (2012-001  vs. 1.1) Now AppleWorks won't run properly (under Rosetta). I can save nothing ("Unexpected error occurred #-51"). I

  • IMAC 27"original internalHard drive serial no

    iMac 27"(SN: C02J51ATDHJP) My internal Hard drive (ST31000528AS) and OPTIARC DVD RW AD-5690H was original built in iMac product or replacement of refurbished? how can I look for built in my iMac Hardware serial numbers? I want to check my hardware de

  • (V7.3)NEW FEATURES ABOUT OPTIMIZATION IN RELEASE 7.2 & 7.3

    제품 : ORACLE SERVER 작성날짜 : 2003-02-24 (V7.3)NEW FEATURES ABOUT OPTIMIZATION IN RELEASE 7.2 & 7.3 ========================================================== PURPOSE Oracle RDBMS V7.2와 V7.3에서 Optimization에 관한 new feature를 알아보기로 한다. Explanation 다음과 같은 대표

  • HT204370 what do you do when A preordered movie wont download and says it has already downloaded?

    what do you do when a preordered movie says you cant reorder it when you never got it?

  • Testing oracle apps security in reports

    Hi, I have a report which is running fine in Report builder 6i and also in Oracle apps(this is a customized report for oracle apps). Now I need to test the security in Oracle apps. As per the advice provided in metalink I added 1) added a user parame