on 01-19-2006 10:58 PM
Hi
I need to convert string to date in message mapping.. i have used function datetransform..but doesn't work?
my sourse string format yyyy-MM-dd
target date format is: yyyyMMdd
2. how do i map following exammple in message mapping?
i need to map two (soruce) fields to target 1 filed..
while i'm doing this 2nd mapping only happening..
Source :
-
ReceivedDate(string)
LastDate (string)
Target
-
BUDAT (date)
Regardss..rambarki
hi rambarki,
for coverting a string to date i think this link may help you
http://www.experts-exchange.com/Programming/Programming_Languages/Java/Q_20946815.html
regards
jithesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for your suggestions.
I'm just hang on my server reboot, while i'm trying to implemenet all your ideas..!
right now my requirement like this only ..two source string fileds mapping traget date fieild, while coming to production we may change to fileds datatypes..
and i tried initially using datetrans function, in properties i have changed format accroding to my req. but while i'm testing its gave me error date not convertble..also let me know length sould be same for source and target fields..because i haven't mentioned length..!
and SAP date field generally containing date only, but in my source filed having date and time also ..should i truncate the time while i'm mapping the field..?
Thanks once again..
Regards..rambarki
Hi,
<b>let me know length sould be same for source and target fields</b>
Yes i guess, i wrote for the length also in my post
<b>in my source filed having date and time also ..should i truncate the time while i'm mapping the field..?
</b>
Yes, Source -->Trim DateFunction -->Target
But make sure the length are correct before and after trim,
The Trip function that is standard Trip's white space, here i guess you can use this logic:
1.Take the input as date and time.
2.Use substring to get the date only.
3.Map to the target.
User defined functions:
http://help.sap.com/saphelp_erp2005/helpdata/en/2c/2d8c4024d26e1de10000000a1550b0/frameset.htm
Regards,
Anirban.
Hi Rambarki,
You can still use the DateTrans funciton. click on the date and time format. There are two boxes. In the second box you can get the time format also. Similarly you can go for the receiver side also. Hope this will solve your problem.
Thanks and Regards
Vishal Kumar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Rambarki,
This links deals with all the DATE functions available on XI. Just check them out.
http://help.sap.com/saphelp_nw04/helpdata/en/43/c4cdfc334824478090739c04c4a249/content.htm
http://java.sun.com/j2se/1.4.2/docs/api/java/util/Calendar.html#setFirstDayOfWeek(int)
http://java.sun.com/j2se/1.4.2/docs/api/java/util/Calendar.html#setMinimalDaysInFirstWeek(int)
Hope this helps,
regards,
Bhavesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
for converting we have to write userdefined function and Transform date
in the mapping
source->userdefinedfunction->TransFormDate->Target
go to the properties of the TransFormdate and change the target format
in the userdefined function use the following code
String x="";
x = a.substring(0,4)"/"a.substring(5,7)"/"a.substring(8,10);
return x;
Regards
Jayaraman
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Umashankar,
Are both the source fields are received date,last date goin to contain the same date?.
If yes, then you can compare dates using compare date function and then DateTransform it into target.
Is there any condition applied on the date i.e the earlier of both or vice versa should go into target?????
otherwise you can always go for user defined function.
Regards,
Rashmi.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
use DateTrans :-
Converts date format I to another date format O.use in message mapping and from context menu --properties do:
source format :yyyy-mm-dd
destination format:yyyymmdd.
with the correct length,
http://help.sap.com/saphelp_erp2005/helpdata/en/43/c4cdfc334824478090739c04c4a249/frameset.htm
Regards,
Anirban.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Rambarki,
I think you need to duplicate the target date field.
Just right click on that and say duplicate.
Then you can go for mapping.
ReceivedDate ---> DateTrans ---> BUDAT
LastDate ---> DateTrans ---> BUDAT (duplicated)
In the DateTrans you can specify the required transformation.
Hope this solves your problem.
regards,
Raju
User | Count |
---|---|
81 | |
24 | |
11 | |
9 | |
7 | |
5 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.