on 02-24-2012 1:03 PM
Hi,
Requirement
scenario is file to i doc
File naming format is : XXXXXXXXXX-YYYYMMDD-HHMMSS-ZZZ
XXXXXXXXXX LS name
ZZZ Millisec value of Current Time Instance
YYYYMMDD-HHMMSS time stamp
i know the adding the time stamp but this requirement is quite different..
Thanks and regards,
Kesava.
File naming format is : XXXXXXXXXX-YYYYMMDD-HHMMSS-ZZZ
might be its helpful for ur requirement:
udf1(GetReceiverPartner) +constant(-) + concat ->udf2(GetTimestamp) -> concat->target node.
udf1(GetReceiverPartner):
String GetReceiverPartner(Container container) throws StreamTransformationException{
String var1 = "";
String var2 = System.getProperty("SAPSYSTEMNAME");
if(var2.equals("dev"))
var1 = "sys name";
if(var2.equals("Qua"))
var1 = "sys name ";
if(var2.equals("Pro"))
var1 = "sys name";
return(var1);
.................................................
udf2(GetTimestamp):
String GetTimestamp(Container container) throws StreamTransformationException{
String DATE_FORMAT_NOW = "YYYYMMDD-HHMMSS-SSS";
Calendar cal = Calendar.getInstance();
SimpleDateFormat sdf = new SimpleDateFormat(DATE_FORMAT_NOW);
return sdf.format(cal.getTime());
note: import package: java.text.SimpleDateFormat
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear Kesava
YOur question is not quite clear, Can you elaborate on following point:
Do you need to pass the file name to any of the fields of IDoc?
Sourabh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Kesava,
Go for Variable Substitution to get the receiver system name (either as the sender/receiver system, or from message payload). You can read more about the VS here:
http://help.sap.com/saphelp_nwpi71/helpdata/en/44/6a316af5a23672e10000000a114a6b/content.htm
And use the timestamp as you know it in parallel with Variable Substitution to achieve your goal.
Hope this helps,
Greg
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.