Dynamic source file names
Hi all,
I am planning to load data from a flat file using an external table in an OWB mapping. Will my mapping work correctly if my file name changes at every load...as an example file name in October is sales_200310 in november it will be sales_200311.
In case OWB cannot handle this kind of variable file name then does it allow to include a pre mapping script (shell script or batch command) to change the flat file name to a standard name each time the mapping is executed.
Pls. suggest a workaround for this problem.
My environment -- Oracle 9i, OWB 9.2
Thanks in advance.
Regards,
Amit.
Amit,
OWB does not support dynamic file names at the moment. You will have to rename the file(s) into a static, pre-defined name either by running a pre mapping process in the mapping or by running an external process from a process flow.
Regards:
Igor
Similar Messages
-
Handling dynamic source file names
Hello,
File - RFC
if the name of the source file doesnt have a fixed name, if the name of source file varies in each input, then what should I specify in the "Filename" of the File adapter parameters?
Thanks
Nikhil.Hi Nikhil,
Check your file names, there are any common portion in the file name. if you find any then you can set like ###.file extenison. ### - this is common portion of your file name. If the file names does not have any similarities with other, then *.file extension. in htis case the channel would pick the files which are having the file extenison as you mentioned in channel.
Cheers
Veera -
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> -
File Sender adapter - source file name - weird
Hi all,
We have a sender file adapter polling an ftp location. The Dynamic config has been enabled to get the source file name.
The actual file name is - "hrmd.xml", but in the dynamic configuration node, in sxmb_moni, the fileName is shown as ./hrmd.xml.
This does not occur with any other file sender adapter comm channels polling ftp locations.
I guess this has something to do with the ftp server. Did anyone face this issue?the fileName is shown as ./hrmd.xml
The file name surely cant have a / in it....such characters are not allowed.
is there any way we can change the fileName message attribute once the file is picked up
Create a UDF for Dynamic Configuration and change the name as per your requirement (in XI)....the source file may be having proper format for name and i assume that you have to change it for receiver file name -
File-File - Need to extract data from source file name???
Hello Experts,
I have a unique situation. In my file to file scenario, the source file name is of the format XYZ_yymmddHHMM.dat. there is field in the target file which has to filled with the date that is there in the file name of the source file (yymmdd). How can this be achieved? Normally we do the other way round using vaiable substitution where we can name a file depending on the value in any of the target field structure.
Please help.
Regards,
YashHi,
please prepare the udf with the following code.
i mean, dynamic configuration concept.
where u get the file name, then use substring function to capture date from right side.
//write your code here
// getFileName User Defined Function
// function to create name of output file
String filename;
filename = strFile;
try {
// initialize DynamicConfiguration for create file with given name
DynamicConfiguration conf = (DynamicConfiguration) container
.getTransformationParameters()
.get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create( "http://sap.com/xi/XI/System/File", "FileName");
//create file with the specified name
conf.put(key, filename);
} catch (Exception ex) {
return filename;
warm regards
mahesh. -
Hi my mapping is sql loader mapping,
i want to capture the source file name and make in lower case . owb is 11.2.0.3 .
please helpyou can pass the file name in as an input paramter so you can dynamically change it when the mapping is invoke, not sure if that is what you want, you have to know the file name first when you are loading orelse it means you hardcode it in the mapping config.
-
Same source file name with a different extension
Hi All,
I have a source file which is dynamic all the time. Can I create a target file which has the same name as the source file but with a different extension.
Scenaio is file to file.
test. xml is the source file name and the target file name should be as test.csv
Regards,
AmarHi Amareshwar,
you can write a java code (either in UDF or import in imported archive and use in imterface mapping).
The piece of code is..
DynamicConfiguration conf = (DynamicConfiguration) myParam.get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey Filekey = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
String OriginalFileName = conf.get(Filekey);
if (OriginalFileName != null)
NewFileName=OriginalFileName.replaceAll(".csv",".txt");
conf.put(Filekey,NewFileName);
And in Integration Directory>Configuration Scenario>your communication channels (both sender and receiver) just select
Adapter specific message attributes- File name
This would solve your problem.....
Regards,
Vishal Gupta
Plz reward points if you are satisfied with the solution. -
Hi Guys,
I am trying to get the source file name in an ABAP mapping. I have done Dynamic Config - for the target file map.
I have tried
*l_dyn_record-namespace = 'http://sap.com/xi/XI/System/File'.
l_dyn_record-name = 'FileName'.
CALL METHOD dynamic_configuration->get_record
EXPORTING
record = l_dyn_record.*
But it is giving me some error about the name space.
Can any help on this.Hi Naveen,
Refer this forum thread Get xml file name within Abap Mapping
It should be able to resolve the problem, if not then paste here the error message which you are getting
Regards
Suraj -
Pdf portfolio source file name and date in file details
Is it possible to import the source file name and extension as well as the source file created date in the portfolio file details? Need to document source to portfolio in working with 3rd parties that will only have the original source. Need to document what was converted into pdf as not all files in a directory will successfully convert to pdf. Sometimes need to convert 100's of files. Manual entry is inefficient. the file names and modified dates are displayed on the Combine Files dialog. is there a way to capture the detail on that page?
I don't need the detail of when the pdf was added to the portfolio. I
need know which dwg or jpg or word file was converted and the original
created date of that file for control of information.
That is impossible; sorry. For some *very specific* types of conversion to PDF the pdfx:SourceModified XMP tag will be set to show the last-modification date of the source file (for example DOCX files converted using MS Word), but there will never be a human-readable record of the source filename or its creation date unless you have manually added them as document XMP properties after conversion (this is what the "Custom Properties" dialog is for). To embed source data automatically would raise no end of privacy and security problems for customers, who most certainly do NOT want their recipients seeing details of internal documents.
Without writing a plugin there's no access to the internal workflow of the Combine Files dialog, so you cannot use a script to read the names and dates of the files *before* conversion and store them automatically in the new PDF Portfolio's Fields array. -
Get source file name in the structure itself or in the payload
Hi everyone,
I have a task regarding mapping
In my structure , i defined a field for Filename . What I need is, what ever source file name am sending, that should be mapped into this filed.
If am sending inputfile.txt.
My output file should appear like this,
<?xml version="1.0"?>
<message id=u201DmessageIDu201D>
<header>
<filename>D:\\inputfile.txt</filename>
</header>
<body>
FileContent
</body>
</message>
Any help would be appreciated. Do I need to create any UDF. If So please provide.
Regards,
VarunHi Varun,
are u using the same UDF that I replied. also note that the variable key should be declared only once.
Use this without changing any thing. It works for me...
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
String ourSourceFileName = conf.get(key);
key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","Directory");
String dir = conf.get(key);
return dir+'/'+ourSourceFileName;
Also let us know where do you het this error..
Thanks
SaNv... -
Dynamic Receiver file name in AS2 adapter
Hi Experts,
How to get dynamic receiver file name in AS2 adapter. We need receiver file name same as of sender file name.
We tried selecting dynamic attributes file name but we are getting followin error in CC.
Message processing failed. Cause: javax.resource.ResourceException: Fatal exception: com.seeburger.xi.connector.queue.TaskBuildException: Mandatory attribute dtAS2FileName is not present in XI message., Mandatory attribute dtAS2FileName is not present in XI message.
Thanks,
Harihi hari,
You can't do it manually. As both adapter are in different context.
You can go with UDF to slove ur problem.
Just extract the input file name using Dynamic configuration
Store that in some variable.
Use same name in the dynamic file name in AS2 receiver. Below code might be useful.
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create( "http://seeburger.com/xi/common/dtAS2FileName", "DYNFILENAME");
conf.put(key,strfilename);
Thanks
Jai
Edited by: Jaideep Baid on Apr 9, 2010 9:16 AM -
Dynamic Logo file names in PO XSL-FO stylesheet
We have different company logo files for different operating units. Hence , we require to use a dynamic logo file name in XSL-FO template.
When I use the below for a single file it works.
<fo:inline>
<fo:external-graphic content-width="50pt" content-height="50pt" src="url({'${OA_MEDIA}/Logo_medium_COMCEL.jpg'})" />
</fo:inline>
However, I would need to make the filename dynamic.
When a tried usng an xsl variable tos tore fielname, it didnt work.
Any pointers as to how we can achieve that would be helpfulThanks for your quick reply Dave, I appreciate your time.
But I couldn't test the new template as I was neither able to create a new PO nor was able to run the PO Output for communication Report. When I tried to create a PO the Purchase Order form did not open saying I am not setup as an employee, even the PO Output for communication did not give any LOV for the PO's.
I tried to define employee name in the employee's login
information (System administrator/Security/User/Define) for my user, but some how my name doesn't appear in LOV. Any help is appreciated.
Thanks,
Sharmila -
RH10 variable and build tag source file names
I'm using RH10 and outputting to WebHelp. My company requires that I archive project source files to our CVS via Eclipse. I am not using RoboSource_Control and must use the company's development resources for archiving.
Since archiving the initial project, I have been uploading only source files with modified dates.
However, I have discovered that the files I thought were storing user variables and build tags are not the correct files to archive. Since I am uploading all files with a newer date and that's not working, I need to know the user variable source file name and the build tag source file name that stores the currently defined variables and build tags.
I have already tried the WebHelp forum and was directed to this forum to pose the question because I'm looking for source file information instead of output file information.
Thanks for your help!
karenYes, Eclipse does work that way. However, we do not use our development directory as the local Eclipse repository. I need to move changed files to the local repository (stores all source files in the project) so that Eclipse can upload changes to the server. Yes, this is planned redundancy.
That said, it is not acceptable to spend the time copying all files in the large projects from the work folder to the local repository. I simply need to know which individual files to copy that include the currently defined variables and build tags. Note, we do not copy the SSL folder output files to our local source file repository, or other associated reference files that are not actually project source files.
Can you find someone who knows which files I need?
Thanks,
karen -
Getting the Source File name Info into Target Message
Hi all,
I want to get the Source file name Info into Target message of one of the fields.
i followed Michal BLOG /people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14
Requirement :
1) I am able to get the Target file name as same as the source file name when i check the ASMA in Sender & Receiver Adapter , with out any UDF...............this thing is OK
2) I took One field extra in the target structure Like "FileName" & I mapped it Like
Constant(" " )--UDF-----FileName
I Checked the Option ASMA in Both Sender & Receiver Adapters
Here iam getting the Target File name as same as Source file name + Source File name Info in the Target Field " FileName".
I Dont want to get the Target File name as same as Source file name. I want like Out.xml as Target file name.
If i de-select the Option ASMA in Adapters means it is showing " null" value in the target field "FileName".
Please Provide the Solution for this
Regards
BopannaHi All,
Iam able to do this by checking the Option ASMA in only sender adapter itself
Regards
Bopanna -
Need to genereate Target file name same as Source File Name thru Local J2SE
Hi Everyone,
I want to genereate Target file name exactly same as Source File Name. I know how to handle this in Central Adapter Engine(Sender & Receiver Communication Channel).
But I need to do this in Local J2SE adpater engine.
Please help me in this regard.
Thanks & Regards,
NagarajuU can use the parameter to save the filename in the message header
file.messageAttributes=<name,directory>
This is similar "Adapter-Specific Message Attributes" concept.
http://help.sap.com/saphelp_nw04/helpdata/en/6f/246b3de666930fe10000000a114084/frameset.htm
Regards,
Prateek
Maybe you are looking for
-
Email of Purchase Order and Payment Advice
Good Morning All We wish to implement the emailing of payment advice documents to our vendors. However, we are not sure if the changes to the vendor master data required for this will also mean that purchase orders for that vendor will also be emaile
-
Had to reinstall Firefox on new drive with new install of Windows 7. Missing all of my profile settings.
-
HI Gurus Their is any reports available like purchase register? In vendor register we have the following fields 1. Purchase material 2. ED 3. Service Tax 4. Vat in one report or which report this fields will available. To reconcil the vendors account
-
I paid my subscription on a PC but want to now use the product on my Mac but, although my account reflects settlement of payment, I am prompted (on the Mac) to settle the outstanding payment before I can use the product. Any suggestions as to why?
-
Media suddenly offline, codec problem?
3 AVI files suddenly went offline after i upgraded from CS4 to CS5 I am unable to find a solution to this myself, anyone out there who can help me? Thank you. <3