cancel
Showing results for 
Search instead for 
Did you mean: 

# is coming the report made on infocube

Former Member
0 Kudos

Dear Friends, i have report on infocube consist of end routine. End routine contains look up consist of DSO brining Cost center group, Profit center and region fields in the reports.# is coming in these 3 fields earlier data was coming in the reports. please chk the following screenshot. please suggest friends

Accepted Solutions (0)

Answers (11)

Answers (11)

Former Member
0 Kudos

hi ,

this is production data and routine. previously i was getting values for those particular fields. i can not change anything in production

former_member189845
Active Participant
0 Kudos

Hi Nikhil,

I just checked the code where select statement had been used

SELECT * from /BIC/AZCSKS00 into TABLE it_csks


And it is followed by a read statement .


READ TABLE it_csks INTO wa_csks with key

       <RESULT_FIELDS>-co_area costcenter = <RESULT_FIELDS>-COSTCENTER.

can you check if the cost center which is in DSO is also present in the look up DSO.

I think the look up is getting failed.

You also do a simulation in expert mode and select all the temporary storage like below, this help us to investigate deeper to find out the whether records after transformation i.e. after the end routine what is the record actually and share the the screen shot of records.

Thx,

Siva

Former Member
0 Kudos

Thx siva for quick reply. i have following routine in the quality which is working fine. data is getting properly in the report. can u find any difference in both routine

PROGRAM trans_routine.

*---------------------------------------------------------------------*

*       CLASS routine DEFINITION

*---------------------------------------------------------------------*

*

*---------------------------------------------------------------------*

CLASS lcl_transform DEFINITION.

   PUBLIC SECTION.

*  Attributs

     DATA:

       p_check_master_data_exist

             TYPE RSODSOCHECKONLY READ-ONLY,

*-    Instance for getting request runtime attributs;

*     Available information: Refer to methods of

*     interface 'if_rsbk_request_admintab_view'

       p_r_request

             TYPE REF TO if_rsbk_request_admintab_view READ-ONLY.

   PRIVATE SECTION.

     TYPE-POOLS: rsd, rstr.

*   Rule specific types

     TYPES:

       BEGIN OF _ty_s_TG_1,

*      InfoObject: 0CHNGID Change run ID.

         CHNGID           TYPE /BI0/OICHNGID,

*      InfoObject: 0RECORDTP Record type.

         RECORDTP           TYPE /BI0/OIRECORDTP,

*      InfoObject: 0REQUID Request ID.

         REQUID           TYPE /BI0/OIREQUID,

*      InfoObject: ZOBJNR Object number.

         /BIC/ZOBJNR           TYPE /BIC/OIZOBJNR,

*      InfoObject: ZGJAHR Fiscal Year.

         /BIC/ZGJAHR           TYPE /BIC/OIZGJAHR,

*      InfoObject: ZWRTTP Value Type.

         /BIC/ZWRTTP           TYPE /BIC/OIZWRTTP,

*      InfoObject: ZKHINR Std Hierarchy.

         /BIC/ZKHINR           TYPE /BIC/OIZKHINR,

*      InfoObject: 0SEGMENT Segment for Segmental Reporting.

         SEGMENT           TYPE /BI0/OISEGMENT,

*      InfoObject: 0PLANT Plant.

         PLANT           TYPE /BI0/OIPLANT,

*      InfoObject: ZWTG001 Value TranCurr.

         /BIC/ZWTG001           TYPE /BIC/OIZWTG001,

*      InfoObject: 0CURRENCY Currency key.

         CURRENCY           TYPE /BI0/OICURRENCY,

*      InfoObject: ZWTG2 Value Currency.

         /BIC/ZWTG2           TYPE /BIC/OIZWTG2,

*      InfoObject: ZWTG3 Value Currency.

         /BIC/ZWTG3           TYPE /BIC/OIZWTG3,

*      InfoObject: ZWTG4 Value Currency.

         /BIC/ZWTG4           TYPE /BIC/OIZWTG4,

*      InfoObject: ZWTG5 Value Currency.

         /BIC/ZWTG5           TYPE /BIC/OIZWTG5,

*      InfoObject: ZWTG7 Value Currency.

         /BIC/ZWTG7           TYPE /BIC/OIZWTG7,

*      InfoObject: 0CALMONTH Calendar year/month.

         CALMONTH           TYPE /BI0/OICALMONTH,

*      InfoObject: ZCALMONTH Cal Month.

         /BIC/ZCALMONTH           TYPE /BIC/OIZCALMONTH,

*      InfoObject: ZBEKNZ Dr/Cr indicator.

         /BIC/ZBEKNZ           TYPE /BIC/OIZBEKNZ,

*      InfoObject: ZTOTALS Total.

         /BIC/ZTOTALS           TYPE /BIC/OIZTOTALS,

*      InfoObject: ZDESC Description.

         /BIC/ZDESC           TYPE /BIC/OIZDESC,

*      InfoObject: ZWTG08 Value Currency.

         /BIC/ZWTG08           TYPE /BIC/OIZWTG08,

*      InfoObject: ZTEXT Description.

         /BIC/ZTEXT           TYPE /BIC/OIZTEXT,

*      InfoObject: 0FISCPER Fiscal year / period.

         FISCPER           TYPE /BI0/OIFISCPER,

*      InfoObject: 0FISCYEAR Fiscal year.

         FISCYEAR           TYPE /BI0/OIFISCYEAR,

*      InfoObject: 0FISCVARNT Fiscal year variant.

         FISCVARNT           TYPE /BI0/OIFISCVARNT,

*      InfoObject: ZLEDNR Ledger.

         /BIC/ZLEDNR           TYPE /BIC/OIZLEDNR,

*      InfoObject: 0COSTCENTER Cost Center.

         COSTCENTER           TYPE /BI0/OICOSTCENTER,

*      InfoObject: 0CO_AREA Controlling area.

         CO_AREA           TYPE /BI0/OICO_AREA,

*      InfoObject: 0PROFIT_CTR Profit Center.

         PROFIT_CTR           TYPE /BI0/OIPROFIT_CTR,

*      InfoObject: Z_ZREGION Region.

         /BIC/Z_ZREGION           TYPE /BIC/OIZ_ZREGION,

*      InfoObject: 0COMP_CODE Company code.

         COMP_CODE           TYPE /BI0/OICOMP_CODE,

*      InfoObject: 0COSTELMNT Cost Element.

         COSTELMNT           TYPE /BI0/OICOSTELMNT,

*      InfoObject: ZCSTELMT Cost Element.

         /BIC/ZCSTELMT           TYPE /BIC/OIZCSTELMT,

*      Field: RECORD.

         RECORD           TYPE RSARECORD,

       END   OF _ty_s_TG_1.

     TYPES:

       _ty_t_TG_1        TYPE STANDARD TABLE OF _ty_s_TG_1

                         WITH NON-UNIQUE DEFAULT KEY.

*$*$ begin of global - insert your declaration only below this line  *-*

... "insert your code here

*$*$ end of global - insert your declaration only before this line   *-*

     METHODS

       new_record__end_routine

         IMPORTING

           source_segid             type rstran_segid

           source_record            type sytabix

         EXPORTING

           record_new               type sytabix.

     METHODS

       end_routine

         IMPORTING

           request                  type rsrequest

           datapackid               type rsdatapid

           segid                    type rsbk_segid

         EXPORTING

           monitor                  type rstr_ty_t_monitors

         CHANGING

           RESULT_PACKAGE              type _ty_t_TG_1

         RAISING

           cx_rsrout_abort

           cx_rsbk_errorcount.

     METHODS

       inverse_end_routine

         IMPORTING

           i_th_fields_outbound         TYPE rstran_t_field_inv

           I_R_SELSET_OUTBOUND          TYPE REF TO CL_RSMDS_SET

           i_is_main_selection          TYPE rs_bool

           i_r_selset_outbound_complete TYPE REF TO cl_rsmds_set

           i_r_universe_inbound         TYPE REF TO CL_RSMDS_UNIVERSE

         CHANGING

           c_th_fields_inbound          TYPE rstran_t_field_inv

           c_r_selset_inbound           TYPE REF TO CL_RSMDS_SET

           c_exact                      TYPE rs_bool.

ENDCLASS.                    "routine DEFINITION

*$*$ begin of 2nd part global - insert your code only below this line  *

... "insert your code here

*$*$ end of 2nd part global - insert your code only before this line   *

*---------------------------------------------------------------------*

*       CLASS routine IMPLEMENTATION

*---------------------------------------------------------------------*

*

*---------------------------------------------------------------------*

CLASS lcl_transform IMPLEMENTATION.

*----------------------------------------------------------------------*

*       Method end_routine

*----------------------------------------------------------------------*

*       Calculation of result package via end routine.

*       Note: Update of target fields depends on rule assignment in

*       transformation editor. Only fields that have a rule assigned,

*       are updated to the data target.

*----------------------------------------------------------------------*

*   <-> result package

*----------------------------------------------------------------------*

   METHOD end_routine.

*=== Segments ===

     FIELD-SYMBOLS:

       <RESULT_FIELDS>    TYPE _ty_s_TG_1.

     DATA:

       MONITOR_REC     TYPE rstmonitor.

*$*$ begin of routine - insert your code only below this line        *-*

... "insert your code here

*--  fill table "MONITOR" with values of structure "MONITOR_REC"

*-   to make monitor entries

... "to cancel the update process

*    raise exception type CX_RSROUT_ABORT.

data RESULT_FIELDS1    TYPE STANDARD TABLE OF  _ty_s_TG_1.

**data : it_cost type standard table of /BI0/TCOSTELMNT,

**       wa_cost like line of it_cost .

*data : it_cost_center type standard table of /BI0/TCOSTCENTER,

*       wa_cost_center like line of it_cost_center .

     data : result_package1 TYPE STANDARD TABLE OF _ty_s_TG_1,

            wa_result_package1 like line OF result_package1 .

*    data : count type i,

*           calyear(4),

*           calmonth(6).

     data : it_csks type STANDARD TABLE OF /BIC/AZCSKS00,

            wa_csks like line of it_csks.

     SELECT * from /BIC/AZCSKS00 into TABLE it_csks.

     sort it_csks by /BIC/ZOBJNR.

*    select * from /BI0/TCOSTELMNT into table it_cost where DATETO eq

*    '99991231'.

*    select * from /BI0/TCOSTCENTER into table it_cost_center where

*    DATETO eq

*    '99991231'.

     loop at RESULT_PACKAGE ASSIGNING <RESULT_FIELDS> .

       BREAK-POINT.

*      read table it_cost into wa_cost with key COSTELMNT =

*      <RESULT_FIELDS>-COSTELMNT.

*      if sy-subrc eq 0.

*        <RESULT_FIELDS>-/BIC/ZDESC = wa_cost-TXTMD.

*      endif.

       READ TABLE it_csks INTO wa_csks with key co_area =

       <RESULT_FIELDS>-co_area costcenter = <RESULT_FIELDS>-COSTCENTER.

       if sy-subrc eq 0.

         <RESULT_FIELDS>-PROFIT_CTR = wa_csks-PROFIT_CTR.

         <RESULT_FIELDS>-/BIC/ZKHINR = wa_csks-/BIC/ZKHINR.

         if <RESULT_FIELDS>-/BIC/ZKHINR+4(2) eq 'WI'.

           <RESULT_FIELDS>-/BIC/Z_ZREGION = 'Western'.

         ELSEIF <RESULT_FIELDS>-/BIC/ZKHINR+4(2) eq 'SI'.

           <RESULT_FIELDS>-/BIC/Z_ZREGION = 'Southern'.

         ELSEIF <RESULT_FIELDS>-/BIC/ZKHINR+4(2) eq 'NI'.

           <RESULT_FIELDS>-/BIC/Z_ZREGION = 'Northern'.

         ELSEIF <RESULT_FIELDS>-/BIC/ZKHINR+4(2) eq 'EI'.

           <RESULT_FIELDS>-/BIC/Z_ZREGION = 'Eastern'.

         ELSEIF <RESULT_FIELDS>-/BIC/ZKHINR+4(2) eq 'CO'.

           <RESULT_FIELDS>-/BIC/Z_ZREGION = 'Corporate'.

         else.

           <RESULT_FIELDS>-/BIC/Z_ZREGION = 'Projects'.

         endif.

         <RESULT_FIELDS>-comp_code = wa_csks-COMP_CODE.

         <RESULT_FIELDS>-plant = wa_csks-plant.

         <RESULT_FIELDS>-costcenter = wa_csks-COSTCENTER.

*   read table it_cost_center into wa_cost_center with key COSTCENTER =

*      wa_csks-COSTCENTER.

*      if sy-subrc eq 0.

*        <RESULT_FIELDS>-/BIC/ZTEXT  = wa_cost_center-TXTMD.

*      endif.

*        clear : count,calyear,calmonth.

*        count = count + 1.

*        move <RESULT_FIELDS>-/BIC/ZGJAHR to calyear.

*        do 16 TIMES.

*          if count eq 1.

*            CONCATENATE calyear  '01'  INTO

*            <RESULT_FIELDS>-/BIC/ZCALMONTH.

*            move <RESULT_FIELDS>-/BIC/ZWTG001 to

*            <RESULT_FIELDS>-/BIC/ZTOTALS   .

*            move <RESULT_FIELDS> to wa_result_package1 .

*            append wa_result_package1 to result_package1 .

*          ELSEIF count eq 2.

*            CONCATENATE calyear '02'  INTO

*            <RESULT_FIELDS>-/BIC/ZCALMONTH           .

*            move <RESULT_FIELDS>-/BIC/ZWTG2 to

*            <RESULT_FIELDS>-/BIC/ZTOTALS   .

*            move <RESULT_FIELDS> to wa_result_package1 .

*            append wa_result_package1 to result_package1 .

*          ELSEIF count eq 3.

*            CONCATENATE calyear '03'  INTO

*            <RESULT_FIELDS>-/BIC/ZCALMONTH           .

*            move <RESULT_FIELDS>-/BIC/ZWTG3 to

*            <RESULT_FIELDS>-/BIC/ZTOTALS   .

*            move <RESULT_FIELDS> to wa_result_package1 .

*            append wa_result_package1 to result_package1 .

*          ELSEIF count eq 4.

*            CONCATENATE calyear '04'  INTO

*            <RESULT_FIELDS>-/BIC/ZCALMONTH           .

*            move <RESULT_FIELDS>-/BIC/ZWTG4 to

*            <RESULT_FIELDS>-/BIC/ZTOTALS   .

*            move <RESULT_FIELDS> to wa_result_package1 .

*            append wa_result_package1 to result_package1 .

*          ELSEIF count eq 5.

*            CONCATENATE calyear '05'  INTO

*            <RESULT_FIELDS>-/BIC/ZCALMONTH           .

*            move <RESULT_FIELDS>-/BIC/ZWTG5 to

*            <RESULT_FIELDS>-/BIC/ZTOTALS   .

*            move <RESULT_FIELDS> to wa_result_package1 .

*            append wa_result_package1 to result_package1 .

*          ELSEIF count eq 6.

*            CONCATENATE calyear '06'  INTO

*            <RESULT_FIELDS>-/BIC/ZCALMONTH           .

*            move <RESULT_FIELDS>-/BIC/ZWTG6 to

*            <RESULT_FIELDS>-/BIC/ZTOTALS   .

*            move <RESULT_FIELDS> to wa_result_package1 .

*            append wa_result_package1 to result_package1 .

*          ELSEIF count eq 7.

*            CONCATENATE calyear '07'  INTO

*            <RESULT_FIELDS>-/BIC/ZCALMONTH           .

*            move <RESULT_FIELDS>-/BIC/ZWTG7 to

*            <RESULT_FIELDS>-/BIC/ZTOTALS   .

*            move <RESULT_FIELDS> to wa_result_package1 .

*            append wa_result_package1 to result_package1 .

*          ELSEIF count eq 8.

*            CONCATENATE calyear '08'  INTO

*            <RESULT_FIELDS>-/BIC/ZCALMONTH           .

*            move <RESULT_FIELDS>-/BIC/ZWTG08 to

*            <RESULT_FIELDS>-/BIC/ZTOTALS   .

*            move <RESULT_FIELDS> to wa_result_package1 .

*            append wa_result_package1 to result_package1 .

*          ELSEIF count eq 9.

*            CONCATENATE calyear '09'  INTO

*            <RESULT_FIELDS>-/BIC/ZCALMONTH           .

*            move <RESULT_FIELDS>-/BIC/ZWTG9 to

*            <RESULT_FIELDS>-/BIC/ZTOTALS   .

*            move <RESULT_FIELDS> to wa_result_package1 .

*            append wa_result_package1 to result_package1 .

*          ELSEIF count eq 10.

*            CONCATENATE calyear '10'  INTO

*            <RESULT_FIELDS>-/BIC/ZCALMONTH           .

*            move <RESULT_FIELDS>-/BIC/ZWTG10 to

*            <RESULT_FIELDS>-/BIC/ZTOTALS   .

*            move <RESULT_FIELDS> to wa_result_package1 .

*            append wa_result_package1 to result_package1 .

*          ELSEIF count eq 11.

*            CONCATENATE calyear '11'  INTO

*            <RESULT_FIELDS>-/BIC/ZCALMONTH           .

*            move <RESULT_FIELDS>-/BIC/ZWTG11 to

*            <RESULT_FIELDS>-/BIC/ZTOTALS   .

*            move <RESULT_FIELDS> to wa_result_package1 .

*            append wa_result_package1 to result_package1 .

*          ELSEIF count eq 12.

*            CONCATENATE calyear '12'  INTO

*            <RESULT_FIELDS>-/BIC/ZCALMONTH           .

*            move <RESULT_FIELDS>-/BIC/ZWTG12 to

*            <RESULT_FIELDS>-/BIC/ZTOTALS   .

*            move <RESULT_FIELDS> to wa_result_package1 .

*            append wa_result_package1 to result_package1 .

*          ELSEIF count eq 13.

*            CONCATENATE calyear '13'  INTO

*            <RESULT_FIELDS>-/BIC/ZCALMONTH           .

*            move <RESULT_FIELDS>-/BIC/ZWTG13 to

*            <RESULT_FIELDS>-/BIC/ZTOTALS   .

*            move <RESULT_FIELDS> to wa_result_package1 .

*            append wa_result_package1 to result_package1 .

*          ELSEIF count eq 14.

*            CONCATENATE calyear '14'  INTO

*            <RESULT_FIELDS>-/BIC/ZCALMONTH           .

*            move <RESULT_FIELDS>-/BIC/ZWTG14 to

*            <RESULT_FIELDS>-/BIC/ZTOTALS   .

*            move <RESULT_FIELDS> to wa_result_package1 .

*            append wa_result_package1 to result_package1 .

*          ELSEIF count eq 15.

*            CONCATENATE calyear '15'  INTO

*            <RESULT_FIELDS>-/BIC/ZCALMONTH           .

*            move <RESULT_FIELDS>-/BIC/ZWTG15 to

*            <RESULT_FIELDS>-/BIC/ZTOTALS   .

*            move <RESULT_FIELDS> to wa_result_package1 .

*            append wa_result_package1 to result_package1 .

*          ELSEIF count eq 16.

*            CONCATENATE calyear '16'  INTO

*            <RESULT_FIELDS>-/BIC/ZCALMONTH           .

*            move <RESULT_FIELDS>-/BIC/ZWTG13 to

*            <RESULT_FIELDS>-/BIC/ZTOTALS   .

*           move <RESULT_FIELDS> to wa_result_package1 .

*           append wa_result_package1 to result_package1 .

*

*          ENDIF.

*          count = count + 1.

*        ENDDO.

*        clear wa_result_package1.

       endif.

     ENDLOOP.

*    RESULT_PACKAGE[] = result_package1[].

*$*$ end of routine - insert your code only before this line         *-*

   ENDMETHOD.                    "end_routine

*----------------------------------------------------------------------*

*       Inverse method inverse_end_routine

*----------------------------------------------------------------------*

*       This subroutine needs to be implemented only for direct access

*       (for better performance) and for the Report/Report Interface

*       (drill through).

*       The inverse routine should transform a projection and

*       a selection for the target to a projection and a selection

*       for the source, respectively.

*       If the implementation remains empty all fields are filled and

*       all values are selected.

*----------------------------------------------------------------------*

*       Customer comment:

*----------------------------------------------------------------------*

   METHOD inverse_end_routine.

*   IMPORTING

*     i_r_selset_outbound          TYPE REF TO cl_rsmds_set

*     i_th_fields_outbound         TYPE HASHED TABLE

*     i_r_selset_outbound_complete TYPE REF TO cl_rsmds_set

*     i_r_universe_inbound         TYPE REF TO cl_rsmds_universe

*   CHANGING

*     c_r_selset_inbound           TYPE REF TO cl_rsmds_set

*     c_th_fields_inbound          TYPE HASHED TABLE

*     c_exact                      TYPE rs_bool

*$*$ begin of inverse routine - insert your code only below this line*-*

... "insert your code here

*$*$ end of inverse routine - insert your code only before this line *-*

   ENDMETHOD.                    "inverse_end_routine

   METHOD new_record__end_routine.

***** IMPLEMENTATION  is only visible in generated program *****

   ENDMETHOD.

ENDCLASS.                    "routine IMPLEMENTATION

former_member189845
Active Participant
0 Kudos

Can you copy paste only the Read statement line and as said above have you tired with the simulation of expert mode ( most probably we can get to know the result ) Please try it

Thx,

Siva

Former Member
0 Kudos

k thx

Former Member
0 Kudos

Thx siva will try

Former Member
0 Kudos

Dear friends, Thx for reply but there is no navigational attribute plz chk this screen shot. end routine is also fine.master data is also active

Former Member
0 Kudos

hi,

further to your checking, if possible post DSO and cube data for company code: 1000 along with end routine code, this helps to dig in further.

Former Member
0 Kudos

HI jyothi,

PFB screenshot and endroutine

ZFI _COST is cube and ZCSKS is DSO used in Look up

PROGRAM trans_routine.

*---------------------------------------------------------------------*

*       CLASS routine DEFINITION

*---------------------------------------------------------------------*

*

*---------------------------------------------------------------------*

CLASS lcl_transform DEFINITION.

   PUBLIC SECTION.

*  Attributs

     DATA:

       p_check_master_data_exist

             TYPE RSODSOCHECKONLY READ-ONLY,

*-    Instance for getting request runtime attributs;

*     Available information: Refer to methods of

*     interface 'if_rsbk_request_admintab_view'

       p_r_request

             TYPE REF TO if_rsbk_request_admintab_view READ-ONLY.

   PRIVATE SECTION.

     TYPE-POOLS: rsd, rstr.

*   Rule specific types

     TYPES:

       BEGIN OF _ty_s_TG_1,

*      InfoObject: 0CHNGID Change run ID.

         CHNGID           TYPE /BI0/OICHNGID,

*      InfoObject: 0RECORDTP Record type.

         RECORDTP           TYPE /BI0/OIRECORDTP,

*      InfoObject: 0REQUID Request ID.

         REQUID           TYPE /BI0/OIREQUID,

*      InfoObject: ZOBJNR Object number.

         /BIC/ZOBJNR           TYPE /BIC/OIZOBJNR,

*      InfoObject: ZGJAHR Fiscal Year.

         /BIC/ZGJAHR           TYPE /BIC/OIZGJAHR,

*      InfoObject: ZWRTTP Value Type.

         /BIC/ZWRTTP           TYPE /BIC/OIZWRTTP,

*      InfoObject: ZKHINR Std Hierarchy.

         /BIC/ZKHINR           TYPE /BIC/OIZKHINR,

*      InfoObject: 0SEGMENT Segment for Segmental Reporting.

         SEGMENT           TYPE /BI0/OISEGMENT,

*      InfoObject: 0PLANT Plant.

         PLANT           TYPE /BI0/OIPLANT,

*      InfoObject: ZWTG001 Value TranCurr.

         /BIC/ZWTG001           TYPE /BIC/OIZWTG001,

*      InfoObject: 0CURRENCY Currency key.

         CURRENCY           TYPE /BI0/OICURRENCY,

*      InfoObject: ZWTG2 Value Currency.

         /BIC/ZWTG2           TYPE /BIC/OIZWTG2,

*      InfoObject: ZWTG3 Value Currency.

         /BIC/ZWTG3           TYPE /BIC/OIZWTG3,

*      InfoObject: ZWTG4 Value Currency.

         /BIC/ZWTG4           TYPE /BIC/OIZWTG4,

*      InfoObject: ZWTG5 Value Currency.

         /BIC/ZWTG5           TYPE /BIC/OIZWTG5,

*      InfoObject: ZWTG7 Value Currency.

         /BIC/ZWTG7           TYPE /BIC/OIZWTG7,

*      InfoObject: 0CALMONTH Calendar year/month.

         CALMONTH           TYPE /BI0/OICALMONTH,

*      InfoObject: ZCALMONTH Cal Month.

         /BIC/ZCALMONTH           TYPE /BIC/OIZCALMONTH,

*      InfoObject: ZBEKNZ Dr/Cr indicator.

         /BIC/ZBEKNZ           TYPE /BIC/OIZBEKNZ,

*      InfoObject: ZTOTALS Total.

         /BIC/ZTOTALS           TYPE /BIC/OIZTOTALS,

*      InfoObject: ZDESC Description.

         /BIC/ZDESC           TYPE /BIC/OIZDESC,

*      InfoObject: ZWTG08 Value Currency.

         /BIC/ZWTG08           TYPE /BIC/OIZWTG08,

*      InfoObject: ZTEXT Description.

         /BIC/ZTEXT           TYPE /BIC/OIZTEXT,

*      InfoObject: 0FISCPER Fiscal year / period.

         FISCPER           TYPE /BI0/OIFISCPER,

*      InfoObject: 0FISCYEAR Fiscal year.

         FISCYEAR           TYPE /BI0/OIFISCYEAR,

*      InfoObject: 0FISCVARNT Fiscal year variant.

         FISCVARNT           TYPE /BI0/OIFISCVARNT,

*      InfoObject: ZLEDNR Ledger.

         /BIC/ZLEDNR           TYPE /BIC/OIZLEDNR,

*      InfoObject: 0COSTCENTER Cost Center.

         COSTCENTER           TYPE /BI0/OICOSTCENTER,

*      InfoObject: 0CO_AREA Controlling area.

         CO_AREA           TYPE /BI0/OICO_AREA,

*      InfoObject: 0PROFIT_CTR Profit Center.

         PROFIT_CTR           TYPE /BI0/OIPROFIT_CTR,

*      InfoObject: Z_ZREGION Region.

         /BIC/Z_ZREGION           TYPE /BIC/OIZ_ZREGION,

*      InfoObject: 0COMP_CODE Company code.

         COMP_CODE           TYPE /BI0/OICOMP_CODE,

*      InfoObject: 0COSTELMNT Cost Element.

         COSTELMNT           TYPE /BI0/OICOSTELMNT,

*      InfoObject: ZCSTELMT Cost Element.

         /BIC/ZCSTELMT           TYPE /BIC/OIZCSTELMT,

*      Field: RECORD.

         RECORD           TYPE RSARECORD,

       END   OF _ty_s_TG_1.

     TYPES:

       _ty_t_TG_1        TYPE STANDARD TABLE OF _ty_s_TG_1

                         WITH NON-UNIQUE DEFAULT KEY.

*$*$ begin of global - insert your declaration only below this line  *-*

... "insert your code here

*$*$ end of global - insert your declaration only before this line   *-*

     METHODS

       new_record__end_routine

         IMPORTING

           source_segid             type rstran_segid

           source_record            type sytabix

         EXPORTING

           record_new               type sytabix.

     METHODS

       end_routine

         IMPORTING

           request                  type rsrequest

           datapackid               type rsdatapid

           segid                    type rsbk_segid

         EXPORTING

           monitor                  type rstr_ty_t_monitors

         CHANGING

           RESULT_PACKAGE              type _ty_t_TG_1

         RAISING

           cx_rsrout_abort

           cx_rsbk_errorcount.

     METHODS

       inverse_end_routine

         IMPORTING

           i_th_fields_outbound         TYPE rstran_t_field_inv

           I_R_SELSET_OUTBOUND          TYPE REF TO CL_RSMDS_SET

           i_is_main_selection          TYPE rs_bool

           i_r_selset_outbound_complete TYPE REF TO cl_rsmds_set

           i_r_universe_inbound         TYPE REF TO CL_RSMDS_UNIVERSE

         CHANGING

           c_th_fields_inbound          TYPE rstran_t_field_inv

           c_r_selset_inbound           TYPE REF TO CL_RSMDS_SET

           c_exact                      TYPE rs_bool.

ENDCLASS.                    "routine DEFINITION

*$*$ begin of 2nd part global - insert your code only below this line  *

... "insert your code here

*$*$ end of 2nd part global - insert your code only before this line   *

*---------------------------------------------------------------------*

*       CLASS routine IMPLEMENTATION

*---------------------------------------------------------------------*

*

*---------------------------------------------------------------------*

CLASS lcl_transform IMPLEMENTATION.

*----------------------------------------------------------------------*

*       Method end_routine

*----------------------------------------------------------------------*

*       Calculation of result package via end routine.

*       Note: Update of target fields depends on rule assignment in

*       transformation editor. Only fields that have a rule assigned,

*       are updated to the data target.

*----------------------------------------------------------------------*

*   <-> result package

*----------------------------------------------------------------------*

   METHOD end_routine.

*=== Segments ===

     FIELD-SYMBOLS:

       <RESULT_FIELDS>    TYPE _ty_s_TG_1.

     DATA:

       MONITOR_REC     TYPE rstmonitor.

*$*$ begin of routine - insert your code only below this line        *-*

... "insert your code here

*--  fill table "MONITOR" with values of structure "MONITOR_REC"

*-   to make monitor entries

... "to cancel the update process

*    raise exception type CX_RSROUT_ABORT.

data RESULT_FIELDS1    TYPE STANDARD TABLE OF  _ty_s_TG_1.

**data : it_cost type standard table of /BI0/TCOSTELMNT,

**       wa_cost like line of it_cost .

*data : it_cost_center type standard table of /BI0/TCOSTCENTER,

*       wa_cost_center like line of it_cost_center .

     data : result_package1 TYPE STANDARD TABLE OF _ty_s_TG_1,

            wa_result_package1 like line OF result_package1 .

*    data : count type i,

*           calyear(4),

*           calmonth(6).

     data : it_csks type STANDARD TABLE OF /BIC/AZCSKS00,

            wa_csks like line of it_csks.

     SELECT * from /BIC/AZCSKS00 into TABLE it_csks.

     sort it_csks by /BIC/ZOBJNR.

*    select * from /BI0/TCOSTELMNT into table it_cost where DATETO eq

*    '99991231'.

*    select * from /BI0/TCOSTCENTER into table it_cost_center where

*    DATETO eq

*    '99991231'.

     loop at RESULT_PACKAGE ASSIGNING <RESULT_FIELDS> .

       BREAK-POINT.

*      read table it_cost into wa_cost with key COSTELMNT =

*      <RESULT_FIELDS>-COSTELMNT.

*      if sy-subrc eq 0.

*        <RESULT_FIELDS>-/BIC/ZDESC = wa_cost-TXTMD.

*      endif.

       READ TABLE it_csks INTO wa_csks with key co_area =

       <RESULT_FIELDS>-co_area costcenter = <RESULT_FIELDS>-COSTCENTER.

       if sy-subrc eq 0.

         <RESULT_FIELDS>-PROFIT_CTR = wa_csks-PROFIT_CTR.

         <RESULT_FIELDS>-/BIC/ZKHINR = wa_csks-/BIC/ZKHINR.

         if <RESULT_FIELDS>-/BIC/ZKHINR+4(2) eq 'WI'.

           <RESULT_FIELDS>-/BIC/Z_ZREGION = 'Western'.

         ELSEIF <RESULT_FIELDS>-/BIC/ZKHINR+4(2) eq 'SI'.

           <RESULT_FIELDS>-/BIC/Z_ZREGION = 'Southern'.

         ELSEIF <RESULT_FIELDS>-/BIC/ZKHINR+4(2) eq 'NI'.

           <RESULT_FIELDS>-/BIC/Z_ZREGION = 'Northern'.

         ELSEIF <RESULT_FIELDS>-/BIC/ZKHINR+4(2) eq 'EI'.

           <RESULT_FIELDS>-/BIC/Z_ZREGION = 'Eastern'.

         ELSEIF <RESULT_FIELDS>-/BIC/ZKHINR+4(2) eq 'CO'.

           <RESULT_FIELDS>-/BIC/Z_ZREGION = 'Corporate'.

         else.

           <RESULT_FIELDS>-/BIC/Z_ZREGION = 'Projects'.

         endif.

         <RESULT_FIELDS>-comp_code = wa_csks-COMP_CODE.

         <RESULT_FIELDS>-plant = wa_csks-plant.

         <RESULT_FIELDS>-costcenter = wa_csks-COSTCENTER.

*   read table it_cost_center into wa_cost_center with key COSTCENTER =

*      wa_csks-COSTCENTER.

*      if sy-subrc eq 0.

*        <RESULT_FIELDS>-/BIC/ZTEXT  = wa_cost_center-TXTMD.

*      endif.

*        clear : count,calyear,calmonth.

*        count = count + 1.

*        move <RESULT_FIELDS>-/BIC/ZGJAHR to calyear.

*        do 16 TIMES.

*          if count eq 1.

*            CONCATENATE calyear  '01'  INTO

*            <RESULT_FIELDS>-/BIC/ZCALMONTH.

*            move <RESULT_FIELDS>-/BIC/ZWTG001 to

*            <RESULT_FIELDS>-/BIC/ZTOTALS   .

*            move <RESULT_FIELDS> to wa_result_package1 .

*            append wa_result_package1 to result_package1 .

*          ELSEIF count eq 2.

*            CONCATENATE calyear '02'  INTO

*            <RESULT_FIELDS>-/BIC/ZCALMONTH           .

*            move <RESULT_FIELDS>-/BIC/ZWTG2 to

*            <RESULT_FIELDS>-/BIC/ZTOTALS   .

*            move <RESULT_FIELDS> to wa_result_package1 .

*            append wa_result_package1 to result_package1 .

*          ELSEIF count eq 3.

*            CONCATENATE calyear '03'  INTO

*            <RESULT_FIELDS>-/BIC/ZCALMONTH           .

*            move <RESULT_FIELDS>-/BIC/ZWTG3 to

*            <RESULT_FIELDS>-/BIC/ZTOTALS   .

*            move <RESULT_FIELDS> to wa_result_package1 .

*            append wa_result_package1 to result_package1 .

*          ELSEIF count eq 4.

*            CONCATENATE calyear '04'  INTO

*            <RESULT_FIELDS>-/BIC/ZCALMONTH           .

*            move <RESULT_FIELDS>-/BIC/ZWTG4 to

*            <RESULT_FIELDS>-/BIC/ZTOTALS   .

*            move <RESULT_FIELDS> to wa_result_package1 .

*            append wa_result_package1 to result_package1 .

*          ELSEIF count eq 5.

*            CONCATENATE calyear '05'  INTO

*            <RESULT_FIELDS>-/BIC/ZCALMONTH           .

*            move <RESULT_FIELDS>-/BIC/ZWTG5 to

*            <RESULT_FIELDS>-/BIC/ZTOTALS   .

*            move <RESULT_FIELDS> to wa_result_package1 .

*            append wa_result_package1 to result_package1 .

*          ELSEIF count eq 6.

*            CONCATENATE calyear '06'  INTO

*            <RESULT_FIELDS>-/BIC/ZCALMONTH           .

*            move <RESULT_FIELDS>-/BIC/ZWTG6 to

*            <RESULT_FIELDS>-/BIC/ZTOTALS   .

*            move <RESULT_FIELDS> to wa_result_package1 .

*            append wa_result_package1 to result_package1 .

*          ELSEIF count eq 7.

*            CONCATENATE calyear '07'  INTO

*            <RESULT_FIELDS>-/BIC/ZCALMONTH           .

*            move <RESULT_FIELDS>-/BIC/ZWTG7 to

*            <RESULT_FIELDS>-/BIC/ZTOTALS   .

*            move <RESULT_FIELDS> to wa_result_package1 .

*            append wa_result_package1 to result_package1 .

*          ELSEIF count eq 8.

*            CONCATENATE calyear '08'  INTO

*            <RESULT_FIELDS>-/BIC/ZCALMONTH           .

*            move <RESULT_FIELDS>-/BIC/ZWTG08 to

*            <RESULT_FIELDS>-/BIC/ZTOTALS   .

*            move <RESULT_FIELDS> to wa_result_package1 .

*            append wa_result_package1 to result_package1 .

*          ELSEIF count eq 9.

*            CONCATENATE calyear '09'  INTO

*            <RESULT_FIELDS>-/BIC/ZCALMONTH           .

*            move <RESULT_FIELDS>-/BIC/ZWTG9 to

*            <RESULT_FIELDS>-/BIC/ZTOTALS   .

*            move <RESULT_FIELDS> to wa_result_package1 .

*            append wa_result_package1 to result_package1 .

*          ELSEIF count eq 10.

*            CONCATENATE calyear '10'  INTO

*            <RESULT_FIELDS>-/BIC/ZCALMONTH           .

*            move <RESULT_FIELDS>-/BIC/ZWTG10 to

*            <RESULT_FIELDS>-/BIC/ZTOTALS   .

*            move <RESULT_FIELDS> to wa_result_package1 .

*            append wa_result_package1 to result_package1 .

*          ELSEIF count eq 11.

*            CONCATENATE calyear '11'  INTO

*            <RESULT_FIELDS>-/BIC/ZCALMONTH           .

*            move <RESULT_FIELDS>-/BIC/ZWTG11 to

*            <RESULT_FIELDS>-/BIC/ZTOTALS   .

*            move <RESULT_FIELDS> to wa_result_package1 .

*            append wa_result_package1 to result_package1 .

*          ELSEIF count eq 12.

*            CONCATENATE calyear '12'  INTO

*            <RESULT_FIELDS>-/BIC/ZCALMONTH           .

*            move <RESULT_FIELDS>-/BIC/ZWTG12 to

*            <RESULT_FIELDS>-/BIC/ZTOTALS   .

*            move <RESULT_FIELDS> to wa_result_package1 .

*            append wa_result_package1 to result_package1 .

*          ELSEIF count eq 13.

*            CONCATENATE calyear '13'  INTO

*            <RESULT_FIELDS>-/BIC/ZCALMONTH           .

*            move <RESULT_FIELDS>-/BIC/ZWTG13 to

*            <RESULT_FIELDS>-/BIC/ZTOTALS   .

*            move <RESULT_FIELDS> to wa_result_package1 .

*            append wa_result_package1 to result_package1 .

*          ELSEIF count eq 14.

*            CONCATENATE calyear '14'  INTO

*            <RESULT_FIELDS>-/BIC/ZCALMONTH           .

*            move <RESULT_FIELDS>-/BIC/ZWTG14 to

*            <RESULT_FIELDS>-/BIC/ZTOTALS   .

*            move <RESULT_FIELDS> to wa_result_package1 .

*            append wa_result_package1 to result_package1 .

*          ELSEIF count eq 15.

*            CONCATENATE calyear '15'  INTO

*            <RESULT_FIELDS>-/BIC/ZCALMONTH           .

*            move <RESULT_FIELDS>-/BIC/ZWTG15 to

*            <RESULT_FIELDS>-/BIC/ZTOTALS   .

*            move <RESULT_FIELDS> to wa_result_package1 .

*            append wa_result_package1 to result_package1 .

*          ELSEIF count eq 16.

*            CONCATENATE calyear '16'  INTO

*            <RESULT_FIELDS>-/BIC/ZCALMONTH           .

*            move <RESULT_FIELDS>-/BIC/ZWTG13 to

*            <RESULT_FIELDS>-/BIC/ZTOTALS   .

*           move <RESULT_FIELDS> to wa_result_package1 .

*           append wa_result_package1 to result_package1 .

*

*          ENDIF.

*          count = count + 1.

*        ENDDO.

*        clear wa_result_package1.

       endif.

     ENDLOOP.

*    RESULT_PACKAGE[] = result_package1[].

*$*$ end of routine - insert your code only before this line         *-*

   ENDMETHOD.                    "end_routine

*----------------------------------------------------------------------*

*       Inverse method inverse_end_routine

*----------------------------------------------------------------------*

*       This subroutine needs to be implemented only for direct access

*       (for better performance) and for the Report/Report Interface

*       (drill through).

*       The inverse routine should transform a projection and

*       a selection for the target to a projection and a selection

*       for the source, respectively.

*       If the implementation remains empty all fields are filled and

*       all values are selected.

*----------------------------------------------------------------------*

*       Customer comment:

*----------------------------------------------------------------------*

   METHOD inverse_end_routine.

*   IMPORTING

*     i_r_selset_outbound          TYPE REF TO cl_rsmds_set

*     i_th_fields_outbound         TYPE HASHED TABLE

*     i_r_selset_outbound_complete TYPE REF TO cl_rsmds_set

*     i_r_universe_inbound         TYPE REF TO cl_rsmds_universe

*   CHANGING

*     c_r_selset_inbound           TYPE REF TO cl_rsmds_set

*     c_th_fields_inbound          TYPE HASHED TABLE

*     c_exact                      TYPE rs_bool

*$*$ begin of inverse routine - insert your code only below this line*-*

... "insert your code here

*$*$ end of inverse routine - insert your code only before this line *-*

   ENDMETHOD.                    "inverse_end_routine

   METHOD new_record__end_routine.

***** IMPLEMENTATION  is only visible in generated program *****

   ENDMETHOD.

ENDCLASS.                    "routine IMPLEMENTATION

Former Member
0 Kudos

Hi ,

not to demotivate, please do not just dump with full screen shots , instead simply pick couple of records to show and just the active code (not the data declaration section/comment section).

any way, with this code are you getting values previously?

when using select statement, please use where condition, also try to select only required fields, instead of all (*)

Former Member
0 Kudos

Hi dear

First you have to check your end routine.if its working fine then check that these infoobjects are navigational attribute or not and after that finally you have to check the master data of that infoobjects.

Former Member
0 Kudos

Hello,

If its navigational attribute, check whether the master data is active or not.

Regards,

Priya M

Former Member
0 Kudos

Hi,

# values appearing in cube from when?

take any costcentre  which had # for the end routine fields.. can you post both dso and cube data here?

former_member251664
Participant
0 Kudos

these three are navigational attribute of cost centre i think so

you check on the navigational attribute check box in cube.

Former Member
0 Kudos

Hello,

Is there any filter is available between source and target.

The final target is having data?

Regards,

Priya M

Former Member
0 Kudos

please required urgent help friends. kindly help me to resolve the issue

Former Member
0 Kudos

Have you checked if there are any filters on the DTP? If the data is loaded and activated in the DSO and the end routine has not changed the fields should populate in the InfoCube.

KodandaPani_KV
Active Contributor
0 Kudos

HI,

can you check the particular record in the cube.

in the source DSO have values for particular combination

if combination satisfy data will get into cube level with out not assigned values.

Thanks,

Phani.

Former Member
0 Kudos

Hi

DSO contains  Cost centre group, Profit centre and region fields which are not unique. these 3 fields are brought to cube using cost centre as matching field in end routine.

Former Member
0 Kudos

Hello Nikhil,

You are filling the data in end routine by looking up the DSO.


First check whether DSO has data for the particular record.

If the Look up DSO does't have a data, then the blank value will be assigned to result_package.

The blank value displayed as "#" in report.

Regards,

Priya M

Former Member
0 Kudos

HI priya,

DSO is having the data

Former Member
0 Kudos

For that particular record is the data in the InfoCube? Has the end routine been changed recently?

Former Member
0 Kudos

lachlanor No data is coming for perticular 3 fields for all records in the cube.Routine hasn't changed at all. Its in production