Create XML-IDOC from outgoing invoice data

Hi!
A customer would like to get informations from our invoice with XML. The XML-file should be a XML-IDOC. Can I create this file by printing the invoice?  Is there a function module to create the XML?
Thanks
Markus

>
Markus Deutschmann wrote:
> Can you explane your solution a little bit more?
> Wher ecan I create a XML-Port?
Check tcode for creating ports : WE21.

Similar Messages

  • Create XML file from table data

    Dear All,
    with dataservice 4.0, I want to create an XML file from a table data.
    Table have a single column but more record, for example:
    0001000488;100;EUR;
    0001000489;200;EUR;
    0001000450;300;EUR;
    My desired XML output:
    <Data>
      0001000488;100;GBP;
      0001000489;200;EUR;
      0001000450;300;EUR;
    </Data>
    I try with a sample query but the sistem write only the last record in XML file:
    <Data>
      0001000450;300;EUR;
    </Data>
    Can everyone help me?
    Thank in advance.
    Simone

    Hello
    That is a very simple (also odd) XML document structure, and as such doesn't require use of the XML target.  It can be easily acheived by writing a normal file with a header and footer, which is acheived using a row_generation and a query to generate the hard coded open and close tags.
    Michael

  • How to create Inbound Idoc from XML file-Need help urgently

    Hi,
    can any one tell how to create inbound Idoc from XML file.
    we have xml file in application server Ex. /usr/INT/SMS/PAYTEXT.xml'  we want to generate inbound idoc from this file.we are successfully able to generate outbound XML file from outbound Idoc by using the XML port. But not able to generate idoc from XML file by using we19 or we16.
    Please let me know the process to trigger inbound Idoc with out using  XI and any other components.
    Thanks in advance
    Dora Reddy

    Hi .. Did either of you get a result on this?
    My question is the same really .. I am testing with WE19 and it seems SAP cannot accept an XML inbound file as standard.
    I see lots of mention of using a Function Module.
    Am I correct in saying therefore that ABAP development is required to create a program to run the FM and process the idoc?
    Or is there something tht can be done with Standard SAP?
    Thanks
    Lee

  • Create XML file from ABAP with SOAP Details

    Hi,
    I am new to XML and I am not familiar with JAVA or Web Service. I have searched in SDN and googled for a sample program for creating XML document from ABAP with SOAP details. Unfortunately I couldn't find anything.
    I have a requirement for creating an XML file from ABAP with SOAP details. I have the data in the internal table. There is a Schema which the client provided and the file generated from SAP should be validating against that Schema. Schema contains SOAP details like Envelope, Header & Body.
    My question is can I generate the XML file using CALL TRANSFORMATION in SAP with the SOAP details?
    I have tried to create Transformation (Transaction XSLT_TOOL) in SAP with below code. Also in CALL transformation I am not able to change the encoding to UTF-8. It's always show UTF-16.
    <xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:sap="http://www.sap.com/sapxsl" version="1.0">
      <xsl:template match="/">
        <SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
          <SOAP:Header>
            <CUNS:HeaderInfo>
              <CUNS:InterfaceTypeId>10006</InterfaceTypeId>
              <CUNS:BusinessPartnerID>11223344</BusinessPartnerID>
              <CUNS:SchemaVersion>1.0</SchemaVersion>
              <CUNS:DateTime>sy-datum</DateTime>
            </CUNS:HeaderInfo>
          </SOAP:Header>
          <SOAP:Body>
            <xsl:copy-of select="*"/>
          </SOAP:Body>
        </SOAP:Envelope>
      </xsl:template>
    </xsl:transform>
    In ABAP program, I have written below code for calling above Transformation.
      call transformation ('Z_ID')
           source tab = im_t_output[]
           result xml xml_out.
      call function 'SCMS_STRING_TO_FTEXT'
        exporting
          text      = xml_out
        tables
          ftext_tab = ex_t_xml_data.
    Please help me how to generate XML file with SOAP details from ABAP. If anybody have a sample program, please share with me.
    Is there any easy way to create the XML file in CALL Transformation. Please help.
    Thanks

    Try ABAP forum, as it seems not to be PI related.

  • Create XML file from internal table and vise a versa

    Hi Friends,
    I have requirement to create an XML string from internal table data and also read XML string data to internal table.
    Can anybody tell are there any Function Modules or methods existing for this?
    Thanks.
    Krishna Yerram.

    1. Write XSLT program. T.code XSLT . e.g. XSLT name "ZTRANS".
    2. Write ABAP program
    Which includes declaration of internal tables
    that you need "IT_DATA".
    Upload XML data to an internal table "IT_XML "
    use below statement to convert XML to internal table.
    Call transformation ZTRANS
    source XML IT_XML
    result IT_DATA.

  • Heap space error while creating XML document from Resultset

    I am getting Heap space error while creating XML document from Resultset.
    It was working fine from small result set object but when the size of resultset was more than 25,000, heap space error
    I am already using -Xms32m -Xmx1024m
    Is there a way to directly write to xml file from resultset instead of creating the whole document first and then writing it to file? Code examples please?
    here is my code:
    stmt = conn.prepareStatement(sql);
    result = stmt.executeQuery();
    result.setFetchSize(999);
    Document doc = JDBCUtil.toDocument(result, Application.BANK_ID, interfaceType, Application.VERSION);
    JDBCUtil.write(doc, fileName);
    public static Document toDocument(ResultSet rs, String bankId, String interfaceFileType, String version)
        throws ParserConfigurationException, SQLException {
            DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
            DocumentBuilder builder = factory.newDocumentBuilder();
            Document doc = builder.newDocument();
            Element results = doc.createElement("sims");
            results.setAttribute("bank", bankId);
            results.setAttribute("record_type", "HEADER");
            results.setAttribute("file_type", interfaceFileType);
            results.setAttribute("version", version);
            doc.appendChild(results);
            ResultSetMetaData rsmd = rs.getMetaData();
            int colCount = rsmd.getColumnCount();
            String columnName="";
            Object value;
            while (rs.next()) {
                Element row = doc.createElement("rec");
                results.appendChild(row);
                for (int i = 1; i <= colCount; i++) {
                    columnName = rsmd.getColumnLabel(i);
                    value = rs.getObject(i);
                    Element node = doc.createElement(columnName);
                    if(value != null)
                        node.appendChild(doc.createTextNode(value.toString()));
                    else
                        node.appendChild(doc.createTextNode(""));
                    row.appendChild(node);
            return doc;
    public static void write(Document document, String filename) {
            //long start = System.currentTimeMillis();
            // lets write to a file
            OutputFormat format = new OutputFormat(document); // Serialize DOM
            format.setIndent(2);
            format.setLineSeparator(System.getProperty("line.separator"));
            format.setLineWidth(80);
            try {
                FileWriter writer = new FileWriter(filename);
                BufferedWriter buf = new BufferedWriter(writer);
                XMLSerializer FileSerial = new XMLSerializer(writer, format);
                FileSerial.asDOMSerializer(); // As a DOM Serializer
                FileSerial.serialize(document);
                writer.close();
            } catch (IOException ioe) {
                ioe.printStackTrace();
            //long end = System.currentTimeMillis();
            //System.err.println("W3C File write time :" + (end - start) + "  " + filename);
        }

    you can increase your heap size..... try setting this as your environment variable.....
    variable: JAVA_OPTS
    value: -Xms512m -Xmx1024m -XX:PermSize=256m -XX:MaxPermSize=512m

  • Creating XML file from Java Bean

    Hi
    Are there any standard methods in Java 1.5 to create XML file from java bean,
    i can use JAXB or castor to do so,
    But i would like to know if there is any thing in java core classes,
    I have seen XMLEncoder, but this is not what i want.
    Any ideas
    Ashish

    Marshall JavaBean to an XML document with JAXB or XMLBeans.

  • How to create xml file from Oracle and sending the same xml file to an url

    How to create xml file from Oracle and sending the same xml file to an url

    SQL/XML (XMLElement, XMLForest, XMLAgg, etc) and UTL_HTTP.
    Whether that works for you with the version of Oracle you have, your requirements, and needs is another story. A little detail goes a long way.

  • Terms of payment(75 days net from the invoice date.payme25 th of the month)

    Hi
    I need to configure the below payment term
    "75 days net from the invoice date, payment 25 th of the month"
    Please suggest  me.
    Regards
    Prasad

    "75 days net from the invoice date, payment 25 th of the month"
    you cann try this
    Tcode OBB8
    Default baseline date = Document date
    Payment terms
    Term 1:- Fixed date= 25
                  Additional months=2

  • Creating XML file from ABAP internal table data....

    Hello,
    I am fethcing data froma  custom table and I have to write data in XMl format. Following is the XML format in which I want data. Is there any function module iN SAP which will help me in writing data from internal table to XML file ?
    <batch>
      <invoice>
        <StatusCode>10</StatusCode>
        <paymentamount>122.00</paymentamount>
         <ReferenceNumber>70980934</ReferenceNumber>
      </invoice>
      <invoice>
         <StatusCode>90</StatusCode>
        <paymentamount>122.00</paymentamount>
         <ReferenceNumber>70980934</ReferenceNumber>
      </invoice>
      <control>
        <InvoiceCount>2</InvoiceCount>
      </control>
    </batch>
    Please help.
    Regards,
    Jainam.

    I suggest you look into "simple transformations". That's SAP's most recent technology for such purposes, as far as I know.
    http://help.sap.com/abapdocu_70/en/ABENABAP_ST.htm
    Thomas

  • JDBC to Idoc mapping - create multiple Idocs from 1 JDBC input

    I am importing data using JDBC and I want to put the data in an IDoc on a SAP system.  my data is about 100,000 rows, but my Idoc (ZIDOC) is defined as 1-35,000 for the segments.  I have followed Ossnote 814393, and also set up my Interface Mapping to use my JDBC source and the Idoc as the target.  In my Message Mapping, i use the source as my JDBC Message Type, and the target is my External Definition Idoc (changed to be 1 to unbounded). 
    My incoming JDBC mapping is:
    JDBCinput     (1:1)
      -row            (0...Unbounded)
          -part        (1:1)
          -unit        (1:1)
          -type       (1:1)
    my outgoing Idoc (from external definition) is:
    ZIDOC           (1:1)
      -IDOC          (1...Unbounded)
         -Begin       (required)
         -EDI_DC40  (1:1)
         -Zsegment   (1...35,000)
            -part        (1:1)
            -unit        (1:1)
            -type       (1:1)
    I currently map JDBCinput = ZIDOC and IDOC,  row = Zsegment, and the rest of the rows match. 
    When I use this mapping, my first 35,000 rows from my JDBC input gets mapped to ZIDOC with 35,000 segments, but the remaining 65,00 rows from my JDBC input just seem to be lost, as only this one ZIDOC is created.  I would expect to see 3 Idocs created, 2 with 35,000 segments each, and the 3rd Idoc created with 30,000 segments.
    Does anyone know what I need to change to get this mapping to work and create the extra needed Idocs?  Can this be done with out using a BPM?
    Any guidance? 
    Thanks
    Jake

    HI,
    Just try out with context change and check if it works
    In this type of case, it is easy to use Java mapping so that you can generate target structures as you like.
    Hope this helps,
    Regards,
    moorthy

  • Generate multiple XML files from one Invoices file in AR Selected Invoices

    I have converted our Oracle EBS 11i Selected Invoice RAXINV.rdf to XML and created a template for XML Bursting. I'm bursting fine at the:
    /ZRAXINV/LIST_G_ORDER_BY/G_ORDER_BY/LIST_G_CF_NO/G_CF_NO. My question is since I'm writing out my pdf output invoices to the filesystem on Sharepoint; I also need to archive the XML part of each invoice broken down by the same group as .//LIST_G_CF_NO/G_CF_NO. When I convert the rdf to XML it produces one XML file from which I created the templates.
    My requirement is to archive both the individual invoices from the templates and the corresponding XML pieces on Sharepoint so that we will be able to search and link the xml to the pdf written out to the filesystem on Sharepoint.
    Any idea how should go about this requirement will be much appreciated.
    Thanks,
    Leo

    So how does it take this file
    file>
    <statement>
    <name>John Dow </name>
    <address>123 Main</address>
    <phone>972-213-3434</phone>
    </statement>
    <statement>
    <name>Jane Dow </name>
    <address>345 Main</address>
    <phone>972-213-3534</phone>
    </statement>
    <statement>
    <name>Marry Dow </name>
    <address>678 Main</address>
    <phone>972-213-3435</phone>
    </statement>
    </file>
    and create these three different one?
    1.)
    <statement>
    <name>John Dow </name>
    <address>123 Main</address>
    <phone>972-213-3434</phone>
    </statement>
    2.)
    <statement>
    <name>Jane Dow </name>
    <address>345 Main</address>
    <phone>972-213-3534</phone>
    </statement>
    3.)
    <statement>
    <name>Marry Dow </name>
    <address>678 Main</address>
    <phone>972-213-3435</phone>
    </statement>
    Is it not going to just grab each element after the file tag? I'm just confused about that.

  • Please Help. Trying to create XML file from 2 tables.

    Step1: Target XML format
    Created an XML
    <DEPART>
    <DEPARTMENT_ID>10</DEPARTMENT_ID>
    <DEPARTMENT_NAME>Administration</DEPARTMENT_NAME>
    <MANAGER_ID>200</MANAGER_ID>
    <LOCATION_ID>1700</LOCATION_ID>
    <EMP><EMPLOYEE_ID>100</EMPLOYEE_ID>
    <FIRST_NAME>Steven</FIRST_NAME>
    <LAST_NAME>King</LAST_NAME>
    <SALARY>24000</SALARY>
    </EMP>
    </DEPART>Step 2. Created a target data server from the above mentioned xml. Specified the logical and physical schema.
    Step3.Logged into Designer and reverse engineered from the the schema created in step2.
    step 4. Following Hierarchy is created
    DEPART
    --> EMP
    Step 5. Reverse engineered 2 tables from oraclexe (HR ) Schema
    Employees
    Departments
    Step 6. Created an interface and made DEPART from step 4 as target
    and Departments from step 5 as source.
    Step 7. Staging area is different to the target.
    step 8. modified the IKM SQL Control Append to write to a file
    create xmlfile #filename from schema DEPART
    Step 9. Changed the DEPART PK Column in the TARGET to 0
    Step 10. File is created.
    Problem:
    1. When i view the file it has all the departments but the employees are also displayed eventhough i haven't done the mapping.
    2. All the employees are listed under every department.
    Please help as i have tried everything. I know i am missing something somewhere.
    Thanks a lot for reading it.
    Alvinder
    Edited by: alvinder on Jun 30, 2010 5:29 PM

    Hi Alvindar,
    Thanks u posted good issue,
    Can u clarify this about how your issue got ressolved. I am also trying with same XML as you have pasted here. I have following doubts.
    While setting up XML data server the ro option i have deleted as defalut value is false which allows both read/write & its look like this
    jdbc:snps:xml?f=../demo/XML/EMPDEPT.xml&s=SCH_EMPDEPT.
    I have mapped and written create XML commands in commit section of IKM which looks like this :CREATE XMLFILE #ExportXMLFileLoc FROM SCHEMA SCH_FLDEPT
    created the interface and executed,it went through fine,4 rows data transformed into target xml data store,file is generated in the given path .
    But in the generated file is same as which have EMPDEPT.xml with data change,but in the target xml data store depart i am able to view newly inserted records.
    i want generate an output xml for each of the target of the XML data store, how we can do that please explain me.
    this is my xml
    <?xml version="1.0" encoding="UTF-8"?>
    <REQUEST>
    <DEPART>
    <DEPARTMENT_ID>10</DEPARTMENT_ID>
    <DEPARTMENT_NAME>Admin</DEPARTMENT_NAME>
    <MANAGER_ID>200</MANAGER_ID>
    <LOCATION_ID>1700</LOCATION_ID>
    </DEPART>
    </REQUEST>
    tried only with DEPART table.
    Waiting for ur repply,
    Thanks,
    MNK

  • How to create xml file from relational tables in 10gR2

    Hi,
    I am very new to XML and was wondering how to create an XML file from querying relational tables. Some child tables may contain multiple rows that need to be returned in certain instances. Other queries will just be single or multiple rows from one or more tables. I would like to use the latest feathers in 10gR2. Thanks for any help you can provide.
    Thanks,
    Lee

    Here is the first row of data created from our person table - it used the column names as the tag names:
    <?xml version="1.0"?>
    <ROWSET>
         <ROW>
              <MP_ID_SEQ>289</MP_ID_SEQ>
              <MP_NAME>LOBERG,JUDITH LEE</MP_NAME>
              <MP_SEX>F</MP_SEX>
              <MP_RACE>I</MP_RACE>
              <MP_DOB>19500709</MP_DOB>
              <MP_HT>504</MP_HT>
              <MP_WT>170</MP_WT>
              <MP_EYE_CLR>BLU</MP_EYE_CLR>
              <MP_HAIR_CLR>BRO</MP_HAIR_CLR>
              <MP_SKN>RUD</MP_SKN>
              <MP_SMT>POCKMARKS</MP_SMT>
              <MP_SOC>517607968</MP_SOC>
              <MP_OLN>517607968</MP_OLN>
              <MP_OLS>MT</MP_OLS>
              <MP_OLY>2007</MP_OLY>
              <MP_CAUT_MED>70</MP_CAUT_MED>
              <MP_VISION_SCRIPT>C0RRECTIVE LENSES</MP_VISION_SCRIPT>
              <MP_DNA_AVAIL>N</MP_DNA_AVAIL>
              <CREATED_BY>MMPS</CREATED_BY>
              <DTM_CREATED>31-AUG-06</DTM_CREATED>
              <MI_INC_ID_SEQ>288</MI_INC_ID_SEQ>
              <MP_ALERT>N</MP_ALERT>
         </ROW>

  • Want to create XML tag from the query

    Here i want to create a xml output from the below code for the given P_repair_number can anyone help me for the code i have written
    ORA-06502: PL/SQL: numeric or value error: character to number conversion error
    facing the above error when run from concurrent program
    Procedure dfdfdf(p_repair_number number,
                              errbuf        OUT VARCHAR2,
                              retcode       OUT NUMBER) as
    v_error_code NUMBER; -- error code
      v_error_message VARCHAR2(255); -- error message
      v_text_msg VARCHAR2(100);
    cursor Rodetails(p_repair_number IN NUMBER) is
    SELECT
      dra.repair_number,
      dra.repair_line_id,
      items.concatenated_segments item_name,
      items.description item_desc,
      dra.inventory_item_id,
      sr.incident_number sr_incident_number,
      decode(dra.customer_product_id, '',dra.serial_number,cp.serial_number) serial_number,
      ltrim(oeh.order_number) rma_number,
      rstl.resource_name ro_owner_name,
      fndl.meaning flow_status_name,
      dra.status ro_status_code,
      drtt.name repair_type_name,
      dra.problem_description,
      dra.promise_date,
      rgtl.group_name repair_org_name,
      decode(dra.customer_product_id, '',dra.item_revision,cp.inventory_revision) revision,
      cp.lot_number,
      dra.unit_of_measure uom_code,
      uom.unit_of_measure_tl uom_name,
      dra.quantity,
      cp.instance_number ib_instance_number,
      plkup.meaning ro_priority_meaning
    FROM
      csd_repairs dra,
      csd_repair_types_tl drtt,  
      cs_incidents_all_b sr,
      csi_item_instances cp,
      fnd_lookups fndl, 
      csd_flow_statuses_b fsb,
      mtl_system_items_kfv items,
      mtl_units_of_measure_tl uom,
      jtf_rs_resource_extns_tl rstl,
      jtf_rs_groups_tl rgtl,
      oe_order_headers_all oeh,
      cs_estimate_details edt,
      csd_product_transactions txns,
      fnd_lookups plkup 
    WHERE dra.repair_type_id =  drtt.repair_type_id
      AND drtt.language = userenv('LANG')
      AND dra.repair_mode = 'WIP'
      AND dra.incident_id = sr.incident_id
      AND dra.CUSTOMER_PRODUCT_ID = cp.INSTANCE_ID(+)
      AND dra.flow_status_id = fsb.flow_status_id
      AND fsb.flow_status_code = fndl.lookup_code
      AND fndl.lookup_type = 'CSD_REPAIR_FLOW_STATUS'
      AND dra.inventory_item_id = items.inventory_item_id
      AND dra.unit_of_measure = uom.uom_code
      AND uom.language = userenv('LANG')
      AND dra.resource_id = rstl.resource_id (+)
      AND rstl.category (+) = 'EMPLOYEE'
      AND rstl.language (+) = userenv('LANG')
      AND dra.owning_organization_id = rgtl.group_id (+)
      AND rgtl.language (+) = userenv('LANG')
      AND dra.repair_line_id = txns.repair_line_id
      AND txns.estimate_detail_id = edt.estimate_detail_id
      AND edt.order_header_id = oeh.header_id
      AND edt.line_category_code = 'RETURN'
      AND dra.currency_code = oeh.transactional_curr_code
      AND dra.ro_priority_code = plkup.lookup_code(+)
      AND plkup.lookup_type(+) = 'CSD_RO_PRIORITY' 
      AND items.organization_id = cs_std.get_item_valdn_orgzn_id
      AND dra.repair_number=p_repair_number
      AND rownum <50;
    begin
    errbuf := NULL;
    retcode := 0;
      SAVEPOINT Create_external_orders;
      --retcode             := FND_API.G_RET_STS_SUCCESS;
      IF (fnd_log.level_procedure >= fnd_log.g_current_runtime_level) THEN
        fnd_log.STRING (fnd_log.level_procedure, 'CSD.PLSQL.XXTNT_CSD_CREATEORDER.SUBMIT_CREATE_ORDER.BEGIN', 'Enter - PrintTraveller');
      END IF;
    --FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<?xml version="1.0"?>');
    --FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<REPAIR_ORDER>');
    FOR v_rodetails IN Rodetails(p_repair_number)
    LOOP
    /*For each record create a group tag <G_RODETAILS> at the start*/
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<?xml version="1.0"?>');
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<REPAIR_ORDER>');
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<G_RODETAILS>');
      FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<REPAIR_NUMBER>' || v_rodetails.repair_number ||
                                       '</REPAIR_NUMBER>');
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<REPAIR_LINE_ID>' || v_rodetails.repair_line_id
                                    || '</REPAIR_LINE_ID>');
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<ITEM_NAME>' || v_rodetails.ITEM_NAME
                                     ||'</ITEM_NAME>');
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<ITEM_DESC>' || v_rodetails.ITEM_DESC
                                    || '</ITEM_DESC>');
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<SR_INCIDENT_NUMBER>' || v_rodetails.SR_INCIDENT_NUMBER ||
                                       '</SR_INCIDENT_NUMBER>');
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<SERIAL_NUMBER>' ||v_rodetails.SERIAL_NUMBER
                                     ||'</SERIAL_NUMBER>');                               
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<RMA_NUMBER>' || v_rodetails.RMA_NUMBER
                                    || '</RMA_NUMBER>');
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<RO_OWNER_NAME>' ||v_rodetails.RO_OWNER_NAME ||
                                       '</RO_OWNER_NAME>');
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<FLOW_STATUS_NAME>' || v_rodetails.FLOW_STATUS_NAME
                                     ||'</FLOW_STATUS_NAME>');                                
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<RO_STATUS_CODE>' || v_rodetails.RO_STATUS_CODE
                                    || '</RO_STATUS_CODE>');
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<REPAIR_TYPE_NAME>' || v_rodetails.REPAIR_TYPE_NAME ||
                                       '</REPAIR_TYPE_NAME>');
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<PROBLEM_DESCRIPTION>' || v_rodetails.PROBLEM_DESCRIPTION
                                     ||'</PROBLEM_DESCRIPTION>');
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<PROMISE_DATE>' || v_rodetails.PROMISE_DATE
                                    || '</PROMISE_DATE>');
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<RO_OWNER_NAME>' || v_rodetails.RO_OWNER_NAME ||
                                       '</RO_OWNER_NAME>');
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<REPAIR_ORG_NAME>' || v_rodetails.REPAIR_ORG_NAME
                                     ||'</REPAIR_ORG_NAME>');                                
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<RO_STATUS_CODE>' || v_rodetails.RO_STATUS_CODE
                                    || '</RO_STATUS_CODE>');
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<REVISION>' || v_rodetails.REVISION ||
                                       '</REVISION>');
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<LOT_NUMBER>' || v_rodetails.LOT_NUMBER
                                     ||'</LOT_NUMBER>');
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<UOM_CODE>' || v_rodetails.UOM_CODE
                                    || '</UOM_CODE>');
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<UOM_NAME>' ||v_rodetails.UOM_NAME ||
                                       '</UOM_NAME>');
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<QUANTITY>' || v_rodetails.QUANTITY
                                     ||'</QUANTITY>');                                
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<IB_INSTANCE_NUMBER>' || v_rodetails.IB_INSTANCE_NUMBER
                                    || '</IB_INSTANCE_NUMBER>');
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<RO_PRIORITY_MEANING>' || v_rodetails.RO_PRIORITY_MEANING ||
                                       '</RO_PRIORITY_MEANING>');
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'</G_RODETAILS>');                             
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'</REPAIR_ORDER>');                                
    END LOOP;
    IF(retcode != FND_API.G_RET_STS_SUCCESS) THEN
                    RAISE FND_API.G_EXC_ERROR;
                  END IF;
                  IF (fnd_log.level_procedure >= fnd_log.g_current_runtime_level) THEN
                    fnd_log.STRING (fnd_log.level_statement, 'CSD.PLSQL.XXTNT_CSD_CREATEORDER.SUBMIT_CREATE_ORDER', ' In PrintTraveller');
                  END IF;
    fnd_file.put_line(fnd_file.log, 'Successfully completed PrintTraveller');
    EXCEPTION
    || Catch all error.
    WHEN OTHERS THEN
    ROLLBACK;
    v_error_code := SQLCODE;
    v_text_msg := 'Fatal Error, Oracle Error is: '
    || TO_CHAR (v_error_code, '99999');
    fnd_file.put_line (fnd_file.log, v_text_msg);
    v_error_message := SQLERRM;
    fnd_file.put_line (fnd_file.log, v_error_message);   
    end dfdfdf;Edited by: user12053530 on Apr 19, 2010 5:54 AM

    However using SYS.ODCIVARCHAR2LIST makes sense if your query is a part of bigger processing (PL/SQL procedure or function) and you will do some processing depending on File_Type, like in this example (not compiled, could contain syntax errors):
    DECLARE
      l_stid           VARCHAR2(10);
      l_address        VARCHAR2(30);
      l_File_Type_tab  SYS.ODCIVARCHAR2LIST;
      cur_cursor IS SELECT STID,
                    ADDRESS,
                    CAST(COLLECT(DISTINCT File_Type) AS SYS.ODCIVARCHAR2LIST) AS File_Type
                    FROM (
                          SELECT STID,
                                 ADDRESS,
                                 File_Type
                            FROM DUMMY
                    GROUP BY STID, ADDRESS;
    BEGIN
      OPEN cur_cursor;
      <<main_loop>>
      WHILE (1=1) LOOP
         FETCH cur_cursor INTO l_stid, l_address, l_File_Type_tab;
         EXIT WHEN cur_cursor%NOTFOUND;
         -- Now do processing for each File_Type in l_File_Type_tab;
         <<each_file_type>>
         FOR i IN l_File_Type_tab.FIRST .. l_File_Type_tab.LAST LOOP
           -- for example:
           -- IF l_File_Type_tab(i) = 'SALES'
           -- THEN
           --   do_something(l_stid, l_address);
           -- ELSIF l_File_Type_tab(i) = 'TRANSFER'
           -- THEN
           --   do_something_else(l_stid, l_address);
           -- ELSE
           --   do_something_default(l_stid, l_address);
           -- END IF;
         END LOOP each_file_type;
      END LOOP main_loop;
      CLOSE cur_cursor;
    END;

Maybe you are looking for