on 05-27-2016 1:04 PM
hello Experts,
i am getting time stamp from my db dd/mm/yyyy hh/mm/ss AM or PM
Before loading the data to hana using slt i would like to truncate the date from source to
dd/mm/yyyy
could any one please how to go abt this.
Thanks & Regards,
Kishore
Hi Kishore,
This is possible.
Please use the transformation settings for this.
Regards
BJ
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Kishore,
Here's how u can do it via transformation settings:
- Go to tcode- LTRS.
- Add Rule for table you are replication.
- Select "field-related" type rule and select field.
- Mention the field in import parameter.
- In line of code - mention your code.
For ex. if you want to use only first 5 char from VPSTA field of MARA
Import parameter: VPSTA.
Code: Data x type char50. x = I_VPSTA_1. E_VPSTA = x+0(5).
Hope helps.
Regards
BJ
Hi Kishore,
I got it, use this.
- Modify the data type of field in "Rule assignment" for table, change it to "CHAR 10".
- Put import parameter: <field>
- Line of code: CONVERT TIME STAMP I_<field>_1 TIME ZONE '<timezone>' INTO DATE E_<field>.
for example: CONVERT TIME STAMP I_TIMESTAMP_1 TIME ZONE 'UTC' INTO DATE E_TIMESTAMP.
It will resolve your issue, let me know.
Cheers
BJ
Hi BJ,
I am trying a work around using program, which i found in below link
The problem i am facing it the data is getting populated with all 00000000
The program is given below, what am i doing wrong.
*&---------------------------------------------------------------------*
*& Include ZGT_TRUNCATE_DTTM
*&---------------------------------------------------------------------*
*Extract date and place it in DATS field
data: H_DTTM type dats.
CONCATENATE
<WA_S_ADT_INS_DTTM_CTRDTLS_O>-ADT_INS_DTTM(4)
<WA_S_ADT_INS_DTTM_CTRDTLS_O>-ADT_INS_DTTM+7(2)
<WA_S_ADT_INS_DTTM_CTRDTLS_O>-ADT_INS_DTTM+10(2)
INTO H_DTTM.
WA_R_ADT_INS_DTTM_CTRDTLS_O-INS_DTTM = H_DTTM.
*End of include
Thanks & Regards,
Kishore
Hello BJ,
I have a bigger problem now, i have 4 date fields in each table,
1 created date
2 updated date.
3 2nd updated date.
4 3rd updated date.
1). I have to edit all the fields in begin of record event and insert them in hana.(it doesnt allow to have two begin of record events in LTRS)
2). The second issue is for all the tables in my system, these fields are common, so all the 160 tables need this code to be implemented. that implies 160 programs or (160*4 which is not possible as begin of record is possible only once.)
is there any way i can make this dymanic for all tables in one program.
Thanks & Regards,
Kishore
User | Count |
---|---|
84 | |
24 | |
11 | |
9 | |
7 | |
6 | |
5 | |
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.