How to generate Header and Trailer for a file
Hi Guru
How can we generate header and Trailer for a file
EX:
i want to generate header with date and trailer with record count from table.
Sample file :
20120120
fwsfs
adfwsfd
adff
afsadf
afdwsg
adgsg
adgsgg
asgdsag
sdgasgdaf
sdfsagfadf
10
Hi ,
1.Create an interface to load data from oracle to file and set generate header as false option in IKM .
2.Create variable get_current_date of alphanumeric datatype and implement logic SELECT to_Char(SYSDATE,'yyyymmdd') FROM DUAL under refreshing tab
3.Create variable get_record_count of numeric datatype and implement logic SELECT '<%=odiRef.getPrevStepLog("INSERT_COUNT")%>' FROM DUAL under refreshing tab
4.Create a package
Drag the get_current_date variable ,
Drag odioutfile and paste the below logic OdiOutFile "-FILE=D:\ODI_TEST\emp.txt" "-CHARSET_ENCODING=ISO8859_1" "-XROW_SEP=0D0A" #GET_current_date in command tab
Drag the interface
Drag another variable get_Record_count
Drag the odioutfile and paste the below logic OdiOutFile "-FILE=D:\ODI_TEST\emp.txt" -APPEND "-CHARSET_ENCODING=ISO8859_1" "-XROW_SEP=0D0A"
#GET_RECORD_COUNT in command tab
Link all these in sequence,save and run the package.
OR Modify the IKM SQL to File Append to achieve same functionality.
Thanks,
Anuradha
Similar Messages
-
Generating Header and trailer sections in reports..
Hi all.
I want to generate reports, that has both a header- and a trailer section page.
Usually this was part of the template report, but in Designer 9, the generator first converts the template report (.rdf) to a template report (.tdf), and is then using this template.
But where is the header- and trailer page? You can't see them in the reports builder, when looking at templates, and the generated report does not contain any header- nor trailer pages.
Have I missed something?
Any replies welcome...
Benny AlbrechtsenI have the same question. This is what I found on Metalink.
goal: How To Define A Header/Trailer Section In A Reports Template Definition File (TDF)
fact: Oracle Reports Developer
fix: It is not possible to have a HEADER/TRAILER section in a Reports Template Definition File (TDF). Templates do not need to have a HEADER/TRAILER section, infact there is no sectioning in a template. They just define the visual layout when applied against a report section.
This did not answer my question! -
How to generate WS and WSDL for proper working DS under ALDSP 3.0?
Hi,
Ive got small problem with generating WebService and WSDL for proper working DataService in AL Data Service Studio.
Whats the worse, I cant find any good documentation showing how to do it step by step in the new development enviroment.
Currently Im doing it like:
1) right click on DS and then Create Web Service Map
2) when Im trying to View WSDL for created (in previous point) WS Map, after a while for deployment, I get Error 404--Not Found
3) when Im trying to Save WSDL As ... , after showing where it should to be saved, nothing happens
4) At Test Web Service Map option Ive got (in ZIP archive there is error trace from WebLogic console):
http://localhost:7001/xyz/abc/test/something.ws?WSDL
failed due to weblogic.testclient.WsdlParseFailedException: Not Found
My questions are:
i) how I can generate WS for DS?
ii) when there will be some tutorials to download for ALDSP 3.0?Some new facts about this situation.
A moment ago Ive made all the things like in edocs:
http://edocs.bea.com/aldsp/docs30/install/migration.html#wp1081343
After that problems still exists and what is the worst - the same problem as at the first time.
So:
1) Problem of not migrated kind="private" to visibility="private"
2) Problem of migrating the files encoded in CP1250 if they got charakters encoded in CP1250
3) I know that proces of migration from multiple imports to the same namespace within XSDs must be done in manual way but problem still exist
4) There are some issue like this:
"[ld:xXx_PIDataServices/cache/order/order.ds]: The return type of the read function "{ld:xXx_PIDataServices/cache/order/order}setOrderStatus" with arity 1 does not match the Data Service target (element) type "{services.cache.integration.amg}setOrderOut"."
When I remove kind="read" from pragma then its going to be valid.
In short time we will try to contact with our local BEA support.
PS Right now I was trying to import another project (sample one for Workshop 8.1 - <BEA_HOME>\weblogic81\samples\workshop\SamplesApp) and it also didnt go smoothly :/
Edited by PiotrGalas at 02/01/2008 4:20 AM -
Unsupported version Error while generating header and footer for the PDF
hi
I want to genrate header and footer for the PDF file however on the call of the EndPage class i got a Unsupported Version Error Unsupported major minor Version Error and Class loader Define class
What has gone wrong ?.Can you provide more information about what you were trying to do? In particular, what does your code like like?
Also, can you include the stack trace, and the complete error message? -
How to add header and fooder in text file
Hi,
i have created simple application for generate report from database into text file.
But i need to add header and fooder in text file. I dont know is there any API for adding these.
Can anyone help me to create header and fooder in text file.
the below text are needs to be print in the header
name of the table :
Recorder type :
file creation time:
the below text are needs to be print in the footer
Recorder Number:
Record Type;
the actual code is
pst = con.prepareStatement("select REQUEST, DOMAIN_NAME, TRUNC(DATE_OF_CONFIGURATION) AS dateofConfig FROM employee where id=300");
rs = pst.executeQuery();
while (rs.next()) {
request = rs.getString("REQUEST");
domain_name = rs.getString("DOMAIN_NAME");
dateofconfig = rs.getString("dateofConfig");
System.out.println(request + " " + domain_name + " " + dateofconfig);
data.add(request + " " + domain_name + " " + dateofconfig);
System.out.println("before calling method");
writeToFile(data, "c:/Employee.txt");
System.out.println("file created successfull");
rs.close();
pst.close();
private static void writeToFile(List list, String path) {
BufferedWriter out = null;
try {
File file = new File(path);
out = new BufferedWriter(new FileWriter(file, true));
for (Object obj : list) {
String s= obj.toString();
out.write(s);
out.newLine();
out.close();
} catch (IOException e) {
}Thanks
Jasmin
Edited by: user13836688 on Mar 21, 2011 4:06 AM
Edited by: user13836688 on Mar 21, 2011 4:07 AM
Edited by: user13836688 on Mar 21, 2011 4:08 AMuser13836688 wrote:
i have created simple application for generate report from database into text file.First off, when posting code, use [code]...[/code]. or '' tags, not '<code>'.
But i need to add header and fooder in text file. I dont know is there any API for adding these.
Can anyone help me to create header and fooder in text file.Well you plainly have the code to write the file contents; and furthermore your report seems to be contained in a List called 'data'. Why not just add the header and footer lines to it? I'd also suggest making 'data' a LinkedList. That way you can add the header afterwards with no performance hit, just in case the information it contains isn't available at the start of your report loop.
Winston -
How to add header and footer to a file through ODI?
hi,
I want to add header and footer to my file..............footer should contain a counter so that page number can be displayed...................
Can anyone please guide me .................
Thanks .............
Ritikawhat is the utility you are using to create file . Interface or OdiSqlUnload ?
and what do you want to have Header and Footer as and how are you concluding the File as page 1 and page 2 etc ... ? -
How to Add Header and Footer in Flat file
HI All,
I am using ODI 11g.
MY interface is populating data from joining to 2 tables through sql query and Loads in to Flat file.
But i need to add Header and Footer in the Flat file.
In the below 3 lines
The 1st line is header ....2nd line is Data ....3rd line is Footer.
Any ideas how to work on this.
HSB9KT.KTPRTO.EBSDATA.D0000000 20120626020636
CFFE00263 SOLGSR014991340000527894536058173880207SOLNE06242012072420120000009048382650000247MRS
T00000000000000000000
Thanks,
LonyHi Drieux,
i am able to add Header and Footer in this.
But i want the header like Its like HSB9KT.KTPRTO.EBSDATA.D0000000 || SYSDATE (YYYYMMDDHHMMSS)
In my Out put i only see header as HSB9KT.KTPRTO.EBSDATA.D0000000 .
I have added a Variable where i am using SELECT to_char(sysdate,'YYYYMMDDHHMMSS') FROM DUAL query.
create header (HSB9KT.KTPRTO.EBSDATA.D0000000 #v_DATE)
/*$$SNPS_START_KEYSNP$CRDWG_TABLESNP$CRTABLE_NAME=FFT_SOLSNP$CRLOAD_FILE=/home/tarak/FFT_SOL.datSNP$CRFILE_FORMAT=FSNP$CRFILE_SEP_FIELD=0x0009SNP$CRFILE_SEP_LINE=0x000ASNP$CRFILE_FIRST_ROW=0SNP$CRFILE_ENC_FIELD=SNP$CRFILE_DEC_SEP=SNP$CRSNP$CRDWG_COLSNP$CRCOL_NAME=descrSNP$CRTYPE_NAME=STRINGSNP$CRLINE_OFFSET=1SNP$CRLENGTH=994SNP$CRPRECISION=994SNP$CR$$SNPS_END_KEY*/
Any idea why this sysdate part is not showing in Header. -
How to remove Header and Footer from Flat File
Hi,
In a scenario , we are going to recieve a flat file which will contains header , footer and data. We have to have to load data in Oracle tables and remove header and footer.
once the data load is complete , we have to delete flat file from source directory.
Please help me in solving this issue.
Thanks,
KamleshYou have a header parameter in the file datastore. You can provide any number to skip rows from top of the file. For footer you can create a filter in staging area.
Filter coould be something like this.
where source_alias.source_column not like '%FOOTER_OR_ANY_VALUE_AS_PER_YOUR_REQ' -
How to get Header and footer in PDF file from a report program
I am generating spool from ALV GRID DISPLAY. Only the body of a report is coming in the SPOOL. I mean content of the TOP_UP_PAGE event is not coming in the SPOOL. Please suggest me.
Coding I am pasting here.
* Begin of modification(+) by I080845 ( Prasanta Maiti ) 12/23/2011 Defect# 17821
IF sy-batch IS NOT INITIAL
* Begin of modification(+) by I080845 ( Prasanta Maiti ) 01/19/2012 Defect# 18155
and i_final is NOT INITIAL.
* End of modification(+) by I080845 ( Prasanta Maiti ) 01/19/2012 Defect# 18155
* The print parameters are retrived and validate
CALL FUNCTION 'GET_PRINT_PARAMETERS'
EXPORTING
* ARCHIVE_TEXT = c_check
* AR_OBJECT = c_check
* ARCHIVE_REPORT = c_check
* COVER_PAGE = c_check
in_archive_parameters = v_arcpar
in_parameters = v_pripar
destination = 'LOCL'
layout = 'X_65_512/2'"c_layout
line_count = '65' "60
line_size = '1024'
no_dialog = c_check
IMPORTING
out_archive_parameters = v_arcpar
out_parameters = v_pripar
valid = v_val
EXCEPTIONS
archive_info_not_found = 1
invalid_print_params = 2
invalid_archive_params = 3
OTHERS = 4.
IF v_val NE space AND sy-subrc = 0.
v_pripar-prrel = space.
v_pripar-primm = space.
NEW-PAGE PRINT ON NEW-SECTION PARAMETERS v_pripar
ARCHIVE PARAMETERS v_arcpar NO DIALOG.
NEW-PAGE.
** displaying output in PDF
* PERFORM f_show_record.
* ALV Display
PERFORM f_alv_display.
NEW-PAGE PRINT OFF.
CALL FUNCTION 'ABAP4_COMMIT_WORK'.
ENDIF.
IF NOT sy-spono IS INITIAL.
"Declarations
v_spool_id = sy-spono.
* Checking the flag for too large spool
* IF v_too_large IS INITIAL.
CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
EXPORTING
src_spoolid = v_spool_id
no_dialog = space
IMPORTING
pdf_bytecount = v_bytecount
TABLES
pdf = i_pdf
EXCEPTIONS
err_no_abap_spooljob = 1
err_no_spooljob = 2
err_no_permission = 3
err_conv_not_possible = 4
err_bad_destdevice = 5
user_cancelled = 6
err_spoolerror = 7
err_temseerror = 8
err_btcjob_open_failed = 9
err_btcjob_submit_failed = 10
err_btcjob_close_failed = 11
OTHERS = 12.
Edited by: Thomas Zloch on Feb 10, 2012Hi,
Try with ALV LIST DISPLAY. I dont thing so its possible with ALV GRID DISPLAY. -
How delimited by header and footer from Source file in BPEL 11g
Hi Friends,
I have source data below like This..
SOFTWARE COMPONENTS:
BPEL 11G,
J DEVELOPER(11.1.1.3)
FILE READ ADAPTER
WEB LOGIC EM SERVER(10.3.3.0)
1|10005|857896|BR |0000 |6544|kantro|54635
1|10265|69875|.36544|2456112|00000|000000|00000|SE|5456|466554|789745|54.325|KVM|56476.32
1|10235|JA|5456|4565|56|656|5855|5555|55445|5444|D|45457|0000|KIL|6555|55566|4454544|45669
1|10235|JA|5456|4565|56|656|5855|5555|55445|5444|D|45457|0000|KIL|6555|55566|4454544|45664
1|10235|JA|5456|4565|56|656|5855|5555|55445|5444|D|45457|0000|KIL|6555|55776|4454544|45660
1|10235|JA|5456|4565|56|656|5855|5555|55445|5444|D|45457|0000|KIL|6555|55566|4454544|85668
1|10235|JA|5456|4565|56|656|5855|5555|55445|5444|D|45457|0000|KIL|6555|55566|4454544|45666
1|10235|JA|5456|4565|56|656|5855|5555|55445|5444|D|45457|0000|KIL|6555|85876|4454544|45666
1|10235|JA|5456|4565|56|656|5855|5555|55445|5444|D|45457|0000|KIL|6555|55566|4454544|69848
1|10235|JA|5456|4565|56|656|5855|5555|55445|5444|D|45457|0000|KIL|6555|69566|4454544|45666
1|10235|JA|5456|4565|56|656|5855|5555|55445|5444|D|45457|0000|KIL|6555|78966|4454544|85669
1|10255|km|5653|RJ |00000|5557544|13-08-1998
But i need to Delimited and insert the data into table ..Here Header data insert into saperate table and
middlle of the data insert into main table and footer data insert in another table it all happen one attempt by using file read Adapter(11.1.1.1.3)You have a header parameter in the file datastore. You can provide any number to skip rows from top of the file. For footer you can create a filter in staging area.
Filter coould be something like this.
where source_alias.source_column not like '%FOOTER_OR_ANY_VALUE_AS_PER_YOUR_REQ' -
Unix Flat File: Remove header and trailer and put in another file.
Hi,
I have Source Flat File placed on Unix Box with header and trailer.
I want to remove Header and Trailer and put in some other file and Data in another file.
I tried following command in unix its working.But not getting Header and Trailer in another file.
sed '1d;$d' input_source.txt > output_data.txt
also How will i use OS command for it in ODI.
Guide me.
Thanks
AshwiniHi Ashwini,
You can run OS commands in a package using an ODI Tool: OdiOSCommand.
It is also possible to execute OS commands in an ODI procedure using the Operating System or Jython technologies.
There should be some articles about this on metalink (http://metalink.oracle.com).
Thanks,
Julien -
How to do the header and trailer validation in the input file?
hi,
what are the ways we can validate whether header and trailer record exists in the input file?
how to do that?
regards
RubanFile to Proxy Validation
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/99593f86-0601-0010-059d-d2dd39dceaa0
/people/swaroopa.vishwanath/blog/2005/06/24/generic-approach-for-validating-incoming-flat-file-in-sap-xi--part-1
/people/swaroopa.vishwanath/blog/2005/06/29/generic-approach-for-validating-incoming-flat-file-in-sap-xi--part-ii
/people/prateek.shah/blog/2005/06/14/file-to-r3-via-abap-proxy -
Receiver FCC Structure For Header and Trailer
Hi Guys ,
I need to go for receiver FCC for header and trailer in PI .How the FCC in communication channel needs to be configured if I am taking a separate node for header and trailer in mapping .Output of the file should be as the file attached.
Thanks.
Regards.Hi,
If you are using File communication channel as a reciver you can go with FCC.
Use record set structure as : Header,detail,trailer.
https://help.sap.com/saphelp_nw04/helpdata/en/d2/bab440c97f3716e10000000a155106/content.htm
Otherwise if you are going for SFTP to create the file ... follow the Indrajit suggestion..
Still facing any issue.. Please let us know..
Thanks,
Sreenivas... -
Supress Header and Trailer from being generated and printed
I am using oracle 9i Reports Builder.
Is there a way to supress the header and trailer pages from being generated and printed.Increase the marigin size to zero size header and trailer in the layout editor and then run the report.
-
Header and trailer pages in report templates
Hi:
I wonder how can i make header and trailer pages in the tamplate reports , so that the objects in the template header & footer report would be inherited to the generated reports. I use Oracle reports 6.0.8 and there is no header section, niether Trailer section in the Template Editor, I've read in the reports online help :"You can use the margin and body of the Header and Trailer sections to create a Header and Trailer page as in earlier releases. In future releases, you will be able to add and delete sections.", is there any method i can use to make header&trailer pages in the template.I have the same question. This is what I found on Metalink.
goal: How To Define A Header/Trailer Section In A Reports Template Definition File (TDF)
fact: Oracle Reports Developer
fix: It is not possible to have a HEADER/TRAILER section in a Reports Template Definition File (TDF). Templates do not need to have a HEADER/TRAILER section, infact there is no sectioning in a template. They just define the visual layout when applied against a report section.
This did not answer my question!
Maybe you are looking for
-
Everything was fine with my phone just a few hours ago. Then I got home from our Father's Day bash and found my phone to be "searching..." with no internet connection, no ability to text or call anyone, and everything I've tried as far as troublesho
-
AUR3 [aur-pyjs] implementation in python (pyjs) + JSON-RPC
Welcome to AUR3. available (pre-alpha)... http://aur.archlinux.org/packages.php?ID=38359 QUICKSTART 1) install # http://aur.archlinux.org/packages.php?ID=38359 2) run # /usr/lib/aur-pyjs-git/aur serve -f 3) view # http://127.0.0.1:8000
-
Is it possible to get a refund on an app? I just purchased pages and keynote. I personally don't see a difference between the two and feel like I paid for the same thing twice.
-
I have done some research and found this (http://discussions.apple.com/thread.jspa?messageID=10762187�) but alas, my problem is different. Ok, this is what I see... * in Mail, I open Preferences > General and have "Ping" set for "New mail so
-
i have got an iphone 4 and i have plugged it into my windows 8 laptop using the usb cable, and a message pops up on the laptop saying usb not recognized, the iphone doesnt say its charging or anything, how do i get my laptop to recognize my phone?