Generate a text (flat) file
i use oracle8
my OS is DGUX (data general UNIX)
i want to generate a text (or flat) file from columns in oracle tables by using a method other than using the command 'SPOOL'
thanks
<BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by Gints Plivna ([email protected]):
you may use package utl_file<HR></BLOCKQUOTE>
May i asking you? How to use this?
I think we must adding in init.ora file
and share our directory first. May you describe this more detail and give me example?
null
Similar Messages
-
Generating a Delimited Flat File
Halo BSP Gurus,
I am in need where I have to generate a delimited flat file. I would like to know whether it is possible in BSP and if so how to achieve that.
Your Suggestions will be appreciated.
Regards
Leogeneration is not a problem, its just a concatenation of field values with propet delimiters . but what do you want to do with the generated file content,
automatically store it in client desktop?
mail it?
regards
Raja -
How to prepare the Format of Flat file(Excel or Text file) for sales order
Hi All,
My requirement is to prepare the Flat File formats(Excel or Text file) for sales order Conversion using BAPI by COB.
Needed Sample Excel or Text flat file .
Thanks for all.
Regards,
Chowdary
Moderator message : Search for available information. Thread locked.
Your similiar question [Flat files formats|Flat files formats] has been already locked for similiar reason. Read forum rules before posting.
Edited by: Vinod Kumar on Jul 8, 2011 9:36 AMHi,
You can use something like this:
switch(cell.getCellType()) {
case Cell.CELL_TYPE_STRING:
System.out.println(cell.getRichStringCellValue().getString());
break;
case Cell.CELL_TYPE_NUMERIC:
if(DateUtil.isCellDateFormatted(cell)) {
System.out.println(cell.getDateCellValue());
else {
System.out.println(cell.getNumericCellValue());
break;
case Cell.CELL_TYPE_BOOLEAN:
System.out.println(cell.getBooleanCellValue());
break;
case Cell.CELL_TYPE_FORMULA:
System.out.println(cell.getCellFormula());
break;
default:
System.out.println();
Hope it helps,
Daniel -
How to get purchasing data from SAP R/3 to Flat files
Hi,
Please can anyone help me to get the data from Purchasing extractors (2LIS_02_ITM, 2LIS_02_SCL, 2LIS_02_S012) to flat files? Here we dont want to load data from R/3 to BW for reporting, wanted to load data from flat files to OWB (Oracle warehouse builder) for reporting. So Is there anyway to generate data into flat files from Purchasing extractors (Full and deltas)?
Thanks,
Pavan.Hello,
here is a short report which converts S012 entries to strings with separator semicolon. Perhaps this will help you?
Regards
Walter Habich
REPORT habitest2 LINE-SIZE 255.
TYPES:
strtab_t TYPE TABLE OF string.
CONSTANTS:
separator VALUE ';'.
DATA:
it_s012 LIKE s012 OCCURS 0,
wa_s012 LIKE s012,
strtab TYPE strtab_t,
strele TYPE string.
SELECT * FROM s012 INTO TABLE it_s012 UP TO 100 ROWS.
PERFORM data_to_string
TABLES
strtab
USING
'S012'. "requires it_s012 and wa_s012
LOOP AT strtab INTO strele.
WRITE: / strele.
ENDLOOP.
*& Form data_to_string
FORM data_to_string TABLES strtab TYPE strtab_t
USING ittab TYPE any.
DATA:
h_zaehler TYPE i,
line_str TYPE string,
l_tabellenname(10) TYPE c,
l_arbeitsbereichsname(10) TYPE c,
h_string TYPE string,
h_char(255) TYPE c.
FIELD-SYMBOLS: <l_tabelle> TYPE ANY TABLE,
<l_arbeits> TYPE ANY,
<feldzeiger> TYPE ANY.
CLEAR strtab.
CONCATENATE 'IT_' ittab INTO l_tabellenname.
ASSIGN (l_tabellenname) TO <l_tabelle>.
CONCATENATE 'WA_' ittab INTO l_arbeitsbereichsname.
ASSIGN (l_arbeitsbereichsname) TO <l_arbeits>.
LOOP AT <l_tabelle> INTO <l_arbeits>.
CLEAR: h_zaehler, line_str.
line_str = ittab.
DO.
ADD 1 TO h_zaehler.
ASSIGN COMPONENT h_zaehler OF
STRUCTURE <l_arbeits> TO <feldzeiger>.
IF sy-subrc <> 0. EXIT. ENDIF.
WRITE <feldzeiger> TO h_char LEFT-JUSTIFIED. "#EC *
h_string = h_char.
CONCATENATE line_str separator h_string INTO line_str.
ENDDO.
APPEND line_str TO strtab.
ENDLOOP.
ENDFORM. "data_to_string -
Flat file conversion from source to destination
Hi
I'm new to SAP and was wondering if someone could help me with the following:
Have a source text file (fields are FirstName and LastName) and would like to run it through PI and get an output as a flat file with the FullName and LastName concaternated.
Example:
SourceFile.txt:
Jason
Gates
TargetFile.txt:
Jason Gates
The mapping is working if I test it using the test feature in Enterprise Services Builder's test mapping feature without any files.
How can I execute the mapping using plain text flat files?
Thanks in advance!
Additional information:
Source file has structure:
First Name
Last Name
Target file has structure:
Full name
The object is to:
u2022 Create data, message, service interface structures for source and target to represent the source and target.
u2022 Create the mapping program between source and target.
u2022 Test mapping works internally in the builder using the internal test facilities.
u2022 Configure the directory to pick up the source file, and content covert to xml using sender file channel
u2022 Configure receiver determination, interface determination, receiver agreement, and target file channel
u2022 Test using files place on the file server
u2022 Trouble shoot using the runtime work bench.
u2022 Once this work, increase the complexity e.g. multiple people in the source file, etc
Edited by: NetSpike on Feb 17, 2010 2:25 PMhttps://wiki.sdn.sap.com/wiki/display/XI/FLATFILETOFLATFILE
-
New EDI Implementation - Flat File format for SPSI in eCommerce Gateway
Hi,
we are trying to setup EDI with a business partner, goal is to import a DELFOR message into Oracle Order Management. Plans are: translate the inbound message into the SPSI flat file format, load it through eCommerce Gateway / Release Management into Order Management.
For this purpose I'd like to test to the import of a SPSI flat file into eCommerce Gateway / Release Management, however I have difficulties to get a proper flat file. Is there a way to generate example flat files somehow? I tried to generate my own flat file, based on the Oracle manuals, but how can I be sure that the format is correct (besides of running the import program)? Any advice on this?
Or is there a better way, e.g. through XML files?
Thanks in advance,
David.Hi, thanks for the response.
Yes I use that report already to get the details of the flat file. But what I am missing is for example which records are repeated, e.g. for every 4000 record, do I need one 0010 record, or can I put multiple 4000 records within one 0010 record?
regards,
David. -
Publishing data from a Cube to a flat file
Hi,
I need to publish data from a Info Cube to a flat file. The requirement here is a variable selection will be specified (fiscal periods, product group) and based on the selection chosen the data should be generated in the flat file. What are the options I have to do this.
I know using an APD we can generare data into a flat file but how can we have a variable selection for that data generation. Plus is there a limit on the number of data records we can generate
using an APD
Apart from the APD what other options do we have?
Thanks
Rashmi.Hi Rashmi,
Please follow below steps by using open hub destination
1. Go to RSA1 -> Select Open Hub Destination from Left pane.
2. Right Click on the info area under which you want to create Open Hub and Select Create Open Hub Destination.
3. Give Name, Description for the Open Hub.
4. In template, Select Object type as "Infocube" and give the name in Name field. Press Enter
5. In Destination tab, Select Destination type as File. Give all other details like Filename, Directory etc.
In the Destination tab select type as FILE and give SEPARATOR as comma(,) and not as semi-colon(
and observe that the values iin the file will be displayed in different cells
6. In Field Def tab, you will see all the Fields that can be transferred from Source infocube to File.
7. Save the open hub destination.
8. Right click on created open hub, Select Create transformation. Give Source of transformation as the infocube. Make transformation as needed.
9. Again right click on the open hub, Select Create DTP. Then Save and Activate the DTP.
10. Schedule the data extract as required.
Option2:
You can download in LISTCUBE tcode as well.
Hope this helps.
Regards,
Reddy -
Hi,
I have data in my oracle DB and I generated the data using procedure, using consume adapter service, oracleDBbinding.
The schema has been formed in my Visual Studio project which it will be my source schema. Now I need to generate a text file with a flat file format!! How do I accomplish that?
I need that text file with a flat file format in order to create my destination schema using the flat file schema wizard!helpful!
But I still can't figure out how to generate oracle data in a flat file format and insert these
data to my destination schema using flat file wizard.
What I'm trying to explain is that I don't have a sample file of data which I need to create based on the data that is available in Oracle DB.
Example of data:
PO1999-10-20
US Alice Smith 123 Maple Street Mill Valley CA 90952
US Robert Smith 8 Oak Avenue Old Town PA 95819
ITEMS,ITEM872-AA|Lawnmower|1|148.95|Confirm this is electric,ITEM926-AA|Baby Monitor|1|39.98|Confirm this is electric -
Generate a text file using Portal
Hello Everyone,
I need to generate a flat text file from a portal screen. I have no idea as
to what is the best way to do this. I have a screen on which i will have a
push button which when pressed needs to run a procedure which generates a
text file.
I don't know whether this is possible also or not.
Any help in the matter would be great.
Thanks.Hi,
You can create a procedure like this.
create or replace procedure op1
as
begin
htp.init;
owa_util.mime_header('plain/text', false);
htp.p('Content-Disposition: attachment; filename='||'output.txt');
owa_util.http_header_close;
htp.p('My output is text...');
exception
when others then
null;
end;
This will direct the ouput to a file called output.txt.
Thanks,
Sharmila -
Font formatting for Flat file generated in PI
Hi,
We have a File receiver scenario in PI wherein we are generating a Flat file. While creating the file, the font needs to be of specific font type and size
eg:
Pyramid u2013 Lucida Console (Size 10)
Aspheria u2013 I5_10N (Size 10)
Is there any way this can be configured or implemented in PI?Hi ,
This requirement we can achieve using XSLT Mapping,we can define the font size in mapping program it self,select output method in xslt program as TEXT,no need of any file content conversion in Receiver Communication channel.
refer this link how to uses the methods for font sizes.
http://www.xml.com/pub/a/2001/01/24/xsl-fo/
Regards,
Raj -
Generating MD5 hash value for any specific flat file
Hi experts,
I am developing a program that will generate flat files and also I should generate the MD5 Hash value for each and every flat files. My question is how can I generate the MD5 hash value for the generated .txt files.
Thanks in advance
ShabirYou can use functions
MD5_CALCULATE_HASH_FOR_CHAR for text file
MD5_CALCULATE_HASH_FOR_RAW for binary -
How to generate a Text file from a Report
Hi Friends,
I need to generate a Text file foramat from my Report.My client is having a text file in a standard format.I need to Generate this Text file according to that text format.
My requirement is For one production order there will be so many line items and for each line item based on its Quantity i need to generate serial numbers.
For Ex for Production order 100 there r 3 line items.If 1st line item is of Quantity 20.I need to Generate 20 serial numbers for the 1st line item and the same for the remaining line items also.
How can i proceed.I need to do dis based on the production order Number.
In d selection screen i need to put the fields Production order Number and From:----
To:----
and u button Generate Text file.If I click on Generate Text file Text file should be generated.
Thanks & Regards,
Chitty.
Edited by: chitty d on Mar 12, 2009 5:44 AMHi,
As far as i understand from your requirements, it like you need all the data item leve into a text file.
You can fetch all the relevant data from variuos tables and then use GUI_Download into a text file. -
Load of hierarchies from R/3 via flat file: how to generate the flat file?
Hello,
I need to build a custom extractor for a hierarchy. The hierarchy exists in R/3, but there's no standard datasource to extract it. I know I can upload it via flat file, but I have a question related to this.
Does anyone know if there's a program (standard or custom by SAP) or function module in R/3 which allows me to generate that flat file, with the required format by BW?
I would appreciate very much any help about this topic
Thanks in advanceIn CO-PA there is a way to generate Hierarchy Extractors (see Note 422175 for more details). With a Custom Program you generate a specific DataSource.
Hope it helps
GFV -
Load of hierarchies from R/3 via flat file: how to generate that flat file?
Hello,
I need to build a custom extractor for a hierarchy. The hierarchy exists in R/3, but there's no standard datasource to extract it. I know I can upload it via flat file, but I have a question related to this.
Does anyone know if there's a program (standard or custom by SAP) or function module in R/3 which allows me to generate that flat file, with the required format by BW?
I would appreciate very much any help about this topic
Thanks in advance
PatriciaHi Patricia,
if there is, I'd love to get hold of it.
I have only ever managed this by extracting the relevant data into Excel and then doing a long series of VLOOKUPS to establish parent and child ids.
I have a sample spreadsheet I can send you if you like.
Regards,
Mike -
How to generate blank spaces at end of the record in a flat file with fixed
Hi,
I am generating a flat file with fixed length.
In my ABAP program, i am able to see the spaces at the end of the recors in debug but when download to applicaiton server i am not able to see those spaces.
How can i generate blank spaces at the end of the record in a flat file?
Please update
Thank youHow are you downloading the file? And, How are you looking at the file on the application server?
Can you provide snippets of your code?
Cheers
John
Maybe you are looking for
-
CUCM 8.6.2 LDAP User Delete Pending LDAP Sync Status Inactive
BE6K ver 8.6.2 Client has a user who recently got married. They changed her account information in Active Directtory to reflect her new last name. At that point CUCM shows her as Delete Pending LDAP Sync Status Inactive CUC shows LDAP User has been
-
Application is hanging after exporting a report
Post Author: AnthonyM CA Forum: .NET I am using Crystal Reports XI R2 with C# in VS 2005. I am also using Crystal Reports SDK 11.5. I have a main report that contains 4 subreports that I want to pass data to at run-time. When I run my app to do this
-
I've changed my keyboard language to a forieng language and when MacBook sleep I could not type the actual password in US language.. Try alot but no language change key
-
Exporting from imovie HD6 to iDVD 08
I upgraded to iDVD 08 but could not do imovie 08 because I don't have an intel based mac. Now I try to export an imovie to idvd and it shows th project but does not take any time. The resulting file is not big enough and when i look at the idvd it fr
-
All my PC's and computer(both Apple and Microsoft) will conect to internet except appleTV I have exhausted all resets, It did work yesterday now no connection Has anyone had same problem ?