on ‎2014 Nov 03 8:56 PM
I have a requirement to create a key date variable based on posting date so that user can input key date and return values based on this logic
PSTNG_DATE <= "Key Date" AND CLEAR_DATE >= "Key Date" ) OR ( PSTNG_DATE <= "Key Date" AND CLEAR_DATE = '00000000' ) .
The Bex Query definitions looks like this
The key date variable is supposed to do something like this dynamicly using customer exit. User is supposed to enter "Key date" and the customer exit is supposed to apply the input date to both "Posting date" and "Clearing date" using the same conditions as below.
I have implemented the code below but the result only gives me results where key date equals user input date. It is not pulling in records less than user input date according to the code. What am I missing?
CASE i_vnam.
*IF I_STEP <> 2.
*RAISE no_processing.
*ENDIF.
WHEN 'ZVAR_PSTNG_ZP_KEYDT'.
IF i_step = 2.
CLEAR l_s_range.
READ TABLE i_t_var_range INTO loc_val_range WITH KEY vnam = 'ZP_KEYDT'.
IF sy-subrc = 0.
l_s_range-sign = 'I'.
l_s_range-opt = 'LE'.
l_s_range-low = loc_val_range-low.
APPEND l_s_range TO e_t_range.
ENDIF.
ENDIF.
WHEN 'ZVAR_CLRDT_ZP_KEYDT'.
IF i_step = 2.
CLEAR l_s_range.
READ TABLE i_t_var_range INTO loc_val_range WITH KEY vnam = 'ZP_KEYDT'.
IF sy-subrc = 0.
l_s_range-sign = 'I'.
l_s_range-opt = 'GT'.
l_s_range-low = loc_val_range-low.
APPEND l_s_range TO e_t_range.
CLEAR l_s_range.
l_s_range-sign = 'I'.
l_s_range-opt = 'EQ'.
l_s_range-low = '#'.
APPEND l_s_range TO e_t_range.
ENDIF.
ENDIF.
ENDCASE.
Request clarification before answering.
Hello Mark,
You will have to define the query accordingly to get the data. I don't see any issue with customer variable. Can you follow the below link and try to use the variable and characteristics as mentioned in that.
Regards
Gajesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 9 | |
| 6 | |
| 4 | |
| 4 | |
| 3 | |
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.