Quantcast
Channel: SCN : All Content - All Communities
Viewing all articles
Browse latest Browse all 9169

0CALDAY to 0CALQUARTER in Expert Routine

$
0
0

Experts,

 

I need to populate 0CALWEEK, 0CALMONTH, 0CALQUARTER & 0CALYEAR in the cube from 0CALDAY in DSO. I wrote the below code in the expert routine. 0CALMONTH & 0CALYEAR are populating perfect, but 0CALWEEK  is coming in wrongly (displays 201308 for 8/12/2013) and 0CALQUARTER is throwing an error at the time of DTP load.

 

I have been successful in the past with regular transformations where in a one to one mapping between 0CALDAY & 0CALWEEK/0CALQUARTER etc, but this is my first time doing this in an Expert Routine. Please share your solutions. Thanks.

 

 

..............................................................................

 

LOOP AT SOURCE_PACKAGE into source_pkg.

      Clear result_pkg.

      Move-corresponding source_pkg to result_pkg.
     
     result_pkg-CALMONTH  = source_pkg-CALDAY.

      result_pkg-CALQUARTER  = source_pkg-CALDAY.

      result_pkg-CALWEEK  = source_pkg-CALDAY.

     result_pkg-CALYEAR  = source_pkg-CALDAY.


Viewing all articles
Browse latest Browse all 9169

Trending Articles