Skip to Content
0
Former Member
Dec 10, 2012 at 01:52 PM

BPC 10 NW - Post Processing BAdI Issue

83 Views

Dear Experts,

I've implemented the post processing BAdI (UJQ_SHARED_QUERY) in order to change some values before

data refresh in reports /input schedules.

All values are divided by 1000.

Thus, if an amounf of 200 000 is stored in the cube, the report/input schedule has to display 200.

You will find below the abap code i've written in the BAdI:

method IF_UJQ_SQE_POST_PROCESS~POST_PROCESS.

FIELD-SYMBOLS: <fs> TYPE ANY,
<fs2> TYPE ANY,
<fs3> TYPE TABLE,
<fs4> TYPE ANY,
<fs5> TYPE ANY,
<fs6> TYPE ANY.

DATA: lr_data TYPE REF TO data.

CONSTANTS: c_unit_measure TYPE string VALUE 'UNIT_MEASURE',
c_member_list TYPE string VALUE 'MEMBER_LIST',
c_member_name TYPE string VALUE 'MEMBER_NAME',
c_dimension TYPE STring VALUE 'DIMENSION',
c_signeddata TYPE string VALUE 'SIGNEDDATA'.

IF NOT CT_ARRAY[] IS INITIAL.

BREAK-POINT.
CREATE DATA lr_data LIKE LINE OF ct_array.
ASSIGN lr_data->* TO <fs>.

LOOP AT CT_ARRAY INTO <fs>.

READ TABLE IT_SLICER
WITH KEY DIMENSION = 'UNIT_MEASURE'
ASSIGNING <fs2>.

IF sy-subrc EQ '0'.
ASSIGN COMPONENT c_member_list OF STRUCTURE <fs2> TO <fs3>.

IF sy-subrc EQ '0'.
READ TABLE <fs3>
WITH KEY (c_dimension) = 'UNIT_MEASURE'
ASSIGNING <fs4>.

ASSIGN COMPONENT c_member_name OF STRUCTURE <FS4> TO <fs5>.

IF <fs5> EQ 'AMOUNT'.
ASSIGN COMPONENT c_signeddata OF STRUCTURE <fs> TO <fs6>.
<fs6> = <fs6> / 1000.

APPEND <fs> TO CT_ARRAY.
ENDIF.
ENDIF.
ENDIF.

ENDLOOP.
ENDIF.

endmethod.

The ABAP code is working properly cause i'm having all values divived by 1000 in the CT_ARRAY internal table.

However, once the data refresh is finished, the report/input schedule is not displaying values changed in CT_ARRAY table

but the original ones from the cube.

Do you have any idea of the issue cause ?

Best Regards,

Alexandre