Reg:block list

Hi,
Can i get the sample report for alv blcok list dispaly.
Thanks,
Jeya

hi prabhu,
chk this:
REPORT  ZKEERTHI_ALV3   LINE-COUNT 100                        .
*& tables declaration
tables: mara.
*& type-pools declaration
type-pools: slis.
*& data declaration
data: g_repid type sy-repid.
DATA : IT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,  "mara
       WA_FIELDCAT TYPE SLIS_FIELDCAT_ALV.
DATA : IT_FIELDCAT1 TYPE SLIS_T_FIELDCAT_ALV,  "makt
       WA_FIELDCAT1 TYPE SLIS_FIELDCAT_ALV.
DATA : IT_FIELDCAT2 TYPE SLIS_T_FIELDCAT_ALV,  "marc
       WA_FIELDCAT2 TYPE SLIS_FIELDCAT_ALV.
DATA: GT_PRINT TYPE SLIS_PRINT_ALV,
      WA_LAYOUT TYPE SLIS_LAYOUT_ALV,
      XS_EVENT  TYPE SLIS_ALV_EVENT,
      GT_XEVENTS TYPE SLIS_T_EVENT,
      GT_YEVENTS TYPE SLIS_T_EVENT,
      GT_ZEVENTS TYPE SLIS_T_EVENT,
      WA_SORT TYPE SLIS_SORTINFO_ALV,
      IT_SORT TYPE SLIS_T_SORTINFO_ALV.
DATA: BEGIN OF it_mara occurs 0,
        MATNR LIKE MARA-MATNR,
        MTART LIKE MARA-MTART,
        MATKL LIKE MARA-MATKL,
        MEINS LIKE MARA-MEINS,
        NTGEW LIKE MARA-NTGEW,
      END OF it_mara.
DATA: BEGIN OF IT_MAKT occurs 0,
        MATNR LIKE MAKT-MATNR,
        SPRAS LIKE MAKT-SPRAS,
        MAKTX LIKE MAKT-MAKTX,
        MAKTG LIKE MAKT-MAKTG,
      END OF IT_MAKT.
DATA: BEGIN OF IT_MARC occurs 0,
        MATNR LIKE MARC-MATNR,
        WERKS LIKE MARC-WERKS,
        LADGR LIKE MARC-LADGR,
        MTVFP LIKE MARC-MTVFP,
        dispr LIKE marc-dispr,
        dismm LIKE marc-dismm,
        dispo LIKE marc-dispo,
      END OF IT_MARC.
*& initialisation
initialization.
g_repid = sy-repid.
*& selection screen
selection-screen begin of block b with frame title text-001.
select-options: s_matnr for mara-matnr,
                s_mtart for mara-mtart.
selection-screen end of block b.
*& start of selection
start-of-selection.
perform get_maradetails.
perform get_maktdetails.
perform get_marcdetails.
*&      Form  get_maradetails
      text
-->  p1        text
<--  p2        text
FORM get_maradetails .
select matnr
       mtart
       matkl
       meins
       ntgew from mara
       into table it_mara
       where matnr in s_matnr and
             mtart in s_mtart.
ENDFORM.                    " get_maradetails
*&      Form  get_maktdetails
      text
-->  p1        text
<--  p2        text
FORM get_maktdetails .
select matnr
       spras
       maktx
       maktg from makt into table it_makt
       for all entries in it_mara
       where matnr = it_mara-matnr..
ENDFORM.                    " get_maktdetails
*&      Form  get_marcdetails
      text
-->  p1        text
<--  p2        text
FORM get_marcdetails .
select matnr
       werks
       ladgr
       mtvfp
       dispr
       dismm
       dispo from marc
       into table it_marc
       for all entries in it_mara
       where matnr = it_mara-matnr.
ENDFORM.                    " get_marcdetails
*& end of selection
END-OF-SELECTION.
perform sort_list.
perform modify_fieldcat.
PERFORM EVENT_LIST.
PERFORM BLOCK_LIST.
*&      Form  modify_fieldcat
      text
-->  p1        text
<--  p2        text
FORM modify_fieldcat .
clear wa_fieldcat.
  WA_FIELDCAT-FIELDNAME = 'MATNR'.
  WA_FIELDCAT-TABNAME = 'IT_MARA'.
  WA_FIELDCAT-SELTEXT_L = 'MATERIAL NUM'.
  WA_FIELDCAT-COL_POS = 1.
  WA_FIELDCAT-OUTPUTLEN = 18.
  APPEND WA_FIELDCAT TO IT_FIELDCAT.
  CLEAR WA_FIELDCAT.
  WA_FIELDCAT-FIELDNAME = 'MTART'.
  WA_FIELDCAT-TABNAME = 'IT_MARA'.
  WA_FIELDCAT-SELTEXT_L = 'MAT TYPE'.
  WA_FIELDCAT-COL_POS = 2.
  WA_FIELDCAT-OUTPUTLEN = 5.
  APPEND WA_FIELDCAT TO IT_FIELDCAT.
  CLEAR WA_FIELDCAT.
  WA_FIELDCAT-FIELDNAME = 'MATKL'.
  WA_FIELDCAT-TABNAME = 'IT_MARA'.
  WA_FIELDCAT-SELTEXT_L = 'MAT GROUP'.
  WA_FIELDCAT-COL_POS = 3.
  WA_FIELDCAT-OUTPUTLEN = 10.
  APPEND WA_FIELDCAT TO IT_FIELDCAT.
  CLEAR WA_FIELDCAT.
  WA_FIELDCAT-FIELDNAME = 'MEINS'.
  WA_FIELDCAT-TABNAME = 'IT_MARA'.
  WA_FIELDCAT-SELTEXT_L = 'UNIT'.
  WA_FIELDCAT-COL_POS = 4.
  WA_FIELDCAT-OUTPUTLEN = 5.
  APPEND WA_FIELDCAT TO IT_FIELDCAT.
  CLEAR WA_FIELDCAT.
  WA_FIELDCAT-FIELDNAME = 'NTGEW'.
  WA_FIELDCAT-TABNAME = 'IT_MARA'.
  WA_FIELDCAT-DO_SUM = 'X'.
  WA_FIELDCAT-SELTEXT_L = 'QUANTITY'.
  WA_FIELDCAT-COL_POS = 5.
  WA_FIELDCAT-OUTPUTLEN = 15.
  APPEND WA_FIELDCAT TO IT_FIELDCAT.
  CLEAR WA_FIELDCAT.
CLEAR WA_FIELDCAT1.
  WA_FIELDCAT1-FIELDNAME = 'MATNR'.
  WA_FIELDCAT1-TABNAME = 'IT_MAKT'.
  WA_FIELDCAT1-SELTEXT_L = 'MATERIAL NUM'.
  WA_FIELDCAT1-COL_POS = 1.
  WA_FIELDCAT1-OUTPUTLEN = 18.
APPEND WA_FIELDCAT1 TO IT_FIELDCAT1.
  CLEAR WA_FIELDCAT1.
  WA_FIELDCAT1-FIELDNAME = 'SPRAS'.
  WA_FIELDCAT1-TABNAME = 'IT_MAKT'.
  WA_FIELDCAT1-SELTEXT_L = 'LANGUAGE'.
  WA_FIELDCAT1-COL_POS = 2.
  WA_FIELDCAT1-OUTPUTLEN = 2.
APPEND WA_FIELDCAT1 TO IT_FIELDCAT1.
  CLEAR WA_FIELDCAT1.
  WA_FIELDCAT1-FIELDNAME = 'MAKTX'.
  WA_FIELDCAT1-TABNAME = 'IT_MAKT'.
  WA_FIELDCAT1-SELTEXT_L = 'MAT DESC'.
  WA_FIELDCAT1-COL_POS = 3.
  WA_FIELDCAT1-OUTPUTLEN = 40.
APPEND WA_FIELDCAT1 TO IT_FIELDCAT1.
  CLEAR WA_FIELDCAT1.
  WA_FIELDCAT1-FIELDNAME = 'MAKTG'.
  WA_FIELDCAT1-TABNAME = 'IT_MAKT'.
  WA_FIELDCAT1-SELTEXT_L = 'GRP DESC'.
  WA_FIELDCAT1-COL_POS = 4.
  WA_FIELDCAT1-OUTPUTLEN = 40.
APPEND WA_FIELDCAT1 TO IT_FIELDCAT1.
  CLEAR WA_FIELDCAT1.
CLEAR WA_FIELDCAT2.
  WA_FIELDCAT2-FIELDNAME = 'MATNR'.
  WA_FIELDCAT2-TABNAME = 'IT_MARC'.
  WA_FIELDCAT2-SELTEXT_L = 'MATERIAL NUM'.
  WA_FIELDCAT2-COL_POS = 1.
  WA_FIELDCAT2-OUTPUTLEN = 18.
APPEND WA_FIELDCAT2 TO IT_FIELDCAT2.
  CLEAR WA_FIELDCAT2.
  WA_FIELDCAT2-FIELDNAME = 'WERKS'.
  WA_FIELDCAT2-TABNAME = 'IT_MARC'.
  WA_FIELDCAT2-SELTEXT_L = 'PLANT'.
  WA_FIELDCAT2-COL_POS = 2.
  WA_FIELDCAT2-OUTPUTLEN = 4.
  APPEND WA_FIELDCAT2 TO IT_FIELDCAT2.
  CLEAR WA_FIELDCAT2.
  WA_FIELDCAT2-FIELDNAME = 'LADGR'.
  WA_FIELDCAT2-TABNAME = 'IT_MARC'.
  WA_FIELDCAT2-SELTEXT_L = 'LOAD GRP'.
  WA_FIELDCAT2-COL_POS = 3.
  WA_FIELDCAT2-OUTPUTLEN = 4.
  APPEND WA_FIELDCAT2 TO IT_FIELDCAT2.
  CLEAR WA_FIELDCAT2.
  WA_FIELDCAT2-FIELDNAME = 'MTVFP'.
  WA_FIELDCAT2-TABNAME = 'IT_MARC'.
  WA_FIELDCAT2-SELTEXT_L = 'GRP CHK'.
  WA_FIELDCAT2-COL_POS = 4.
  WA_FIELDCAT2-OUTPUTLEN = 4.
  APPEND WA_FIELDCAT2 TO IT_FIELDCAT2.
  CLEAR WA_FIELDCAT2.
  WA_FIELDCAT2-FIELDNAME = 'DISPR'.
  WA_FIELDCAT2-TABNAME = 'IT_MARC'.
  WA_FIELDCAT2-SELTEXT_L = 'MRP PROFILE'.
  WA_FIELDCAT2-COL_POS = 5.
  WA_FIELDCAT2-OUTPUTLEN = 4.
  APPEND WA_FIELDCAT2 TO IT_FIELDCAT2.
  CLEAR WA_FIELDCAT2.
  WA_FIELDCAT2-FIELDNAME = 'DISMM'.
  WA_FIELDCAT2-TABNAME = 'IT_MARC'.
  WA_FIELDCAT2-SELTEXT_L = 'MRP TYPE'.
  WA_FIELDCAT2-COL_POS = 6.
  WA_FIELDCAT2-OUTPUTLEN = 4.
  APPEND WA_FIELDCAT2 TO IT_FIELDCAT2.
  CLEAR WA_FIELDCAT2.
  WA_FIELDCAT2-FIELDNAME = 'DISPO'.
  WA_FIELDCAT2-TABNAME = 'IT_MARC'.
  WA_FIELDCAT2-SELTEXT_L = 'MRP CON'.
  WA_FIELDCAT2-COL_POS = 7.
  WA_FIELDCAT2-OUTPUTLEN = 4.
APPEND WA_FIELDCAT2 TO IT_FIELDCAT2.
  CLEAR WA_FIELDCAT2.
ENDFORM.                    " modify_fieldcat
*&      Form  BLOCK_LIST
      text
-->  p1        text
<--  p2        text
FORM BLOCK_LIST .
CLEAR WA_LAYOUT.
WA_LAYOUT-ZEBRA = 'X'.
WA_LAYOUT-TOTALS_TEXT = 'TOTAL'.
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_INIT'
  EXPORTING
    I_CALLBACK_PROGRAM             = G_REPID
   I_CALLBACK_PF_STATUS_SET       = ' '
   I_CALLBACK_USER_COMMAND        = 'user_command'.
  IT_EXCLUDING                   =
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
  EXPORTING
    IS_LAYOUT                        = WA_LAYOUT
    IT_FIELDCAT                      = IT_FIELDCAT[]
    I_TABNAME                        = 'IT_MARA'
    IT_EVENTS                        = GT_XEVENTS
   IT_SORT                          = IT_SORT
  I_TEXT                           = ' '
  TABLES
    T_OUTTAB                         = IT_MARA
EXCEPTIONS
  PROGRAM_ERROR                    = 1
  MAXIMUM_OF_APPENDS_REACHED       = 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.
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
  EXPORTING
    IS_LAYOUT                        = WA_LAYOUT
    IT_FIELDCAT                      = IT_FIELDCAT1
    I_TABNAME                        = 'IT_MAKT'
    IT_EVENTS                        = GT_YEVENTS
  IT_SORT                          =
  I_TEXT                           = ' '
  TABLES
    T_OUTTAB                         = IT_MAKT
EXCEPTIONS
  PROGRAM_ERROR                    = 1
  MAXIMUM_OF_APPENDS_REACHED       = 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.
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
  EXPORTING
    IS_LAYOUT                        = WA_LAYOUT
    IT_FIELDCAT                      = IT_FIELDCAT2
    I_TABNAME                        = 'IT_MARC'
    IT_EVENTS                        = GT_ZEVENTS
  IT_SORT                          =
  I_TEXT                           = ' '
  TABLES
    T_OUTTAB                         = IT_MARC
EXCEPTIONS
  PROGRAM_ERROR                    = 1
  MAXIMUM_OF_APPENDS_REACHED       = 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.
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_DISPLAY'
EXPORTING
  I_INTERFACE_CHECK             = ' '
   IS_PRINT                      = GT_PRINT
  I_SCREEN_START_COLUMN         = 0
  I_SCREEN_START_LINE           = 0
  I_SCREEN_END_COLUMN           = 0
  I_SCREEN_END_LINE             = 0
IMPORTING
  E_EXIT_CAUSED_BY_CALLER       =
  ES_EXIT_CAUSED_BY_USER        =
EXCEPTIONS
  PROGRAM_ERROR                 = 1
  OTHERS                        = 2
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM.                    " BLOCK_LIST
*&      Form  EVENT_LIST
      text
-->  p1        text
<--  p2        text
FORM EVENT_LIST .
CLEAR XS_EVENT.
  XS_EVENT-NAME = SLIS_EV_TOP_OF_PAGE.
  XS_EVENT-FORM = 'XTOP_OF_PAGE'.
  APPEND XS_EVENT TO GT_XEVENTS.
  CLEAR XS_EVENT.
  XS_EVENT-NAME = SLIS_EV_END_OF_PAGE.
  XS_EVENT-FORM = 'XEND_OF_PAGE'.
  APPEND XS_EVENT TO GT_XEVENTS.
  CLEAR XS_EVENT.
  XS_EVENT-NAME = SLIS_EV_TOP_OF_LIST.
  XS_EVENT-FORM = 'XTOP_OF_LIST'.
  APPEND XS_EVENT TO GT_XEVENTS.
  CLEAR XS_EVENT.
  XS_EVENT-NAME = SLIS_EV_END_OF_LIST.
  XS_EVENT-FORM = 'XEND_OF_LIST'.
  APPEND XS_EVENT TO GT_XEVENTS.
  CLEAR XS_EVENT.
  XS_EVENT-NAME = SLIS_EV_END_OF_PAGE.
  XS_EVENT-FORM = 'YEND_OF_PAGE'.
  APPEND XS_EVENT TO GT_YEVENTS.
  CLEAR XS_EVENT.
  XS_EVENT-NAME = SLIS_EV_TOP_OF_PAGE.
  XS_EVENT-FORM = 'YTOP_OF_PAGE'.
  APPEND XS_EVENT TO GT_YEVENTS.
  CLEAR XS_EVENT.
  XS_EVENT-NAME = SLIS_EV_TOP_OF_LIST.
  XS_EVENT-FORM = 'YTOP_OF_LIST'.
  APPEND XS_EVENT TO GT_YEVENTS.
  CLEAR XS_EVENT.
  XS_EVENT-NAME = SLIS_EV_END_OF_LIST.
  XS_EVENT-FORM = 'YEND_OF_LIST'.
  APPEND XS_EVENT TO GT_YEVENTS.
  CLEAR XS_EVENT.
  XS_EVENT-NAME = SLIS_EV_END_OF_PAGE.
  XS_EVENT-FORM = 'ZEND_OF_PAGE'.
  APPEND XS_EVENT TO GT_ZEVENTS.
  CLEAR XS_EVENT.
  XS_EVENT-NAME = SLIS_EV_TOP_OF_PAGE.
  XS_EVENT-FORM = 'ZTOP_OF_PAGE'.
  APPEND XS_EVENT TO GT_ZEVENTS.
  CLEAR XS_EVENT.
  XS_EVENT-NAME = SLIS_EV_TOP_OF_LIST.
  XS_EVENT-FORM = 'ZTOP_OF_LIST'.
  APPEND XS_EVENT TO GT_ZEVENTS.
  CLEAR XS_EVENT.
  XS_EVENT-NAME = SLIS_EV_END_OF_LIST.
  XS_EVENT-FORM = 'ZEND_OF_LIST'.
  APPEND XS_EVENT TO GT_ZEVENTS.
  CLEAR XS_EVENT.
ENDFORM.                    " EVENT_LIST
FORM XTOP_OF_PAGE.
WRITE:/ 'TOP OF PAGE FOR MARA'.
ENDFORM.
FORM YTOP_OF_PAGE.
WRITE:/ 'TOP OF PAGE FOR MAKT'.
ENDFORM.
FORM ZTOP_OF_PAGE.
WRITE:/ 'TOP OF PAGE FOR MARC'.
ENDFORM.
FORM XEND_OF_PAGE.
WRITE:/ 'END OF PAGE FOR MARA'.
ENDFORM.
FORM YEND_OF_PAGE.
WRITE:/ 'END OF PAGE FOR MAKT'.
ENDFORM.
FORM ZEND_OF_PAGE.
WRITE:/ 'END OF PAGE FOR MARC'.
ENDFORM.
FORM XTOP_OF_LIST.
WRITE:/ 'TOP OF LIST FOR MARA'.
ENDFORM.
FORM YTOP_OF_LIST.
WRITE:/ 'TOP OF LIST FOR MAKT'.
ENDFORM.
FORM ZTOP_OF_LIST.
WRITE:/ 'TOP OF LIST FOR MARC'.
ENDFORM.
FORM XEND_OF_LIST.
WRITE:/ 'END OF LIST FOR MARA'.
ENDFORM.
FORM YEND_OF_LIST.
WRITE:/ 'END OF LIST FOR MAKT'.
ENDFORM.
FORM ZEND_OF_LIST.
WRITE:/ 'END OF LIST FOR MARC'.
ENDFORM.
*&      Form  sort_list
      text
-->  p1        text
<--  p2        text
FORM sort_list .
  CLEAR WA_SORT.
  WA_SORT-FIELDNAME = 'MTART'.
  WA_SORT-SUBTOT = 'X'.
    APPEND WA_SORT TO IT_SORT.
  CLEAR WA_SORT.
  WA_SORT-FIELDNAME = 'MATKL'.
WA_SORT-SUBTOT = 'X'.
  APPEND WA_SORT TO IT_SORT.
  CLEAR WA_SORT.
ENDFORM.                    " sort_list
regards,
keerthi

Similar Messages

  • ALV Block list. Field name at user command not getting populated

    Hi All,
    I'm trying to use ALN block list. Field catalog is built using the REUSEALVMERGE FM.
    I've put hot spot on some fields. When I'm trying to capture the data when user clicks on the hotspot field the structure that comes in the user_command subroutine is not getting populated with the fieldname. But it is getting populated with the tabname and value is also coming properly.
    FORM user_command
              USING
              ucomm    TYPE sy-ucomm
                    selfield TYPE kkblo_selfield.
    What could be the possible reason?
    I appreciate your inputs.

    Hi Surya,
             Did you find the solution for this?
    Best Regards.

  • Issue with Secondary list display in ALV BLocked List

    Hi all,
    I am using ALV Blocked List consissting of 3 blocks.
    For my requirement, in the 1st block, I need to make a colum clickable, for which I have used the User_Command Event.
    But this is not working. The second list is not gettin displayed.
    Here'z my code:
    CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_INIT'
          EXPORTING
            i_callback_program             = v_repid
           i_callback_top_of_page       = 'TOP-OF-PAGE'            "see FORM
      I_CALLBACK_PF_STATUS_SET       = ' '
       I_CALLBACK_USER_COMMAND        = 'USER_COMMAND'
      IT_EXCLUDING                   =
      REFRESH: it_events[].
      wa_events-name = slis_ev_top_of_list.
      wa_events-form = 'FIRST_HEADING'.
      APPEND wa_events TO it_events.
      wa_events-name = slis_ev_user_command.
      wa_events-form = 'USER_COMMAND'.
      APPEND wa_events TO it_events.
      CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
        EXPORTING
          is_layout                        = v_layout
          it_fieldcat                      = it_disptab_field[]
          i_tabname                        = 'DISPTAB'
          it_events                        = it_events[]                  " Call 1st  BLOCK TO BE APPENDED For SALES ANALYSIS
      IT_SORT                          =
      I_TEXT                           = ' '
        TABLES
          t_outtab                         = it_disptab
       EXCEPTIONS
         program_error                    = 1
         maximum_of_appends_reached       = 2
         OTHERS                           = 3.
    CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_DISPLAY'.
    FORM user_command USING r_ucomm LIKE sy-ucomm
                      rs_selfield TYPE slis_selfield.
      CASE r_ucomm.
        WHEN '&IC1'.
           READ TABLE it_disptab INTO w_disptab INDEX rs_selfield-tabindex.
           IF rs_selfield-fieldname = 'KUNAG'.
               WRITE:/1  'invoice',
                 10   'Quantity in Base Unit',
                 20   'Base Unit',
                 30   'Qty in KL',
                 40   'Price'.
          ENDIF.
       ENDCASE.
    ENDFORM.                    " USER_COMMAND
    Please Help..

    Hi Ganesh,
    Thanks for your reply. I have already used hotspot on the fieldcat of the clickable field.  But it seems that except for the hand cursor appearing only on that field, the other columns are also clickable.
    Moreover, only the fiirst block should be clickable but all the blocks are applying the user_command.
    This might be due to the REUSE_ALV_BLOCK_LIST_INIT Function Module, which applies to all the blocks.
      CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_INIT'
          EXPORTING
            i_callback_program             = v_repid
           i_callback_top_of_page       = 'TOP-OF-PAGE'            "see FORM
      I_CALLBACK_PF_STATUS_SET       = ' '
       i_callback_user_command        = 'USER_COMMAND'
      IT_EXCLUDING                   =
    In orser to avoid this, I am using the following code, which can be a temporary solution to the problem.
    FORM user_command USING r_ucomm LIKE sy-ucomm
                      rs_selfield TYPE slis_selfield.
      DATA: row_count TYPE sy-lilli.
      CASE r_ucomm.
        WHEN '&IC1'.
          DESCRIBE TABLE it_disptab LINES row_count.
          READ TABLE it_disptab INTO w_disptab INDEX rs_selfield-tabindex.
          IF rs_selfield-tabindex LE row_count AND rs_selfield-tabindex ne 0 AND rs_selfield-tabname = 'DISPTAB'.
            PERFORM get_data.
            PERFORM build_fieldcat.
            PERFORM display_second_list.
          ELSE.
            EXIT.
          ENDIF.
      ENDCASE.
    ENDFORM.                    " USER_COMMAND

  • Problem in ALV Block List

    Hi All,
    I am trying to displaying BOM explosion for materials in ALV Block list.
    I am taking the materials to be exploded from a local file. Taking the contents of the file in an internal table and then passing the parameters like material number bom application , alternative BOM to the function 'CS_BOM_EXPL_MAT_V2'
    Then I am calling the functions for ALV Block display for each material.
      But when I am displaying the data in the block display , only the BOM explosion for the last material is getting displayed.
    I am pasting the code also for ur reference.
    REPORT  zcs13                                   .
    TABLES:
            mara,
            stpo,
            t001w,
            stko.
    TYPE-POOLS: slis.
    DATA: BEGIN OF it_stb OCCURS 0.
            INCLUDE STRUCTURE zstpox.
    DATA:END OF it_stb.
    DATA: BEGIN OF it_matmaster OCCURS 0,
          matnr TYPE matnr,
          werks TYPE werks,
         stlal type stlal,
         capid type capid,
          emeng TYPE emeng,
          END OF it_matmaster.
    DATA : ievent TYPE slis_t_event.
    DATA: it_stb2 LIKE stpox OCCURS 0 WITH HEADER LINE,
    it_stb3 LIKE stpox OCCURS 0 WITH HEADER LINE,
    temp_cat TYPE slis_fieldcat_alv,
    sline TYPE slis_listheader,
    gt_list_top_of_page TYPE slis_t_listheader,
    gs_layout TYPE slis_layout_alv ,
    gt_events TYPE slis_t_event,
    gt_sort TYPE slis_t_sortinfo_alv,
    w_msg(255) TYPE c,
    int TYPE i VALUE 0.
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-002.
    PARAMETERS:p_file LIKE rlgrap-filename OBLIGATORY.
    SELECTION-SCREEN END OF BLOCK b1 .
    CONSTANTS c_x VALUE 'X'.
    DATA: w_topmat LIKE cstmat,
        fieldcat TYPE slis_t_fieldcat_alv,
         wa_fieldcat TYPE slis_fieldcat_alv.
    DATA:v_file TYPE string.
    *SELECTION-SCREEN END OF BLOCK b1.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
      CALL FUNCTION 'F4_FILENAME'
        EXPORTING
          program_name  = syst-cprog
          dynpro_number = syst-dynnr
          field_name    = 'P_FILE'
        IMPORTING
          file_name     = p_file.
    START-OF-SELECTION.
      v_file = p_file.
      CALL FUNCTION 'GUI_UPLOAD'
        EXPORTING
          filename                      = v_file
         filetype                      = 'ASC'
         has_field_separator           = 'X'
      HEADER_LENGTH                 = 0
      READ_BY_LINE                  = 'X'
      DAT_MODE                      = ' '
    IMPORTING
      FILELENGTH                    =
      HEADER                        =
        TABLES
          data_tab                      =  it_matmaster
       EXCEPTIONS
         file_open_error               = 1
         file_read_error               = 2
         no_batch                      = 3
         gui_refuse_filetransfer       = 4
         invalid_type                  = 5
         no_authority                  = 6
         unknown_error                 = 7
         bad_data_format               = 8
         header_not_allowed            = 9
         separator_not_allowed         = 10
         header_too_long               = 11
         unknown_dp_error              = 12
         access_denied                 = 13
         dp_out_of_memory              = 14
         disk_full                     = 15
         dp_timeout                    = 16
         OTHERS                        = 17
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
      LOOP AT it_matmaster.
        PERFORM explode_assembly.
       PERFORM f01_set_layo CHANGING gs_layout.
       PERFORM eventtab_build USING ievent.
    perform fldcat.
        PERFORM display_grid.
      ENDLOOP.
    PERFORM display_grid.
    CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_DISPLAY'
    EXPORTING
       i_interface_check             = 'x_print_layout'
      IS_PRINT                      =
      I_SCREEN_START_COLUMN         = 0
      I_SCREEN_START_LINE           = 0
      I_SCREEN_END_COLUMN           = 0
      I_SCREEN_END_LINE             = 0
    IMPORTING
      E_EXIT_CAUSED_BY_CALLER       =
      ES_EXIT_CAUSED_BY_USER        =
    EXCEPTIONS
       program_error                 = 1
       OTHERS                        = 2
    IF sy-subrc <> 0.
      MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
              WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    *&      Form  EXPLODE_ASSEMBLY
          text
    FORM explode_assembly.
      CALL FUNCTION 'CS_BOM_EXPL_MAT_V2'
        EXPORTING
          capid                 = 'BEST'
          cuols                 = c_x
          datuv                 = sy-datum
          emeng                 = it_matmaster-emeng
          knfba                 = c_x
          ksbvo                 = c_x
          mehrs                 = c_x
          mbwls                 = c_x
         mdmps                 = c_x
          mktls                 = c_x
         stlal                 = it_matmaster-stlal
         stlan                 = p_bomap
          mtnrv                 = it_matmaster-matnr
          werks                 = it_matmaster-werks
         svwvo                 = 'X'
         vrsvo                 = 'X'
        IMPORTING
          topmat                = w_topmat
        TABLES
          stb                   = it_stb
        EXCEPTIONS
          alt_not_found         = 1
          call_invalid          = 2
          material_not_found    = 3
          missing_authorization = 4
          no_bom_found          = 5
          no_plant_data         = 6
          no_suitable_bom_found = 7
          conversion_error      = 8
          OTHERS                = 9.
      IF sy-subrc <> 0.
       MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
               WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4
               INTO w_msg.
       WRITE: / w_msg.
       EXIT.
      ENDIF.
    ENDFORM.                    "explode_assembly
    *&      Form  display_grid
          text
    -->  p1        text
    <--  p2        text
    form display_grid .
    *CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
      EXPORTING
        i_callback_program                = 'ZCS13'
    i_callback_top_of_page            = 'TOP_OF_PAGE_GRID'
      is_layout                         = gs_layout
        it_fieldcat                       = fieldcat
          IT_SORT                           = GT_SORT[]
           i_save                            = 'A'
         it_events                         = gt_events[]
       TABLES
         t_outtab                          = it_stb
    EXCEPTIONS
      PROGRAM_ERROR                     = 1
      OTHERS                            = 2
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_INIT'
      EXPORTING
        i_callback_program             = 'ZALVTOTAL'
      I_CALLBACK_PF_STATUS_SET       = PFSTATUS
       i_callback_user_command        = 'USER_COMMAND'(001)
      IT_EXCLUDING                   =
    *CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
    EXPORTING
       is_layout                        = gs_layout
       it_fieldcat                      = i_fieldcat
       i_tabname                        = 'IT_TAB[]'
       it_events                        = gt_events
      it_sort                          = gt_sort
      I_TEXT                           = ' '
    TABLES
       t_outtab                         = it_tab[]
    EXCEPTIONS
      program_error                    = 1
      maximum_of_appends_reached       = 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.
    CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
      EXPORTING
        is_layout                        = gs_layout
        it_fieldcat                      = fieldcat
        i_tabname                        = 'IT_STB[]'
        it_events                        = gt_events
       it_sort                          = gt_sort
      I_TEXT                           = ' '
      TABLES
        t_outtab                         = it_stb[]
    EXCEPTIONS
       program_error                    = 1
       maximum_of_appends_reached       = 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.
    clear it_stb[].
    endform.                    " display_grid
    *&      Form  fldcat
          text
    -->  p1        text
    <--  p2        text
    form fldcat .
    *DATA: wa_fieldcat TYPE slis_fieldcat_alv,
      CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
       EXPORTING
         i_program_name               = 'ZCS13'
      I_INTERNAL_TABNAME           = 'IT_STB'
         i_structure_name             = 'ZSTPOX'
      I_CLIENT_NEVER_DISPLAY       = 'X'
         i_inclname                   = 'ZCS13'
      I_BYPASSING_BUFFER           =
      I_BUFFER_ACTIVE              =
        CHANGING
          ct_fieldcat                  = fieldcat[]
    EXCEPTIONS
      INCONSISTENT_INTERFACE       = 1
      PROGRAM_ERROR                = 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.
    Pls Suggest
    Thanks.

    Hi All,
    I am trying to displaying BOM explosion for materials in ALV Block list.
    I am taking the materials to be exploded from a local file. Taking the contents of the file in an internal table and then passing the parameters like material number bom application , alternative BOM to the function 'CS_BOM_EXPL_MAT_V2'
    Then I am calling the functions for ALV Block display for each material.
      But when I am displaying the data in the block display , only the BOM explosion for the last material is getting displayed.
    I am pasting the code also for ur reference.
    REPORT  zcs13                                   .
    TABLES:
            mara,
            stpo,
            t001w,
            stko.
    TYPE-POOLS: slis.
    DATA: BEGIN OF it_stb OCCURS 0.
            INCLUDE STRUCTURE zstpox.
    DATA:END OF it_stb.
    DATA: BEGIN OF it_matmaster OCCURS 0,
          matnr TYPE matnr,
          werks TYPE werks,
         stlal type stlal,
         capid type capid,
          emeng TYPE emeng,
          END OF it_matmaster.
    DATA : ievent TYPE slis_t_event.
    DATA: it_stb2 LIKE stpox OCCURS 0 WITH HEADER LINE,
    it_stb3 LIKE stpox OCCURS 0 WITH HEADER LINE,
    temp_cat TYPE slis_fieldcat_alv,
    sline TYPE slis_listheader,
    gt_list_top_of_page TYPE slis_t_listheader,
    gs_layout TYPE slis_layout_alv ,
    gt_events TYPE slis_t_event,
    gt_sort TYPE slis_t_sortinfo_alv,
    w_msg(255) TYPE c,
    int TYPE i VALUE 0.
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-002.
    PARAMETERS:p_file LIKE rlgrap-filename OBLIGATORY.
    SELECTION-SCREEN END OF BLOCK b1 .
    CONSTANTS c_x VALUE 'X'.
    DATA: w_topmat LIKE cstmat,
        fieldcat TYPE slis_t_fieldcat_alv,
         wa_fieldcat TYPE slis_fieldcat_alv.
    DATA:v_file TYPE string.
    *SELECTION-SCREEN END OF BLOCK b1.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
      CALL FUNCTION 'F4_FILENAME'
        EXPORTING
          program_name  = syst-cprog
          dynpro_number = syst-dynnr
          field_name    = 'P_FILE'
        IMPORTING
          file_name     = p_file.
    START-OF-SELECTION.
      v_file = p_file.
      CALL FUNCTION 'GUI_UPLOAD'
        EXPORTING
          filename                      = v_file
         filetype                      = 'ASC'
         has_field_separator           = 'X'
      HEADER_LENGTH                 = 0
      READ_BY_LINE                  = 'X'
      DAT_MODE                      = ' '
    IMPORTING
      FILELENGTH                    =
      HEADER                        =
        TABLES
          data_tab                      =  it_matmaster
       EXCEPTIONS
         file_open_error               = 1
         file_read_error               = 2
         no_batch                      = 3
         gui_refuse_filetransfer       = 4
         invalid_type                  = 5
         no_authority                  = 6
         unknown_error                 = 7
         bad_data_format               = 8
         header_not_allowed            = 9
         separator_not_allowed         = 10
         header_too_long               = 11
         unknown_dp_error              = 12
         access_denied                 = 13
         dp_out_of_memory              = 14
         disk_full                     = 15
         dp_timeout                    = 16
         OTHERS                        = 17
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
      LOOP AT it_matmaster.
        PERFORM explode_assembly.
       PERFORM f01_set_layo CHANGING gs_layout.
       PERFORM eventtab_build USING ievent.
    perform fldcat.
        PERFORM display_grid.
      ENDLOOP.
    PERFORM display_grid.
    CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_DISPLAY'
    EXPORTING
       i_interface_check             = 'x_print_layout'
      IS_PRINT                      =
      I_SCREEN_START_COLUMN         = 0
      I_SCREEN_START_LINE           = 0
      I_SCREEN_END_COLUMN           = 0
      I_SCREEN_END_LINE             = 0
    IMPORTING
      E_EXIT_CAUSED_BY_CALLER       =
      ES_EXIT_CAUSED_BY_USER        =
    EXCEPTIONS
       program_error                 = 1
       OTHERS                        = 2
    IF sy-subrc <> 0.
      MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
              WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    *&      Form  EXPLODE_ASSEMBLY
          text
    FORM explode_assembly.
      CALL FUNCTION 'CS_BOM_EXPL_MAT_V2'
        EXPORTING
          capid                 = 'BEST'
          cuols                 = c_x
          datuv                 = sy-datum
          emeng                 = it_matmaster-emeng
          knfba                 = c_x
          ksbvo                 = c_x
          mehrs                 = c_x
          mbwls                 = c_x
         mdmps                 = c_x
          mktls                 = c_x
         stlal                 = it_matmaster-stlal
         stlan                 = p_bomap
          mtnrv                 = it_matmaster-matnr
          werks                 = it_matmaster-werks
         svwvo                 = 'X'
         vrsvo                 = 'X'
        IMPORTING
          topmat                = w_topmat
        TABLES
          stb                   = it_stb
        EXCEPTIONS
          alt_not_found         = 1
          call_invalid          = 2
          material_not_found    = 3
          missing_authorization = 4
          no_bom_found          = 5
          no_plant_data         = 6
          no_suitable_bom_found = 7
          conversion_error      = 8
          OTHERS                = 9.
      IF sy-subrc <> 0.
       MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
               WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4
               INTO w_msg.
       WRITE: / w_msg.
       EXIT.
      ENDIF.
    ENDFORM.                    "explode_assembly
    *&      Form  display_grid
          text
    -->  p1        text
    <--  p2        text
    form display_grid .
    *CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
      EXPORTING
        i_callback_program                = 'ZCS13'
    i_callback_top_of_page            = 'TOP_OF_PAGE_GRID'
      is_layout                         = gs_layout
        it_fieldcat                       = fieldcat
          IT_SORT                           = GT_SORT[]
           i_save                            = 'A'
         it_events                         = gt_events[]
       TABLES
         t_outtab                          = it_stb
    EXCEPTIONS
      PROGRAM_ERROR                     = 1
      OTHERS                            = 2
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_INIT'
      EXPORTING
        i_callback_program             = 'ZALVTOTAL'
      I_CALLBACK_PF_STATUS_SET       = PFSTATUS
       i_callback_user_command        = 'USER_COMMAND'(001)
      IT_EXCLUDING                   =
    *CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
    EXPORTING
       is_layout                        = gs_layout
       it_fieldcat                      = i_fieldcat
       i_tabname                        = 'IT_TAB[]'
       it_events                        = gt_events
      it_sort                          = gt_sort
      I_TEXT                           = ' '
    TABLES
       t_outtab                         = it_tab[]
    EXCEPTIONS
      program_error                    = 1
      maximum_of_appends_reached       = 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.
    CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
      EXPORTING
        is_layout                        = gs_layout
        it_fieldcat                      = fieldcat
        i_tabname                        = 'IT_STB[]'
        it_events                        = gt_events
       it_sort                          = gt_sort
      I_TEXT                           = ' '
      TABLES
        t_outtab                         = it_stb[]
    EXCEPTIONS
       program_error                    = 1
       maximum_of_appends_reached       = 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.
    clear it_stb[].
    endform.                    " display_grid
    *&      Form  fldcat
          text
    -->  p1        text
    <--  p2        text
    form fldcat .
    *DATA: wa_fieldcat TYPE slis_fieldcat_alv,
      CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
       EXPORTING
         i_program_name               = 'ZCS13'
      I_INTERNAL_TABNAME           = 'IT_STB'
         i_structure_name             = 'ZSTPOX'
      I_CLIENT_NEVER_DISPLAY       = 'X'
         i_inclname                   = 'ZCS13'
      I_BYPASSING_BUFFER           =
      I_BUFFER_ACTIVE              =
        CHANGING
          ct_fieldcat                  = fieldcat[]
    EXCEPTIONS
      INCONSISTENT_INTERFACE       = 1
      PROGRAM_ERROR                = 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.
    Pls Suggest
    Thanks.

  • HOW TO TRIGGER CHECK BOX EVENT IN BLOCKED LIST OUT PUT

    Hi Abapers,
    I am developing ALV Blocked list using 3 internal tables.
    in output list my requirement is if I click one check box in one intrrnal table the below internal table checkboxes should be checked.
    how to solve this problem this is very urgent to me I hope somebody will help me.
    Regards
    Shashikumar.G

    Hi
    First you need to register the events of clicking of the checkbox.
    Once registerred, you can capture that event and when occured, you can set the checkboxes for below internal table.
    <a href="http://help.sap.com/saphelp_nw04/helpdata/en/95/34eb7feb6211d3a7270000e83dd863/frameset.htm">http://help.sap.com/saphelp_nw04/helpdata/en/95/34eb7feb6211d3a7270000e83dd863/frameset.htm</a>
    Regards
    Raj

  • How to download a Block List based ALV report to PDF file?

    Hi Everyone,
    I need to display a report in block list alv format using REUSE_ALV_BLOCK_LIST_DISPLAY... I have done this. But my problem comes next.
    1. I need to download this report to a pdf file in the user given directory - in presentation server. How can I download this in PDF format.
    2. My report has TOP_OF_LIST and END_OF_LIST events. The body of the report contains a table with some material data. There should be 1 table for each material no. There are around 50 records for each material no. So I am looping at the material no. and calling REUSE_ALV_BLOCK_LIST_APPEND.
    Now my problem is that I should have only 20 records in each page. How can I determine this? How do I put a page-break?
    Please anyone help me.

    Hi Anwesha
    You can send the report output to spool using the IS_PRINT parameter of REUSE_ALV_BLOCK_LIST_DISPLAY FM. Then read the spool number generated and pass it to CONVERT_ABAPSPOOLJOB_2_PDF to get the pdf content which could be downloaded to presentation server.
    The splitting of records on count could be done by calling above method with different internal table filtered as per your requirement.
    Regards
    Ranganath

  • Can't send or receive email, network on block list?

    i've set up exchange 2013 for the first time and when i log into the browser and send a email to my Microsoft account i get the following error:
    BAY004-MC2F50.hotmail.com gave this error:
    OU-002 (BAY004-MC2F50) Unfortunately, messages from 86.10.3.44 weren't sent. Please contact your Internet service provider since part of their network is on our block list.
    when i send a email from my Microsoft account to my exchange i get the following error:
    '[email protected]' on 27/03/2015 21:04
    Server error: '550 relay not permitted'
    i can send mail to my gmail account no problems. looks like Microsoft have blocked my ip, but maybe its something i've missed? this is the first time i've set up a exchange server. any feedback would be greatly appreciated.
    cheers.
    mike.

    Hi mike,
    Thank you for your question.
    We could run the following command to check if the issue persist:
    Set-SendConnector <sendconnnectorname> -IgnoreSTARTTLS $true
    If other domains are well, we could refer to the following links:
    http://answers.microsoft.com/en-us/outlook_com/forum/oemail-osend/please-contact-your-internet-service-provider/38318705-fb86-4f8d-9ebe-089c13bae099
    https://social.technet.microsoft.com/forums/exchange/en-US/213288f3-b320-479a-b65d-39cafa81adba/mail-delivery-issue
    If there are any questions regarding this issue, please be free to let me know. 
    Best Regard,
    Jim
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact [email protected]
    Jim Xu
    TechNet Community Support

  • Exchange 2013 Realtime Block List is Kind of Working

    Hi Everyone.
    I've been setting up a RBL in exchange 2013 using zen.spamhaus.org. The IPBlockListProviders require that the connection filtering agent be enabled. By default when running the installantispamagents.ps1, this script will not install that connection filtering
    agent because it only installs on an "edge" server and since exchange 2013 did away with the "edge" role, it did not get installed. I had to modify the script so it installed that connection filtering agent with all the other anti-spam agents. (We are a one
    exchange server shop so the CAS and Mailbox roles are on one box.)
    I'm having a very weird response. The RBL list works and when I get a test email sent to me using the service at '[email protected]', I can see the Reject message getting sent back out in the agent logs and the SMTP logs. This is the message
    I see in the logs. Notice that the originating IP and the RBL triggering IP are the same: 192.203.178.107.
    2012-12-14T01:59:04.970Z,08CFA71A75A19B4B,10.10.3.50:2525,192.203.178.107:55186,192.203.178.107
    ,,<>,,t***********e@*****.org,1,Connection Filtering Agent,OnRcptCommand,RejectCommand,550
    5.7.1 zen.spamhaus.org has blocked your IP address (192.203.178.107) using the list
    'zen.spamhaus.org'. Please see http://www.spamhaus.org/query/bl?ip=192.203.178.107 for further
    information. This organization has no control over this RBL (Realtime Blo,BlockListProvider,
    zen.spamhaus.org,,,,Undefined
    This is a correct message and that IP address matches the Test RBL IP address spamhaus has blacklisted to check RBL filters. The IP address is added dynamically to the message with a variable in the reject message settings and should list the IP address
    of the SMTP server that triggered the RBL hit.
    The VERY strange thing is when I trigger the RBL with the test message, exchange rejects all incoming mail for my account from any source for several minutes and rejects with that same message. I send a test message from my google account and I can clearly
    see in the agent log that the SMTP connection is coming from a google IP but it still rejects and issues the message that was sent in response to my test using the nelson-'[email protected]'
    This is the reject message sent to my google account after I sent myself an email following the RBL test message. Notice that the originating IP is a google IP and does not match the IP the the reject message claims the message came from. The log
    shows the originating IP as 74.125.82.179 (A google IP) but im rejecting the message because 192.203.178.107 is blocked??? The message didn't come from that IP. :
    2012-12-14T02:00:06.318Z,08CFA71A75A19B4B,10.10.3.50:2525,74.125.82.179:50654,74.125.82.179,,
    t***t@******.net,,t*******te@******.org,1,Connection Filtering Agent,OnRcptCommand,
    RejectCommand,550 5.7.1 zen.spamhaus.org has blocked your IP address (192.203.178.107) using
    the list 'zen.spamhaus.org'. Please see http://www.spamhaus.org/query/bl?ip=192.203.178.107
    for further information. This organization has no control over this RBL
    (Realtime Blo,BlockListProvider,zen.spamhaus.org,,,,Undefined
    After a couple minutes, it clears up and I can get mail again. I just can not for the life of me figure out why all messages are rejected for several minutes after I have an RBL hit and the reject message is always referencing the the SMTP transaction
    that originally triggered the hit. Which in this case, is blocking my Gmail message thinking its coming forom the crynwr.com test even when the smtp logs show a completely different SMTP originating IP and Connection.
    Here is my IPBlockListProvider:
    RunspaceId        : 068b87d2-9c34-4ce9-ab05-eedef928cb27
    RejectionResponse : {1} has blocked your IP address ({0}) using the list '{2}'. Please see 
                        http://www.spamhaus.org/query/bl?ip={0} for further information. This organization has no control 
                        over this RBL (Realtime Block List).
    LookupDomain      : zen.spamhaus.org
    Enabled           : True
    AnyMatch          : True
    BitmaskMatch      : 
    IPAddressesMatch  : {}
    Priority          : 1
    AdminDisplayName  : 
    ExchangeVersion   : 0.1 (8.0.535.0)
    Name              : zen.spamhaus.org
    DistinguishedName : CN=zen.spamhaus.org,CN=IPBlockListProviderConfig,CN=Message Hygiene,CN=Transport 
                        Settings,CN=Bel******ch,CN=Microsoft 
                        Exchange,CN=Services,CN=Configuration,DC=b******rk,DC=net
    Identity          : zen.spamhaus.org
    Guid              : 0c9b5eec-b19a-4ab5-9c6a-cb1666cf68d6
    ObjectCategory    : beltwaypark.net/Configuration/Schema/ms-Exch-Message-Hygiene-IP-Block-List-Provider
    ObjectClass       : {top, msExchMessageHygieneIPBlockListProvider}
    WhenChanged       : 12/12/2012 10:02:36 PM
    WhenCreated       : 12/12/2012 10:02:36 PM
    WhenChangedUTC    : 12/13/2012 4:02:36 AM
    WhenCreatedUTC    : 12/13/2012 4:02:36 AM
    OrganizationId    : 
    OriginatingServer : Lucas.*****.net
    IsValid           : True
    ObjectState       : Unchanged

    When you install the Antispam agents on Exchange 2013 servers you get all of them installed like you did for previous versions of Exchange server. most of them will get installed on the mailbox role but not the Connection filtering agent aka. RBL, DNS Block
    List etc.
    The powershell script: install-AntispamAgents.ps1 will look for which server role is installed and will not install Connection filtering if the server hold the mailbox role. This is understandable since SMTP connection should come in from the CAS server
    and then the original sending IP will not be show since CAS do Source-NAT. So the logic would be to install the connection filtering agent on CAS but the install script will not let you do that either. Connection Filtering will only install on Edge role.
    I can only speculate why this is, but either Microsoft want it to be like this or they have found some trouble with the Connection Filtering Agent running on CAS.
    I figured I will give this a try anyway, and here is how you get it to work.
    Start Exchange Management Shell as administrator.
    Change Directory to scripts folder.   
    cd $exscripts     
    Install the agent.    
    Install-TransportAgent -Name "Connection Filtering Agent" -TransportService FrontEnd -TransportAgentFactory "Microsoft.Exchange.Transport.Agent.ConnectionFiltering.ConnectionFilteringAgentFactory" -AssemblyPath "C:\Program Files\Microsoft\Exchange
    Server\V15\TransportRoles\agents\Hygiene\Microsoft.Exchange.Transport.Agent.Hygiene.dll"
    If you have multiple agents running on the frontend transport you must set them in the correct order with the priority parameter
    Add a IPBlocklistprovider of your choice   
    Add-IPBlockListProvider -Name zen.spamhaus.org -LookupDomain zen.spamhaus.org -AnyMatch $true -Enabled $true
    You can add more than one provider if you like. If you Don’t provide a custom response it will be “Recipient not authorized, your IP has been found on a block list”
    Enable the agent   
    Enable-TransportAgent -TransportService FrontEnd -Identity "Connection Filtering Agent"
    Restart FrontEnd transport service   
    Restart-Service MSExchangeFrontEndTransport
    Now the agent should be live and kicking. Logging for the frontend agent is here
    “C:\Program Files\Microsoft\Exchange Server\V15\TransportRoles\Logs\FrontEnd\AgentLog” instead of the directory for the backend transport “C:\Program Files\Microsoft\Exchange Server\V15\TransportRoles\Logs\Hub\AgentLog”
    Since the script don’t install the Connection filtering agent on CAS it is probably unsupported to install the agent manually, but I had it running for months without any problem so make your own judgment.

  • Check box in ALV BLOCK List

    Hi All,
    iam Using ALV BLOCK list to print the output along with check boxes, iam able to print the output along with the check boxes but when i select any of the check box and click button on application tool bar it is going to dump  and saying,
    FIELD SYMBOL HAS NOT YET BEEN ASSIGNED.
    i populated layout with following fields.
      w_layout-box_fieldname = 'BOX'.
      w_layout-box_tabname = 'T_FINAL2'.
    Plz Help me out.
    Thanks in Advance.
    Neha

    *& Report  BCALV_TEST_BLOCK_LIST
    report  bcalv_test_block_list.
    types: g_ty_t_carrid  type standard table of alv_tab,
           g_ty_t_connid  type standard table of alv_chck,
           g_ty_t_curr    type standard table of alv_cur,
           g_ty_s_sflight type alv_t_t2,
           g_ty_s_carrid  type alv_tab,
           g_ty_s_connid  type alv_chck,
           g_ty_s_curr    type alv_cur.
    constants: con_sflight type lvc_fname value 'ALV_T_T2',
               con_scarr   type lvc_fname value 'ALV_TAB',
               con_spfli   type lvc_fname value 'ALV_CHCK',
               con_scurx   type lvc_fname value 'ALV_CUR',
               con_event_01 type lvc_fname value 'PF_STATUS_SET',
               con_event_02 type lvc_fname value 'USER_COMMAND',
               con_event_03 type lvc_fname value 'CALLER_EXIT',
               con_event_04 type lvc_fname value 'LIST_MODIFY',
               con_event_05 type lvc_fname value 'BEFORE_LINE_OUTPUT',
               con_event_06 type lvc_fname value 'AFTER_LINE_OUTPUT',
               con_event_07 type lvc_fname value 'SUBTOTAL_TEXT',
               con_event_08 type lvc_fname value 'REPREP_MODIFY',
               con_event_09 type lvc_fname value 'TOP_OF_PAGE',
               con_event_10 type lvc_fname value 'END_OF_PAGE',
               con_event_11 type lvc_fname value 'TOP_OF_LIST',
               con_event_12 type lvc_fname value 'END_OF_LIST',
               con_event_13 type lvc_fname value 'TOP_OF_COVERPAGE',
               con_event_14 type lvc_fname value 'END_OF_COVERPAGE',
               con_event_15 type lvc_fname value 'TOP_OF_FOREIGN_PAGE',
               con_event_16 type lvc_fname value 'END_OF_FOREIGN_PAGE',
               con_event_17 type lvc_fname value 'GROUPLEVEL_CHANGE'.
    DATA                                                                 *
    tables: sscrfields.   " for processing the FCODEs in Selektion screens
    include <icon>.
    include <symbol>.
    type-pools: slis, kkblo.
    types: g_ty_t_icon  type standard table of icon,
           g_ty_t_icont type standard table of icont,
           begin of g_ty_s_plane,
             carrid    type g_ty_s_sflight-carrid,
             connid    type g_ty_s_sflight-connid,
             planetype type g_ty_s_sflight-planetype,
             seatsmax  type g_ty_s_sflight-seatsmax,
           end   of g_ty_s_plane,
           g_ty_t_plane type sorted table of g_ty_s_plane
                             with unique key carrid connid,
           begin of g_ty_s_fcat_curr,
             fieldname  type lvc_fname,
             cfieldname type lvc_fname,
             currency   type lvc_s_fcat-currency,
           end   of g_ty_s_fcat_curr,
           g_ty_t_fcat_curr type sorted table of g_ty_s_fcat_curr
                                 with unique key fieldname,
           begin of g_ty_s_sort.
    include type slis_sortinfo_alv.
    types: end   of g_ty_s_sort,
           g_ty_t_sort type sorted table of g_ty_s_sort
                            with unique key spos fieldname,
           begin of g_ty_s_test,
             list_amount              type num1,
             select_amount            type i,
             only_db_info             type char1,
             db_short                 type char1,
             excp_display             type char1,
             excp_condense            type char1,
             layo_title               type lvc_s_layo-grid_title,
             layo_zebra               type char1,
             layo_no_vert_lines       type char1,
             layo_no_horiz_lines      type char1,
             layo_cell_merge          type char1,
             layo_count               type char1,
             layo_box                 type char1,
             layo_no_colhead          type char1,
             layo_column_optimize     type char1,
             layo_keys_hotspot        type char1,
             layo_no_keyfix           type char1,
             layo_no_hotspot          type char1,
             layo_hotspot_rows        type i occurs 0,
             layo_hotspot_columns     type lvc_fname occurs 0,
             layo_no_scrolling        type char1,
             layo_no_authcheck        type char1,
             layo_no_min_linesize     type char1,
             layo_min_linesize        type sylinsz,
             layo_max_linesize        type sylinsz,
             layo_group_change_edit   type char1,
             layo_get_selinfo         type char1,
             layo_confirmation_prompt type char1,
             layo_f2code              type syucomm,
             layo_reprep              type char1,
             sum_before               type char1,
             sum_no_sumline           type char1,
             sum_no_sumchoice         type char1,
             sum_numc                 type char1,
             sum_no_unitsplit         type char1,
             sum_totals_only          type char1,
             sum_totals_text          type symsgli,
             sum_no_subtotals         type char1,
             sum_no_subchoice         type char1,
             sum_subtotals_text       type symsgli,
             prnt_print               type char1,
             prnt_reserve_lines       type lvc_s_prnt-reservelns,
             prnt_no_listinfo         type char1,
             prnt_no_selinfo          type char1,
             prnt_with_title          type char1,
             prnt_footline            type lvc_s_prnt-footline,
             prnt_printinfo           type char1,
             prnt_no_coverpage        type char1,
             prnt_no_new_page         type char1,
             prnt_no_change_print_params type char1,
             color_rows               type i occurs 0,
             color_fields_column      type lvc_fname occurs 0,
             color_fields_cell        type lvc_fname occurs 0,
             fcat_no_out_fields       type lvc_fname occurs 0,
             fcat_tech_fields         type lvc_fname occurs 0,
             fcat_fix_column_fields   type lvc_fname occurs 0,
             fcat_do_sum_fields       type lvc_fname occurs 0,
             fcat_no_sum_fields       type lvc_fname occurs 0,
             fcat_curr_fields         type g_ty_t_fcat_curr,
             curr_amount              type i,
             curr_space               type char1,
             t_sort                   type g_ty_t_sort,
             no_info_popup            type char1,
             info_popup_once          type char1,
             events_info_popup        type lvc_fname occurs 0,
             events                   type lvc_fname occurs 0,
             buffer_active            type char1,
             bypassing_buffer         type char1,
           end   of g_ty_s_test,
           begin of g_ty_s_outtab.
    include type g_ty_s_sflight.
    types:   list                 type num1,
             box                  type char1,
             count                type i,
             lights               type char1,
             checkbox             type char1,
             hotspot              type char1,
             color(4)             type c,
             tabcolor             type slis_t_specialcol_alv,
             price2               type g_ty_s_sflight-price,
             currency2            type g_ty_s_sflight-currency,
             char(10)             type c,
             string               type string,
             int1                 type int1,
             int2                 type int2,
             int4                 type int4,
             numc(10)             type n,
             dec(10)              type p decimals 2,
             fltp                 type f,
             dats                 type d,
             tims                 type t,
             icon                 type icon-id,
             icon_qinfo           type icon-name,
             symbol               type icon-id,
           end   of g_ty_s_outtab,
           g_ty_t_outtab type table of g_ty_s_outtab.
    constants: con_true         type char1 value 'X',
               con_ok   type sy-ucomm value 'OK',
               con_exit type sy-ucomm value 'EXIT',
               con_canc type sy-ucomm value 'CANC',
               con_back type sy-ucomm value 'BACK'.
    data: gt_outtab1 type g_ty_t_outtab,
          gt_outtab2 type g_ty_t_outtab,
          gt_outtab3 type g_ty_t_outtab,
          gt_outtab4 type g_ty_t_outtab,
          gt_outtab5 type g_ty_t_outtab,
          gt_outtab6 type g_ty_t_outtab,
          gt_outtab7 type g_ty_t_outtab,
          gt_outtab8 type g_ty_t_outtab,
          gt_outtab9 type g_ty_t_outtab.
    data: gt_outtab   type g_ty_t_outtab with header line,
          gs_test     type g_ty_s_test.
    data: g_repid     type sy-repid.
    data: g_field     type lvc_s_fcat-fieldname,
          g_int_field type i.
          CLASS random DEFINITION
    class random definition.
      public section.
        types:
          value(16) type p decimals 0,
          numcv(15) type n.
        constants:
          max type random=>value value 4294967295.
        class-methods:
      computes a random natural number from the set {0, ..., random=>max}.
          number returning value(rval) type random=>value,
      computes a random character from the set {A-Za-z0-9}
          c returning value(rval) type char01,
      computes a random string consisting of "len" random characters
          string importing len type i
                 returning value(rval) type string,
      computes a date
          dats returning value(rval) type d,
      computes a time
          time returning value(rval) type t,
      computes a random numc from the set {low, ..., high}
          numc importing low type random=>numcv high type random=>numcv
            returning value(rval) type random=>numcv,
      computes a random integer from the set {low, ..., high}
          i importing low type i high type i
            returning value(rval) type i,
      computes a random integer from the set {low, ..., high}
          int2 importing low type int2 high type int2
               returning value(rval) type int2,
      computes a random integer from the set {low, ..., high}
          int1 importing low type int1 high type int1
               returning value(rval) type int1,
      computes a random float from the interval [low ; high]
          f importing low type f high type f
            returning value(rval) type f,
      computes a random character from the set {A-F0-9}
          hex returning value(rval) type char01,
      computes a random character from the set {0-1}
          x returning value(rval) type char01,
      method "random=>class_constructor"
          class_constructor.
      private section.
        class-data:
      precomputed maximal index (= string length - 1) of "random=>chars"
      or of "random=>x_data".
          charsmax type i,
          xmax type i,
      random number seed value.
      (Used in method "random=>number".)
          seed type random=>value.
        constants:
      characters for class-method "random=>hex"
          hex_data(100) type c value 'ABCDEF' &
                                     '0123456789',
      characters for class-method "random=>x"
          x_data(100) type c value '01',
      characters for class-metshod "random=>c"
          chars(100) type c value 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' &
                                  'abcdefghijklmnopqrstuvwxyz' &
                                  '0123456789'.
    endclass.                    "random DEFINITION
          CLASS random IMPLEMENTATION
    class random implementation.
    implementation of the methods for randomizing the values
      method x.
        data: ri type i.
        ri = random=>i( low = 0  high = random=>xmax ).
        move x_data+ri(1) to rval.
      endmethod.                    "x
      method hex.
        data: ri type i.
        ri = random=>i( low = 0  high = random=>charsmax ).
        move hex_data+ri(1) to rval.
      endmethod.                    "hex
      method number.
        constants:
          a(3) type p  value 67301,        " Coefficient
          c(1) type p  value 1,            " Increment
          m(6) type p  value 4294967296.   " Modulus 2**32
        random=>seed = ( a * random=>seed + c ) mod m.
        rval = random=>seed.
      endmethod.                    "number
      method c.
        data:
          ri type i.
        ri = random=>i( low = 0  high = random=>charsmax ).
        move chars+ri(1) to rval.
      endmethod.                    "c
      method string.
        data:
          char(1) type c.
        clear rval.
        do len times.
          char = random=>c( ).
          concatenate rval char into rval.
        enddo.
      endmethod.                    "string
      method dats.
        data: l_date      type sy-datum,
              l_day(2)    type n,
              l_month(2)  type n,
              l_year(4)   type n,
              l_value     type random=>numcv,
              l_low       type random=>numcv,
              l_high      type random=>numcv.
        l_year  = sy-datum+0(4).
        l_low   = l_year - 5.
        l_high  = l_year + 5.
        l_value = random=>numc( low = l_low high = l_high ).
        l_year  = l_value+11(4).
        l_value = random=>numc( low = 1 high = 12 ).
        l_month = l_value+13(2).
        case l_month.
          when 2.
            l_high = 28.
          when 4 or 6 or 9 or 11.
            l_high = 30.
          when others.
            l_high = 31.
        endcase.
        l_value = random=>numc( low = 1 high = l_high ).
        l_day   = l_value+13(2).
        l_date+0(4) = l_year.
        l_date+4(2) = l_month.
        l_date+6(2) = l_day.
        rval = l_date.
      endmethod.                    "dats
      method time.
        data: l_time      type t,
              l_hour(2)   type n,
              l_min(2)    type n,
              l_sec(2)    type n,
              l_value     type random=>numcv.
        l_value = random=>numc( low = 0 high = 60 ).
        l_sec   = l_value+13(2).
        l_value = random=>numc( low = 0 high = 60 ).
        l_min   = l_value+13(2).
        l_value = random=>numc( low = 1 high = 24 ).
        l_hour  = l_value+13(2).
        l_time+0(2) = l_hour.
        l_time+2(2) = l_min.
        l_time+4(2) = l_sec.
        rval = l_time.
      endmethod. "time
      method numc.
      Go from {0,...,random=>max} to {low,...,high} with ABAP rounding
        data: l_dec(16)   type p,
              l_char(16)  type c.
        l_dec = ( ( high - low + 1 ) * random=>number( ) ) / random=>max
               + '0.5'.
        subtract 1 from l_dec.
        add low to l_dec.
        data: lr_type_descr  type ref to cl_abap_typedescr,
              lr_elem_descr  type ref to cl_abap_elemdescr.
        lr_type_descr =
                 cl_abap_typedescr=>describe_by_data( rval ).
        lr_elem_descr ?= lr_type_descr.
        l_char = l_dec.
        shift l_char left deleting leading space.
        rval = l_char+0(lr_elem_descr->output_length).
      endmethod.                    "i
      method i.
      Go from {0,...,random=>max} to {low,...,high} with ABAP rounding
        data: l_dec(16)   type p,
              l_char(16)  type c.
        l_dec = ( ( high - low + 1 ) * random=>number( ) ) / random=>max
               + '0.5'.
        subtract 1 from l_dec.
        add low to l_dec.
        data: lr_type_descr  type ref to cl_abap_typedescr,
              lr_elem_descr  type ref to cl_abap_elemdescr.
        lr_type_descr =
                 cl_abap_typedescr=>describe_by_data( rval ).
        lr_elem_descr ?= lr_type_descr.
        l_char = l_dec.
        shift l_char left deleting leading space.
        rval = l_char+0(lr_elem_descr->output_length).
      endmethod.                    "i
      method int2.
      Go from {0,...,random=>max} to {low,...,high} with ABAP rounding
        data: l_dec(16)   type p,
              l_char(16)  type c.
        l_dec = ( ( high - low + 1 ) * random=>number( ) ) / random=>max
               + '0.5'.
        subtract 1 from l_dec.
        add low to l_dec.
        data: lr_type_descr  type ref to cl_abap_typedescr,
              lr_elem_descr  type ref to cl_abap_elemdescr.
        lr_type_descr =
                 cl_abap_typedescr=>describe_by_data( rval ).
        lr_elem_descr ?= lr_type_descr.
        l_char = l_dec.
        shift l_char left deleting leading space.
        rval = l_char+0(lr_elem_descr->output_length).
      endmethod.                    "i
      method int1.
      Go from {0,...,random=>max} to {low,...,high} with ABAP rounding
        data: l_dec(16)   type p,
              l_char(16)  type c.
        l_dec = ( ( high - low + 1 ) * random=>number( ) ) / random=>max
               + '0.5'.
        subtract 1 from l_dec.
        add low to l_dec.
        data: lr_type_descr  type ref to cl_abap_typedescr,
              lr_elem_descr  type ref to cl_abap_elemdescr.
        lr_type_descr =
                 cl_abap_typedescr=>describe_by_data( rval ).
        lr_elem_descr ?= lr_type_descr.
        l_char = l_dec.
        shift l_char left deleting leading space.
        rval = l_char+0(lr_elem_descr->output_length).
      endmethod.                    "i
      method f.
      Go from {0,...,random=>max} to [low;high]
        rval = ( ( high - low ) * random=>number( ) ) / random=>max
               + low.
      endmethod.                    "f
      method class_constructor.
        charsmax = strlen( chars ) - 1.
        xmax = strlen( x_data ) - 1.
        seed = 1.
      endmethod.                    "class_constructor
    endclass.                    "random IMPLEMENTATION
    SELECTION-SCREEN                                                     *
    selection-screen begin of block gen with frame.
    parameters:
    p_amount type i default 30,
    p_dbinfo as checkbox,
    p_dbshrt as checkbox.
    selection-screen end of block gen.
    parameters:
    p_list type num1 default 3.
    selection-screen begin of block tit with frame title text-tit.
    parameters:
    p_tit01 type lvc_s_layo-grid_title default text-p01. "TITLE
    selection-screen end of block tit.
    selection-screen begin of block lay with frame title text-lay.
    parameters:
    p_lay01 as checkbox. "ZEBRA
    selection-screen skip.
    parameters:
    p_lay02 as checkbox, "NO HORIZONTAL LINES
    p_lay03 as checkbox. "NO VERTICAL LINES
    selection-screen skip.
    parameters:
    p_lay04 as checkbox. "NO SCROLLING
    selection-screen skip.
    parameters:
    p_lay06 type syucomm,                                       "F2CODE
    p_lay07 as checkbox. "CONFIRMATION PROMPT
    selection-screen end of block lay.
    selection-screen begin of block spa with frame title text-spa.
    parameters:
    p_spa01 as checkbox, "BOX
    p_spa02 as checkbox, "COUNT FELD
    p_spa03 as checkbox, "NO COLUMN HEADERS
    p_spa04 as checkbox. "COLUMN OPTIMIZE
    selection-screen begin of block hot with frame title text-hot.
    parameters:
    p_hot01 as checkbox. "NO HOTSPOT
    parameters:
    p_hot02 as checkbox. "Hotspot auf Zeilenebene
    select-options:
    p_hotf02 for g_int_field no intervals default 1.
    parameters:
    p_hot03 as checkbox.
    select-options:
    p_hotf03 for g_field no intervals.
    selection-screen end of block hot.
    selection-screen begin of block mrg with frame title text-mrg.
    parameters:
    p_mrg01 radiobutton group mrge, "Default
    p_mrg02 radiobutton group mrge, "kein Merge
    p_mrg03 radiobutton group mrge. "Merge
    selection-screen end of block mrg.
    selection-screen begin of block out with frame title text-out.
    parameters:
    p_out01 as checkbox.
    select-options:
    p_outf01 for g_field no intervals.
    selection-screen end of block out.
    selection-screen begin of block tec with frame title text-tec.
    parameters:
    p_tec01 as checkbox.
    select-options:
    p_tecf01 for g_field no intervals.
    selection-screen end of block tec.
    selection-screen begin of block fix with frame title text-fix.
    parameters:
    p_fix01 as checkbox.
    select-options:
    p_fixf01 for g_field no intervals.
    selection-screen end of block fix.
    selection-screen begin of block txt with frame title text-txt.
    selection-screen pushbutton /1(50) text-pb2 user-command pb02.
    selection-screen end   of block txt.
    selection-screen begin of block cur with frame title text-cur.
    parameters:
    p_curanz type i,
    p_curspc as checkbox default space.
    selection-screen skip.
    select-options:
    p_curf00 for g_field no intervals.
    parameters:
    p_cur01 radiobutton group cur default 'X',
    p_curf01 type lvc_s_fcat-fieldname.
    parameters:
    p_cur02 radiobutton group cur,
    p_curf02 type g_ty_s_sflight-currency.
    selection-screen end of block cur.
    selection-screen begin of block sort with frame title text-srt.
    selection-screen pushbutton /1(20) text-pb1 user-command pb01.
    selection-screen end   of block sort.
    selection-screen end of block spa.
    selection-screen begin of block key with frame title text-key.
    parameters:
    p_key01 as checkbox, "KEYFELDER ALS HOTSPOT
    p_key02 as checkbox. "NO KEY FIXIERUNG
    selection-screen end of block key.
    selection-screen begin of block exp with frame title text-exp.
    parameters:
    p_excp01 as checkbox, "EXCEPTION
    p_excp_c as checkbox. "EXCEPTION CONDENSE
    selection-screen end of block exp.
    selection-screen begin of block sum with frame title text-sum.
    parameters:
    p_sum01 as checkbox, "SUM BEFORE
    p_sum02 as checkbox, "NUMC
    p_sum03 as checkbox, "NO UNITSPLIT
    p_sum04 as checkbox, "TOTALS ONLY
    p_sum05 as checkbox, "NO SUMCHOICE
    p_sum06 as checkbox, "NO SUMLINE
    p_sum07 type sy-msgli, "TOTALS TEXT
    p_sum08 as checkbox, "NO SUBCHOICE
    p_sum09 as checkbox, "NO SUBTOTALS
    p_sum10 type sy-msgli. "SUBTOTALS TEXT
    selection-screen begin of block dos with frame title text-dos.
    parameters:
    p_dos01 as checkbox.
    select-options:
    p_dosf01 for g_field no intervals.
    selection-screen end of block dos.
    selection-screen begin of block nos with frame title text-nos.
    parameters:
    p_nos01 as checkbox.
    select-options:
    p_nosf01 for g_field no intervals.
    selection-screen end of block nos.
    selection-screen end of block sum.
    selection-screen begin of block col with frame title text-col.
    parameters:
    p_col01 as checkbox.
    select-options:
    p_colf01 for g_int_field no intervals default 1.
    parameters:
    p_col02 as checkbox.
    select-options:
    p_colf02 for g_field no intervals.
    parameters:
    p_col03 as checkbox.
    select-options:
    p_colf03 for g_field no intervals.
    selection-screen end of block col.
    selection-screen begin of block prn with frame title text-prn.
    parameters:
    p_lpr01 as checkbox default 'X'. "GROUP CHANGE EDIT
    selection-screen skip.
    parameters:
    p_lpr02 as checkbox. "GET SELINFO
    selection-screen skip.
    parameters:
    p_lpr03 as checkbox, "NO MIN LINESIZE
    p_lpr04 type sylinsz, "MIN LINESIZE
    p_lpr05 type sylinsz. "MAX LINESIZE
    selection-screen skip.
    parameters:
    p_prn01 as checkbox, "PRINT
    p_prn02 type lvc_s_prnt-reservelns, "RESERVE LINES
    p_prn03 as checkbox, "NO LISTINFO
    p_prn04 as checkbox, "NO SELINFO
    p_prn05 as checkbox, "TITEL
    p_prn06 type lvc_s_prnt-footline, "FOOTLINE
    p_prn07 as checkbox, "PRINT INFO
    p_prn08 as checkbox, "NO COVERPAGE
    p_prn09 as checkbox, "NO NEW PAGE
    p_prn10 as checkbox. "NO CHANGE PRINT PARAMS
    selection-screen end of block prn.
    selection-screen begin of block evt with frame.
    parameters:
    p_evt01 as checkbox, "PF_STATUS_SET
    p_evt02 as checkbox. "USER_COMMAND
    selection-screen skip.
    parameters:
    p_evt03 as checkbox, "CALLER_EXIT
    p_evt04 as checkbox, "LIST_MODIFY
    p_evt05 as checkbox, "BEFORE_LINE_OUTPUT
    p_evt06 as checkbox. "AFTER_LINE_OUTPUT
    selection-screen skip.
    parameters:
    p_evt07 as checkbox, "SUBTOTAL_TEXT
    p_evt08 as checkbox. "REPREP_SEL_MODIFY
    selection-screen skip.
    parameters:
    p_evt09 as checkbox, "TOP_OF_PAGE
    p_evt10 as checkbox, "END_OF_PAGE
    p_evt11 as checkbox, "TOP_OF_LIST
    p_evt12 as checkbox. "END_OF_LIST
    selection-screen skip.
    parameters:
    p_evt13 as checkbox, "TOP_OF_COVERPAGE
    p_evt14 as checkbox. "END_OF_COVERPAGE
    selection-screen skip.
    parameters:
    p_evt15 as checkbox, "FOREIGN_TOP_OF_PAGE
    p_evt16 as checkbox. "FOREIGN_END_OF_PAGE
    selection-screen skip.
    parameters:
    p_evt17 as checkbox. "GROUPLEVEL_CHANGE
    selection-screen end of block evt.
    INITIALIZATION                                                       *
    initialization.
      perform f01_f4_field using 'SUM' space changing p_dosf01-low.
      p_dosf01-option = 'EQ'.
      p_dosf01-sign   = 'I'.
      append p_dosf01.
      perform f01_f4_field using 'SUM' space changing p_nosf01-low.
      p_nosf01-option = 'EQ'.
      p_nosf01-sign   = 'I'.
      append p_nosf01.
      perform f01_f4_field using 'KEY' space changing p_outf01-low.
      p_outf01-option = 'EQ'.
      p_outf01-sign   = 'I'.
      append p_outf01.
      perform f01_f4_field using space space changing p_tecf01-low.
      p_tecf01-option = 'EQ'.
      p_tecf01-sign   = 'I'.
      append p_tecf01.
      perform f01_f4_field using space space changing p_fixf01-low.
      p_fixf01-option = 'EQ'.
      p_fixf01-sign   = 'I'.
      append p_fixf01.
      perform f01_f4_field using 'CURR' space changing p_curf00-low.
      p_curf00-option = 'EQ'.
      p_curf00-sign   = 'I'.
      append p_curf00.
      perform f01_f4_field using 'CUKY' space changing p_curf01.
      perform f01_f4_field using space space changing p_hotf03-low.
      p_hotf03-option = 'EQ'.
      p_hotf03-sign   = 'I'.
      append p_hotf03.
      perform f01_f4_field using space space changing p_colf02-low.
      p_colf02-option = 'EQ'.
      p_colf02-sign   = 'I'.
      append p_colf02.
      perform f01_f4_field using space space changing p_colf03-low.
      p_colf03-option = 'EQ'.
      p_colf03-sign   = 'I'.
      append p_colf03.
    AT SELECTION-SCREEN                                                  *
    at selection-screen.
      case sscrfields-ucomm.
        when 'PB01'.
          call screen 1001 starting at 1 1 ending at 80 20.
        when 'PB02'.
          call screen 1002 starting at 1 1 ending at 80 20.
      endcase.
    AT SELECTION-SCREEN ON VALUE-REQUEST                                 *
    at selection-screen on value-request for p_dosf01-low.
      perform f01_f4_field using 'SUM' 'X' changing p_dosf01-low.
    at selection-screen on value-request for p_nosf01-low.
      perform f01_f4_field using 'SUM' 'X' changing p_nosf01-low.
    at selection-screen on value-request for p_outf01-low.
      perform f01_f4_field using 'KEY' 'X' changing p_outf01-low.
    at selection-screen on value-request for p_tecf01-low.
      perform f01_f4_field using space 'X' changing p_tecf01-low.
    at selection-screen on value-request for p_fixf01-low.
      perform f01_f4_field using space 'X' changing p_fixf01-low.
    at selection-screen on value-request for p_curf00-low.
      perform f01_f4_field using 'CURR' 'X' changing p_curf00-low.
    at selection-screen on value-request for p_curf01.
      perform f01_f4_field using 'CUKY' 'X' changing p_curf01.
    at selection-screen on value-request for p_hotf03-low.
      perform f01_f4_field using space 'X' changing p_hotf03-low.
    at selection-screen on value-request for p_colf02-low.
      perform f01_f4_field using space 'X' changing p_colf02-low.
    at selection-screen on value-request for p_colf03-low.
      perform f01_f4_field using space 'X' changing p_colf03-low.
    at selection-screen on value-request for p_lay06.
      perform f01_f4_fcode using space
                                 space
                        changing p_lay06.
    START-OF-SELECTION                                                   *
    start-of-selection.
      g_repid               = sy-repid.
      gs_test-select_amount = p_amount.
      gs_test-only_db_info  = p_dbinfo.
      gs_test-db_short      = p_dbshrt.
      gs_test-list_amount = p_list.
      gs_test-layo_title               = p_tit01.
      gs_test-layo_zebra               = p_lay01.
      gs_test-layo_no_horiz_lines      = p_lay02.
      gs_test-layo_no_vert_lines       = p_lay03.
      gs_test-layo_no_scrolling        = p_lay04.
      gs_test-layo_f2code              = p_lay06.
      gs_test-layo_confirmation_prompt = p_lay07.
      gs_test-layo_box                 = p_spa01.
      gs_test-layo_count               = p_spa02.
      gs_test-layo_no_colhead          = p_spa03.
      gs_test-layo_column_optimize     = p_spa04.
      gs_test-layo_no_hotspot          = p_hot01.
      if p_hot02 eq con_true.
        loop at p_hotf02.
          if not p_hotf02-low is initial.
            append p_hotf02-low to gs_test-layo_hotspot_rows.
          endif.
        endloop.
      endif.
      if p_hot03 eq con_true.
        loop at p_hotf03.
          if not p_hotf03-low is initial.
            append p_hotf03-low to gs_test-layo_hotspot_columns.
          endif.
        endloop.
      endif.
      case con_true.
        when p_mrg01.
          gs_test-layo_cell_merge          = space.
        when p_mrg02.
          gs_test-layo_cell_merge          = 'N'.
        when p_mrg03.
          gs_test-layo_cell_merge          = 'Y'.
      endcase.
      if p_out01 eq con_true.
        loop at p_outf01.
          if not p_outf01-low is initial.
            append p_outf01-low to gs_test-fcat_no_out_fields.
          endif.
        endloop.
      endif.
      if p_tec01 eq con_true.
        loop at p_tecf01.
          if not p_tecf01-low is initial.
            append p_tecf01-low to gs_test-fcat_tech_fields.
          endif.
        endloop.
      endif.
      if p_fix01 eq con_true.
        loop at p_fixf01.
          if not p_fixf01-low is initial.
            append p_fixf01-low to gs_test-fcat_fix_column_fields.
          endif.
        endloop.
      endif.
      gs_test-curr_amount = p_curanz.
      gs_test-curr_space  = p_curspc.
      if p_cur01 eq con_true or p_cur02 eq con_true.
        data: ls_fcat_curr type g_ty_s_fcat_curr.
        loop at p_curf00.
          clear ls_fcat_curr.
          if not p_curf00-low is initial.
            ls_fcat_curr-fieldname = p_curf00-low.
            case con_true.
              when p_cur01.
                ls_fcat_curr-cfieldname = p_curf01.
              when p_cur02.
                ls_fcat_curr-currency   = p_curf02.
            endcase.
            append ls_fcat_curr to gs_test-fcat_curr_fields.
          endif.
        endloop.
      endif.
      gs_test-layo_keys_hotspot        = p_key01.
      gs_test-layo_no_keyfix           = p_key02.
      gs_test-excp_display             = p_excp01.
      gs_test-excp_condense            = p_excp_c.
      gs_test-sum_before               = p_sum01.
      gs_test-sum_numc                 = p_sum02.
      gs_test-sum_no_unitsplit         = p_sum03.
      gs_test-sum_totals_only          = p_sum04.
      gs_test-sum_no_sumchoice         = p_sum05.
      gs_test-sum_no_sumline           = p_sum06.
      gs_test-sum_totals_text          = p_sum07.
      gs_test-sum_no_subchoice         = p_sum08.
      gs_test-sum_no_subtotals         = p_sum09.
      gs_test-sum_subtotals_text       = p_sum10.
      if p_dos01 eq con_true.
        loop at p_dosf01.
          if not p_dosf01-low is initial.
            append p_dosf01-low to gs_test-fcat_do_sum_fields.
          endif.
        endloop.
      endif.
      if p_nos01 eq con_true.
        loop at p_nosf01.
          if not p_nosf01-low is initial.
            append p_nosf01-low to gs_test-fcat_no_sum_fields.
          endif.
        endloop.
      endif.
      gs_test-layo_group_change_edit   = p_lpr01.
      gs_test-layo_get_selinfo         = p_lpr02.
      gs_test-layo_no_min_linesize     = p_lpr03.
      gs_test-layo_min_linesize        = p_lpr04.
      gs_test-layo_max_linesize        = p_lpr05.
      gs_test-prnt_print                  = p_prn01.
      gs_test-prnt_reserve_lines          = p_prn02.
      gs_test-prnt_no_listinfo            = p_prn03.
      gs_test-prnt_no_selinfo             = p_prn04.
      gs_test-prnt_with_title             = p_prn05.
      gs_test-prnt_footline               = p_prn06.
      gs_test-prnt_printinfo              = p_prn07.
      gs_test-prnt_no_coverpage           = p_prn08.
      gs_test-prnt_no_new_page            = p_prn09.
      gs_test-prnt_no_change_print_params = p_prn10.
      if p_col01 eq con_true.
        loop at p_colf01.
          if not p_colf01-low is initial.
            append p_colf01-low to gs_test-color_rows.
          endif.
        endloop.
      endif.
      if p_col02 eq con_true.
        loop at p_colf02.
          if not p_colf02-low is initial.
            append p_colf02-low to gs_test-color_fields_column.
          endif.
        endloop.
      endif.
      if p_col03 eq con_true.
        loop at p_colf03.
          if not p_colf03-low is initial.
            append p_colf03-low to gs_test-color_fields_cell.
          endif.
        endloop.
      endif.
      if p_evt01 eq con_true.
        append con_event_01 to gs_test-events.
      endif.
      if p_evt02 eq con_true.
        append con_event_02 to gs_test-events.
      endif.
      if p_evt03 eq con_true.
        append con_event_03 to gs_test-events.
      endif.
      if p_evt04 eq con_true.
        append con_event_04 to gs_test-events.
      endif.
      if p_evt05 eq con_true.
        append con_event_05 to gs_test-events.
      endif.
      if p_evt06 eq con_true.
        append con_event_06 to gs_test-events.
      endif.
      if p_evt07 eq con_true.
        append con_event_07 to gs_test-events.
      endif.
      if p_evt08 eq con_true.
        append con_event_08 to gs_test-events.
      endif.
      if p_evt09 eq con_true.
        append con_event_09 to gs_test-events.
      endif.
      if p_evt10 eq con_true.
        append con_event_10 to gs_test-events.
      endif.
      if p_evt11 eq con_true.
        append con_event_11 to gs_test-events.
      endif.
      if p_evt12 eq con_true.
        append con_event_12 to gs_test-events.
      endif.
      if p_evt13 eq con_true.
        append con_event_13 to gs_test-events.
      endif.
      if p_evt14 eq con_true.
        append con_event_14 to gs_test-events.
      endif.
      if p_evt15 eq con_true.
        append con_event_15 to gs_test-events.
      endif.
      if p_evt16 eq con_true.
        append con_event_16 to gs_test-events.
      endif.
      if p_evt17 eq con_true.
        append con_event_17 to gs_test-events.
      endif.
      gs_test-buffer_active            = space.
      gs_test-bypassing_buffer         = space.
    END-OF-SELECTION                                                     *
    end-of-selection.
      perform f01_call_list.
    *&      Form  f01_call_list
          text
    form f01_call_list .
      data: ls_prnt   type slis_print_alv,
            lt_excl   type slis_t_extab,
            l_exit    type char1,
            ls_exit   type slis_exit_by_user,
            l_list    type num1.
      call function 'REUSE_ALV_BLOCK_LIST_INIT'
        exporting
          i_callback_program       = g_repid
          i_callback_pf_status_set = ' '
          i_callback_user_command  = ' '
          it_excluding             = lt_excl.
      do gs_test-list_amount times.
        add 1 to l_list.
        perform f01_append_list using l_list.
      enddo.
      perform f01_set_prnt changing ls_prnt.
      call function 'REUSE_ALV_BLOCK_LIST_DISPLAY'
        exporting
          i_interface_check       = ' '
          is_print                = ls_prnt
          i_screen_start_column   = 0
          i_screen_start_line     = 0
          i_screen_end_column     = 0
          i_screen_end_line       = 0
        importing
          e_exit_caused_by_caller = l_exit
          es_exit_caused_by_user  = ls_exit
        exceptions
          program_error           = 1
          others                  = 2.
      if sy-subrc <> 0.
        message id sy-msgid type sy-msgty number sy-msgno
                with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      endif.
    endform.                    " f01_call_list
    *&      Form  f01_append_list
          text
    form f01_append_list using value(i_list) type num1.
      data: ls_layo   type slis_layout_alv,
            lt_fcat   type slis_t_fieldcat_alv,
            lt_sort   type slis_t_sortinfo_alv,
            lt_evts   type slis_t_event,
            l_tabname type slis_tabname.
      field-symbols: <l_table> type any.
      perform f01_get_outtab using i_list.
      case i_list.
        when 1.
          gt_outtab1 = gt_outtab[].
        when 2.
          gt_outtab2 = gt_outtab[].
        when 3.
          gt_outtab3 = gt_outtab[].
        when 4.
          gt_outtab4 = gt_outtab[].
        when 5.
          gt_outtab5 = gt_outtab[].
        when 6.
          gt_outtab6 = gt_outtab[].
        when 7.
          gt_outtab7 = gt_outtab[].
        when 8.
          gt_outtab8 = gt_outtab[].
        when 9.
          gt_outtab9 = gt_outtab[].
      endcase.
      perform f01_set_layo changing ls_layo.
      perform f01_set_fcat changing lt_fcat.
      perform f01_set_evts changing lt_evts.
      concatenate 'LIST_' i_list into l_tabname.
      case i_list.
        when 1.
          call function 'REUSE_ALV_BLOCK_LIST_APPEND'
            exporting
              is_layout                  = ls_layo
              it_fieldcat                = lt_fcat
              i_tabname                  = l_tabname
              it_events                  = lt_evts
              it_sort                    = lt_sort
              i_text                     = 'Hello'              "#EC NOTEXT
            tables
              t_outtab                   = gt_outtab1
            exceptions
              program_error              = 1
              maximum_of_appends_reached = 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.
        when 2.
          call function 'REUSE_ALV_BLOCK_LIST_APPEND'
            exporting
              is_layout                  = ls_layo
              it_fieldcat                = lt_fcat
              i_tabname                  = l_tabname
              it_events                  = lt_evts
              it_sort                    = lt_sort
              i_text                     = 'Hello'              "#EC NOTEXT
            tables
              t_outtab                   = gt_outtab2
            exceptions
              program_error              = 1
              maximum_of_appends_reached = 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.
        when 3.
          call function 'REUSE_ALV_BLOCK_LIST_APPEND'
            exporting
              is_layout                  = ls_layo
              it_fieldcat                = lt_fcat
              i_tabname                  = l_tabname
              it_events                  = lt_evts
              it_sort                    = lt_sort
              i_text                     = 'Hello'              "#EC NOTEXT
            tables
              t_outtab                   = gt_outtab3
            exceptions
              program_error              = 1
              maximum_of_appends_reached = 2
              others                     = 3.
          if sy-subrc <> 0.
            message id sy-msgid type sy-msgty number sy-msgno
                    with sy-ms

  • Top of page in Block list ALV

    HI,
    I have a Requirement where i have a Block list ALV . I have 4 blocks to be Displayed in the output and the output has to be transfered to the PDF.
    I am able to get the 4 blocks in the output and the Top of Page for the Report in each page.
    But the Problem is when i download the output containing the top of page of output with 4 blocks into a PDF.
    I want the Top of page of Report to be the Top of Page of the PDf also.
    In PDF the Top of page of Report is coming in the center of the PDF also in some other places also.
    How to make sure the Top of page of Report comes in the top of the PDf
    Can you kinldy help me in this.
    Thanks,
    Gokul

    Duplicate post.
    Reported.

  • BLOCK LIST DISPLAY IN ALV

    Moderator message: Please do not use ALL CAPITALS in your message subjects
    I am facing a peculiar situation with respect to a report with 2 block lists.
    STEP 1:
    I first use REUSE_ALV_BLOCK_LIST_INIT with EXPORTING parameter as
    i_callback_program = SY-REPID.
    This works fine with return code of sy-subrc = 0.
    STEP 2:
    I build the field catalog and internal table - in debug I also check the sequence of fields of both the internal tables and field calatogs - perfect - no issues.
    Then I call REUSE_ALV_BLOCK_LIST_APPEND with exporting parameters as layout, field catalog, table name & event and tables parameter as internal table and exception handling, I repeat this call for the two internal tables.
    This works fine with return code of sy-subrc = 0
    STEP 3:
    I use REUSE_ALV_BLOCK_LIST_DISPLAY to display the two lists one after the other, and I have coded for error message if sy-subrc is non zero.
    This works fine with return code of sy-subrc = 0
    ISSUE :
    Internal table 1 and internal table 2 both have say 4 records, then I see the two lists with heading(s) perfec and col width also optimized and zebra (alternate steipes also in place), and 4 rows for each internal table on output, however the rows are BLANK - NO DATA, whereas I have checked both internal tables before the call and they seem to have the data perfectly and in the same sequence as the field catalog - however the rows are BLANK.
    I checked in debugging but was just not able to find out why if the internal tables and field catalog is perfect, no data is passed to output.
    Please help !!
    Edited by: M N on Nov 14, 2008 5:22 AM
    Edited by: Matt on Nov 14, 2008 10:23 AM

    *& Report  Y_ALV_BLOCKLIST_
    REPORT  Y_ALV_BLOCKLIST_16131.
    TYPE-POOLS : SLIS.
    DATA: X_LAYOUT TYPE SLIS_LAYOUT_ALV.
    Events
    DATA: GT_XEVENTS TYPE SLIS_T_EVENT.
    DATA: GT_YEVENTS TYPE SLIS_T_EVENT.
    data : XS_EVENT  TYPE SLIS_ALV_EVENT.
    DATA: XFIELD TYPE SLIS_T_FIELDCAT_ALV.
    DATA: YFIELD TYPE SLIS_T_FIELDCAT_ALV.
    DATA: AFIELD TYPE SLIS_FIELDCAT_ALV.
    DATA: GT_PRINT TYPE SLIS_PRINT_ALV.
    TYPES : BEGIN OF TY_MARA ,
              MATNR TYPE MATNR,
              MTART TYPE MTART,
             END OF TY_MARA.
    TYPES: BEGIN OF TY_MAKT ,
           MATNR TYPE MATNR,
           MAKTX TYPE MAKTX,
          END OF TY_MAKT.
    DATA : ITAB TYPE TABLE OF TY_MARA,
           PTAB TYPE TABLE OF TY_MAKT.
    START-OF-SELECTION.
    SELECT DATA
      SELECT MATNR MAKTX FROM MAKT INTO TABLE PTAB UP TO 10 ROWS.
      SELECT  MATNR MTART FROM MARA INTO TABLE ITAB UP TO 10 ROWS.
    *eVENT FOR Heading
      PERFORM F_EVENTS.
    FIELD CATALOG
      PERFORM F_FIELDCAT.
    INIT BLOCK ALV
      CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_INIT'
        EXPORTING
          I_CALLBACK_PROGRAM = SY-REPID.
    ADD INTERNAL TABLE ITAB
      CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
        EXPORTING
          IS_LAYOUT                  = X_LAYOUT
          IT_FIELDCAT                = XFIELD "ALVFC
          I_TABNAME                  = 'ITAB'
          IT_EVENTS                  = GT_XEVENTS
        TABLES
          T_OUTTAB                   = ITAB
        EXCEPTIONS
          PROGRAM_ERROR              = 1
          MAXIMUM_OF_APPENDS_REACHED = 2
          OTHERS                     = 3.
    ADD INTERNAL TABLE PTAB
    REFRESH ALVFC[].
      CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
        EXPORTING
          IS_LAYOUT                  = X_LAYOUT
          IT_FIELDCAT                = YFIELD "ALVFC
          I_TABNAME                  = 'PTAB'
          IT_EVENTS                  = GT_YEVENTS
        TABLES
          T_OUTTAB                   = PTAB
        EXCEPTIONS
          PROGRAM_ERROR              = 1
          MAXIMUM_OF_APPENDS_REACHED = 2
          OTHERS                     = 3.
    DISPLAY
      CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_DISPLAY'
        EXCEPTIONS
          PROGRAM_ERROR = 1
          OTHERS        = 2.
    *GT_PRINT-RESERVE_LINES = 2.
    CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_DISPLAY'
          EXPORTING
               IS_PRINT = GT_PRINT.
    *&      Form  F_FIELDCAT
          text
    -->  p1        text
    <--  p2        text
    FORM F_FIELDCAT .
      DATA: L_COUNT TYPE I.
      CLEAR AFIELD.
      L_COUNT = L_COUNT + 1.
      AFIELD-COL_POS = L_COUNT.
      AFIELD-FIELDNAME = 'MATNR'.
      AFIELD-REF_TABNAME = 'MARA'.
      AFIELD-KEY = 'X'.                    "define field as key
    AFIELD-DO_SUM = 'X'.
      APPEND AFIELD TO XFIELD.
      CLEAR AFIELD.
      L_COUNT = L_COUNT + 1.
      AFIELD-COL_POS = L_COUNT.
      AFIELD-FIELDNAME = 'MTART'.
      AFIELD-REF_TABNAME = 'MARA'.
      AFIELD-KEY = 'X'.                    "define field as key
      APPEND AFIELD TO XFIELD.
      L_COUNT = 0.
      CLEAR AFIELD.
      L_COUNT = L_COUNT + 1.
      AFIELD-COL_POS = L_COUNT.
      AFIELD-FIELDNAME = 'MATNR'.
      AFIELD-REF_TABNAME = 'MAKT'.
      AFIELD-KEY = 'X'.                    "define field as key
      APPEND AFIELD TO YFIELD.
      CLEAR AFIELD.
      L_COUNT = L_COUNT + 1.
      AFIELD-COL_POS = L_COUNT.
      AFIELD-FIELDNAME = 'MAKTX'.
      AFIELD-REF_TABNAME = 'MAKT'.
      AFIELD-KEY = 'X'.                    "define field as key
      APPEND AFIELD TO YFIELD.
    ENDFORM.                    " F_FIELDCAT
    *&      Form  F_EVENTS
          text
    -->  p1        text
    <--  p2        text
    FORM F_EVENTS .
    CLEAR XS_EVENT.
      XS_EVENT-NAME = SLIS_EV_TOP_OF_PAGE.
      XS_EVENT-FORM = 'TOP1'.
      APPEND XS_EVENT TO GT_XEVENTS.
    CLEAR XS_EVENT.
      XS_EVENT-NAME = SLIS_EV_TOP_OF_PAGE.
      XS_EVENT-FORM = 'TOP2'.
      APPEND XS_EVENT TO GT_YEVENTS.
    ENDFORM.                    " F_EVENTS
    FORM TOP1.
    WRITE : 'MARA TABLE'.
    ENDFORM.
    FORM TOP2.
    WRITE : 'MAKT TABLE'.
    ENDFORM.

  • Does IP block list Providers protect Public Folders

    Hi,
    Just a quick question about IP Block List Providers in exchange 2010.
    We have Spamhaus setup in the list, we just moved one of  our customers over to DNS based mail and they have since been receiving a great deal of spam.
    Does IP block list Providers protect Public Folders
    with when email is enabled on the folder?
    thanks,
    Fulton
    Have a good day.

    Hi, Fultz.
    I am not sure if you are using ForeFront (FF) but if you are, you need to configure FF to add the public folders as a scan target for real-time scanning.
    http://technet.microsoft.com/en-us/library/cc483020.aspx
    Alternately, it seems like a lot of folks use the GFI Mail Essentials for scanning public folders as well.
    If these answers are no good to you, that's cool. I recommend that you this question on the Exchange forum, located here:
    http://social.technet.microsoft.com/Forums/exchange/en-US/home
    Good luck!
    Best wishes, Davin Mickelson

  • Sving layout with ALV block list

    1) I am not able to save layout for alv block. How this can be done?
    2) Can this be saved for all blocks if the fields of all blocks are the same?

    Hi,
    1. not possible with the ALV BLOCK list.
    2. No option avaialble for this in case of Block list.
    for normal list you have variant option.
    Regards
    vijay

  • Events in ALV block list

    Hi,
    Im using ALV block list to display the output. In that one column is highlighted using HOT SPOT. I have to capture that event and display the information as pop-up.
    can anyone tell me how to do this?
    Thanks,
    Amal

    Hi
    Check with the Handling the Hot spot
    hot spot
    ALV GRID HOT Spot
    and the coming value populate to the function module....for the POP-UP.
    Regards!
    Edited by: Prasanth on Feb 26, 2009 8:12 PM

  • IP Block List Communication Problem?

    Hi,
    Im trying to set up IP Block List Providers on a very simple Exchange environment consisting of two servers.
    Server1 = Client Access and Mailbox roles (domain joined)
    Server2 = Edge role (not domain joined) 
    I Setup my Block Lists Providers on Server1 then run the PowerShell command "Get-IPBlockListProvider" which then returns the providers I setup. Now if I change to Server2 and run the same PowerShell command it does not list any
    configuration. My first thought was that the AD LDS instance on the edge was not updated so I ran the command Start-EdgeSynchronization -ForceFullSync -Server Server1 -TargetServer Server2 to force an update on the edge, then Test-EdgeSynchronization –FullCompareMode
    which reports everything as synchronized.
    Why is the configuration not showing on the Edge? Could there be a communication issue or should I be adding the Block List Providers Directly on the Edge without being able to see the configuration from Server1?
    The reason I suspect communication is because when I open the ECP on Server1 (FrontEnd) click Servers and double click the Edge (Server2) I get the following error message “An error occurred while accessing the registry on the server
    "Server2.domain.local". The error that occurred is: "The network path was not found". Ive checked the DNS, im able to ping the DC and the front end (server1) from the edge. Im also able to map the C$ share of the DC and Front End. 
    Appreciate any help on this. 

    Hi,
    Thanks for your reply. It looks like the IP Block lists are working when deployed directly on the edge. However the message from ECP – “An error occurred while accessing the registry on the server "server2.domain.local".
    The error that occurred is: "Attempted to perform an unauthorized operation.” Still remains.
    As described in the first suggestion attempted to use ldp to connect to the edge, it connects but it give me a server error, dont know if it’s supposed to be like that or not.
    ld = ldap_open("server2.domain.local", 50636); Established connection to server2.domain.local. Retrieving base DSA information... Server error: <empty> Error<94>: ldap_parse_result failed: No result present in message
    Server error: <empty> Getting 0 entries: ----------- Server error: <empty>
    Mavis, thanks for your suggestion regarding the 137-139 and 445 ports. I opened these ports in the Windows firewall but again the problem remains. To make sure there is nothing blocking traffic between the front end and the edge, I completely
    disabled the firewalls on the edge and front end, as well as any firewall between them while I tested but still the same error.
    I also tried to do google some more and there are several mentions of the “Remote Registry Service” being disabled. This service was indeed stopped on both the front end and edge, starting the service made no difference. Since the thread
    started I have also updated both servers to CU6 (first the front end then the edge) hoping that there was some fix in the latest updates from Microsoft, but unfortunately no. The strange thing is that now in the ECP console the edge is returning a lower build
    version than the front end, but if I run a PowerShell command directly on the Edge it returns the correct build number. I suppose that the next step would be to run Wireshark or similar to see if the traffic is actually going through.

Maybe you are looking for

  • Constant freezing and beach balls

    I've skimmed other posts and seen that it usualy is a hard drive issue. My question, though, is that most of those posts seem to relate to people having chnaged the computer's original hard drive to something different. My computer's out of the box;

  • Graphic Converter insisting on opening WMV files

    I'm trying to access wmv files, but even after downloading the Windows Media Player and Stuffit, my Graphic Converter keeps trying to open the files, and it CAN'T!! I just keep getting boxes of codes appearing on my screen. Do I need to get rid of Gr

  • New GROUP_ACCT_NUM not loading into GL_ACCOUNT_D

    Hi: Analytics: 7.9.6 Source: EBS 11.5.10 I believe I correctly modified the files file_group_acct_names.csv, file_group_acct_codes_ora.csv, and file_grpact_fstmt.csv to add new GL account groupings. Yet in the W_GL_ACCOUNT_D table all records have a

  • After update to lion my music is loosing

    Hallo, we can ich meine Einkäufe (Musik) wieder herstelllen? Alle in der vergangenheit gekauften Artikel (Musik) sind weg.

  • Need help!!! multi-tracks audio to quicktime via compressor

    I have a timeline in FinalCut Pro with 10 audio tracks. I want to do an uncompressed QuickTime and keep the 10 audio tracks seperated. How do I do that?