Skip to Content
0
Former Member
Dec 08, 2006 at 04:02 PM

Add Key Figure with Routine into a InfoCube

38 Views

Hi there,

InfoCube 0PUR_C04:Purchasing Group contains Key Figure 0NO_PUR_ORD: Number of Purchase Order

InfoCube 0PUR_C04 is linked to Info Source: 2LIS_02_HDR

We are using InfoCube 0PUR_C01 which is linked to Info Source: 2LIS_02_ITM

I have 2 option now :-

A) I connect the whole 2LIS_02_ITM into InfoCube 0PUR_C01

B)I just add Key Figure 0NO_PUR_ORD: Number of Purchase Order into Info Cube 0PUR_C04

<b>Can Option A) be implemented ?</b>

<b> The issue with Option B) is</b>

I do not know how to RE-USE the routine mm_no_of_po in my new cube InfoCube 0PUR_C01

If I copy this routine and insert this as my Update Rule routine for Key Figure 0NO_PUR_ORD in Info Cube 0PUR_C01, would it work ?

The standard mm_no_of_po routine is :-

[code]

FORM compute_data_field

TABLES MONITOR STRUCTURE RSMONITOR "user defined monitoring

USING COMM_STRUCTURE LIKE /BIC/CS2LIS_02_HDR

RECORD_NO LIKE SY-TABIX

RECORD_ALL LIKE SY-TABIX

SOURCE_SYSTEM LIKE RSUPDSIMULH-LOGSYS

CHANGING RESULT LIKE /BI0/V0PUR_C04T-NO_PUR_ORD

RETURNCODE LIKE SY-SUBRC

ABORT LIKE SY-SUBRC. "set ABORT <> 0 to cancel update

*

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

  • fill the internal table "MONITOR", to make monitor entries

if COMM_STRUCTURE-HDRPROCESS = '01' "Bestellung

AND COMM_STRUCTURE-no_hdr <> 0.

  • result value of the routine

RESULT = COMM_STRUCTURE-no_hdr.

[/code]