Export data from a data block
WEB_SERVER_PREFIX := FND_WEB_CONFIG.GFM_AGENT; MIME_TYPE := NVL (FND_PROFILE.VALUE ('FND_EXPORT_MIME_TYPE'), 'text/tab-separated-values' ); DB_FILE := FND_GFM.FILE_CREATE (CONTENT_TYPE => MIME_TYPE, PROGRAM_NAME => 'export'); V_RECORD_NUM := :SYSTEM.CURSOR_RECORD; GO_BLOCK ('PO_RULE'); FIRST_RECORD LOOP EXIT WHEN SYSTEM.LAST_QUERY = TRUE ; OUTSTRING := 輸入你要的資料 FND_GFM.FILE_WRITE_LINE (DB_FILE, OUTPUT_STRING); NEXT_RECORD; END LOOP; GO_RECORD (V_RECORD_NUM); DB_FILE := FND_GFM.FILE_CLOSE (DB_FILE); URL := FND_GFM.CONSTRUCT_DOWNLOAD_URL (WEB_SERVER_PREFIX, DB_FILE, TRUE); FND_UTILITIES.OPEN_URL (URL); 這樣就搞定了,我剛開始想的太複雜了。因為我要使用Excle的模版,認為模版要在程式中呼叫,所以走了很多的彎路。 TO Mypeking : 你隨便開啟一個form只要有資料列的,你選擇檔案--〉匯出就可以存入excel了。
Oracle標準功能就用這一句程式碼:app_export.event('EXPORT');
自己寫最多再在前面加個:go_block('xxx');
就夠了。
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/59792/viewspace-980611/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- OAF export data from VO in xlsx formatExportORM
- 初探data pump export (二)Export
- 初探data pump export(一)Export
- Data Utilities : Export and Import Utilities (57)ExportImport
- Get data style from ExcelExcel
- Unload data from oracleOracle
- get_data_from_yml
- DATA BLOCK內部結構BloC
- SQL*Net more data from clientSQLclient
- Oracle Data block 的物理結構OracleBloC
- Oracle 的 data block研讀(二)OracleBloC
- oracle10g data block structureOracleBloCStruct
- DATA BLOCK內部結構圖BloC
- How to migrate data from Oracle to MSSQLSERVEROracleSQLServer
- Availability and Optimization of Free Space in a Data Block(五)AIBloC
- Availability and Compression of Free Space in a Data BlockAIBloC
- How to get ORACLE_HOME from data dictionaryOracle
- Unload data to a flat file from Oracle databaseOracleDatabase
- oracle concept——data block,extent,segment-01OracleBloC
- 【等待事件】SQL*Net more data from dblink事件SQL
- SQL*Net more data from dblink Reference NoteSQL
- External Tables: Querying Data From Flat Files in OracleOracle
- Script:Translate RDBA relative data block addressBloC
- 模擬data block lost write的簡單方法BloC
- 原創:oracle data block 內部結構分析OracleBloC
- LeetCode-Find Median from Data StreamLeetCode
- [轉載]ORA-01578: ORACLE data block corruptedOracleBloC
- Oracle Data block 的物理結構-體系架構OracleBloC架構
- 【轉載】使用 BAPI_BUPA_CREATE_FROM_DATA 建立BPAPI
- Oracle的SQL*Net more data from client 等待事件分析OracleSQLclient事件
- Oracle 11g Data Guard 使用duplicate from active databaseOracleDatabase
- 搭建11g data guard(duplicate from active database方式)Database
- Doing Data Science: Straight Talk from the FrontlineAI
- Import Data From MS Excel to DataSet without using COM ObjectsImportExcelObject
- Enterprise Library - Data Access Application Block 6.0.1304APPBloC
- Data Quality and Data Cleaning
- SQL*Net more data from dblink引起library cache pinSQL
- Got fatal error 1236 from master when reading data from binary logGoErrorAST