on 10-25-2005 6:29 AM
Dear all ,
I have a query related to variable substitution :
The requirement is that filename should be in the following format : <b>%<store_code>%_%<Date>%_master.xml</b> .
I have done the configuration for Store_code in the variable substitution from Payload .
But I am facing problem related to <b>Date</b> <b>as the requirement is that we should not take the date from the payload .</b> . We used "ADDtimestamp" in the file mode creation but it is generating file with time stamp also which doesn;t serve the purpose .
Can somebody suggest how to take the current date without taking it from payload . Does anyone know something about standard current date which I can assign as Var2 .
Thanks in advance
Regards
Prabhat
Hello Prabhat,
As per SP14 you might use the Adapter-Specific Message Properties that can be filled in the mapping step of XI. Please check the documentation for details: http://help.sap.com/saphelp_nw04/helpdata/en/43/0a7d1be4e622f3e10000000a1553f7/frameset.htm
Best regards
Joachim
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Prabhath,
From your scenario you need a file name as follows:
<store_code>_<date>.xxx
In this case what you can do is that when your target structure which is going in the file data is created, using a user defined function(if message mapping is being used or XSLT mapping with java enhancement) to pull in the current date. This you can populate in a separate node <b>Date with a child node Current_date</b> in your target structure.
In the file adapter what you can do is
1. Variable substitution add a new line to take this date from the XML path of your <b>target structure till Current_date</b> as mentioned above.
2. In the content conversion parameters use the following parameters:
Name Value
Date.fieldFixedLengths 0
Date.fixedLengthTooShortHandling Cut
*Assuming Date is the name of the node that is holding your current_date tag.
Hope this will help you...
Cheers
JK
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Prabhat
"As mentioned earlier as per the requirement I don't have to mention "Current_Date" in my xml tag"
Well JK is trying to explain exactly that, what he is trying to tell you is, create a temporary node called "Current_Date" in your target xml. This node will store the date value which you can pass via variable substitution.
Now in the final xml output, you do not need the current_date node, no problem using file content conversion you can remove that particular node alone.
Check the following blog, as to how to remove the current_date node from your final output.
/people/sravya.talanki2/blog/2005/08/11/solution-to-the-problem-encountered-using-variable-substitution-with-xi-sp12
We had a similar requirement, where we had to have a dynamic file name. I followed a similar process with success. In case you need further help, mail me. My mail id is in my Business card.
cheers
Sameer
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.