Tuesday, November 15, 2011

Open New Window Using ABAP


 While displaying a report , generally user wants to drill down by clicking one of the lines or cells to get more detailed information about related topic. Most common behavior to accomplish this task is displaying detailed information at the same window. However in some cases users need to display the detailed report in another window. They need to see both reports inside different windows. For this purpose check sample below.



DATA ls_params TYPE tpara,
       lt_params TYPE TABLE OF tpara.

ls_params-paramid 'BUK'.
ls_params-partext '0001'.
APPEND ls_params TO lt_params.

ls_params-paramid 'BLN'.
ls_params-partext '00000101'.
APPEND ls_params TO lt_params.

ls_params-paramid 'GJR'.
ls_params-partext '2011'.
APPEND ls_params TO lt_params.


CALL FUNCTION 'CC_CALL_TRANSACTION_NEW_TASK'
  STARTING NEW TASK 'FB03_TASK'
 
DESTINATION 'NONE'
   

EXPORTING
    transaction           'FB03'
    skip_first_screen     'X'
  TABLES
    paramtab              lt_params
  EXCEPTIONS
    communication_failure 97
    system_failure        98
    OTHERS                99.

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









No comments:

Post a Comment