Nt1310 Unit 2 Text Analysis

Words: 718
Pages: 3

*&---------------------------------------------------------------------*
*& Form SUB_DISPLAY_SECONDALV
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* -->P_I_FIELDCATALOG2 text
* -->P_I_ORDERS2 text
*----------------------------------------------------------------------*
FORM sub_display_secondalv USING fp_i_fieldcatalog2 TYPE lvc_t_fcat fp_i_orders2 TYPE ty_t_orders2.

* Local data declaration DATA: li_layout TYPE lvc_s_layo, lx_print TYPE lvc_s_prnt.

* Layout for ALV PERFORM sub_prepare_layout USING c_x text-012
…show more content…
"To ensure that object is created only once

CREATE OBJECT g_custom_container2 EXPORTING container_name = 'G_CONTAINER2'.

* Create an instance of ALV control CREATE OBJECT g_grid2 EXPORTING i_parent = g_custom_container2.

CALL METHOD g_grid2->set_table_for_first_display EXPORTING it_toolbar_excluding = i_exclude is_layout = li_layout is_print = lx_print CHANGING it_outtab = fp_i_orders2 it_fieldcatalog = fp_i_fieldcatalog2 EXCEPTIONS invalid_parameter_combination = 1 program_error = 2 too_many_lines = 3 OTHERS = 4. IF sy-subrc <> 0. MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4. ENDIF. ENDIF.

ENDFORM. “SUB_DISPLAY_SECONDALV

Subroutine to Display Third ALV

*&---------------------------------------------------------------------*
*& Form SUB_DISPLAY_THIRDALV
…show more content…
ENDIF. ENDIF.
ENDFORM. “SUB_DISPLAY_THIRDALV

Subroutine for ALV layout
*&---------------------------------------------------------------------*
*& Form SUB_PREPARE_LAYOUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* <--P_LI_LAYOUT text
*----------------------------------------------------------------------*
FORM sub_prepare_layout USING fp_c_x TYPE xfeld fp_title TYPE lvc_title fp_smalltitle TYPE xfeld fp_stylename TYPE lvc_fname CHANGING fp_li_layout TYPE lvc_s_layo.

fp_li_layout-zebra = fp_c_x. fp_li_layout-grid_title = fp_title. fp_li_layout-smalltitle = fp_smalltitle. fp_li_layout-stylefname = fp_stylename.

ENDFORM. “SUB_PREPARE_LAYOUT

Subroutine for Report header, which will be created dynamically based on the fields selected by the User for a User selected report layout.