2013年2月4日 星期一

[Code] How to catching selection criteria

How to catching selection criteria

Example: 
  DATA: selection_table LIKE rsparams OCCURS 0  WITH HEADER LINE.

  CLEAR selection_table. REFRESH selection_table.

* Get selection criteria
  CALL FUNCTION 'RS_REFRESH_FROM_SELECTOPTIONS'
    EXPORTING
      curr_report     = sy-repid
    TABLES
      selection_table = selection_table
    EXCEPTIONS
      not_found       = 1
      no_report       = 2
      OTHERS          = 3.

  IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  ENDIF.

沒有留言:

張貼留言