on 09-18-2014 10:36 AM
Hi Expert,
We've to derive Cal month and year based on the print date in transformation routine. Could you please share sample code how to derive this? Do need to do in start/field routine or end routine.
Thanks,
Hi Pawan
As Ganesh mentioned you don't need to write a routine for this derivation.
Just map the date you receive in source field to the Calmonth/CalYear field in Transformations, SAP will automatically derive the values based on source data.
Although an alternative could be to use the SAP's standard functions available like CalYear, Calmonth which takes a date field as input to derive the respective outputs.
You can use this as formula in transformations.
Thanks & Regards
Ashish
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Pawan
As mentioned in the image mentioned by Karthik, you can use the update type of characteristic as formula and use the SAP standard functions like :DATE_MONTH() , DATE_TO_WEEK () etc.
However the easiest seems to be direct assignment just assign print date to the target fields SAP will internally derive Calweek and Calmonth assuming the value of your char: ZPRINTDT is identical as of Sy-datum.
Note: If the format of value in ZPRINTDT is different then you might need to go for formula or routine.
Regards
Ashish
Hi Pawan,
I think without routine also you can populate calmonth and cal year using date(Time conversion)
Regards,
Ganesh Bothe
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
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.