cancel
Showing results for 
Search instead for 
Did you mean: 

Populate Time Characteristic

Former Member
0 Kudos
93

Experts,

I have the date in this format - 2007M01D12 in my flat file. I have to populate this to both 0Calday (YYYYMMDD) and 0Calmonth (YYYYMM) in my DSO. I am using BI 3.x. Where and How do I make these necessary changes? Please explain in detail.

Thanks,

Pooja

View Entire Topic
Former Member
0 Kudos

Hi Pooja,

You can go with update routine which retrieves only YYYYMMDD for 0Calday (YYYYMMDD) and YYYYMM for 0Calmonth (YYYYMM).

In the update routine, write the following code.

For 0Calday:

RESULT = COMM_STRUCTURE-/BI0/CALDAY0(4)5(2)+8(2).

(take first 4, 6, 7 and 9, 10th characters of the field and push it into the result)

For 0Calmonth:

RESULT = COMM_STRUCTURE-/BI0/CALMONTH0(4)5(2).

Regards,

KK.

Former Member
0 Kudos

Can I use this code in BI 3.x? I am not using BI 7.0. Once again, I have two date fields, posted day and execution day. Both are in the format 2007M01D12 as mentioned earlier. My client wants 0calday as well as 0calmonth for both posted day and execution day in the DSO. Now the important question is, what should I include in my infosoure? Should I include only posted day and execution day fields or even 0calday and 0calmonth. Where should I map posted day to 0calday and 0calmonth; and execution day to zcalday (reference 0calday) and zcalmonth (reference 0calmonth)? Also under data field in DSO what are the time chars that I should be dragging.

Former Member
0 Kudos

You can use this code in BW 3.5.

Map required fields with respect to flat file fields in your transfer structure.

Go for the routine specified. It may help you. In the routine, mention the correct field name in XXXXX of COMM_STRUCTURE-/BI0/XXXXXX...

Former Member
0 Kudos

Where and how do I input this update routine code?

Former Member
0 Kudos

hi,

use the code in the start routine and store thevalues in the internal table and pass the values in the update routines for each object.

hope if you have the date and month format for all date and month fields as u mentioned, then you can use the star routine to get the required format and update routine to pass the values to the objects.

Ramesh

Former Member
0 Kudos

Pooja,

For the calday use just the calday routine. For the calmonth, first implement the calday conversion logic from yyyyMmmDdd to yyyymmdd and then continue the code with log for calmonth and assign it to calmonth.

example

for CALDAY

data: wa1 type /BIC/OICALDAY.

wa1 = comm_structure-calday.

replace 'M' with '' into wa1.

replace 'D' with '' into wa1.

condense wa1 no-gaps.

RESULT = wa1

For calmonth

wa1 = comm_structure-calday.

replace 'M' with '' into wa1.

replace 'D' with '' into wa1.

condense wa1 no-gaps.

Result = wa1(6).

Hope this helps

Thanks

Yashu Raj