cancel
Showing results for 
Search instead for 
Did you mean: 

Routine in DTP. Selection conditions not visible

Former Member
0 Kudos

Hello,

I am under BW7.0

I am filtering data with a routine in a DTP. The routine is reading a custom table that user maintain. It contains a date range.

This works, the correct data is selected.

My problem is that in the request the 'Selection Conditions' field is empty and consequently, I cannot delete in the cube the same selections.

This was working under BW3.5..

Many Thanks,

Alex-

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member182429
Active Participant
0 Kudos

My guess is that somewhere in your routine for the selection, there is some incorrect code.

Did you append the final selection conditions to l_t_range?

Otherwise, you can put your code here and let the folks around here help you out and spot the problem.

Former Member
0 Kudos

Hello,

Here is the code. It is working as I expect. And debugging gives me the correct start and end date. But this is not reflected in the request 'Selection conditions'.

TYPES:

BEGIN OF BCSZP_TYPE,

JJJJPER TYPE ZCBCSZP-ZEITPUNKT,

RELEV TYPE ZCBCSZP-RELEVANT,

END OF BCSZP_TYPE.

DATA: BCSZP_TAB TYPE STANDARD TABLE OF BCSZP_TYPE,

BCSZP_WA TYPE BCSZP_TYPE,

start_date type sy-datum,

end_date type sy-datum.

SELECT ZEITPUNKT

RELEVANT

FROM ZCBCSZP

INTO TABLE BCSZP_TAB

WHERE ZEITPUNKT <> ''.

READ TABLE BCSZP_TAB INTO BCSZP_WA

WITH KEY RELEV = 'X'.

CALL FUNCTION 'FIRST_DAY_IN_PERIOD_GET'

EXPORTING

I_GJAHR = BCSZP_WA-JJJJPER(4)

I_PERIV = 'K6'

I_POPER = BCSZP_WA-JJJJPER+4(3)

IMPORTING

E_DATE = start_date

EXCEPTIONS

INPUT_FALSE = 1

T009_NOTFOUND = 2

T009B_NOTFOUND = 3

OTHERS = 4.

CALL FUNCTION 'LAST_DAY_IN_PERIOD_GET'

EXPORTING

I_GJAHR = BCSZP_WA-JJJJPER(4)

I_PERIV = 'K6'

I_POPER = BCSZP_WA-JJJJPER+4(3)

IMPORTING

E_DATE = end_date

EXCEPTIONS

INPUT_FALSE = 1

T009_NOTFOUND = 2

T009B_NOTFOUND = 3

OTHERS = 4.

read table l_t_range with key

fieldname = 'FKDAT'.

l_idx = sy-tabix.

l_t_range-sign = 'I'.

l_t_range-option = 'BT'.

l_t_range-low = start_date.

l_t_range-high = end_date.

if l_idx <> 0.

modify l_t_range index l_idx.

else.

append l_t_range.

endif.

p_subrc = 0.