Variable Length Files and ABAP
I have a comma delimited file that is of a variable length.
The first 5 fields are fixed, but then I have a counter field and then 2 fields that repeat for each counter.
So if the counter field was 3, Id have 6 additional fields, but if the counter was 5, Id have 10 additional fields.
The goal is to end up with 3 records (since the counter was 3) with the 5 fixed fields then the 2 fields respectively.
Such as if it looks like this:
Abc,abc,abc,abc,abc,003,1a,1b,2a,2b,3a,3c
DCE,abc,abc,abc,abc,005,1a,1b,2a,2b,3a,3c,4a,4b,5a,5b
I need it to look like this or at least be able to read it similar to this.
Abc,abc,abc,abc,abc,003,1a,1b
Abc,abc,abc,abc,abc,003,2a,2b,
Abc,abc,abc,abc,abc,003,3a,3c
DCE,abc,abc,abc,abc,005,1a,1b
DCE,abc,abc,abc,abc,005,2a,2b
DCE,abc,abc,abc,abc,005,3a,3c
DCE,abc,abc,abc,abc,005,4a,4b
DCE,abc,abc,abc,abc,005,5a,5b
Hi,
I guess rich has written more efficient program anyways this is what I could do.
data : begin of i_line occurs 0,
line(100),
end of i_line.
data : begin of i_format occurs 0,
txt1(5),
txt2(5),
txt3(5),
txt4(5),
txt5(5),
txt6(5),
txt7(5),
txt8(5),
end of i_format.
data : comma type c,
off TYPE i,
moff TYPE i,
mlen TYPE i,
count type i,
len(3),
n type i.
start-of-selection.
i_line-line = 'Abc,abc,abc,abc,abc,003,1a,1b,2a,2b,3a,3c'.
append i_line.
clear i_line.
i_line-line = 'DCE,abc,abc,abc,abc,005,1a,1b,2a,2b,3a,3c,4a,4b,5a,5b'.
append i_line.
clear i_line.
comma = ','.
loop at i_line.
off = 0.
count = 0.
moff = 0.
while count lt 5.
count = count + 1.
find comma in section OFFSET off OF
i_line-line
MATCH OFFSET moff
MATCH LENGTH mlen.
if sy-subrc = 0.
off = moff + mlen.
write : / 'moff',moff,
'mlen', mlen..
endif.
endwhile.
moff = moff + 1.
write : i_line-line+moff(3) to len no-zero.
write :/ 'The len is ', len.
i_format-txt1 = i_line+0(3).
i_format-txt2 = i_line+4(3).
i_format-txt3 = i_line+8(3).
i_format-txt4 = i_line+12(3).
i_format-txt5 = i_line+16(3).
i_format-txt6 = i_line+20(3).
n = 24.
do len times.
i_format-txt7 = i_line+n(2).
n = n + 3.
i_format-txt8 = i_line+n(2).
n = n + 3.
append i_format.
enddo.
endloop.
loop at i_format.
write :/ i_format.
endloop.
end-of-selection.
Regards
Vick
Similar Messages
-
Replace unix file and abap prog triggers
Hi All,
I had an ABAP program which is scheduled to reads a file at a unix directory.
But instead my program should get triggered when there is a Change to the existing file or a new file comes in in the unix directory.Is there any way to trigger?
Please provide your valuable suggestions , points will be granted for sure.
Thanks
SumanSuman,
One approach would be to just regularly scan for your config file being modified
(just stat() and check st_mtime in unix) with date and timestamp... How often you want to check is up to you, but I wouldn't think more than once per minute would be necessary, unless you have some need to make changes instantly or something...
Another approach would be to use dnotify/inotify to have the kernel notify you when
the file changes...
Hope this helps
Cheers
Senthil -
Variable xml file and Cyrillic
Hello,
Due to the workflow of our design studio I have been working on a series of scripts that use php to write artwork information from a database into xml files to be loaded into illustrator.
after first getting an issue where any image replacements from the xml linked file wouldn't work in cs5. which has just been avoided by using cs4.
the main issue is that the cyrillic text is not being loaded into illustrstor when i load the variable data set, there is just a blank space where the cyrillic should be.
Any ideas on how to fix this would be greatly appreciated!the following is a one variable tester i've been trying for the cyrillic
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20001102//EN" "http://www.w3.org/TR/2000/CR-SVG-20001102/DTD/svg-20001102.dtd" [
<!ENTITY ns_graphs "http://ns.adobe.com/Graphs/1.0/">
<!ENTITY ns_vars "http://ns.adobe.com/Variables/1.0/">
<!ENTITY ns_imrep "http://ns.adobe.com/ImageReplacement/1.0/">
<!ENTITY ns_custom "http://ns.adobe.com/GenericCustomNamespace/1.0/">
<!ENTITY ns_flows "http://ns.adobe.com/Flows/1.0/">
<!ENTITY ns_extend "http://ns.adobe.com/Extensibility/1.0/">
]>
<svg>
<variableSets xmlns="&ns_vars;">
<variableSet varSetName="binding1" locked="none">
<variables>
<variable category="&ns_flows;" varName="Variable1" trait="textcontent"></variable>
</variables>
<v:sampleDataSets xmlns:v="&ns_vars;" xmlns="&ns_custom;">
<v:sampleDataSet dataSetName="Data Set 1">
<Variable1>
<p>Пена Для Ванн</p>
</Variable1>
</v:sampleDataSet>
</v:sampleDataSets>
</variableSet>
</variableSets>
</svg>
Пена Для Ванн is between the P tags, however the code box doesnt seem to like cyrillic! -
Transforming XML File to abap structure
Hello,
I am working in a new project for making an input interface.
The problem to resolv is :
1>Reading an XML file on a unix Server
2>Transforming this file in abap structure with the instruction
call transformation.
Format of the input file :
<LISTEART>
<ART code="A01" label="Designation A01"/>
<ART code="A02" label="Designation A02"/>
<ART code="A03" label="Designation A03"/>
<ART code="A04" label="Designation A04"/>
<ART code="A05" label="Designation A05"/>
</LISTEART>
Format of the abap structure :
DATA : BEGIN OF ws_art,
code(4) TYPE c,
label(3) TYPE c,
END OF ws_art.
DATA : wt_art LIKE ws_art OCCURS 0 WITH HEADER LINE.
is it possible to transform the input file to an internal table
with the call transformation ?
CALL TRANSFORMATION transfo
SOURCE XML xml_string
RESULT para = result.
Somebody can explain me how to create links between xml file
and abap structure ?
with regards
JLuc Ledoux
[email protected]Hi,
try like this.
TYPES: BEGIN OF day,
name TYPE string,
work(1) TYPE c,
END OF day.
DATA: BEGIN OF week,
day1 TYPE day,
day2 TYPE day,
day3 TYPE day,
day4 TYPE day,
day5 TYPE day,
day6 TYPE day,
day7 TYPE day,
END OF week.
DATA xml_string TYPE string.
DATA result LIKE week.
week-day1-name = 'Monday'. week-day1-work = 'X'.
week-day2-name = 'Tuesday'. week-day2-work = 'X'.
week-day3-name = 'Wednesday'. week-day3-work = 'X'.
week-day4-name = 'Thursday'. week-day4-work = 'X'.
week-day5-name = 'Friday'. week-day5-work = 'X'.
week-day6-name = 'Saturday'. week-day6-work = ' '.
week-day7-name = 'Sunday'. week-day7-work = ' '.
CALL TRANSFORMATION ...
SOURCE root = week
RESULT XML xml_string.
CALL TRANSFORMATION ...
SOURCE XML xml_string
RESULT root = result.
Regards,
Vijay -
Zero sized files and client download errors..
Frequently I see zero sized files being downloaded into the patch proxy spool area.
Sometimes it is the detectors file. Other times it is a whole heap of all_signed<patchid>.jar files. This basically breaks all future downloads of these patches to the clients.
If I go into the spool directory and delete the offending zero length files and re-issue the download command it works.
Also, on especially large patch files, the client will report errors during the download. The patch proxy is still downloading the patch in the background but the client times out waiting for it to come down.
I will paste logs etc when I see it again.I encountered an issue today with zero length patch jar File
17# cd /var/sadm
doe63 - root - /var/sadm - (-ksh)
18# find . -name "*120068*"
./spool/patchsvr/%2Fall_signed%2F120068-02.jar
doe63 - root - /var/sadm - (-ksh)
19# ls -l ./spool/patchsvr/%2Fall_signed%2F120068-02.jar
-rw-r--r-- 1 root root 0 Feb 22 10:00 ./spool/patchsvr/%2Fall_signed%2F120068-02.jarThese were the entries in the catalina.out on the patchsvr
Feb 22, 2007 10:00:02 AM com.sun.swup.updateserver.net.ConnectionFactory getConnection
INFO: Connecting to https://getupdates1.sun.com/
/usr/lib/cc-ccr/bin/ccr -g cns.assetid
/usr/lib/cc-ccr/bin/ccr -g cns.patchsvr.cachelocation
Feb 22, 2007 10:00:04 AM com.sun.swup.updateserver.security.SignatureValidationUtil validateJarFile
SEVERE: error in opening zip file
java.util.zip.ZipException: error in opening zip file
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(ZipFile.java:203)
at java.util.jar.JarFile.<init>(JarFile.java:132)
at java.util.jar.JarFile.<init>(JarFile.java:84)
at com.sun.swup.updateserver.security.SignatureValidationUtil.validateJarFile(SignatureValidationUtil.java:265)
at com.sun.swup.updateserver.handler.CachingProxyValidationHandler.validate(CachingProxyValidationHandler.java:195)
at com.sun.swup.updateserver.handler.CachingProxyValidationHandler.handleRequest(CachingProxyValidationHandler.java:86)
at com.sun.swup.updateserver.UpdateServlet.processRequest(UpdateServlet.java:80)
at com.sun.swup.updateserver.UpdateServlet.doGet(UpdateServlet.java:106)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1027)
at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1125)
at java.lang.Thread.run(Thread.java:595)
Feb 22, 2007 10:02:40 AM com.sun.swup.updateserver.UpdateServlet processRequestOn the client I got
3# smpatch update -i 120068-02
Failure: ERROR: Problem encountered while downloading a patch. Determine if the file system containing the patch download directory is full; the file system is corrupted; or the directory permissions were changed during download.
Installing patches from /var/sadm/spool...
WARNING: The installer cannot find the patch.
/var/sadm/spool/patchpro_dnld_2007.02.22@10:04:17:MET.txt has been moved to /var/sadm/spool/patchproSequester/patchpro_dnld_2007.02.22@10:04:17:MET.txtAfter deleting the jar file of the patch mentioned above it worked. -
SQL*Loader and "Variable length field was truncated"
Hi,
I'm experiencing this problem using SQL*Loader: Release 8.1.7.0.0
Here is my control file (it's actually split into separate control and data files, but the result is the same)
LOAD DATA
INFILE *
APPEND INTO TABLE test
FIELDS TERMINATED BY ','
OPTIONALLY ENCLOSED BY '"'
first_id,
second_id,
third_id,
language_code,
display_text VARCHAR(2000)
begindata
2,1,1,"eng","Type of Investment Account"
The TEST table is defined as:
Name Null? Type
FIRST_ID NOT NULL NUMBER(4)
SECOND_ID NOT NULL NUMBER(4)
THIRD_ID NOT NULL NUMBER(4)
LANGUAGE_CODE NOT NULL CHAR(3)
DISPLAY_TEXT VARCHAR2(2000)
QUESTION_BLOB BLOB
The log file displays:
Record 1: Warning on table "USER"."TEST", column DISPLAY_TEXT
Variable length field was truncated.
And the results of the insert are:
FIRST_ID SECOND_ID THIRD_ID LANGUAGE_CODE DISPLAY_TEXT
2 1 1 eng ype of Investment Account"
The language_code field is imported correctly, but display_text keeps the closing delimiter, and loses the first character of the string. In other words, it is interpreting the enclosing double quote and/or the delimiter, and truncating the first two characters.
I've also tried the following:
LOAD DATA
INFILE *
APPEND INTO TABLE test
FIELDS TERMINATED BY '|'
first_id,
second_id,
third_id,
language_code,
display_text VARCHAR(2000)
begindata
2|1|1|eng|Type of Investment Account
In this case, display_text is imported as:
pe of Investment Account
In the log file, I get this table which seems odd as well - why is the display_text column shown as having length 2002 when I explicitly set it to 2000?
Column Name Position Len Term Encl Datatype
FIRST_ID FIRST * | O(") CHARACTER
SECOND_ID NEXT * | O(") CHARACTER
THIRD_ID NEXT * | O(") CHARACTER
LANGUAGE_CODE NEXT 3 | O(") CHARACTER
DISPLAY_TEXT NEXT 2002 VARCHAR
Am I missing something totally obvious in my control and data files? I've played with various combinations of delimiters (commas vs '|'), trailing nullcols, optional enclosed etc.
Any help would be greatly appreciated!Use CHAR instead aof VARCHAR
LOAD DATA
INFILE *
APPEND INTO TABLE test
FIELDS TERMINATED BY ','
OPTIONALLY ENCLOSED BY '"'
first_id,
second_id,
third_id,
language_code,
display_text CHAR(2000)
)From the docu:
A VARCHAR field is a length-value datatype.
It consists of a binary length subfield followed by a character string of the specified length.
http://download-west.oracle.com/docs/cd/A87860_01/doc/server.817/a76955/ch05.htm#20324 -
File Sender, Content Conversion - how to define variable length last field?
XI 3.0 SP17
With a File Sender communication channel, that uses Content Conversion - how do I define a 'variable length' last field?
The scenario - the input file has four fields, of which the first three are a known fixed length, and the last (fourth, trailing) field is variable in length.
Using a Message Protocol of 'File Content Conversion', how do I define that last variable length field (field name 'WOData' below) in the Content Conversion Parameters section?
My current parameters are:
Recordset Structure - Row,*
ignoreRecordsetName - true
Row.fieldFixedLengths - 1,12,5,99999
Row.fieldNames - WOType,WONum,WOLine,WOData
I've tried the following for 'Row.fieldFixedLengths' to no avail -
'1,12,5,*'
'1,12,5,0'
'1,12,5,'
'1,12,5'
The last two were grasping at straws )
The only thing I've got to work is specifying a 'large' value for the final field (99999 above).
In addition, does anyone know if specifying a large value (e.g. 99999) for the final trailing field will give rise to performance issues when the file is being processed?
In the help for "Converting File Content in a Sender Adapter", it states -
<Begin Quote>
NameA.fieldFixedLengths
If you make a specification here, the system expects a character string that contains the lengths of the structure columns as arguments separated by commas.
If you also specify a separator for the columns, you must not add its length to the length of the columns.
This entry is mandatory if you have not made an entry for NameA.fieldSeparator.
<End Quote>
http://help.sap.com/saphelp_nw04/helpdata/en/2c/181077dd7d6b4ea6a8029b20bf7e55/content.htm<< note that fieldFixedLengths will not take any wildcard entries like *. So in these case it is ideal to provide a maximum char length. But note that while the file is being created that many spaces will be created in your file !!! >>
Hi Shabarish,
Yes, no wildcard is the conclusion I came to, hence my maximum )
The message size did not increase by any 'blank padding'. When I look in [Message Display Tool (Detail Display)] 'Audit Log for Message: X' -
2006-10-17 18:22:42 Success Channel X: Entire file content converted to XML format
2006-10-17 18:22:42 Success Send binary file "X" from FTP server "X", size 103290 bytes with QoS EO
2006-10-17 18:22:42 Success Application attempting to send an XI message asynchronously using connection AFW.
2006-10-17 18:22:42 Success Trying to put the message into the send queue.
2006-10-17 18:22:42 Success Message successfully put into the queue.
2006-10-17 18:22:42 Success The application sent the message asynchronously using connection AFW. Returning to application.
The input flat file in non-XML format was 92,132 bytes and the message payload into XI was 103,290 bytes.
My understanding is that trailing spaces are stripped from XML nodes. -
I need to update specific records(of variable lengths) in a file. I can get the correct record but when I update it(add or change info), it overwrites part of the record following it. I am using labview 6.0. I need to be able to insert information into the middle of a file without disturbing the data before and after
It's hard to give more specifics without more detail, but in general you're going to need to read in the entire file, split it into three pieces (everything before the record of interest, the record itself, and everything after the record of interest), modify the record, reassemble the three pieces in proper order, and write the whole thing back to the file.Of course if the file is very large you might not want to actually implement it this way, but conceptually at least, this is what you are looking at.If this file some sort of proprietary format?Mike...PS: this type of issue is why I really like databases...
Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion
"... after all, He's not a tame lion..."
Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps -
Open module for managing property file and environment variables
Looking for an open module for managing property files and environment variables (like CLASSPATH) set in a shell script. For handeling properties (preserving comments, supporting includes, appending new entries, and more) I have looked at SuperProperties from openadaptor but find certain functionality lacking. As for interfacing with common shell scripts/files containing setting for CLASSPATH, JAVA_HOME, other system/application variables another type of object editor is needed. Maybe JFIG?
Any ideas are greatly welcomed.You seem wright, you hit a brick wall here with Air to find the location
of the command console on windows...
So in fact I never build an exe tool, but this little problem was a nice
case to test it and I tried it.:
I downloaded monodevelop
-GTK# for .NET 2.12.10*
-MonoDevelop 2.4.2*
from http://monodevelop.com/Download
created a console project and had an exe in 5 minutes !
You can download the findconsole tool and the projectfiles here:
http://greencollective.nl/temp/dump/findconsole_monoproject.zip
findconsole.exe will reveal the path/location of cmd.exe on a windows system.
Cheers,
Latcho -
When I try to build executables in LabView 8.01 I get message:
Error 7 occurred at Copy in ABAPI Dist New VI Library.vi->ABAPI Dist Chk for Destinations.vi->ABAPI Copy Files and Apply Settings.vi->EBEP_Invoke_Build_Engine.vi->EBUIP_Build_Invoke.vi->EBUIP_Build_Invoke.vi.ProxyCaller
Best RegardsI got the same error as I tried to build my application, the reason was the string I set for the 'Build specification name' property of my build.
I changed from '3DC - Dlog Data Compacter ' to '3DC' and it worked afterwards..quite strange behaviour.. -
Find text from a file and set it as a variable in applescript?
I am trying to build a script that sends me updates and notifications from cex.io. Please keep on reading below, so I may guide you until the point I have trouble with.
The first simple script in this operation goes to cex.io's trading page for BTC/GHS. It records ands saves the text to a file every 4 seconds. It works great. It doesn't need to have safari refresh because the site pushes info to the browser live.
repeat
set the webpage_content to ""
tell application "Safari" to set the webpage_content to the text of document 1
set theText to webpage_content
set a to "Macintosh HD:Users:PRIVATE:Desktop:CEX:"
set theFile to (open for access file ((a) & "CEXRaw") with write permission)
write theText to theFile
close access theFile
delay 4
end repeat
And it returns this from the site to this main file every 4 seconds: (note I cut off a chunk from the bottom and the top of the file, because they are unimportant)
GHS:
0.05233439
BTC:
0.00000223
NMC:
0.00002939
LTC:
0.00000000
GHS/BTC
0.02362958 LTC/BTC
0.02438131 NMC/BTC
0.00597565 GHS/NMC
3.96951800 BF1/BTC
1.67000000 Fund Account
GHS/BTC
Last price:
0.02362958
Daily change:
-0.00018042
Today's open:
0.02381000
24h volume:
73812.35539255
I now need an applescript to read that file, and return wanted values. But I'm lost on how to write it.
It needs to find the number under BTC, and set it as a variable.
It needs to find the number under GHS, and set it as a variable.
It needs to find the number under Last Price, and set it as a variable.
If anyone could script that really quick for me, or tell me how to do it, that would be amazing. Thank you so much!Couldn't tell if you had any whitespace in the lines (i.e. is there a space before or after GHS:), so I used contains, not is. Also, if you have a line such as GHS/BTC with a colon GHS/BTC: then it will also fail (as contains "BTC:" would be true for BTC: and GHS/BTC:)
However, this will give you some guidance:
set a to "Macintosh HD:Users:PRIVATE:Desktop:CEX:CEXRaw"
set x to 0
set Names to paragraphs of (read file a)
repeat with nextLine in Names
set x to x + 1
if nextLine contains "BTC:" then
set BTC to item (x + 1) of Names
else if nextLine contains "GHS:" then
set GHS to item (x + 1) of Names
else if nextLine contains "Last Price:" then
set lastPrice to item (x + 1) of Names
end if
end repeat -
File to File and then Call ABAP Program and pass file name and location
Hi
I am new to PI and am working on the following requirement and some guidance would help:
A file is picked up from a third party server using FTP and is put in an SAP server in a specific location. After I have put in the file successfully, I need to call an ABAP program and provide the name and location of the file for further processing by the ABAP program.
Although I am familiar with File to File, how can I add in the ABAP call with the filename and location? I do not want to pass any other information to the ABAP program.
Thanks for your help.
ManojI think I get what you're saying. This additional file would have the file and the path in it's content. I would then use this as a source (FCC?) for Mapping with the RFC. Right?
Exactly and yes, FCC would be helpful
Would you have a sample OS script to do the above?
Actually it depends on the operating system on which your PI system is standing. For instance for Windows, you might try with the following as a start point (but I was not able to test it, so I can't guarantee it will do the job):
cmd.exe /C "%f %F > C:\target_directory\%DATE%_%TIME%.txt"
In case you needed more, try googling on "windows batch script" or similar.
Hope this helps,
Greg -
Loading a CSV file and accessing the variables
Hi guys,
I'm new to AS3 and dealt with AS2 before (just getting the grasp when the change it).
Is it possible in AS3 to load an excel .csv file into Flash using the URLLoader (or ???) and the data as variables?
I can get the .csv to load and trace the values (cell1,cell2,cell3....) but I'm not sure how to collect the data and place it into variables.
Can I just create an array and access it like so.... myArray[0], myArray[1]? If so, I'm not sure why it's not working.
I must be on the completely wrong path. Here's what I have so far....
var loader:URLLoader = new URLLoader();
loader.dataFormat = URLLoaderDataFormat.VARIABLES;
loader.addEventListener(Event.COMPLETE, dataLoaded);
var request:URLRequest = new URLRequest("population.csv");
loader.load(request);
function dataLoaded(evt:Event):void {
var myData:Array = new Array(loader.data);
trace(myData[i]);
Thanks for any help,
Skyjust load your csv file and use the flash string methods to allocate those values to an array:
var myDate:Array = loader.data.split(","); -
Reading and printing the pdf file in abap reports.
Hello friends .
how to read pdf file and print the contents of the pdf file in abap reports.?
Edited by: Shivanand Kalagi on Jan 11, 2008 12:47 PMHI Brad Bohn,
Issue is not only with the file damaged.
My requirement is to place the PDF file in FTP folder using FTP_COMMAND, FTP_R3_TO_SERVER Function Modules.
I'm placing the PDF sucessfully in FTP Folder. When i try to open it's showing the "File cannot be opened because it's damaged....".
I'm not sure whether i'm placing the PDF file in correct way.
Regards,
Saran -
In trace file and output file showing bind variable instead of value
Hi,
database 9i
optimizer = choose(for cost based)
In my trace file and output file showing bind variable instead of value.
in my trace file 20 queries.
I alse set this parameter in session level.
alter session set events '10046 trace name context forever, level 4';
but still showing traceoutput file bind variable.
Pls help its very urgentCan you post the query for which the bind variable values are not being shown and the trace output for the same?
Probably it is listed down somewhere when you actually executed the query among the others. Try completely analyzing your trace file..
Maybe you are looking for
-
Trex can't be updated to higher levels on windows 2003 server 64 bit
Hi gurus, We have a portal system (EP 7.0 SP18) and a Trex 7.0 server which are working on windows 2003 server 64 bit on the same server. After upgrading our portal system from sp15 to sp18, we can not see indexes on Index Administration screen. When
-
Hi Gurus, I Have a situation where transfer orders are generating based on the storage bin capacity. For example: when i used GR quantity 3000 LBs, TO is not generated and when i changed the quantity to 1000Lbs TO is generated. I believe, it has some
-
Most recent pdf files open when clicking on one?
Hi, I am having some issues with Adobe Reader (Downloaded 9.1.3). When I select a pdf to open all of my most recent pdf's open at once. I am using Windows Vista. I have uninstalled and reinstalled after a fresh boot. Any thoughts about what could
-
Updated from Firefox 22 to Firefox 23 and now I have Bing as my browser. I want Google as my browser. How to set Google as my browser on Firefox start page.
-
How to adjust the "Recent Updates" folder in iTunes.
I have a 2009 iMac running OS 10,10,1 and iTunes 12.0.1.26. In the podcast section, at the top of the sidebar there is what appears to be a folder titled "Recent Updates." I have looked noticed that it has been showing 134 episodes for the past two w