Reading "TypeRecorder" .kbd files
Is there any program (TextEdit?) - which can read the .kbd files created by the program TypeRecorder? I am a registered used of TypeRecorder, but sometimes want to open the files (text) without having TypeRecorder installed on that computer.
Thanks,
Steve Wednesday 29 November 2006 at 13:03
I don't have a sample file to test, but you might want to try the text editor TextWrangler, which is free and can open/read just about anything.
Similar Messages
-
Open and read from text file into a text box for Windows Store
I wish to open and read from a text file into a text box in C# for the Windows Store using VS Express 2012 for Windows 8.
Can anyone point me to sample code and tutorials specifically for Windows Store using C#.
Is it possible to add a Text file in Windows Store. This option only seems to be available in Visual C#.
Thanks
WendelThis is a simple sample for Read/Load Text file from IsolateStorage and Read file from InstalledLocation (this folder only can be read)
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Windows.Storage;
using System.IO;
namespace TextFileDemo
public class TextFileHelper
async public static Task<bool> SaveTextFileToIsolateStorageAsync(string filename, string data)
byte[] fileBytes = System.Text.Encoding.UTF8.GetBytes(data);
StorageFolder local = Windows.Storage.ApplicationData.Current.LocalFolder;
var file = await local.CreateFileAsync(filename, CreationCollisionOption.ReplaceExisting);
try
using (var s = await file.OpenStreamForWriteAsync())
s.Write(fileBytes, 0, fileBytes.Length);
return true;
catch
return false;
async public static Task<string> LoadTextFileFormIsolateStorageAsync(string filename)
StorageFolder local = Windows.Storage.ApplicationData.Current.LocalFolder;
string returnvalue = string.Empty;
try
var file = await local.OpenStreamForReadAsync(filename);
using (StreamReader streamReader = new StreamReader(file))
returnvalue = streamReader.ReadToEnd();
catch (Exception ex)
// do somthing when exception
return returnvalue;
async public static Task<string> LoadTextFileFormInstalledLocationAsync(string filename)
StorageFolder local = Windows.ApplicationModel.Package.Current.InstalledLocation;
string returnvalue = string.Empty;
try
var file = await local.OpenStreamForReadAsync(filename);
using (StreamReader streamReader = new StreamReader(file))
returnvalue = streamReader.ReadToEnd();
catch (Exception ex)
// do somthing when exception
return returnvalue;
show how to use it as below
async private void Button_Click(object sender, RoutedEventArgs e)
string txt =await TextFileHelper.LoadTextFileFormInstalledLocationAsync("TextFile1.txt");
Debug.WriteLine(txt);
在現實生活中,你和誰在一起的確很重要,甚至能改變你的成長軌跡,決定你的人生成敗。 和什麼樣的人在一起,就會有什麼樣的人生。 和勤奮的人在一起,你不會懶惰; 和積極的人在一起,你不會消沈; 與智者同行,你會不同凡響; 與高人為伍,你能登上巔峰。 -
Issue with reading a xml file from xsl
Hi,
When I am trying to read a xml file from xsl, I am getting unwanted output.
Following is the XSL:
<?xml version="1.0" encoding="UTF-8" ?>
<?oracle-xsl-mapper
<!-- SPECIFICATION OF MAP SOURCES AND TARGETS, DO NOT MODIFY. -->
<mapSources>
<source type="XSD">
<schema location="../xsd/B2BMarketProperties.xsd"/>
<rootElement name="ReceipentIDType" namespace="http://www.example.org"/>
</source>
</mapSources>
<mapTargets>
<target type="XSD">
<schema location="../xsd/B2BMarketProperties.xsd"/>
<rootElement name="ReceipentIDType" namespace="http://www.example.org"/>
</target>
</mapTargets>
<!-- GENERATED BY ORACLE XSL MAPPER 11.1.1.4.0(build 110106.1932.5682) AT [TUE DEC 03 16:06:03 EST 2013]. -->
?>
<xsl:stylesheet version="1.0"
xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
xmlns:xp20="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.Xpath20"
xmlns:mhdr="http://www.oracle.com/XSL/Transform/java/oracle.tip.mediator.service.common.functions.MediatorExtnFunction"
xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
xmlns:oraext="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.ExtFunc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ns0="http://www.example.org"
xmlns:dvm="http://www.oracle.com/XSL/Transform/java/oracle.tip.dvm.LookupValue"
xmlns:hwf="http://xmlns.oracle.com/bpel/workflow/xpath"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:med="http://schemas.oracle.com/mediator/xpath"
xmlns:ids="http://xmlns.oracle.com/bpel/services/IdentityService/xpath"
xmlns:bpm="http://xmlns.oracle.com/bpmn20/extensions"
xmlns:xdk="http://schemas.oracle.com/bpel/extension/xpath/function/xdk"
xmlns:xref="http://www.oracle.com/XSL/Transform/java/oracle.tip.xref.xpath.XRefXPathFunctions"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:ora="http://schemas.oracle.com/xpath/extension"
xmlns:socket="http://www.oracle.com/XSL/Transform/java/oracle.tip.adapter.socket.ProtocolTranslator"
xmlns:ldap="http://schemas.oracle.com/xpath/extension/ldap"
exclude-result-prefixes="xsi xsl ns0 xsd bpws xp20 mhdr bpel oraext dvm hwf med ids bpm xdk xref ora socket ldap">
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
<xsl:variable name="ReceipentID" select="document('../xsd/B2BMarketProperties.xml')"/>
<xsl:template match="/">
<ns0:ReceipentIDType>
<xsl:for-each select="$ReceipentID">
<ns0:ReceipentID>
<xsl:value-of select="$ReceipentID"/>
</ns0:ReceipentID>
</xsl:for-each>
</ns0:ReceipentIDType>
</xsl:template>
</xsl:stylesheet>
Following is the XML ( B2BMarketProperties.xml)
<?xml version="1.0" encoding="UTF-8" ?>
<ReceipentIDType xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.example.org B2BMarketProperties.xsd"
xmlns="http://www.example.org">
<ReceipentID>123</ReceipentID>
<ReceipentID>345</ReceipentID>
</ReceipentIDType>
The output i am getting with this code is
<?xml version="1.0" encoding="UTF-8"?>
<ns0:ReceipentIDType xmlns:ns0="http://www.example.org">
<ns0:ReceipentID>123345</ns0:ReceipentID>
</ns0:ReceipentIDType>
But, I need output in the following format
<ns0:ReceipentIDType xmlns:ns0="http://www.example.org">
<ns0:ReceipentID>123</ns0:ReceipentID>
<ns0:ReceipentID>345</ns0:ReceipentID>
</ns0:ReceipentIDType>
Could you guys let me know what i am doing wrong. Any help would be appreciated.
Thanks,This worked for me :
<xsl:template match="/">
<ns0:ReceipentIDType>
<xsl:for-each select="document('B2BMarketProperties.xml')/*:ReceipentIDType/*:ReceipentID">
<xsl:variable name="count" select="position()"/>
<ns0:ReceipentID>
<xsl:value-of select="document('B2BMarketProperties.xml')/*:ReceipentIDType/*:ReceipentID[$count]"/>
</ns0:ReceipentID>
</xsl:for-each>
</ns0:ReceipentIDType>
</xsl:template> -
Hi Gurus,
I am dier need of one of the xml issue which I am facing right now.
I am reading one of the xml file which is like this
<?xml version="1.0" encoding="UTF-8" ?>
- <GEBIZ_ORDER xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <HEADER>
<MINISTRY_CODE>RPO</MINISTRY_CODE>
<DEPARTMENT_CODE>000</DEPARTMENT_CODE>
<ORDER_CODE>RPO000EPO11000953</ORDER_CODE>
<EXTERNAL_SYSTEM_CODE>E</EXTERNAL_SYSTEM_CODE>
<AMENDMENT_NUMBER>0</AMENDMENT_NUMBER>
<VARIATION_NUMBER>0</VARIATION_NUMBER>
<DESCRIPTION>Purchase Order for Air tickets for SOT to Korea (from 17th - 26th Sep 2011) off PC(RPO000ECN11000100)for SAS</DESCRIPTION>
<STATUS>NEW</STATUS>
<STATUS_DATE>2011-07-08T16:57:39</STATUS_DATE>
<PAYMENT_TERMS xsi:nil="true" />
<BILL_TO>One-Stop Centre, 9 Woodlands Avenue 9, S(738964)</BILL_TO>
<JUSTIFICATION>Please refer to attached approval email.</JUSTIFICATION>
<CREATE_TIMESTAMP>2011-07-08T16:57:39</CREATE_TIMESTAMP>
<TERMINATE_REASON xsi:nil="true" />
<TERMINATE_TIMESTAMP xsi:nil="true" />
<ORDER_TYPE>1</ORDER_TYPE>
- <FINANCIAL_SYSTEM>
<SUB_BUSINESS_UNIT>RPS01</SUB_BUSINESS_UNIT>
</FINANCIAL_SYSTEM>
- <SUPPLIER>
<CODE>200003048E</CODE>
<NAME>Safe2Travel Pte Ltd</NAME>
<GST_NUMBER>20-0003048-E</GST_NUMBER>
<CONTACT_NAME>ONG PEI LENG</CONTACT_NAME>
<CONTACT_PHONE>68233103</CONTACT_PHONE>
<CONTACT_EMAIL>[email protected]</CONTACT_EMAIL>
<CONTACT_FAX>68221636</CONTACT_FAX>
- <SITES>
- <SITE>
<ID>1</ID>
<NAME>ravel Pte Ltd</NAME>
<PHONE>68233013</PHONE>
<PHONE_EXTENSION xsi:nil="true" />
<FAX>68221636</FAX>
<EMAIL>[email protected]</EMAIL>
<ADDRESS_LINE1>10 Eunos Road 8</ADDRESS_LINE1>
<ADDRESS_LINE2>#08-03 (North Lobby)</ADDRESS_LINE2>
<ADDRESS_LINE3>Singapore Post Centre</ADDRESS_LINE3>
<COUNTRY_CODE>SG</COUNTRY_CODE>
<PROVINCE xsi:nil="true" />
<STATE xsi:nil="true" />
<CITY xsi:nil="true" />
<AREA_CODE xsi:nil="true" />
<ZIP>408600</ZIP>
<REGION_CODE xsi:nil="true" />
</SITE>
- <SITE>
<ID>2</ID>
<NAME>ravel Pte Ltd</NAME>
<PHONE>62208866</PHONE>
<PHONE_EXTENSION xsi:nil="true" />
<FAX>62265578</FAX>
<EMAIL>[email protected]</EMAIL>
<ADDRESS_LINE1>3 Lim Teck Kim Road</ADDRESS_LINE1>
<ADDRESS_LINE2>#02-02</ADDRESS_LINE2>
<ADDRESS_LINE3>Singapore Technologies Building</ADDRESS_LINE3>
<COUNTRY_CODE>SG</COUNTRY_CODE>
<PROVINCE xsi:nil="true" />
<STATE xsi:nil="true" />
<CITY xsi:nil="true" />
<AREA_CODE xsi:nil="true" />
<ZIP>088934</ZIP>
<REGION_CODE xsi:nil="true" />
</SITE>
- <SITE>
<ID>3</ID>
<NAME>Safe2Travel Pte Ltd</NAME>
<PHONE>62208866</PHONE>
<PHONE_EXTENSION xsi:nil="true" />
<FAX>62265578</FAX>
<EMAIL>[email protected]</EMAIL>
<ADDRESS_LINE1>3 Lim Teck Kim Road</ADDRESS_LINE1>
<ADDRESS_LINE2>#02-02</ADDRESS_LINE2>
<ADDRESS_LINE3>Singapore Technologies Building</ADDRESS_LINE3>
<COUNTRY_CODE>SG</COUNTRY_CODE>
<PROVINCE xsi:nil="true" />
<STATE xsi:nil="true" />
<CITY xsi:nil="true" />
<AREA_CODE xsi:nil="true" />
<ZIP>088934</ZIP>
<REGION_CODE xsi:nil="true" />
</SITE>
</SITES>
</SUPPLIER>
- <USER>
<CODE>JOYCE SOON</CODE>
<NAME>JOYCE SOON</NAME>
<ORGANISATION_NAME>Republic Polytechnic</ORGANISATION_NAME>
</USER>
- <FUND_COMMIT_AMOUNT>
<CURRENCY_CODE>SGD</CURRENCY_CODE>
<CURRENCY_RATE>1</CURRENCY_RATE>
<CURRENCY_RATE_DATE>1900-01-01T00:00:00</CURRENCY_RATE_DATE>
<CURRENCY_RATE_TYPE>BOOK</CURRENCY_RATE_TYPE>
<CURRENCY_AMOUNT>21551.4</CURRENCY_AMOUNT>
</FUND_COMMIT_AMOUNT>
- <PERIOD_CONTRACT>
<CODE>RPO000ECN11000100</CODE>
<AGENCY_CODE>RPO000</AGENCY_CODE>
<ADMIN_FEE_SGD_AMOUNT>0</ADMIN_FEE_SGD_AMOUNT>
</PERIOD_CONTRACT>
- <BUYER>
<ORGANISATION_CODE>1</ORGANISATION_CODE>
<ORGANISATION_NAME>Republic Polytechnic</ORGANISATION_NAME>
<NAME>Sally Ang</NAME>
<PHONE>31001711</PHONE>
<FAX>64151310</FAX>
<EMAIL>[email protected]</EMAIL>
</BUYER>
<APPROVING_OFFICERS />
</HEADER>
- <ITEMS>
- <ITEM>
<LINE_NUMBER>1</LINE_NUMBER>
<STATUS>NEW</STATUS>
<STATUS_DATE>2011-07-08T16:57:39</STATUS_DATE>
<DESCRIPTION>Return Air Ticket including Airport Taxes and Fuel Surcharges (2 staff and 24 students)</DESCRIPTION>
<UNIT_OF_MEASURE>PAX</UNIT_OF_MEASURE>
<QUANTITY>26</QUANTITY>
<LINE_TYPE>SERVICES</LINE_TYPE>
<UNIT_PRICE>828.9</UNIT_PRICE>
<PRICE_UNIT>1</PRICE_UNIT>
<TOTAL_AMOUNT>21551.4</TOTAL_AMOUNT>
<MATERIAL_MASTER_CODE xsi:nil="true" />
<MATERIAL_GROUP_CODE xsi:nil="true" />
<PLANT_CODE xsi:nil="true" />
<ITEM_CATEGORY_CODE xsi:nil="true" />
<ADMIN_FEE_SGD_AMOUNT>0</ADMIN_FEE_SGD_AMOUNT>
<INSTRUCTION_TO_SUPPLIER>Purchase of goods/services is subject to the Terms & Conditions found in www.rp.sg/purchase and/or in the ITQ/ITT Specifications. Please liaise with the Contact Person for delivery details. Invoice MUST be addressed to the Contact Person. PO number MUST be included in the Description field under e-Invoice Details section at Vendor@Gov.</INSTRUCTION_TO_SUPPLIER>
<PERIOD_CONTRACT_LINE_NUMBER>1</PERIOD_CONTRACT_LINE_NUMBER>
<GOODS_INSPECT_FLAG>N</GOODS_INSPECT_FLAG>
- <PURCHASE_REQUEST>
<CODE>RPO000EPR11000465</CODE>
<LINE_NUMBER>1</LINE_NUMBER>
</PURCHASE_REQUEST>
- <PART_NUMBER_INFORMATION>
<NATO_STOCK_NUMBER xsi:nil="true" />
<MANUFACTURER_PART_NUMBER xsi:nil="true" />
<PART_NUMBER xsi:nil="true" />
<CAGE_CODE xsi:nil="true" />
<CAGE_NAME xsi:nil="true" />
<ITEM_CONDITION xsi:nil="true" />
<MINIMUM_SHELF_LIFE xsi:nil="true" />
<SHELF_LIFE_REMAINING xsi:nil="true" />
<CERTIFICATE_OF_CONFORMANCE xsi:nil="true" />
<EXPORT_LICENSE xsi:nil="true" />
</PART_NUMBER_INFORMATION>
- <LOCATIONS>
- <LOCATION>
<LINE_NUMBER>1</LINE_NUMBER>
<STATUS>NEW</STATUS>
<STATUS_DATE>2011-07-08T16:57:39</STATUS_DATE>
<QUANTITY>26</QUANTITY>
<DELIVERY_DESTINATION>Republic Polytechnic, One-Stop Centre, 9 Woodlands Avenue 9, S(738964)</DELIVERY_DESTINATION>
<DELIVERY_DATE>2011-07-11T00:00:00</DELIVERY_DATE>
<DELIVERY_TERMS>LOC</DELIVERY_TERMS>
<PORT_OF_ORIGIN>-</PORT_OF_ORIGIN>
- <RECIPIENT>
<CODE>OSC</CODE>
<NAME>One Stop Centre</NAME>
<PHONE>65103000</PHONE>
<EMAIL>[email protected]</EMAIL>
</RECIPIENT>
- <DISTRIBUTIONS>
- <DISTRIBUTION>
<LINE_NUMBER>1</LINE_NUMBER>
<STATUS>NEW</STATUS>
<STATUS_DATE>2011-07-08T16:57:39</STATUS_DATE>
<QUANTITY>26</QUANTITY>
<CHART_OF_ACCOUNT>1/G01/3SAS/020/220908/0000/0000/0000</CHART_OF_ACCOUNT>
<PROJECT_DISTRIBUTION xsi:nil="true" />
</DISTRIBUTION>
</DISTRIBUTIONS>
</LOCATION>
</LOCATIONS>
</ITEM>
</ITEMS>
</GEBIZ_ORDER>I was able to read this kind of file structure but due to some constraints now they added supplier sites and increment that one which will be like variable kind of thing now.
And below mentioned is the script which I am using right now for reading that xml file
PROCEDURE XGBZPROD.XGBZ_PUR_ORD_XMLTAG_PROC(P_XML_FILE IN VARCHAR2, P_FOLDER_NAME IN VARCHAR2)
IS
lv_supp_file XMLTYPE;
lv_hdr_error VARCHAR2(240);
lv_line_error VARCHAR2(240);
lv_line_loc_err VARCHAR2(240);
lv_dist_err VARCHAR2(240);
l_file_name VARCHAR2(300);
l_folder_name VARCHAR2(300);
lv_sysdate DATE := sysdate;
BEGIN
l_file_name := p_xml_file;
l_folder_name := p_folder_name;
-- this clause to check whether is xml file or NODATA FILE.
IF upper(substr(l_file_name,instr(l_file_name,'.',1)+1,3)) ='XML' THEN
lv_supp_file := xmltype( bfilename('XMLDIR',P_XML_FILE), nls_charset_id('AL32UTF8'));
dbms_output.put_line('P_XML_FILE '||P_XML_FILE);
-- Initially insert data into 11g table
-- This is to read xml datafile
INSERT INTO XGBZ_PO_XML_DETAILS
(ministry_code ,
department_code ,
order_code ,
external_system_code ,
amendment_number ,
variation_number ,
description ,
status ,
status_date ,
payment_terms ,
bill_to ,
justification ,
create_timestamp ,
terminate_reason ,
terminate_timestamp ,
order_type ,
sub_business_unit ,
cost_center_group ,
buyer_code ,
financial_system_order_code ,
user_nric ,
supplier_code ,
supplier_name ,
gst_number ,
contact_name ,
contact_phone ,
contact_email ,
contact_fax ,
supp_site_id ,
supp_site_name ,
supp_site_phone ,
supp_sit_phone_ext ,
supp_site_fax ,
supp_site_email ,
supp_site_add_line1 ,
supp_site_add_line2 ,
supp_site_add_line3 ,
supp_site_country_code ,
supp_site_province ,
supp_site_state ,
supp_site_city ,
supp_site_area_code ,
supp_site_zip ,
supp_site_region_code ,
user_code ,
user_name ,
user_org_name ,
currency_code ,
currency_rate ,
currency_rate_date ,
currency_rate_type ,
currency_amount ,
tx_field_2 ,
agency_code ,
admin_fee_sgd ,
buyer_orgn_code ,
buyer_orgn_name ,
buyer_name ,
buyer_phone ,
buyer_fax ,
buyer_email ,
ao_code ,
ao_name ,
line_no ,
line_status ,
line_status_date ,
line_description ,
unit_of_measure ,
line_qty ,
line_type ,
unit_price ,
line_total_amount ,
material_master_code ,
material_group_code ,
item_category_code ,
line_admin_fee_sgd_amt ,
instruction_supplier ,
period_contract_line_no ,
goods_inspect_flag ,
pr_code ,
pr_line_number ,
nato_stock_number ,
manufacturer_part_no ,
part_number ,
cage_code ,
cage_name ,
item_condition ,
minimum_shelf_life ,
shelf_life_remaining ,
cert_of_conformance ,
export_license ,
line_location_no ,
line_loc_status ,
line_loc_status_date ,
line_loc_qty ,
delivery_destination ,
delivery_date ,
delivery_terms ,
port_of_origin ,
recipient_code ,
recipient_name ,
recipient_phone ,
recipient_email ,
dist_line_no ,
dist_line_status ,
dist_line_status_date ,
dist_line_qty ,
chart_of_account ,
project_distribution
SELECT --Header Data
ministry_code ,
department_code ,
order_code ,
external_system_code ,
amendment_number ,
variation_number ,
description ,
status ,
status_date ,
payment_terms ,
bill_to ,
justification ,
create_timestamp ,
terminate_reason ,
terminate_timestamp ,
order_type ,
sub_business_unit ,
cost_center_group ,
buyer_code ,
financial_system_order_code ,
user_nric ,
supplier_code ,
supplier_name ,
gst_number ,
contact_name ,
contact_phone ,
contact_email ,
contact_fax ,
supp_site_id ,
supp_site_name ,
supp_site_phone ,
supp_sit_phone_ext ,
supp_site_fax ,
supp_site_email ,
supp_site_add_line1 ,
supp_site_add_line2 ,
supp_site_add_line3 ,
supp_site_country_code ,
supp_site_province ,
supp_site_state ,
supp_site_city ,
supp_site_area_code ,
supp_site_zip ,
supp_site_region_code ,
user_code ,
user_name ,
user_org_name ,
currency_code ,
currency_rate ,
currency_rate_date ,
currency_rate_type ,
currency_amount ,
tx_field_2 ,
agency_code ,
admin_fee_sgd ,
buyer_orgn_code ,
buyer_orgn_name ,
buyer_name ,
buyer_phone ,
buyer_fax ,
buyer_email ,
ao_code ,
ao_name ,
line_no ,
line_status ,
line_status_date ,
line_description ,
unit_of_measure ,
line_qty ,
line_type ,
unit_price ,
line_total_amount ,
material_master_code ,
material_group_code ,
item_category_code ,
line_admin_fee_sgd_amt ,
instruction_supplier ,
period_contract_line_no ,
goods_inspect_flag ,
pr_code ,
pr_line_number ,
nato_stock_number ,
manufacturer_part_no ,
part_number ,
cage_code ,
cage_name ,
item_condition ,
minimum_shelf_life ,
shelf_life_remaining ,
cert_of_conformance ,
export_license ,
line_location_no ,
line_loc_status ,
line_loc_status_date ,
line_loc_qty ,
delivery_destination ,
delivery_date ,
delivery_terms ,
port_of_origin ,
recipient_code ,
recipient_name ,
recipient_phone ,
recipient_email ,
dist_line_no ,
dist_line_status ,
dist_line_status_date ,
dist_line_qty ,
chart_of_account ,
project_distribution
FROM XMLTable('/GEBIZ_ORDER'
passing lv_supp_file
columns
ministry_code VARCHAR2(3) path 'HEADER/MINISTRY_CODE',
department_code VARCHAR2(3) path 'HEADER/DEPARTMENT_CODE',
order_code VARCHAR2(17 ) path 'HEADER/ORDER_CODE',
external_system_code VARCHAR2(1) path 'HEADER/EXTERNAL_SYSTEM_CODE',
amendment_number VARCHAR2(5) path 'HEADER/AMENDMENT_NUMBER' ,
variation_number VARCHAR2(5) path 'HEADER/VARIATION_NUMBER',
description VARCHAR2(500) path 'HEADER/DESCRIPTION',
status VARCHAR2(500) path 'HEADER/STATUS',
status_date VARCHAR2(24) path 'HEADER/STATUS_DATE',
payment_terms VARCHAR2(400) path 'HEADER/PAYMENT_TERMS',
bill_to VARCHAR2(200) path 'HEADER/BILL_TO',
justification VARCHAR2(400) path 'HEADER/JUSTIFICATION',
create_timestamp VARCHAR2(24) path 'HEADER/CREATE_TIMESTAMP',
terminate_reason VARCHAR2(400) path 'HEADER/TERMINATE_REASON',
terminate_timestamp VARCHAR2(24) path 'HEADER/TERMINATE_TIMESTAMP',
order_type VARCHAR2(2 ) path 'HEADER/ORDER_TYPE',
sub_business_unit VARCHAR2(5 ) path 'HEADER/FINANCIAL_SYSTEM/SUB_BUSINESS_UNIT',
cost_center_group VARCHAR2(20 ) path 'HEADER/FINANCIAL_SYSTEM/NFS/COST_CENTER_GROUP',
buyer_code VARCHAR2(30 ) path 'HEADER/FINANCIAL_SYSTEM/NFS/BUYER_CODE',
financial_system_order_code VARCHAR2(20 ) path 'HEADER/FINANCIAL_SYSTEM/NFS/FINANCIAL_SYSTEM_ORDER_CODE',
user_nric VARCHAR2(9 ) path 'HEADER/FINANCIAL_SYSTEM/NFS/USER_NRIC',
supplier_code VARCHAR2(10) path 'HEADER/SUPPLIER/CODE',
supplier_name VARCHAR2(140) path 'HEADER/SUPPLIER/NAME' ,
gst_number VARCHAR2(30 ) path 'HEADER/SUPPLIER/GST_NUMBER',
contact_name VARCHAR2(140 ) path 'HEADER/SUPPLIER/CONTACT_NAME',
contact_phone VARCHAR2(23 ) path 'HEADER/SUPPLIER/CONTACT_PHONE',
contact_email VARCHAR2(100) path 'HEADER/SUPPLIER/CONTACT_EMAIL',
contact_fax VARCHAR2(23 ) path 'HEADER/SUPPLIER/CONTACT_FAX',
supp_site_id NUMBER path 'HEADER/SUPPLIER/SITES/SITE/ID',
supp_site_name VARCHAR2(140) path 'HEADER/SUPPLIER/SITES/SITE/NAME',
supp_site_phone VARCHAR2(23) path 'HEADER/SUPPLIER/SITES/SITE/PHONE',
supp_sit_phone_ext VARCHAR2(4 ) path 'HEADER/SUPPLIER/SITES/SITE/PHONE_EXTENSION',
supp_site_fax VARCHAR2(23 ) path 'HEADER/SUPPLIER/SITES/SITE/FAX',
supp_site_email VARCHAR2(100 ) path 'HEADER/SUPPLIER/SITES/SITE/EMAIL',
supp_site_add_line1 VARCHAR2(254 ) path 'HEADER/SUPPLIER/SITES/SITE/ADDRESS_LINE1',
supp_site_add_line2 VARCHAR2(35 ) path 'HEADER/SUPPLIER/SITES/SITE/ADDRESS_LINE2',
supp_site_add_line3 VARCHAR2(35 ) path 'HEADER/SUPPLIER/SITES/SITE/ADDRESS_LINE3',
supp_site_country_code VARCHAR2(2 ) path 'HEADER/SUPPLIER/SITES/SITE/COUNTRY_CODE',
supp_site_province VARCHAR2(25 ) path 'HEADER/SUPPLIER/SITES/SITE/PROVINCE',
supp_site_state VARCHAR2(25 ) path 'HEADER/SUPPLIER/SITES/SITE/STATE',
supp_site_city VARCHAR2(25 ) path 'HEADER/SUPPLIER/SITES/SITE/CITY',
supp_site_area_code VARCHAR2(10 ) path 'HEADER/SUPPLIER/SITES/SITE/AREA_CODE',
supp_site_zip VARCHAR2(20 ) path 'HEADER/SUPPLIER/SITES/SITE/ZIP',
supp_site_region_code VARCHAR2(3 ) path 'HEADER/SUPPLIER/SITES/SITE/REGION_CODE',
user_code VARCHAR2(16 ) path 'HEADER/USER/CODE',
user_name VARCHAR2(25 ) path 'HEADER/USER/NAME',
user_org_name VARCHAR2(95 ) path 'HEADER/USER/ORGANISATION_NAME',
currency_code VARCHAR2(3 ) path 'HEADER/FUND_COMMIT_AMOUNT/CURRENCY_CODE',
currency_rate NUMBER path 'HEADER/FUND_COMMIT_AMOUNT/CURRENCY_RATE',
currency_rate_date VARCHAR2(24) path 'HEADER/FUND_COMMIT_AMOUNT/CURRENCY_RATE_DATE',
currency_rate_type VARCHAR2(5 ) path 'HEADER/FUND_COMMIT_AMOUNT/CURRENCY_RATE_TYPE',
currency_amount NUMBER path 'HEADER/FUND_COMMIT_AMOUNT/CURRENCY_AMOUNT',
tx_field_2 VARCHAR2(17 ) path 'HEADER/PERIOD_CONTRACT/CODE',
agency_code VARCHAR2(6 ) path 'HEADER/PERIOD_CONTRACT/AGENCY_CODE',
admin_fee_sgd NUMBER path 'HEADER/PERIOD_CONTRACT/ADMIN_FEE_SGD_AMOUNT' ,
buyer_orgn_code VARCHAR2(5 ) path 'HEADER/BUYER/ORGANISATION_CODE',
buyer_orgn_name VARCHAR2(95 ) path 'HEADER/BUYER/ORGANISATION_NAME',
buyer_name VARCHAR2(80 ) path 'HEADER/BUYER/NAME',
buyer_phone VARCHAR2(23 ) path 'HEADER/BUYER/PHONE',
buyer_fax VARCHAR2(23 ) path 'HEADER/BUYER/FAX',
buyer_email VARCHAR2(100 ) path 'HEADER/BUYER/EMAIL',
ao_code VARCHAR2(16 ) path 'HEADER/APPROVING_OFFICERS/APPROVING_OFFICER/CODE',
ao_name VARCHAR2(40 ) path 'HEADER/APPROVING_OFFICERS/APPROVING_OFFICER/NAME',
items XMLTYPE path 'ITEMS'
) x1,
XMLTABLE('/ITEMS/ITEM'
passing x1.items
columns
line_no VARCHAR2(5) path 'LINE_NUMBER',
line_status VARCHAR2(15) path 'STATUS',
line_status_date VARCHAR2(24) path 'STATUS_DATE',
line_description VARCHAR2(500) path 'DESCRIPTION',
unit_of_measure VARCHAR2(3) path 'UNIT_OF_MEASURE',
line_qty NUMBER path 'QUANTITY',
line_type VARCHAR2(20) path 'LINE_TYPE',
unit_price NUMBER path 'UNIT_PRICE',
line_total_amount NUMBER path 'TOTAL_AMOUNT',
material_master_code VARCHAR2(20) path 'MATERIAL_MASTER_CODE',
material_group_code VARCHAR2(10) path 'MATERIAL_GROUP_CODE',
item_category_code VARCHAR2(18) path 'ITEM_CATEGORY_CODE',
line_admin_fee_sgd_amt NUMBER path 'ADMIN_FEE_SGD_AMOUNT',
instruction_supplier VARCHAR2(400) path 'INSTRUCTION_TO_SUPPLIER',
period_contract_line_no NUMBER path 'PERIOD_CONTRACT_LINE_NUMBER',
goods_inspect_flag VARCHAR2(1) path 'GOODS_INSPECT_FLAG',
pr_code VARCHAR2(17) path 'PURCHASE_REQUEST/CODE',
pr_line_number VARCHAR2(5) path 'PURCHASE_REQUEST/LINE_NUMBER',
nato_stock_number VARCHAR2(14) path 'PART_NUMBER_INFORMATION/NATO_STOCK_NUMBER',
manufacturer_part_no VARCHAR2(32) path 'PART_NUMBER_INFORMATION/MANUFACTURE_PART_NUMBER',
part_number VARCHAR2(200) path 'PART_NUMBER_INFORMATION/PART_NUMBER',
cage_code VARCHAR2(10) path 'PART_NUMBER_INFORMATION/CAGE_CODE',
cage_name VARCHAR2(140) path 'PART_NUMBER_INFORMATION/CAGE_NAME',
item_condition VARCHAR2(1) path 'PART_NUMBER_INFORMATION/ITEM_CONDITION' ,
minimum_shelf_life NUMBER path 'PART_NUMBER_INFORMATION/MINIMUM_SHELF_LIFE',
shelf_life_remaining VARCHAR2(3) path 'PART_NUMBER_INFORMATION/SHELF_LIFE_REMAINING',
cert_of_conformance VARCHAR2(1000) path 'PART_NUMBER_INFORMATION/CERTIFICATE_OF_CONFORMANCE',
export_license VARCHAR2(3) path 'PART_NUMBER_INFORMATION/EXPORT_LICENSE',
locations XMLTYPE path 'LOCATIONS'
)x2,
XMLTABLE('/LOCATIONS/LOCATION'
passing x2.locations
columns
line_location_no NUMBER path 'LINE_NUMBER',
line_loc_status VARCHAR2(15) path 'STATUS',
line_loc_status_date VARCHAR2(24) path 'STATUS_DATE',
line_loc_qty NUMBER path 'QUANTITY',
delivery_destination VARCHAR2(1000) path 'DELIVERY_DESTINATION',
delivery_date VARCHAR2(24) path 'DELIVERY_DATE',
delivery_terms VARCHAR2(3) path 'DELIVERY_TERMS',
port_of_origin VARCHAR2(150) path 'PORT_OF_ORIGIN',
recipient_code VARCHAR2(16 ) path 'RECIPIENT/CODE',
recipient_name VARCHAR2(40 ) path 'RECIPIENT/NAME',
recipient_phone VARCHAR2(23 ) path 'RECIPIENT/PHONE',
recipient_email VARCHAR2(100 ) path 'RECIPIENT/EMAIL',
distributions XMLTYPE path 'DISTRIBUTIONS'
)x3,
XMLTABLE('/DISTRIBUTIONS/DISTRIBUTION'
passing x3.distributions
columns
dist_line_no NUMBER path 'LINE_NUMBER',
dist_line_status VARCHAR2(15) path 'STATUS',
dist_line_status_date VARCHAR2(24) path 'STATUS_DATE',
dist_line_qty NUMBER path 'QUANTITY',
chart_of_account VARCHAR2(420) path 'CHART_OF_ACCOUNT',
project_distribution VARCHAR2(4000) path 'PROJECT_DISTRIBUTION'
)x4;
end;As there is change in requirement now I need to read the multiple supplier sites at the header level. Current this is my structure please give an idea how to read the mulitple sites as one record, probably i can increase the supplier site columns at table level so as to capture second site level information.
But if in case if i receive that time it should not fail please provide some good solution for this issue.
Thanks in advance for your help.
Regards
NagendraHi odie,
Thanks for your response. But here my supplier site will always be maxiumum 2 times and minimum 1 time. My thinking is to fit this one in the existing code by repeating the supplier site only like this
supp_site_id NUMBER path 'HEADER/SUPPLIER/SITES/SITE/ID',
supp_site_name VARCHAR2(140) path 'HEADER/SUPPLIER/SITES/SITE/NAME',
supp_site_phone VARCHAR2(23) path 'HEADER/SUPPLIER/SITES/SITE/PHONE',
supp_sit_phone_ext VARCHAR2(4 ) path 'HEADER/SUPPLIER/SITES/SITE/PHONE_EXTENSION',
supp_site_fax VARCHAR2(23 ) path 'HEADER/SUPPLIER/SITES/SITE/FAX',
supp_site_email VARCHAR2(100 ) path 'HEADER/SUPPLIER/SITES/SITE/EMAIL',
supp_site_add_line1 VARCHAR2(254 ) path 'HEADER/SUPPLIER/SITES/SITE/ADDRESS_LINE1',
supp_site_add_line2 VARCHAR2(35 ) path 'HEADER/SUPPLIER/SITES/SITE/ADDRESS_LINE2',
supp_site_add_line3 VARCHAR2(35 ) path 'HEADER/SUPPLIER/SITES/SITE/ADDRESS_LINE3',
supp_site_country_code VARCHAR2(2 ) path 'HEADER/SUPPLIER/SITES/SITE/COUNTRY_CODE',
supp_site_province VARCHAR2(25 ) path 'HEADER/SUPPLIER/SITES/SITE/PROVINCE',
supp_site_state VARCHAR2(25 ) path 'HEADER/SUPPLIER/SITES/SITE/STATE',
supp_site_city VARCHAR2(25 ) path 'HEADER/SUPPLIER/SITES/SITE/CITY',
supp_site_area_code VARCHAR2(10 ) path 'HEADER/SUPPLIER/SITES/SITE/AREA_CODE',
supp_site_zip VARCHAR2(20 ) path 'HEADER/SUPPLIER/SITES/SITE/ZIP',
supp_site_region_code VARCHAR2(3 ) path 'HEADER/SUPPLIER/SITES/SITE/REGION_CODE',
supp_site_id2 NUMBER path 'HEADER/SUPPLIER/SITES/SITE/ID',
supp_site_name2 VARCHAR2(140) path 'HEADER/SUPPLIER/SITES/SITE/NAME',
supp_site_phone2 VARCHAR2(23) path 'HEADER/SUPPLIER/SITES/SITE/PHONE',
supp_sit_phone_ext2 VARCHAR2(4 ) path 'HEADER/SUPPLIER/SITES/SITE/PHONE_EXTENSION',
supp_site_fax2 VARCHAR2(23 ) path 'HEADER/SUPPLIER/SITES/SITE/FAX',
supp_site_email2 VARCHAR2(100 ) path 'HEADER/SUPPLIER/SITES/SITE/EMAIL',
supp_site_add_line1_2 VARCHAR2(254 ) path 'HEADER/SUPPLIER/SITES/SITE/ADDRESS_LINE1',
supp_site_add_line2_2 VARCHAR2(35 ) path 'HEADER/SUPPLIER/SITES/SITE/ADDRESS_LINE2',
supp_site_add_line3_2 VARCHAR2(35 ) path 'HEADER/SUPPLIER/SITES/SITE/ADDRESS_LINE3',
supp_site_country_code_2 VARCHAR2(2 ) path 'HEADER/SUPPLIER/SITES/SITE/COUNTRY_CODE',
supp_site_province_2 VARCHAR2(25 ) path 'HEADER/SUPPLIER/SITES/SITE/PROVINCE',
supp_site_state_2 VARCHAR2(25 ) path 'HEADER/SUPPLIER/SITES/SITE/STATE',
supp_site_city_2 VARCHAR2(25 ) path 'HEADER/SUPPLIER/SITES/SITE/CITY',
supp_site_area_code_2 VARCHAR2(10 ) path 'HEADER/SUPPLIER/SITES/SITE/AREA_CODE',
supp_site_zip_2 VARCHAR2(20 ) path 'HEADER/SUPPLIER/SITES/SITE/ZIP',
supp_site_region_code_2 VARCHAR2(3 ) path 'HEADER/SUPPLIER/SITES/SITE/REGION_CODE',As this table I am being used in many areas, it will be problem for me if try to go for different levels of tables. Or else can it be possible to read only once
I mean only the first in the xml tags and leave the second xml. As there is not much significant for the second one.
I appreciate your ideas on this, as the structure we are following is to rigid so I don't have much options to explore, please provide me your inputs in this context.
Thanks for your help.
Regards
Nagendra
Edited by: 838961 on Jul 13, 2011 1:43 AM -
Read a CSV file and dynamically generate the insert
I have a requirement where there are multiple csv's which needs to be exported to a sql table. So far, I am able to read the csv file and generate the insert statement dynamically for selected columns however, the insert statement when passed as a parameter
to the $cmd.CommandText
does not evaluate the values
How to evaluate the string in powershell
Import-Csv -Path $FileName.FullName | % {
# Insert statement.
$insert = "INSERT INTO $Tablename ($ReqColumns) Values ('"
$valCols='';
$DataCols='';
$lists = $ReqColumns.split(",");
foreach($l in $lists)
$valCols= $valCols + '$($_.'+$l+')'','''
#Generate the values statement
$DataCols=($DataCols+$valCols+')').replace(",')","");
$insertStr =@("INSERT INTO $Tablename ($ReqColumns) Values ('$($DataCols))")
#The above statement generate the following insert statement
#INSERT INTO TMP_APPLE_EXPORT (PRODUCT_ID,QTY_SOLD,QTY_AVAILABLE) Values (' $($_.PRODUCT_ID)','$($_.QTY_SOLD)','$($_.QTY_AVAILABLE)' )
$cmd.CommandText = $insertStr #does not evaluate the values
#If the same statement is passed as below then it execute successfully
#$cmd.CommandText = "INSERT INTO TMP_APL_EXPORT (PRODUCT_ID,QTY_SOLD,QTY_AVAILABLE) Values (' $($_.PRODUCT_ID)','$($_.QTY_SOLD)','$($_.QTY_AVAILABLE)' )"
#Execute Query
$cmd.ExecuteNonQuery() | Out-Null
jyeragiHi Jyeragi,
To convert the data to the SQL table format, please try this function out-sql:
out-sql Powershell function - export pipeline contents to a new SQL Server table
If I have any misunderstanding, please let me know.
If you have any feedback on our support, please click here.
Best Regards,
Anna
TechNet Community Support -
UPDATE 2: Phoned Toshiba tech support again, guided by techie to begin the recovery again. Just before phoning I was able to go into recovery options and view the drive setup and all the files that couldn't be read are on the CD so I've no idea why the error kept occuring, and neither did the techie. Fingers crossed it works this time but I'm not overly hopefully given that we've just done exactly the same as I did before. UPDATE 1: I got into the BIOS and reset everything back to defaults and yay, my toshiba recovery wizard now starts! :-D On the down side, when trying to do a factory default software / out of the box recovery I continually get error messages with regards to copying the files, for example
cannot read from source file or disk
7z.dll
Type application extension
size 585kb
date modified 7/14/2009 10.26pm
other read / copy errors include PREINST6.SWM, BOOT_32, BOOTPRIORITY, CHECKMAXPTSIZE, CHGBOOT, CPU, CPUCHECK, CREATEPARTITION, CTRLDRVINFO, DISKWIPE, DMI, DPINST32, EBLIB.DLL, ERRORDIALOG, EW3BOOTSEQ, FWLINK, FWLINK.SYS, GETHDDINFO, GETKEYSTATE, IMAGEX, INFILED, INITRECAREA, KRAIADAPI.DLL ..... at which point I decided to 'skip all' :-/
Any explanations as to what's going on and how I might be able to fix it would be very much appreciated! :-) Thank you!
I have a two and half year old satellite L500 with an Intel i-3 and 4 gigs of RAM, on which I was running Windows 7.
Admittedly it’s had rather a hard life (I ran some very demanding CAD / graphics software on it) but it had always performed well until just recently, when after suffering several BSOD (which had never happened before), the hard drive failed.
I partitioned and formatted a brand new hard drive (which is perfectly fine and functions normally when hooked up to another laptop with a SATA to USB cable) and obtained system recovery discs from Toshiba. Unfortunately, when I try and run the first disc, windows starts to load files but then generates an error screen with the message Error F3-F100-0003 and a request to turn the computer off.
When I use the windows Memory Diagnostic to get into the Windows Boot Manager Screen I get the following;
Windows failed to start. A recent hardware / software change might be the case.
To fix the problem
Insert your windows installation disc and restart your computer
Choose your language settings and click ‘next’
Click ‘repair your computer’
File: \boot\memtest.exe
Status: 0xc000000f
Info: the selected entry could not be loaded because the application is missing or corrupt.
I can also use F8 on startup to get into the advanced boot options but selecting any of them simply results in the F3-F100-0003 error message. I’ve run a memory test using the UBCD, which tells me the memory is fine, and tried another hard drive (which also works perfectly well in another laptop) but no joy. On phoning Toshiba support the techie said my hard drive had failed, but as I say, both hard drives are perfectly fine / usable when hooked up to another laptop. I’m now completely stuck as to what the problem is and how I might resolve it – any advice / suggestions would be most gratefully received! Thank you in advance :-)Satellite L655-S5096
Downloads here.
the second disc gives me the the "cannot read from source file or disk PREINST8.SWM"
My best guess is that the disc is not readable. Try copying it to another. Sometimes that works.
Otherwise, order new discs from Toshiba.
-Jerry -
ITUNES WILL NOT DELETE FROM ADD @ REMOVE PROGRAMS,
MESSAGE, READS a network error occured while attempting to read from the file C:WINDOWS\installer\iTunes.msiAll sorted now just needed to repair itunes from control panel
-
Help reading a .txt file from the hard drive....
Hi guys,
Ok... I need to know how to read a .txt file from the hard drive... I have an example on how to read from a disk, but I don't have a disk drive. I could be confusing terminology, but I don't think I am. Here is the code I have for reading from a disk.. please let me know how I should change it to read from a hard drive.
Also, when the error pops up, it says that it can't read another .txt file that is not specified in the code... any ideas how that is occuring? Please advise.
import java.io.*;
public class TEST {
public static void main(String args[]) throws Exception{
FileReader fr = new FileReader("customer.txt");
BufferedReader bfr = new BufferedReader (fr);
String s;
while ((s=bfr.readLine())!= null){
System.out.println (s);
fr.close();
}Ok... I need to know how to read a .txt file from the
hard drive... I have an example on how to read from a
disk, but I don't have a disk drive. I could be
confusing terminology, but I don't think I am. Here
is the code I have for reading from a disk.. please
let me know how I should change it to read from a
hard drive.The code will be the same, regardless of where the file is located. It's just the filename that will be different.
Also, when the error pops up, it says that it can't
read another .txt file that is not specified in the
code... any ideas how that is occuring? Please
advise.Probably becuase the class file (compiled version of the source code) is a different version to the source code, i.e. the source code hasn't been recompiled since the source code was changed.
How does this relate to EJBs? -
Read a zip file from Application server.
Hi,
Is there a way to read a zip file from the applicatoin server to internal table in ABAP program? The operation system is running MS windows server. The zip file contains only 1 text file. I tried to use open dataset 'uncompress', and use read dataset, but read dataset gave me sy-subrc = 4. Any feedback is greatly appreciated.
Thanks.hi,
to convert xstring to text you can use this:
DATA unzipped_data TYPE xstring.
DATA text_data TYPE string.
DATA conv_x2c TYPE REF TO cl_abap_conv_in_ce.
conv_x2c = cl_abap_conv_in_ce=>create( ).
conv_x2c->convert( EXPORTING input = unzipped_data IMPORTING data = text_data ).
moreover, if you want to split your text at "end of line" (CR LF in microsoft windows) into lines:
DATA text_lines TYPE TABLE OF string.
SPLIT text_data AT cl_abap_char_utilities=>cr_lf INTO TABLE text_lines. -
Read an EXCEL file from application server
Hi all
I have to read an excel file from applicatin sever and update my custom tablels.
The problem is when the file is uploaded into the application server .
the fields it has are
name age gender
xyz 67 m.
when seeing the file using al11 tcode :
its showing the following:
###ࡱ##################>#######################################################################################################################
#################################################################O#b#j#I#n#f#o################################################################
How do i read this and put in my internal table
Pleaes help.
Thanks and Regards,Hi,
I am using ECC6.0.
I think the EXCEL file is stored in compressed format to save space.
Please let me know how to decompress etc.
I tried using the function moduel
text_convert_xls_to_sap.
How do I pass the parameter to I_filename.
Regards, -
Read Tab delimited File from Application server
Hi Experts,
I am facing problem while reading file from Application server.
File in Application server is stored as follows, The below file is a tab delimited file.
##K#U#N#N#R###T#I#T#L#E###N#A#M#E#1###N#A#M#E#2###N#A#M#E#3###N#A#M#E#4###S#O#R#T#1###S#O#R#T#2###N#A#M#E#_#C#O###S#T#R#_#S#U#P#P#L#1###S#T#R#_#S#U#P#P#L#2###S#T#R#E#E#T###H#O#U#S#E#_#N#U#M#1
i have downloaded this file from Application server using Transaction CG3Y. the Downloaded file is a tab delimited file and i could not see "#' in the file,
The code is as Below.
c_split TYPE abap_char1 VALUE cl_abap_char_utilities=>horizontal_tab.
here i am using IGNORING CONVERSION ERRORS in order to avoid Conversion Error Short Dump.
OPEN DATASET wa_filename-file FOR INPUT IN TEXT MODE ENCODING DEFAULT IGNORING CONVERSION ERRORS.
IF sy-subrc = 0.
WRITE : /,'...Processing file - ', wa_filename-file.
DO.
Read the contents of file
READ DATASET wa_filename-file INTO wa_file-data.
IF sy-subrc = 0.
SPLIT wa_file-data AT c_split INTO wa_adrc_2-kunnr
wa_adrc_2-title
wa_adrc_2-name1
wa_adrc_2-name2
wa_adrc_2-name3
wa_adrc_2-name4
wa_adrc_2-name_co
wa_adrc_2-city1
wa_adrc_2-city2
wa_adrc_2-regiogroup
wa_adrc_2-post_code1
wa_adrc_2-post_code2
wa_adrc_2-po_box
wa_adrc_2-po_box_loc
wa_adrc_2-transpzone
wa_adrc_2-street
wa_adrc_2-house_num1
wa_adrc_2-house_num2
wa_adrc_2-str_suppl1
wa_adrc_2-str_suppl2
wa_adrc_2-country
wa_adrc_2-langu
wa_adrc_2-region
wa_adrc_2-sort1
wa_adrc_2-sort2
wa_adrc_2-deflt_comm
wa_adrc_2-tel_number
wa_adrc_2-tel_extens
wa_adrc_2-fax_number
wa_adrc_2-fax_extens
wa_adrc_2-taxjurcode.
WA_FILE-DATA is having below values
##K#U#N#N#R###T#I#T#L#E###N#A#M#E#1###N#A#M#E#2###N#A#M#E#3###N#A#M#E#4###S#O#R#T#1###S#O#R#T#2###N#A#M#E#_#C#O###S#T#R#_#S#U#P#P#L#1###S#T#R#_#S#U#P#P#L#2###S#T#R#E#E#T###H#O#U#S#E#_#N#U#M#1
And this is split by tab delimited and moved to other variables as shown above.
Please guide me how to read the contents without "#' from the file.
I have tried all possible ways and unable to get solution.
Thanks,
ShrikanthHi ,
In ECC 6 if all the unicode patches are applied then UTF 16 will defintly work..
More over i would suggest you to ist replace # with some other * or , and then try to see in debugging if any further # appears..
and no # appears then try to split now.
if even now the # appears after replace statement then try to find out what exactly is it... wheather it is a horizantal tab etc....
and then again try to replace it and then split..
Please follow the process untill all the # are replaced...
This should work for you..
Let me know if you further face any issue...
Regards
Satish Boguda -
Reading all the files from Application Server in a specific folder
Hi,
I want to read all the files present in a folder on Application Server ( AL11 ). My problem is that I do not know the name of the file but I know the folder path where files are present.
I need to go to this folder and pick up all the files present in this folder and then process these files in my program.
Can any one help me in this!
Regards,
LalitYou can use a call to
C_DIR_READ_START'
and
CALL 'C_DIR_READ_NEXT'
Regards,
John. -
Why does Read from Text file default to array of 9 elements
I am writing to a text file starting with a type def. cluster (control) of say 15 dbl numeric elements, that works fine I open the tab-delimited text file and all of the elements appear in the file. However when I read from the same text file back to the same type def. cluster (indicator), the read from text file defaults to 9 elements?? Is there a way to control how many elements are read from the file. This all works great when I initially use a cluster of 9 elements and read back to a cluster of 9 elements.
Solved!
Go to Solution.From the LabVIEW Help: http://zone.ni.com/reference/en-XX/help/371361G-01/glang/array_to_cluster/
Converts a 1D array to a cluster of elements of the same type as the array elements. Right-click the function and select Cluster Size from the shortcut menu to set the number of elements in the cluster.
The default is nine. The maximum cluster size for this function is 256.
Aside: so, how many times has this question been asked over the years? -
How to open saved files using 'read from text file' function
Hi everyone, I am having a hard time trying to solve the this particular problem ( probably because I am a newb to lanbview ). Anyway , I am able to save the acquired waveforms by using the 'Write to text file' icon. I did manually modify the block diagram of the 'Write to text file' icon and create the correct number of connector so as to make my program work. But now I have no idea on how to modify the block diagram of the 'Read from text file' block diagram to make my program 'open' my saved waveforms. Or i do not have to modify anything from the block diagram of the 'Read from text file'? Can anyone teach/help me connect up? Do i need the build array on the "open" page?
Here are some screenshots on part of my program
let me know if you guys would need more information / screenshots thank you!
Attachments:
ss_save.jpg 94 KB
ss_open.jpg 94 KB
modified_writetotextfile.jpg 99 KBOhmy, thanks altenbach. oh yeah i forgot about those sub VIs. will upload them now. Was rather demoralized after reading the comments and really struck me on how weak i'm at on labview really hope to get this done. But of course i have to study through and see how it works. Actually i am going to replace those 'signal generators sub vi' with ThoughtTechonology's sample code so i can obtain data waveforms real-time using Electrocardiography (ECG) ,Electromyography (EMG ) and Electroencephalography (EEG) hopefully i can find out how to connect the sample code.
( ps . cant connect it now unless my program is working otherwise labview will crash )
( p.s.s the encoder of my biofeedback trainer already acts as an DAQ so i wont need to place an DAQ assistant in my block diagram i suppose )
The sample code of ThoughtTechnology is named as attachment.ashx.vi. too bad i cant use it and present it as my project
Attachments:
frequency detactor.vi 53 KB
signal generator.vi 13 KB
attachment.ashx.vi 40 KB -
LabVIEW for ARM 2009 Read from text file bug
Hello,
If you use the read from text file vi for reading text files from a sdcard there is a bug when you select the option "read lines"
you cannot select how many lines you want to read, it always reads the whole file, which cause a memory fault if you read big files!
I fixed this in the code (but the software doesn't recognize a EOF anymore..) in CCGByteStreamFileSupport.c
at row 709 the memory is allocated but it tries to allocate to much (since u only want to read lines).
looking at the codes it looks like it supposed to allocated 256 for a string:
Boolean bReadEntireLine = (linemode && (cnt == 0));
if(bReadEntireLine && !cnt) {
cnt = BUFINCR; //BUFINCR=256
but cnt is never false since if you select read lines this is the size of the file!
the variable linemode is also the size of the file.. STRANGE!
my solution:
Boolean bReadEntireLine = (linemode && (cnt > 0)); // ==
if(bReadEntireLine) { //if(bReadEntireLine && !cnt) {
cnt = BUFINCR;
and now the read line option does work, and reads one line until he sees CR or LF or if the count of 256 is done.
maybe the code is good but the data link of the vi's to the variables may be not, (cnt and linemode are the size of the file!)
count should be the number of lines, like chars in char mode.
linemode should be 0 or 1.
Hope someone can fix this in the new version!
greets,
Wouter
Wouter.
"LabVIEW for ARM guru and bug destroyer"I have another solution, the EOF works with this one.
the cnt is the bytes that are not read yet, so the first time it tries to read (and allocate 4 MB).
you only want to say that if it's in line mode and cnt > 256 (BUFINCR) cnt = BUFINCR
the next time cnt is the value of the bytes that are not read yet, so the old value minus the line (until CR LF) or if cnt (256) is reached.
with this solution the program does not try to allocate the whole file but for the max of 256.
in CCGByteStreamFileSupprt.c row 705
if(linemode && (cnt>BUFINCR)){
cnt = BUFINCR;
don't use the count input when using the vi in line mode. count does not make sense, cnt will be the total file size. also the output will be an array.
linemode seems to be the value of the file size but I checked this and it is just 0 or 1, so this is good
update: damn it doesn't work!
Wouter.
"LabVIEW for ARM guru and bug destroyer"
Maybe you are looking for
-
I have a new imac and want to transfer my itunes from a pc
hi, I just bought my first mini mac. I been using a HP with windows 7. I want to transfer my itunes on my mini mac. How can I do this without the need of my iphone to transfer. Thank you, Debbie
-
Adobe CS2 installation failed on macbook air
I am trying to install Adobe Photoshop CS2 on Macbook air, but when the installation goes the half way, system generates a message, "installation failed, please contact the manufacturer". Could you please help me to resolve the issue. thank you
-
How to Throw an Exception in a SapServer
Hello, We have successfully implemented SAPServer in our external process. The only thinks that doesn't work perfectly is that we can't throw an exception in the implementation of remote function module. The ABAP Program that is calling our fontion w
-
I have a MAC laptop and want to recieve faxes on my computer, but the Systems: printer and fax tab does not have a faxes choice. what do I need to do to set it up?
-
Navigation bar refuses to delete prior page results.
In the navigation bar, when I physically type in an address, the OLD address information refuses to delte. This creates a mess of letters and numbers that cannot be read. Solution: <br /> A subroutine that forces the navigation bar to "CLEAR" upon hi