Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9564

Customer exit for post_popup

$
0
0

Hi,

 

I've created a BEx query and added a variable MCE9004 in field Ref.org.unit and this variable is mapped to a customer exit code via CMOD step 2 (post_popup).

 

Basically how I want it to work is, I will select an org.unit value e.g. org.unit = A1 in tcode RSRT variable selection screen and this value will be passed in the customer exit code as shown below and retrieve the look up values and pass it to the field ref.org.unit via e_t_range.

 

CASE i_vnam.

     WHEN 'MCE9004'.

****      IF i_step = 2.

       READ TABLE i_t_var_range INTO LS_T_VAR_RANGE

       WITH KEY IOBJNM = '0CALMONTH'.

       l_date = LS_T_VAR_RANGE-low.

 

       IF l_date IS NOT INITIAL.

         CALL FUNCTION 'SLS_MISC_GET_LAST_DAY_OF_MONTH'

           EXPORTING

             day_in            = l_date

           IMPORTING

             last_day_of_month = ld_last_day

           EXCEPTIONS

             day_in_not_valid  = 1

             OTHERS            = 2.

       ENDIF.

 

       READ TABLE i_t_var_range INTO LS_T_VAR_RANGE

       WITH KEY IOBJNM = '0ORGUNIT'.

       SELECT /BIC/ORGUNT_PR FROM /BIC/AMPA5AX0000 INTO lv_org "l_s_range

         WHERE ORGUNIT = LS_T_VAR_RANGE-low

         AND DATETO LE ld_last_day.

 

         l_s_range-SIGN = 'I'.

         l_s_range-OPT = 'EQ'.

         l_s_range-LOW = lv_org.

*          l_s_range-HIGH =

 

         APPEND l_s_range TO e_t_range.

       ENDSELECT.


***** To clear value of org.unit field

****      READ TABLE i_t_var_range INTO LS_T_VAR_RANGE

****      WITH KEY IOBJNM = '0ORGUNIT'.

****      IF sy-subrc EQ 0.

*****        CLEAR LS_T_VAR_RANGE-low.

****        DELETE i_t_var_range index sy-tabix.

****      ENDIF.

 

 

   ENDCASE.

 

ENDFUNCTION.


Once this code has been executed it goes back to the selection screen and there is still an org.unit value on the screen even though I have removed it in my code in red above in i_t_var_range.


Therefore when I execute the query, the value for org.unit field is not emptied.


Can you please teach me how to clear that value of org.unit field?


Let me know if you need further details.



Thanks,

Rebekah


Viewing all articles
Browse latest Browse all 9564

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>