Professional Documents
Culture Documents
1 of 5
https://archive.sap.com/discussions/thread/3951017
10/31/2016 8:18 PM
2 of 5
https://archive.sap.com/discussions/thread/3951017
Hi Experts,
I'm using SAP BW on HANA 7.4 and I created a generic data source based on an ABAP coded table. The
fields are in the attachment/screenshot. I'm trying to map the time chars from the data source to the ADSO.
Trying to map AJAHR (Year) in the datasource to 0CALYEAR in the data source and I keep getting error
Automatic time conversion is not possible for source field AJAHR. And I get the same error trying to map
SMONT from the datasource to 0CALMONTH2 in ADSO:
Automatic time conversion of source field AJAHR to 0CALYEAR could not be defined. This is because the
source is a DataSource and consists of fields, and not InfoObjects. Time conversion can only be defined
automatically for InfoObjects.
If you need a time conversion, you can assign an InfoObject to the field in the rule details.
Alternatively, you can define your own time conversion using a formula or a routine.
Here's the transformation error:
I know I need to write a routine. Could some one please help with a routine that I need to write for this
conversion. I'll assign points.
10/31/2016 8:18 PM
3 of 5
https://archive.sap.com/discussions/thread/3951017
Transformation.PNG
(54448 B)
Kalinda Kalinda
August 30, 2016 at 19:25 PM
0 Likes
Correct Answer
Maju Alexander
replied
August 31, 2016 at 06:35 AM
endloop.
Else if your AJAHR is coming as
"31082016"
Then write code in end routine as:
Loop at result_package assigning
<result_fields>.
<result_fields>-calyear =
<result_fields>-ajahr+4(4).
endloop.
Similarly you can populate
0CALMONTH as well.
Other simple approach would be to
map the AJAHR to a DATE type
infoobject in LDP layer and assigning
10/31/2016 8:18 PM
4 of 5
https://archive.sap.com/discussions/thread/3951017
Other simple approach would be to
map the AJAHR to a DATE type
infoobject in LDP layer and assigning
it directly to 0CALYEAR in BT layer
Br,
Maju
Correct Answer
Maju Alexander
10/31/2016 8:18 PM
5 of 5
https://archive.sap.com/discussions/thread/3951017
Br,
Maju
0
Kalinda Kalinda
replied
August 31, 2016 at 22:03 PM
Kalinda Kalinda
How do I assign points? Are we still able to do this? I don't see anything to
assign with
0
Maju Alexander
replied
September 01, 2016 at 06:19 AM
10/31/2016 8:18 PM