Variable Substitution field shouldnot be written to the file
Hello,
I am doing a proxy to file scenario.
Below is my datatype structure:
MT_IN
---Line 1..unbounded
---FileName 1..1
From the R/3 side, I send the entire file in the "line" element and the name of that file in the "FileName" element.
Now I want to use this "FileName" element in my variable substitution to dynamically generate my filename schema but I dont want to write this into the file which is written to the filesystem.
I only want to write the contents of "Line" element to the file and not the "FileName".
What all options are available to do this? Please detail out.
Thanks
Hi Laxmi
I think you need to reframe the message
Do like this
MT_OUT
Header
FileName
Items
Line
Now you get Record Structure Header, Items
and apply FCC parameter. This will resolve. Your structure is not getting supported correctly by FCC. Try it
Thanks
Gaurav
Similar Messages
-
Cascading Style Sheets are NOT written to the file system
Hallo,
On the "Cascading Style Sheets" page is written that: "The Cascading Style Sheets are written to the file system, so you can reference them in your HTML source code."
I am true that if this works I can reference the css with something like this?
<link rel="stylesheet" href="/i/sample.css" type="text/css">
and do not need this style:
<link rel="stylesheet" href="#APP_IMAGES#sample.css" type="text/css">
<link rel="stylesheet" href="#WORKSPACE_IMAGES#sample.css" type="text/css">
I have looked on the "Cascading Style Sheets" page: http://127.0.0.1:7780/apex/f?p=4000:37
Are there some other preferences, options, etc. to set that this will be working?
Thx for your help. WilliHi,
CSS files uploaded through Shared Components, Cascading Style Sheets are written into the database, so you would have to use:
<link rel="stylesheet" href="#WORKSPACE_IMAGES#sample.css" type="text/css"/>You should be able to see these if you run the following in SQL Commands:
SELECT * FROM APEX_APPLICATION_FILES
WHERE UPPER(FILENAME) LIKE '%CSS%'Andy -
Is movie metadata changes written to the file in iTunes 10.1?
Hello.
I'm putting together a bunch of home videos for my parents (made in iMovie) for Christmas and I'm using iTunes 10.1 to populate the metadata (genre, movie title, comments, etc.) — is this data written to the file or is it stored in an iTunes DB? My concern is, like how iTunes handles cover artwork, will all the metadata be lost when I give them these videos (since they'll be importing into their own iTunes library) or will the information I edit in iTunes move with the files? If this information is not written to the file (ie. it'll be lost when I give them the videos), can anyone suggest an iTunes add-on that will allow me to edit these files already imported into iTunes?
Also, I assume the cover art isn't written to the file, like with music files — is this true? For example, if I add a cover to these videos (which I'm making myself as JPGs), if I add the cover art in iTunes, will it be written to the file so it appears as cover art when I give the files to my parents and they import into iTunes?
Any info would be appreciated!!!
k.Meta X works great for editing the metadata.
-> http://www.kerstetter.net/index.php/projects/software/metax
I'm putting together a bunch of home videos for my parents
How are you giving them these videos? As a regular, playable DVD (such as burned with iDVD)?
If so, tags are not needed as they are not written to the playable DVD.
However, it is good to add the metadata so you have the info in the file on your computer. -
Idoc- File scenario: Read a data field in IDOC and name the file with it
Hi All,
I am configuring an IDOC to File scenario.
I have a requirement where I need to read one of the IDOC data field and use that as the name of the File.
E.g: If the IDOC data field-1 = '123456', then I need to name the output file as '123456'.
Is it possible to do this. Appreciate your help on same.
Thanks
ShirinTry this code..
desired field from IDoc will be input parameter to UDF
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
conf.put(key,a); // a is input parameter
String ourSourceFileName = conf.get(key);
return ourSourceFileName;
Also, check Adapter specific message attributes in file adapter, check filename -
One field is missing in downloading the file from report
Hi Friends,
I have a problem with downloading the file from SAP.
Actually the report has to download 6 fields from the list of the report to a .txt file on the presentation server. But it is downloading only 5 fields. The missing field is DEA#. Actually now i have to fix that problem.
I found that in the download process they have not inlcuded the DEA# field.
Here in this 1 field is not getting dowloading from the list of the report to the text file.
I'm giving a portion of the code.
Like this they r calling the FM:
FORM DOWNLOAD_FILE.
CALL FUNCTION 'DOWNLOAD'
EXPORTING
FILENAME = P_OUTFIL
TABLES
DATA_TAB = I_OUTPUT.
IF SY-SUBRC <> 0.
WRITE:/ 'Error downloading file'.
ENDIF.
in code we have,
data: v_output type t_output,
data: i_output type t_output occurs 0.
and,
BEGIN OF T_OUTPUT,
RECORD(200),
END OF T_OUTPUT.
when i debug the program,
the record field is showing only the 5 fields not the missing 6th filed)DEA#).
and we have another FORM :
*& Form FORMAT_FILE_WITH_TABS
Insert tabs between fields so when uploaded in Excel, the
record will be separated into columns where a tab is found.
FORM FORMAT_FILE_WITH_TABS.
LOOP AT I_KNA1 INTO V_KNA1.
CONCATENATE: V_KNA1-KUNNR
V_KNA1-NAME1
V_KNA1-NAME2
V_KNA1-STRAS
V_KNA1-ORT01
V_KNA1-REGIO
V_KNA1-PSTLZ
INTO V_OUTPUT SEPARATED BY C_TAB.
APPEND V_OUTPUT TO I_OUTPUT.
CLEAR V_OUTPUT.
ENDLOOP.
ENDFORM. " FORMAT_FILE_WITH_TABS
If you look into this FM, there is no mention of DEA# field,
i hve tried to correct it by adding the "v_likp_dea" in the FM. when i did like this it is showing the DEA# field in the downloaded .txt file but only 1 value for all the records.
My question is for each record i have to show its unique DEA#.
I guess i could do this by putting it in loop, could anybody tell me how i can i do that, Please
Thank you very much.
Raj.In the subroutine format_file_with_tabs ,
You should read it_likp with the key that uniquely identifies for dea# . This should be done in the loop at i_kna1.
Suppose kunnr identifies a unique dea# in it_likp internal table , then you should write
FORM FORMAT_FILE_WITH_TABS.
LOOP AT I_KNA1 INTO V_KNA1.
clear v_likp.
read table it_likp into v_likp
with key kunnr = v_kna1-kunnr binary search. (should sort the itab to use binary search with read. )
CONCATENATE: V_KNA1-KUNNR
V_KNA1-NAME1
V_KNA1-NAME2
V_KNA1-STRAS
V_KNA1-ORT01
V_KNA1-REGIO
V_KNA1-PSTLZ
v_likp-dea
INTO V_OUTPUT SEPARATED BY C_TAB.
APPEND V_OUTPUT TO I_OUTPUT.
CLEAR V_OUTPUT.
ENDLOOP.
ENDFORM. " FORMAT_FILE_WITH_TABS
Message was edited by: Kalidas Cheroolil -
Field not visible when uploading the file in application ser
Hi,
I have added a new field at the end of a structure and When i upload the data in the application server it is not visible there. The new field length is 30chars(say field 'A') and the one just before this one is 250 chars(say field 'B'). When i reduce the length of field 'B' to 30 chars or 40 chars the value which i populated in field 'A' is visble in the output file.
Since the complete file was not visible in AL11 transaction, i used the CG3Y tcode as well to download the data to presentation server so that i can view the complete file. Even after downlaoding in presentation server the new field value is not visible.
Can anyone please suggest why is the value in field 'A' not visible when the length of field 'B' is 250 chars? Also, how can i display the value of the new field in the application server.I cannot change the layout of the structure as per the requirement. Any help will be very useful.
Thanks in advance,
Sneha.Hi Sneha.. Happy new year
<you subject is missing ver from the server, thats why your server doesnt like you :P>
-ok, lets go step by step. how did you upload the file?
-after uploading the file check the file in OS level(goto SM69, execute CAT, in additional parameter (not in parameter) give the full path (case sensitive), execute. ). here you can see the actual content of the file... check you data is present or not
-which structure are you using to download and upload? a temp work area.. then please provide the WA details, so that i can try on my system.
lets see what happens next
one more thing: regarding AL11, it can read upto length 510 characters. check program RSWATCH0 form SHOW_FILE. here the read dataset into butffer is 510 characters. -
How to acces the filename from Message Header during variable substitution
Hi,
We need to access the attribute filename from Message Header during Variable Substitution.We are able to access the following attributes of Message Header
sender_party, sender_service, receiver_party, receiver_service, interface_name, interface_namespace,
message_id (message ID with hyphens, for example 9fbe1ff1-9a0d-11d9-8665-cbf10a126331)
message_id_hex (message ID in hexadecimal format, for example 9fbe1ff19a0d11d98665cbf10a126331)
For example, if we want to specify the interface name from the message header in the target directory or in the file name scheme, we enter message:interface_name as the reference.
In the same way i need to access the filename which we get in the Message Header(which we get in the Message Header when we check the Adaptor specific message properties and filename in sender CC).Any suggestions on the same
Thanks and Regards,
Bhargav
Message was edited by:
bhargav gundabolu
Message was edited by:
bhargav gundaboluHi Bhargav,
Use this UDF to retreive the file name from the Dynamic Configuration Payload in the mapping.
getFileName(UDF) -
> Filename(node in the target structure).
public String getFileName(Container container)
//write your code here
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;
Create a node in the target structure top hold the filename returned by the UDF.
Now your payload will have the filename along with the actual data.
U can use the variable substution now as u use for the other data in the payload since the filename is now a part of your payload.
Regards
San -
The "Exception" field cannot be written
When I try to enter a website as an exception (so the password I use for it will not be saved anymore), the field cannot be written. The only action I can do is to click on the "Close" button !
Thank you for your answer.
The problem is that this info bar appears only when you visit a website for the first time.
I have already tried to ask the password manager to forget the password I wanted to be forgotten, but it does not work, it still appears by default in its field when I go to the site. -
Reciever File Adapter - Temp File Name Scheme using Variable Substitution
How can I create a temporary file that uses variable substitution?
We are having a problem with files merging when we write files using the "Use Temporary File" setting on the FIle Adapter. So two independent files are merging into a single file. We are not using the "Append" setting.
We would like to use a Temp File Name Scheme that would append the message id onto the temporary file name.
Using variable substitution we created a msgid variable. When added to the temporary file name using %msgid% the temporary file name is created with %msgid% in the name instead of the actual message id. We put the variable into the "File Name Scheme" as well and the end completed file used the message id in the name.
Any Ideas?
Thanks,
MattHI Matthew,
Why are you adding the message id into the temporary file??
I understand that you want the output of the filename to contain message id .. and hence you are using variable substitution for the same.
Temporary file name will anyways get overwritten by the actual file name (here the actual filename will be using variable substituion).
So i suggest to achieve your scenario you can add any name in the temporary file and maintain the desired filename you require as output in the variable subsititution.
Temporary File Name option actually acts as a lock - unlock mechanism from PI side while the file is getting written to the file server so that while PI is writting the file no third party application batch program picks it up.
I hope this helps.
Cheers
Dhwani -
Variable substitution for csv file
Hi Guys,
I am using Multimapping to generate 2 target messages and finally creating these 2 messges as csv files. But i need to use variable substitution (because dynamic configuration doesnt work in multimapping) to create the target files and i need to omit this node from content. i know if it is fixed length file we can use variable substitution and finally we can cut the variable in content conversion by using below method
fixedLengthToodShortHandling cut
Note:- I am using PI7.1
thanks,
madhuYou must separate variable filename from the other fields in several nodes.
Please, analyze if you can change your scenario, with next stucture:
<ns0:MT_MadhuMulti xmlns:ns0="http://rr.unilever.com/bconepi13">
<Strutcture>
<Name>Syam</Name>
<***>FEMALE</***>
<ID>123</ID>
</Strutcture>
</Strutcture>
<Strutcture>
<Name>Syam1</Name>
<***>Male</***>
<ID>789</ID>
</Strutcture>
<nothing>
<Filename>EmpDetails</EmpDetails>
</nothing>
</ns0:MT_MadhuMulti>
And then in your CC:
Recordset strucutre --> Structure,nothing
Structure.fieldSeparator --> ;
nothing.fieldFixedLengths --> 0
nothing.fixedLengthTooShortHandling --> Cut
nothing.endSeparator --> '0'
Regards,
Carme. -
Difficulty in Variable substitution.
Dear all,
I want to go for variable substutution in Receiver channel(File adapter).The variables I need are there in the RunTime tag of the SOAP Header(Date & Time).
The exact location
Inbound Message:
SOAP Header
RunTime
Date
Time
So can you please suggest what would be the variable format in this case.
I tried for:
Header:RunTime,1,Date,1
Header:RunTime,1,Time,1
But these variable were not found and I got the error in RWB Comm Channel monitoring.
Thanks in advance.
AbhishekAs per your scenario, SOAP is sender and the header information is sent from soap sender. Now in mapping, using java or xsl, you have to retrieve the soap header information and map it to the target side field. Only then this field could be used in variable substitution. Are you sure that the fields SOAP Header, RunTime, Date, Time are part of target message type structrure?
Regards,
Prateek -
Variable substitution parameter
Hi All,
I have a scenario where in i am creating a flat file . File name is being taken from the payload using variable substitution parameter . But while wrting to a file , i need to make sure that File name doesnt get written in the file .
Is there anyway i can avoid filename getting written into the file.
Regards
Vinay P.Hi,
You can Use ASMA Properties of file adapter .
Step 1. Create UDF with following code.
try
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
String MyFileName = "_ASMA.txt";
conf.put(key, MyFileName);
return MyFileName ;
catch(Exception e)
String exception = e.toString();
return exception;
this is an example : Here i have Hard coded the File Name in MyFileName String.
If You Want file name from Target Message Type , Create your UDF as Parameterized UDF, and Pass Filename as argument to that Parameter
Step 2:
Map This Parameterised UDF Function to Root Node, so that it will return value to root node.
Step 3:
On Receiver adapter .
Tick the Set Adapter Specific Message Attribute on advanced Tab.
Step 4:
Tick File Name.
Rest is same....
I hope this will help you ...
Regards
Prabhat Sharma. -
Error in Variable Substitution
Dear All,
Result Payload:
<ns1:MT_Level1 xmlns:ns1="http://test.com">
<Header>
<Separator>,</Separator>
</Header>
<Detail>
<FileNumber>30</FileNumber>
<LinkToNextLevel />
<Expansion1>0</Expansion1>
<Expansion2>0</Expansion2>
<Expansion3>0</Expansion3>
<Expansion4>0</Expansion4>
</Detail>
<Detail>
<FileNumber>30</FileNumber>
<LinkToNextLevel />
<Expansion1>0</Expansion1>
<Expansion2>0</Expansion2>
<Expansion3>0</Expansion3>
<Expansion4>0</Expansion4>
</Detail>
<FileNode>
<FileName>test.txt</FileName>
</FileNode>
</ns1:MT_Level1>
I want to use "File Name" in the "File Node" node for my variable substitution.
In the configuration:
File Name Scheme = %filename%
Variable = filename
reference = payload: Messages, 1, Message, 1, MT_Level1, 1, FileNode, 1, FileName, 1
Note: I'm using multimapping (1 to N).
File Name path is /ns0:Messages/ns0:Message2/ns1:MT_Level1/FileNode/FileName ( from right click in the file name --> copy path).
I got following error:
"Attempt to process file failed with com.sap.aii.adapter.file.configuration.DynamicConfigurationException: Error during variable substitution: com.sap.aii.adapter.file.varsubst.VariableDataSourceException: The following variable was not found in the message payload: filename"
Please advise!
Best Regards,
Victor.Dear All,
My problem is solved!
The issue is because I don't put the interface mappings sequence as the same sequence as the message mappings sequence. Hence the structure name that i put in the variable substitution all are not match with the structure name in the payload even though all have the file name element.
So what i did is i have to reorder the sequence of my message mappings to be the same sequence as the interface mappings sequence.
Thanks for all that trying to help!
Appreciated it guys.
BTW, for the variable reference it's correct that i no need to put message and message2 as the reference.
payload:MT_Level1,1,FileNode,1,FileName,1 will do.
Best Regards,
Victor. -
'Variable Substitution' error - Expected numeric element index
Hello everyone!
I'm using the 'variable substitution' property in XI to replace the filename of the output file to a value in the message payload.
Here are the parameters I provided:
File Name Scheme: %filename%.xml
Variable Name: filename
Reference: payload:ORDERS05,1,recordset,1,IDOC,1,E1EDK02,BELNR,1
I'm getting this error in the adapter engine:
Caught exception while initializing variable substitution engine: Cannot parse pseudo-path for variable substitution: 'filename': Expected numeric element index, got 'BELNR': For input string: "BELNR"
Can anyone tell me what this means, and how I can fix this problem?
Thanks in advance!
GlennYup, raj! it's IDOC to file.... I did what you asked but I'm now getting this error:
MP: Exception caught with cause com.sap.aii.af.ra.ms.api.RecoverableException: The Adapter Message Property 'FileName' was configured as mandatory element, but there is no 'DynamicConfiguration' element in the XI Message header: com.sap.aii.adapter.file.configuration.DynamicConfigurationException: The Adapter Message Property 'FileName' was configured as mandatory element, but there is no 'DynamicConfiguration' element in the XI Message header
any idea what it means?
Kind regards,
Glenn -
Variable substitution for Dynamic filename
Hi All,
my Scenario is Proxy to file. and the receiver file should be a zip file of extension .dat.gz.
In mapping I tried as below. In signature I used one sender and two receiver messages.
SENDER: RECEIVER:(2messages)
MT_Product MT_Product
-----Row ---------Row
---------field1 -----------field1
---------field2 -----------field2
---------field3 -----------field3
MT_Poduct_1
--------field5
for field5 I mapped current date and I am trying to use it in Reciver file communication channel. will that be correct to use?
In receiver communication channel the file name is Product_%field5%.zip I used
and I used Module Configuration for content conversion and Zipping the file.
In variable substitution I used field5 for dynamic date.
field5-----------
payload:Messages,1,Message2,1,MT_Product_1,1,field5,1
Module Confuguration:
Guys! am on right path????? will this be possible????Hello,
Why you are using multimapping? Just for defining target file name using var substitution - BTW, that too is incorrect. You cannot use Messages/Message 1 nodes in variable substitution.
Secondly, if I am not wrong the approach of defining dynamic zip file name using variable substitution won’t work because variable substitution will be executed once all the modules before standard call sap adapter gets executed. So during runtime, at var substitution step, ur file will actually be a text file instead of XML as a result u will get an exception.
So, if there is no specific objective of using multimapping then simply use DC.
Thanks
Amit Srivastava
Maybe you are looking for
-
I rented a movie. I want to see it using different user on same mac for security reason. How can I do this? Home Sharing fails to do this, so far.
-
Error while deleting Profitcenter in ECC 6.0
Hi Experts, My user wants to delete one profitcenter which has no postings as of today and no use in future. We have tried deleting using T.codes KE54 and 0KE2 but getting the below message. Error Message: Profit center scenario is active in new Gene
-
Hi all, i am trying to load a file called text1.txt using sql loader. I am using sqlplus but i dont know how to call sql loader in sql plus. can someone provide syntax assumming data file is text1.txt and control file is txt.clt thanks
-
* Urgent FND_REQUEST.SUBMIT_REQUEST *
Hi Gurus, I am having a problem in Oracle apps. I am calling the following function and running a shell script which has been registered in apps as "CPSINTA" and working fine if I run it using concorrent program. I need to run this from forms and I w
-
HI my problem is untill now i used old cost center, to day onwards i want use new cost center... how to modify in my cost element in cost center. i want to modify my old cost center and put new cost center. Thank you. Ashok kumar