Specifying source file name
Hi,
We have a javascript form validation program that we would like to use in our BSP applications. Unless I include this in every BSP application it does not work. I have tried specifying this using the src="xxxx.js" within the tag and does not work. Anythoughts?
Albert
Hi,
I was trying to, but looks like I cannot post javascript code.
Here is my sample code.
<htmlb:content design="classicdesign2002design2003" >
<htmlb:document>
<htmlb:documentHead title="Title" >
<%@ include file="MyJavascript.js"%>
</htmlb:documentHead>
<htmlb:documentBody marginLeft="100" marginRight="50">
</htmlb:documentBody>
</htmlb:document>
</htmlb:content>
The above works. However, if I use
<htmlb:content design="classicdesign2002design2003" >
<htmlb:document>
<htmlb:documentHead title="Title" >
script language="javascript" src="/SAP/BC/BSP/SAP/ZAPPLICATION/MyJavascript.js"/script
</htmlb:documentHead>
<htmlb:documentBody marginLeft="100" marginRight="50">
</htmlb:documentBody>
</htmlb:document>
</htmlb:content>
does not work.
my javascript file does not have script tags.
Albert
Similar Messages
-
I am trying to set-up CI of Orchard CMS and deploy it on Azure using TF service. I am stuck at following error for path being
longer than 260 characters. However, when counted the total characters in path are 235. Please see the below error :
Other Errors and Warnings
1 error(s), 1 warning(s)
Exception Message: TF400889: The following path contains more than the allowed 259 characters: drop/_PublishedWebsites/Orchard.Web_Package/Archive/Content/C_C/a/src/projects/Orchard/dev/DevAltaf/Orchard/src/Orchard.Web/obj/Debug/Package/PackageTmp/Modules/BrentApart.BannerManager/Scripts/controllers/bannerAssignmentController.js. Specify a shorter path. (type VssServiceException)
Exception Stack Trace: at Microsoft.TeamFoundation.Build.Workflow.Activities.FileContainerDropProvider.EndCopyDirectory(IAsyncResult result)
at Microsoft.TeamFoundation.Build.Workflow.Activities.CopyDirectory.EndExecute(AsyncCodeActivityContext context, IAsyncResult result)
at System.Activities.AsyncCodeActivity.CompleteAsyncCodeActivityData.CompleteAsyncCodeActivityWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)
Inner Exception Details:
Exception Message: The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters. (type PathTooLongException)
Did anyone came across such issue while deploying Orchard on Azure with TF service? If yes, how did you sort this freaking error?
Thanks,
Altaf B.Hi AltafB,
For your situation, you can short the path for the source code. Or use a short path for build agent folder in your build definition. You can refer to the links below to solve your problem:
http://blogs.msdn.com/b/aaronhallberg/archive/2007/06/20/team-build-and-260-character-paths.aspx
https://social.msdn.microsoft.com/Forums/vstudio/en-US/1638a5f0-9321-4ff9-9ee7-6d347badb972/please-some-solution-to-the-specified-path-file-name-or-both-are-too-long?forum=tfsbuild
Besides, since you deploy Orchard to Azure, you can also publish it directly using publish profile in Visual Stduio or WebMatrix directly.
Best regards,
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
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. -
How to overwrite source files, or use source file names?
Hi all
I would like AME (5.5.1.12, under Windows 7) to overwrite the source files that it is encoding, or if that's not possible, save the exported files to a different folder with the same file names as the sources.
However I can see no way to do this without manually specifying a file name for every file. I need to process 400 files so this is not practical.
Currently AME automatically adds a "-1" suffix to the exported file name, whether it's saved in the same folder as the source or a different folder.
Can anyone advise, please?Hi Jim,
Thanks for the reply. However, overwriting source files during a batch process is a common feature in audio/video software. It's possible in Audition, for instance, as well as in third-party programs such as Sound Forge, Wavelab and Samplitude.
Presumably in these cases the software writes to a temporary file, either in RAM or on the hard drive, before deleting the original and replacing it with the new one.
I'm surprised to hear that AME can't do this for conversions that stay within the same file format (such as the bit depth of a wave file). -
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. -
Hi,
I have a solution that used to contain one SharePoint 2010 project. The project is named along the following lines:
<Company>.<Product>.SharePoint - let's call it Project1 for future reference. It contains a number of features which have been named according
to their purpose, some are reasonably long and the paths fairly deep. As far as I am concerned we are using sensible namespaces and these reflect our company policy of "doing things properly".
I first encountered the following error message when packaging the aforementioned SharePoint project into a wsp:
"The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters."
I went through a great deal of pain in trying to rename the project, shorten feature names and namespaces etc... until I got it working. I then went about gradually
renaming everything until eventually I had what I started with, and it all worked. So I was none the wiser...not ideal, but I needed to get on and had tight delivery timelines.
Recently we wanted to add another SharePoint project so that we could move some of our core functinality out into a separate SharePoint solution - e.g. custom workflow
error logging. So we created another project in Visual Studio called:
<Company>.<Product>.SharePoint.<Subsystem> - let's call it Project2 for future reference
And this is when the error has come back and bitten me! The scenario is now as follows:
1. project1 packages and deploys successfully with long feature names and deep paths.
2. project2 does not package and has no features in it at all. The project2 name is 13 characters longer than project1
I am convinced this is a bug with Visual Studio and/or the Package MSBuild target. Why? Let me explain my findings so far:
1. By doing the following I can get project2 to package
In Visual Studio 2010 show all files of project2, delete the obj, bin, pkg, pkgobj folders.
Clean the solution
Shut down Visual Studio 2010
Open Visual Studio 2010
Rebuild the solution
Package the project2
et voila the package is generated!
This demonstrates that the package error message is in fact inaccurate and that it can create the package, it just needs a little help, since Visual Studio seems to
no longer be hanging onto something.
Clearly this is fine for a small time project, but try doing this in an environment where we use Continuous Integration, Unit Testing and automatic deployment of SharePoint
solutions on a Build Server using automated builds.
2. I have created another project3 which has a ludicrously long name, this packages fine and also has no features contained within it.
3. I have looked at the length of the path under the pkg folder for project1 and it is large in comparison to the one that is generated for project2, that is when it
does successfully package using the method outlined in 1. above. This is strange since project1 packages and project2 does not.
4. If I attempt to add project2 to my command line build using MSBuild then it fails to package and when I then open up Visual Studio and attempt to package project2
from the Visual Studio UI then it fails with the path too long error message, until I go through the steps outlined in 1. above to get it to package.
5. DebugView shows nothing useful during the build and packaging of the project.
6. The error seems to occur in
CreateSharePointProjectService target called at line 365 of
Microsoft.VisualStudio.SharePoint.targetsCurrently I am at a loss to work out why this is happening? My next task is to delete
project2 completely and recreate it and introduce it into my Visual Studio solution.
Microsoft, can you confirm whether this is a known issue and whether others have encountered this issue? Is it resolved in a hotfix?
Anybody else, can you confirm whether you have come up with a solution to this issue? When I mean a solution I mean one that does not mean that I have to rename my namespaces,
project etc... and is actually workable in a meaningful Visual Studio solution.Hi
Yes, I thought I had fixed this my moving my solution from the usual documents to
c:\v2010\projectsOverflow\DetailedProjectTimeline
This builds ok, but when I come to package I get the lovely error:
Error 2 The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters. C:\VS2010\ProjectsOverflow\DetailedProjectTimeline\VisualDetailedProjectTimelineWebPart\Features\Feature1\Feature1.feature VisualDetailedProjectTimeline
Now, the error seems to be related to
Can anyone suggest what might be causing this. Probably some path in an XML file somewhere. Here is my prime suspect!
<metaData>
<type name="VisualDetailedProjectTimelineWebPart.VisualProjectTimelineWebPart.VisualProjectTimeline, $SharePoint.Project.AssemblyFullName$" />
<importErrorMessage>$Resources:core,ImportErrorMessage;</importErrorMessage>
</metaData>
<data>
<properties>
<property name="Title" type="string">VisualProjectTimelineWebPart</property>
<property name="Description" type="string">My Visual WebPart</property>
</properties>
</data>
</webPart>
</webParts>
.... Unless I can solve this I will have to remove the project and recreate but with simple paths. Tho I will be none the wiser if I come across this again.
Daniel -
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 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> -
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 -
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 -
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 -
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.
-
UDF to capture the source file name or the source folder for mapping
Hi All,
i have 2 files - File1 from File2 from 2 different folders- single comm channel FTP (FCC). i have to pass a constant A and B respectively to a field in target structure.
my options are -
either create a new field in source str populating different constants and then map to the target str
or a udf to get the source file name or the source folder so that i can map the constant using the value mapping/FixValue mapping.
please suggest. thanks.
rajibHi,
please use the UDF to determine the file name. Then based on file name either pass A or B to your target field.
The code is as given below. Just tweak the code to pass either A or B as per your requirement.
public String G_GetFileName(Container container) throws StreamTransformationException{
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);
return ourSourceFileName;
Regards,
Deepak. -
Condition based on source file name - PI 7.1
Hi Friends
I have an file2file interface without any mapping requirement , source is sending .csv files and I need to post those source files to two target systems in which each target system have two directories where I need to post based on few conditions and here are my queries.
1. As mapping is not required I guess File Content Conversion is also not required as I simply pick and drop the .csv files into target - please confirm.
2. One of the condition is : source file name will be XXXX-AABB-C-XXXX-XXX-XXX.csv , here SAP PI has to read the company code (AABB) to determine the target system. Z001 and Z007 should be sent to TARGET1 & All other files will be sent to Target2.
3. 2nd Condition : SAP PI has to read the type of file indicator (C). The files will be sent to the following target application directories:
Simulation files (indicator = S): /interfaces/XXX/simulation
Production files (indicator = P): /interfaces/XXX/inbound/
Please kindly provide your ideas/solutions .
Regards
Suman.Hi Suman,
If the Target is two different locations, then i guess you need to have two receiver Channels. Please check the below thread for details:
Re: Genrate file in 2 different locations
Incase of different directories in same server, you can check out this link:
Dyanamic Configuration at receiver file adapter determine target directory
kanan
Maybe you are looking for
-
How to get back lost runs on nike+ website
Hi to everyone, i've erased a run from the nike+ site but it's still on the ipod.How can i make it appear again on the website? please help me... thanks everyone for the interest.Bye, gugu000
-
I try to download an app and it tells me that there is not enough room when there is plenty
An app that is 1.9 GB is saying that there is not enough room to download, even though i have around 3 GB free.
-
Additional fields in FI Document - BAdI FI_HEADER_SUB_1300
Hi, I need to add some additional fields in FI document via transaction F-43. I added them in an append structure in BKPF, implemented BADI FI_HEADER_SUB_1300 and programmed the screen with the corresponding fields. But it didn´t work with my new fi
-
How to display propagation errors
I have script to display apply errors and i would like to know if there is any scrip to display propagation errors because oracle tools like enreprise manager displays only the last error. Is there any script to display all propagation errors?( i use
-
Ld: cycle in dylib re-exports with /usr/X11/lib/libGL.dylib liker error
Hello, I found out that some open source applications when tied to be installed from source or trough fink or mac ports simply fail at linking with the error: ld: cycle in dylib re-exports with /usr/X11/lib/libGL.dylib However, when I force the linke