Export with dynamic file name
Hi everyone.
I want to know how export oracle tables with dynamic file name on windows XP platform.
bye.
You'd have to generate the export command-line or par file using a script -- Windows or SQL !
It would be easy to use SQL to generate the script.
So you could have a BATch file that
a. Calls the SQL to generate the export command-line or parfile
b. Executes the export
even possibly run in a loop.
Hemant K Chitale
Similar Messages
-
Saving Offline PDF form from Web-Dynpro with Dynamic File Name
Hello All,
We have a offline PDF form.... When we save the form, a default file name appears. We need to change this default name to some value that is already available in the form fields.
I have gone through some posts in the forum. However not able to figure out the solution.
Following are the details:
1. Web-Dynpro used : ABAP Web-Dynpro
2. Form Type: Native
3. Offline Editable form
Regards,
Kunjal PatelHi Rajesh,
I have not yet found a solution....
Also as you have seen no one is replying.....
All,
Should we consider that this issue does not have a specific solution?
Regards,
Kunjal -
Calling SQL Loader with Dynamic file names
HI all
I woul like to know if I can call sql loader as below
$ sqlldr userid=uname/pwd control=new.ctl, data=$1
I have to schedule my loader 3 times a day and each time my file names are different(AAA_BBB_timestamp)
ThanksI have found a solution myself and if any one is interested its like this
for file in `ls -1 /opt/user/from/`
do
sqlldr userid=user/pwd@connect_string control=control_file.ctl data="/opt/user/from//$file"
done
Ramu -
IDOC to multiple file with dynamic file names with same content
Hi,
My scenario is from IDOC to file.
The number of files which i need to create is dynamic, which depends on the number of plants.
I have a Z-table where i will maintin list of all plants ( non SAP plant names).
I need to fetch the data from this z-table and depending on the nunber of plants i need to create the file for each plant and fiel name should contain plant name in it. EX: abc_<plant>_datatype.txt
I want to use only receiver one CC, and files should be created in the same directory.
Can we do this without BPM?Hi,
You can use the Mapping lookup concept to fetch the plant names from Z-tables and then you can use the variable substitution technique to resolve your purpose.
Here you need to create multiple interfaces ie.e per plant to create multiple files. You can use common Communication channel for all.
Mapping Lookup
http://help.sap.com/saphelp_nw04/helpdata/en/cf/406642ea59c753e10000000a1550b0/frameset.htm
Mapping Lookups - RFC API
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/a03e7b02-eea4-2910-089f-8214c6d1b439
/people/bhavesh.kantilal/blog/2006/11/20/webservice-calls-from-a-user-defined-function
http://help.sap.com/saphelp_nw04/helpdata/en/cf/406642ea59c753e10000000a1550b0/frameset.htm
Variable Substitution
An interesting usage of Variable Substitution in XI
/people/sameer.shadab/blog/2005/09/23/an-interesting-usage-of-variable-substitution-in-xi
SP12 -Variable Substitution option
Receiver File Adapter:Variable substitution :FATAL ERROR
Thanks
Swarup -
Spooling with dynamic file names
Hi
i'm having a situation where i need to execute a script daily, the logs of the script should be saved using spool. is there a way to dynamically create a destination file with the filename as "spooled_text_"||sysdate
like
spool spooled_text_30_Jan_2008_08_45_AM
Any help is greatly appreicated
Thank youAs follows, in sqlplus...
SQL> column dt new_value file_date
SQL> select to_char(sysdate,'YYYYMMDD') as dt from dual;
DT
20080130
SQL> spool file_name_&file_date..log
SQL> spool off
SQL> host ls
file_name_20080130.log -
Csv-export with dynamic filename ?
I'm using the report template "export: CSV" to export data to a csv-file. It works fine with a static file name. Now, I would like to have a dynamic file name for the csv-file, e.g. "ExportData_20070209.csv".
Any ideas ?Ran,
This is a procedure, which will export result of any query into a flat file in your directory:
PROCEDURE export_rep_to_bfile (
p_query IN VARCHAR2,
p_directory IN VARCHAR2,
p_filename IN VARCHAR2 DEFAULT 'export_csv.csv',
p_delimiter IN VARCHAR2 DEFAULT ';',
p_coll_name IN VARCHAR2 DEFAULT 'MY_EXP_COLL'
IS
v_file UTL_FILE.file_type;
v_column_list DBMS_SQL.desc_tab;
v_column_cursor PLS_INTEGER;
v_number_of_col PLS_INTEGER;
v_col_names VARCHAR2 (4000);
v_line VARCHAR2 (4000);
v_delimiter VARCHAR2 (100);
v_error VARCHAR2 (4000);
v_code VARCHAR2 (4000);
BEGIN
-- Get the Source Table Columns
v_column_cursor := DBMS_SQL.open_cursor;
DBMS_SQL.parse (v_column_cursor, p_query, DBMS_SQL.native);
DBMS_SQL.describe_columns (v_column_cursor,
v_number_of_col,
v_column_list
DBMS_SQL.close_cursor (v_column_cursor);
FOR i IN v_column_list.FIRST .. v_column_list.LAST
LOOP
v_col_names :=
v_col_names || p_delimiter
|| (v_column_list (i).col_name);
END LOOP;
v_col_names := LTRIM (v_col_names, ';');
v_file := UTL_FILE.fopen (p_directory, p_filename, 'W');
UTL_FILE.put_line (v_file, v_col_names);
--for ApEx when used outside of ApEx
IF htmldb_collection.collection_exists (p_collection_name => p_coll_name)
THEN
htmldb_collection.delete_collection
(p_collection_name => p_coll_name);
END IF;
htmldb_collection.create_collection_from_query
(p_collection_name => p_coll_name,
p_query => p_query
COMMIT;
v_number_of_col := 50 - v_number_of_col;
FOR i IN 1 .. v_number_of_col
LOOP
v_delimiter := v_delimiter || p_delimiter;
END LOOP;
FOR c IN (SELECT c001, c002, c003, c004, c005, c006, c007, c008, c009,
c010, c011, c012, c013, c014, c015, c016, c017, c018,
c019, c020, c021, c022, c023, c024, c025, c026, c027,
c028, c029, c030, c031, c032, c033, c034, c035, c036,
c037, c038, c039, c040, c041, c042, c043, c044, c045,
c046, c047, c048, c049, c050
FROM htmldb_collections
WHERE collection_name = p_coll_name)
LOOP
v_line :=
RTRIM ( c.c001
|| p_delimiter
|| c.c002
|| p_delimiter
|| c.c003
|| p_delimiter
|| c.c004
|| p_delimiter
|| c.c005
|| p_delimiter
|| c.c006
|| p_delimiter
|| c.c007
|| p_delimiter
|| c.c008
|| p_delimiter
|| c.c009
|| p_delimiter
|| c.c010
|| p_delimiter
|| c.c011
|| p_delimiter
|| c.c012
|| p_delimiter
|| c.c013
|| p_delimiter
|| c.c014
|| p_delimiter
|| c.c015
|| p_delimiter
|| c.c016
|| p_delimiter
|| c.c017
|| p_delimiter
|| c.c018
|| p_delimiter
|| c.c019
|| p_delimiter
|| c.c020
|| p_delimiter
|| c.c021
|| p_delimiter
|| c.c022
|| p_delimiter
|| c.c023
|| p_delimiter
|| c.c024
|| p_delimiter
|| c.c025
|| p_delimiter
|| c.c026
|| p_delimiter
|| c.c027
|| p_delimiter
|| c.c028
|| p_delimiter
|| c.c029
|| p_delimiter
|| c.c030
|| p_delimiter
|| c.c031
|| p_delimiter
|| c.c032
|| p_delimiter
|| c.c033
|| p_delimiter
|| c.c034
|| p_delimiter
|| c.c035
|| p_delimiter
|| c.c036
|| p_delimiter
|| c.c037
|| p_delimiter
|| c.c038
|| p_delimiter
|| c.c039
|| p_delimiter
|| c.c040
|| p_delimiter
|| c.c041
|| p_delimiter
|| c.c042
|| p_delimiter
|| c.c043
|| p_delimiter
|| c.c044
|| p_delimiter
|| c.c045
|| p_delimiter
|| c.c046
|| p_delimiter
|| c.c047
|| p_delimiter
|| c.c048
|| p_delimiter
|| c.c049
|| p_delimiter
|| c.c050,
v_delimiter
UTL_FILE.put_line (v_file, v_line);
END LOOP;
UTL_FILE.fclose (v_file);
IF htmldb_collection.collection_exists (p_collection_name => p_coll_name)
THEN
htmldb_collection.delete_collection
(p_collection_name => p_coll_name);
END IF;
COMMIT;
EXCEPTION
WHEN OTHERS
THEN
IF DBMS_SQL.is_open (v_column_cursor)
THEN
DBMS_SQL.close_cursor (v_column_cursor);
END IF;
v_error := SQLERRM;
v_code := SQLCODE;
raise_application_error (-20001,
'Your query is invalid!'
|| CHR (10)
|| 'SQL_ERROR: '
|| v_error
|| CHR (10)
|| 'SQL_CODE: '
|| v_code
|| CHR (10)
|| 'Please correct and try again.'
|| CHR (10)
END export_rep_to_bfile;You may adjust this to get a report query, by doing the following:
DECLARE
x VARCHAR2 (4000);
BEGIN
SELECT region_source
INTO x
FROM apex_application_page_regions
WHERE region_id = TO_NUMBER (LTRIM (p_region, 'R'))
AND page_id = p_page_id
AND application_id = p_app_id;
END;which will get your region query.
...and there you go.
Denes Kubicek -
Dynamic file name from input payload (RFC 2 flat file)
Hi,
I have an RFC to flat file scenario. The output flat file has not an XML structure, it's just a plain text file generated with abap mapping.
In my source interface (RFC), I have a field called <FILENAME>, I want to use the value of that field to create the target file using dynamic file name. But if in variable substitution I use payload:ZRFC_NAME,1,FILENAME,1 It doesn't work because the dynamic variable substitution try to access to output payload, not the source one...
What can I do?Hi Marshal,
You can add a extra node to your target strucutre like
FileName- Node
--FileName - Element.
do the mapping from the field filename of RFC to FileName field in u r target strucure. And use this field path at Refrence in variable subtituion.
In the Content converison add the Name & Values as below
FileName.fileldNames -- FileName
FileName.fieldFixedLengths -- 0
FileName.fixedLengthTooShortHandling -- Cut
So the extra field in u r target structure would not populate in u r target text file.
Cheers
Veera -
How to read dynamic file names in RSEINB00?
Hi, ABAP Gurus,
actually I'm a PI Consultant. Now I have a scenario to use the report RSEINB00.
In the Applicaton Server i put ASCII IDocs with the following name convension: <static name>+<time stemple>:
SAPIDOC20111127-224128-952.txt
SAPIDOC20111127-224129-115.txt
I created a new port in WE21 and the Outbound file and Inbound fiel tabs haben the same configration:
physical directory: /ABC/DEV100/inbound/
Function module: EDI_PATH_CREATE_DATE_TIME
Inbound file: SAPIDOC.txt
To execute the report RSEINB00 I must give the complete file name and port. It is not convenient.
My target is, with a job to run RSEINB00 once daily to read all files with name "SAPIDOC + <time stemple>" full automatically.
Is it possible? how to figure it out?
thanks a lot in advance! <removed by moderator>.
Regards
Rene
Edited by: Thomas Zloch on Nov 29, 2011 5:23 PMwith the extension of the standard report RSEINB00 i solved this problem. here is some code:
DATA:
dir_name LIKE epsf-epsdirnam,
file_mask LIKE epsf-epsfilnam,
g_message_fields LIKE edimessage.
DATA:
filename LIKE edi_path-pthnam,
filename2 LIKE edi_path-pthnam,
myport TYPE EDIPO-PORT.
DATA: h_EDIDC LIKE EDIDC.
DATA:
wa TYPE file_table.
DATA:
t_dir_list TYPE STANDARD TABLE OF epsfili WITH HEADER LINE,
itab TYPE table of file_table WITH HEADER LINE.
*The directoy, where the Markant ASCII IDocs are droped by XI.
dir_name = '<.../inbound>'.
*File mask of ASCII IDocs.
file_mask = 'XYIDOC.'.
*File port.
myport = '<Portname>'.
CALL FUNCTION 'EPS_GET_DIRECTORY_LISTING'
EXPORTING
dir_name = dir_name
file_mask = file_mask
TABLES
dir_list = t_dir_list
EXCEPTIONS
invalid_eps_subdir = 1
sapgparam_failed = 2
build_directory_failed = 3
no_authorization = 4
read_directory_failed = 5
too_many_read_errors = 6
empty_directory_list = 7
OTHERS = 8.
IF sy-subrc <> 0.
MESSAGE e600(fr) WITH 'No ASCII IDoc exits'.
ENDIF.
"BREAK-POINT.
*The old ASCII IDocs are stored in a dataset and copied with new file name sent_<original name>
LOOP AT t_dir_list.
CONCATENATE dir_name '/' t_dir_list-name INTO filename.
CONCATENATE dir_name '/sent_' t_dir_list-name INTO filename2.
open dataset filename for input in text mode.
open dataset filename2 for output in text mode.
if sy-subrc = 0.
do.
read dataset filename into wa.
if sy-subrc <> 0.
exit.
endif.
transfer wa to filename2.
append wa to itab.
enddo.
endif.
close dataset filename.
*loop at itab into wa.
transfer wa to filename2.
*endloop.
close dataset filename2.
PERFORM inbound_processing USING filename.
ENDLOOP.
*& Form inbound_processing
FORM inbound_processing USING filename TYPE edi_path-pthnam.
do inbound processing from file
CALL FUNCTION 'IDOC_INBOUND_FROM_FILE'
EXPORTING
file_name = filename
port = myport
EXCEPTIONS
file_open_failed = 1
marker_to_be_deleted = 2
read_file_failed = 3
idoc_not_stored = 4
file_delete_failed = 5
marker_modify_failed = 6
event_create_failed = 7
first_record_invalid = 8
invalid_record = 9
OTHERS = 10.
IF sy-subrc <> 0.
fill message fields for exception handling from system fields
MOVE-CORRESPONDING sy TO g_message_fields.
error handling using the 3.0 business workflow
CALL FUNCTION 'IDOC_ERROR_WORKFLOW_START'
EXPORTING
docnum = 0
eventcode = 'EDIM'
mess = g_message_fields
EXCEPTIONS
no_entry_in_tede5 = 0
error_in_start_workflow = 0
OTHERS = 0.
do not care for exceptions here
COMMIT WORK.
append message for RFC
MESSAGE ID g_message_fields-msgid
TYPE 'A'
NUMBER g_message_fields-msgno
WITH g_message_fields-msgv1 g_message_fields-msgv2
g_message_fields-msgv3 g_message_fields-msgv4.
ENDIF.
ENDFORM. "inbound_processing -
Hi Master,
I written the UDF for Getting the Dynamic File name.
DynamicConfiguration conf = (DynamicConfiguration) container.getParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
// Retrieve the filename
String FileName = conf.get(key);
This is working ok - but I want to return these values so I can be used in mapping.
when I try to add the statement return FileName; , the compiler then complains with the following error:
cannot return a value from method whose result type is void return FileName;
Please help me,
Thanks,
AnuThanks Nithiyanandam,
I am using the Same code. But i am getting the Syntax error:
Source code has syntax error: E:/usr/sap/DX1/DVEBMGS01/j2ee/cluster/server0/./temp/classpath_resolver/Mapaf708c00d6bb11dd83ee00101816a382/source/com/sap/xi/tf/_MM_I_FF_O_RFC_.java:13: cannot resolve symbol symbol : class variable location: class com.sap.xi.tf._MM_I_FF_O_RFC_ variable a; ^ 1 error
UDF Name: FileName
while creating the UDF, I select the first radio button(Value). not Context and Queue.
I written the below code.
DynamicConfiguration conf = (DynamicConfiguration) container
.getTransformationParameters()
.get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create(
"http://sap.com/xi/XI/System/File",
"FileName");
String FileName = conf.put(key, a);
return FileName;
Thanks,
ANU -
Dynamic File Name depending on the Source File name
Hi Experts,
I have a problem like Dynamic File name depending on the Source File Name. I will explain with example as follwos
Source File name Targer Folder/Filename
NK01.VR59.L2007030 VR59/Rec.l200
NK01.VR71.L2017030 VR71/Rec.l201
NK01.VR77.L2027030 VR77/Rec.l202
See above the exaple, Depending on the Source file name, I am deciding where i need to place my file and what name i need to name it.
So please suggest me the solution and How can i do this with a single communication channel ? Do i need to create multiple CC for each folder??
Points will be rewarded for Valuable anwer.
Thanks in Advance,
Best Regads,
VijayHi VIjay,
Thanks for quick reply. But i am getting error in End to End Scenarios only. If i remove the Return " " statement from the UDF, while activating it is showing the error saying like missing return statement. I also mapped to the top most node to this UDF.
I am getting the following error in End to End error Scenarios:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
- <!-- Request Message Mapping
-->
- <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="">
<SAP:Category>Application</SAP:Category>
<SAP:Code area="MAPPING">EXCEPTION_DURING_EXECUTE</SAP:Code>
<SAP:P1>com/sap/xi/tf/_MM_Target_File_determined_</SAP:P1>
<SAP:P2>com.sap.aii.utilxi.misc.api.BaseRuntimeException</SAP:P2>
<SAP:P3>Fatal Error: com.sap.engine.lib.xml.parser.Parser~</SAP:P3>
<SAP:P4 />
<SAP:AdditionalText />
<SAP:ApplicationFaultMessage namespace="" />
<SAP:Stack>During the application mapping com/sap/xi/tf/_MM_Target_File_determined_ a com.sap.aii.utilxi.misc.api.BaseRuntimeException was thrown: Fatal Error: com.sap.engine.lib.xml.parser.Parser~</SAP:Stack>
<SAP:Retry>M</SAP:Retry>
</SAP:Error> -
Dynamic File name for Open Hub file
Hi All,
I wanted to create a .csv file using open hub destination. I wanted the name of the file to be dynamic based on month. for example in jan I wanted it as 01.Dump for January and 02.Dump for february.
is is possible at all to do that.I wanted to save the file in the application server. There should not be any manual intervention the process.
Thanks in advance.
Regds
RaghuHi
We have take month from the first record that we read.
Our requirement is to take one months data and give it in a file with a file name having the corresponding month.
In the code mentioned below MOC_CODE is the field that is used for this purpose.
Hope it helps.
Regards,
Raghu
code:
#!/bin/sh
Script to dump file.
Parameters.
$1 Division name to extract from the data file.
It re-arranges the columns.
It replaces values in strings.
Parameters.
DATA_FILE_NAME="data_file.csv"
HEADER_FILE_NAME="header_file.csv"
DIVISION_NAME="$1"
Re-arrange header file columns.
Transpose rows to columns comma separated.
HEADER_ROW=`cat "$
Re-arrange header columns.
Re-direct the output to a temporary file.
" | tr '\n' ',' | sed 's/,$//g'`
echo "$" | awk 'BEGIN { FS = ","; OFS = "," } { print $2, $3, $1, $4, $5, $6, $7 }' > "$.$.tmp"
Prepare awk program.
Re-arrange data file columns.
Replace UNI in 6th column with UNIT and Replace TON in 6th column with TONS.
Filter division rows.
AWK_PROGRAM="BEGIN { FS = \",\"; OFS = \",\"; TVAL = 0 } \$5 ~ /$/ { sub( \"UNI\", \"UNIT\", \$6 ); sub( \"TON\", \"TONS\", \$6 ); print \$2, \$3, \$1, \$4, \$5, \$6, \$7; TVAL = TVAL + \$7 } END { printf \"$ Total Value: %f\", TVAL 2> \"$$Re-direct the program to a temporary program file.Control.ctl\" }"
echo "$" > "$.awk"
Execute the data file formatting command.
awk -f "$.awk" "$" > "$.$
Get generation date.
Get moc code from data file.
.tmp"
GENERATION_TIME=`date +"%Y%m%d_%H%M%S"`
MOC_CODE=`head -1 $ | awk -F, '{ print $3 }'`
Prepare dump file.
DUMP_FILE_NAME="$_$_$_$"
cat "$.$.tmp" "$.$.tmp" > "$
Remove temporary files.
FTP dump file to remote server.
FTP.
rm *.tmp
REMOTE_SERVER="<replace with server ip address>"
REMOTE_USER="xxxx"
REMOTE_PWD="xxxx"
ftp -n "$" << EOF
quote USER "$"
quote PASS "$"
ascii
put "$"
bye
EOF
Exit.
exit 0 -
Xml file in dynamic file name in file receiver adapter
Hi,
I'm doing the dynamic file name in file receiver adapter. I have done as per instructed in /people/jayakrishnan.nair/blog/2005/06/20/dynamic-file-name-using-xi-30-sp12-part--i
All turned out okay. I have got the file name I require. Except that the file format is XML and I need to suppress the filename node occupied by the dynamic file name.
The content conversion mentioned in /people/sravya.talanki2/blog/2005/08/11/solution-to-the-problem-encountered-using-variable-substitution-with-xi-sp12, does not seem to solve my problem. As it is only for file format other than the XML one, because we only do the content conversion if we want to "convert" the format of the content from XML to the other format.
Does anybody have the solution to my problem? thanks in advanceThank you Raj for the direction
The way to do it is :
1. In ID, advanced tab, put a check on the adapter-specific message attributes - file name.
2. Put a "*" on the file name scheme
3. In IR, create a UDF to set up target file name :
DynamicConfiguration conf = (DynamicConfiguration) container
.getTransformationParameters()
.get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
// set up file name for receiver adapter
String SourceFileName = conf.get(key);
conf.put(key, TargetFileName);
return " ";
4. Map the above UDF to the header level of the target structure.
Regards,
Idi -
Dynamic file names in outbound file adapter
I have to configure a flow in XI system wich takes an input file from one machine and after mapping process leaves the output file in target machine with the same name of input file.
Name of input file won't be always the same (*.dat) so i cannot hardcode this name in outbound file adapter.
Does anyone know how to transfer input filename from inbound file adapter to XI message and then to outbound file adapter?
I know there is an option to create dynamic file names in file adapter but i think it isn't enought to solve my problem.I have to configure a flow in XI system wich takes an input file from one machine and after mapping process leaves the output file in target machine with the same name of input file.
Name of input file won't be always the same (*.dat) so i cannot hardcode this name in outbound file adapter.
Does anyone know how to transfer input filename from inbound file adapter to XI message and then to outbound file adapter?
I know there is an option to create dynamic file names in file adapter but i think it isn't enought to solve my problem. -
How to give a dynamic File Name for Receiver File/FTP Adapter.
Hi Experts,
I have one scenario in which we are creating a flat file of IDOC which is coming from R/3 & sending it to FTP location. For this we have configured Receiver FTP adapter with File Name Scheme as "NT.out" & in File Consturction mode i have given as "Add Time Stamp".
therfore while creating a file it is creating as NTyyyyMMdd-HHmmss-SSS.out
where as my requirement is only to to add Time & not the Date. (NThhmmss.out)
How to do this ?
for your info we are using ABAP Mapping.
Pl help me
Regards,
UmeshHi Umesh,
Add one more field to your target structure for your file name and populate that field as per your requirement like NTyyyyMMdd.out. In receiver communication channel use Variable subtiution option and give the refrence of Payload and file construction mode set as create.
And refer the below weblogs for Variable Subtiutuion File Name Scheme
/people/jayakrishnan.nair/blog/2005/06/20/dynamic-file-name-using-xi-30-sp12-part--i - Dynamic File Name Part 1
/people/jayakrishnan.nair/blog/2005/06/28/dynamic-file-namexslt-mapping-with-java-enhancement-using-xi-30-sp12-part-ii - Dynamic File Name Part 2
Hope this way would be solve u r problem.
Cheers
Veera
>>>Reward points, if it is needful -
Passing Dynamic File Name to ODI nterface for processing to another system
Hi,
I need help regarding passing a Dynamically Name changing fixed length Flat File in ODI Interface. This interface is built for taking the Flat File as Input and process it to SQL Server by applying Data Mapping and transformations... The input Flat File Name is sequence generated for eg: OEORD1123.txt and next file will be OEORD1124.txt and it sits in Oracle Conc tier. How to pass the latest file name to ODI interface for processing
Regards,
Anil..Hi Guys...
I would like to suggest a way.
a) create a single interface with dynamic resouce name (a ODI variable) with a filter to the month column like:
month_column = '#vCountMonth'
b) in the refresh tab of a first variable (I named "vMonth"), use the following query: (varialbe should be alphanumeric, "not persistent")
select to_char(to_date('#vCountMonth','MM'),'month') from dual
c) create one more ODI variable (I named "vCountMonth"), alphanumeric, not persistent and at its refresh tab write:
select lpad(to_char(#vCountMonth + 1), 2, '0') from dual
d) now just create a package, drag and drop the objects in the following order:
d.1) vCountMonth in set mode and set = 0 (zero)
d.2) vCountMonth in refresh mode
d.3) vMonth in refresh mode
d.4) the interface
d.5) vCountMonth in evaluate mode, evaluating "= 12"
==> if NO (KO, red line) link the KO line to d.2 step
==> a OK line is not necessary unless you have others steps after finish the evaluating
Make any sense? That is a single loop to have the interface developed only one time.
Please, remember to check each thread reply as Useful or Correct if they are useful to you...
Maybe you are looking for
-
Facing issues in standby database
standby database is in sync but when we say archive log list "Current log sequence " and "Oldest online log sequence" are not geting updated even though archives are getting applied. Solution :- We can create new standby controlfile in order to get t
-
Executing package as owner of package
I have defined a package as an administrative account. I execute this package from an on-insert trigger on a table. A regular user inserts records into the table, firing the trigger. How do I ensure that when the package is executed, it is executed a
-
Pavilion Slimline s3760a: Cloning the Hard drive to replace with larger drive
Product Name:Pavilion Slimline s3760a OS: Vista Hi All, I'm Turina, just joined the forum think I'm posting in the right place but let me know if I'm not please. So we've had our computer for several years, the hard drive is in the red so am swapping
-
Help!I have a question about the Logminer,want to ask everybody to help.
Question: Archived redo log not to recoed DML statements, only to record DDL statements. 问题:归档日志不记录DML,只记录DDL. Below is a detailed steps operation: 下面是详细的操作步骤: *1. Install Logminer* C:\Workspace\GetFiles\bin sqlplus /nolog SQL*Plus: Release 10.2.0.3.
-
Generating table STXFPCUST for Adobe Forms
Hi, I am creating a smartform compatible adobe form and I believe for the system to generate the smartform for this, we need to update the table STXFPCUST with the name of the Adobe form and allow the system to generate the smartform. Can I have some