cancel
Showing results for 
Search instead for 
Did you mean: 

How to populate from current calendar week until next 1 year.

former_member215567
Participant
0 Kudos

Hi Experts,

I am extracting data from CRM to BI (DSO) and mapped the source field Valied to to Calweek in BI.

My requirement is

1) which have Valid to date less than current date will be ignored as they no longer are valid

2) Data has been populated from current calendar week until next 1 year.

Ex:

  One record with value 200 valid till 13.03.2011 --> This data will not come to BI side

  Other record with value 300 valid till 31.12.9999. --> This data has been populated from current calendar week until next 1 year

(Should apper Calweek data from 201406 to 201506)

So how can i achive this?

Thanks & Regards,

Venkat

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member184884
Active Participant
0 Kudos

Hi venkat,

can you please clarify below doubts so that we can help you in better way.

  • One record with value 200 valid till 13.03.2011 --> This data will not come to BI side

       -  May i know what is the field for the record 200 in source..?

          based on this field we can filter out by using routine(better end routine for performance reasons)

           below is piece of code(end routine) for the same.


Loop at RESULT_PACKAGE ASSIGNING <RESULT_FIELDS> .

if <RESULT_FIELDS>-A  EQ '200'

and  <RESULT_FIELDS>-B LQ SY-DATUM

DELETE RESULT_PACKAGE.

ELSE

Other conditions also you can write in Else if part in similar way if you are unable to write please give more clarity on your 2nd point so that we can assist you in better way.

      

ENDIF.

ENDLOOP.

  • Other record with value 300 valid till 31.12.9999. --> This data has been populated from current calendar week until next 1 year  

     -  this requirement really i am really not understood please elaborate then only we can help out.


Regards,

Harish

0 Kudos

Hi Venkat,

can you please elaborate the issue with example so that it can be solved

former_member215567
Participant
0 Kudos

Hi Dinesh,

I am planning to extract data from CRM to BI ( Loaidng data to DSO in BI) and i have one filed in CRM as Valid to which is i am going to map 0calweek in BI.

Now i want data only which is morethan current date values only. ( if Valid to date less than current date will be ignored)

Ex:

  If any record with value 200 valid till 13.03.2011 --> This data will not come to BI side

  If any record with value 300 valid till 31.12.9999. --> This data has been populated from current calendar week until next 1 year

(Should apper Calweek data from 201406 to 201506)

Regards - Venkat

0 Kudos

Hi Venkat,

For this you need to right a code in transfer rule or in start routine of transformation. If the valid to date is less than system data (SYSDATUM < Tran structure- Valid to then delete).

And  you can create 2 info-object with valid week to & valid week from. Calculate this week from current date ..

Thanks

Dinesh Kumar B

Former Member
0 Kudos

HI venkat,

I think you need convert  form calweek to calday it can be happen with Automatic time conversion,i think you will get an idea by seeing the below thread,but data target should be cube.

Please look over the below thread it may help you,

Former Member
0 Kudos

Hello Venkat,

Current calendar week will be always dependant on current system date. Each time you execute the report the query run time date (sydatum) should be assigned to calweek.

Until next year the current week is constant in your report.

If this does not answer your qeustion. Please draft an example with 2 records and expected output.