You are on page 1of 3

*&---------------------------------------------------------------------*

*& Report  ZMIO_PLOUT_PRICE_MERGER
*&
*&---------------------------------------------------------------------*
* Created By       : E000DBD                                           
*
* Created On       : 03/05/2014                                        
*
* TR #             : GRDK904810                                       
 *
* Transaction Code : ZM_PLOUT_MERGER                                   *
* Description      : The report is to extract the Regular Retail       *
*                    pricing data for the Markets and it is provided   *
*                    to the RMS system.                               
 *
*&---------------------------------------------------------------------*

REPORT  zmio_plout_price_merger.

*----------------------------------------------------------------------*
* Include for Data declarations and Selection screen                   *
*----------------------------------------------------------------------*
INCLUDE zmio_plout_price_merger_top.

*----------------------------------------------------------------------*
* Initialization event                                                 
*
*----------------------------------------------------------------------*
INITIALIZATION.
  PERFORM initialize_values.

*----------------------------------------------------------------------*
* At selection screen output event                                     
*
*----------------------------------------------------------------------*
AT SELECTION-SCREEN OUTPUT.
  PERFORM modify_input_screen.

AT SELECTION-SCREEN.
  IF sy-ucomm = 'ONLI'.
    IF p_dl     IS NOT INITIAL   AND
   ( ( r_appsvr IS NOT INITIAL   AND
       p_apfile IS     INITIAL ) OR
     ( r_presvr IS NOT INITIAL   AND
       p_prfile IS     INITIAL ) ).
      MESSAGE text-030 TYPE gc_e.
      CLEAR : sy-ucomm.
    ENDIF.
  ENDIF.
*----------------------------------------------------------------------*
* AT SELECTION SCREEN ON VALUE-REQUEST event                           *
*----------------------------------------------------------------------*
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_apfile.
  PERFORM f4_filename_appsvr.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_prfile.
  PERFORM f4_filename_presvr.

*----------------------------------------------------------------------*
*Include for Subroutines                                               
*
*----------------------------------------------------------------------*
  INCLUDE zmio_plout_price_merger_routns.

*----------------------------------------------------------------------*
* Start of selection event                                             
*
*----------------------------------------------------------------------*
START-OF-SELECTION.
*To extract the data from DB tables
  PERFORM zm_fetch_data.

*----------------------------------------------------------------------*
* END OF SELECTION event                                               
*
*----------------------------------------------------------------------*
END-OF-SELECTION.

  IF it_a965[] IS NOT INITIAL.

*To process the data
    PERFORM zm_process_data.

    IF p_sc = gc_x.

*To prepare the field catalog and display the final data
      PERFORM zm_display_data.

    ELSEIF p_dl = gc_x AND r_presvr = gc_x.

**Download data to Presentation server.
      PERFORM zm_download_to_presvr.

    ENDIF.
  ELSE.
    MESSAGE text-006 TYPE gc_s.
  ENDIF.

You might also like