Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

PF-STATUS(application tools) done't work when execute the ALV and pop up a new alv can't close

0 Kudos
**Class definition for handling double click
CLASS event_class DEFINITION DEFERRED.
*Internal table and work area declarations for zpp_process_log and zpp_proitem_log
DATA : it_zpp_process_log TYPE TABLE OF zpp_process_log,
       wa_zpp_process_log TYPE zpp_process_log,
       it_zpp_proitem_log TYPE TABLE OF zpp_proitem_log,
       wa_zpp_proitem_log TYPE zpp_proitem_log.
*data declarations for ALV Main list
DATA : ty_lay1 TYPE lvc_s_layo,
       it_fieldcat TYPE lvc_t_fcat ,
       ty_fieldcat TYPE lvc_s_fcat ,
       c_alv1 TYPE REF TO cl_gui_alv_grid,
       c_cont1 TYPE REF TO cl_gui_custom_container,
       event_receiver TYPE REF TO event_class.
*data declarations for ALV Interactive list
DATA : ty_lay2 TYPE lvc_s_layo,
       it_fcat TYPE lvc_t_fcat ,
       ty_fcat TYPE lvc_s_fcat ,
       c_alv2 TYPE REF TO cl_gui_alv_grid,
       c_cont2 TYPE REF TO cl_gui_custom_container.
DATA: ok_code TYPE sy-ucomm.
**Select options for multiple values and NOT ranges
SELECT-OPTIONS : s_aufnr FOR wa_zpp_process_log-aufnr,  "	Process order (range)
                 s_matnr FOR wa_zpp_process_log-matnr,  "	Material no. (range)
                 s_werks FOR wa_zpp_process_log-werks,  "	Plant (range)
                 s_gstrp FOR wa_zpp_process_log-gstrp,  "	Basic start date (range)
                 s_gltrp FOR wa_zpp_process_log-gltrp,  "	Basic end date (range)
                 s_verid FOR wa_zpp_process_log-verid,  "	Production version (range)
                 s_ernam FOR wa_zpp_process_log-ernam,  "	Created by (range)
                 s_aenam FOR wa_zpp_process_log-aenam,  "	Modified by (range)
                 s_vbeln FOR wa_zpp_process_log-zzvbeln,"	MTOL sales order and item (range)
                 s_vbelp FOR wa_zpp_process_log-zzvbelp,
                 s_ebeln FOR wa_zpp_process_log-zzebeln."	MTOL purchase order (range)


* Initialization event
INITIALIZATION.
*Start of selection event
START-OF-SELECTION.
*fetch data into table and field characteristics
  PERFORM fetch_data.
*ALV display for output
  PERFORM alv_output.
*&---------------------------------------------------------------------*
*&      Form  FETCH_DATA
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*  -->  p1        text
*  <--  p2        text
*----------------------------------------------------------------------*
FORM fetch_data .
*Select the table details
  SELECT * FROM zpp_process_log INTO CORRESPONDING FIELDS OF TABLE it_zpp_process_log
   WHERE aufnr IN s_aufnr
     AND matnr IN s_matnr
     AND werks IN s_werks
     AND gstrp IN s_gstrp
     AND gltrp IN s_gltrp
     AND verid IN s_verid
     AND ernam IN s_ernam
     AND aenam IN s_aenam
     AND zzvbeln IN s_vbeln
     AND zzvbelp IN s_vbelp
     AND zzebeln IN s_ebeln .


  SORT  it_zpp_process_log BY aufnr erdat.
ENDFORM.                    " FETCH_DATA
*----------------------------------------------------------------------*
* CLASS lcl_event_receiver DEFINITION
*----------------------------------------------------------------------*
CLASS event_class DEFINITION.
*Handling double click
  PUBLIC SECTION.
    METHODS:
    handle_top_of_page
        FOR EVENT print_top_of_page OF cl_gui_alv_grid,
    handle_double_click
    FOR EVENT double_click OF cl_gui_alv_grid IMPORTING e_row .
ENDCLASS. "lcl_event_receiver DEFINITION
*----------------------------------------------------------------------*
* CLASS lcl_event_receiver IMPLEMENTATION
*----------------------------------------------------------------------*
CLASS event_class IMPLEMENTATION.
  METHOD handle_top_of_page.
    DATA:  g_time(20).
    CONCATENATE  sy-datum+6(2) '.'
                 sy-datum+4(2) '.'
                 sy-datum(4) '/'
                 sy-uzeit(2) '.'
                 sy-uzeit+2(2) '.'
                 sy-uzeit+4(2)
                 INTO g_time.
    WRITE:/1 'Date/time: ' ,g_time.
    WRITE:/1 'Signature: ', sy-uname.
  ENDMETHOD.                           "handle_top_of_page
  METHOD handle_double_click.
    DATA : ls_zpp_process_log LIKE LINE OF it_zpp_process_log.
*Reading the selected data into a variable
    READ TABLE it_zpp_process_log INDEX e_row-index INTO ls_zpp_process_log.
*  *Select the field details of the selected table
    SELECT * FROM zpp_proitem_log INTO CORRESPONDING FIELDS OF TABLE it_zpp_proitem_log
    WHERE aufnr EQ ls_zpp_process_log-aufnr.


    SORT it_zpp_proitem_log BY aufnr rspos erdat.
*calling the ALV containing the field values
    CALL SCREEN 101 STARTING AT 10 5.
  ENDMETHOD.
ENDCLASS. "lcl_event_receiver IMPLEMENTATION
*&---------------------------------------------------------------------*
*& Module pbo_100 OUTPUT
*&---------------------------------------------------------------------*
MODULE pbo_100 OUTPUT.
  set pf-status 'ZSTANDARD'.
*set titlebar 'XXX'.
ENDMODULE. " PBO_100 OUTPUT
*&---------------------------------------------------------------------*
*& Module alv_100 OUTPUT
*&---------------------------------------------------------------------*
MODULE alv_100 OUTPUT.
*Check if there is no custom container in screen 100
  IF c_cont1 IS INITIAL.
*Creating object of container
    CREATE OBJECT c_cont1
      EXPORTING
        container_name = 'CCONT'.
    IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
*Creating object of alv
    CREATE OBJECT c_alv1
      EXPORTING
        i_parent = c_cont1.
    IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
*alv layout
    PERFORM alv_100_layout.
*alv field catalogue
    PERFORM alv_100_fieldcat.
*Displaying the ALV grid
    CALL METHOD c_alv1->set_table_for_first_display
      EXPORTING
        is_layout       = ty_lay1
      CHANGING
        it_outtab       = it_zpp_process_log[]
        it_fieldcatalog = it_fieldcat.
    IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
*Create object of the event class and setting handler for double click
    CREATE OBJECT event_receiver.
    SET HANDLER event_receiver->handle_double_click FOR c_alv1.
*Calling the interactive toolbar method of ALV
    CALL METHOD c_alv1->set_toolbar_interactive.


    CREATE OBJECT event_receiver.
    SET HANDLER event_receiver->handle_top_of_page FOR c_alv1.
  ENDIF.
ENDMODULE. " ALV_100 OUTPUT
*&---------------------------------------------------------------------*
*& Module pai_100 INPUT
*&---------------------------------------------------------------------*
MODULE pai_100 INPUT.
  CASE SY-UCOMM .
    WHEN '&F15' OR '&F12' OR '&F03'.
      IF NOT c_cont1  IS INITIAL.
        CALL METHOD c_cont1->FREE.
      ENDIF.


      LEAVE TO SCREEN 0.
  ENDCASE.
ENDMODULE. " pai_100 INPUT
*----------------------------------------------------------------------*
* MODULE PBO_101 OUTPUT
*----------------------------------------------------------------------*
MODULE pbo_101 OUTPUT.
  SET PF-STATUS 'ZSTANDARD1'.
*  SET TITLEBAR 'XXX'.
ENDMODULE. " PBO_101 INPUT
*----------------------------------------------------------------------*
* MODULE ALV_101 OUTPUT
*----------------------------------------------------------------------*
MODULE alv_101 OUTPUT.
*Check if the Custom container exists.
  IF c_cont2 IS INITIAL.
*Creating container object
    CREATE OBJECT c_cont2
      EXPORTING
        container_name = 'CDCONT'.
    IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
*creating ALV grid for interactive list
    CREATE OBJECT c_alv2
      EXPORTING
        i_parent = c_cont2.
    IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
*ALV layout
    PERFORM alv_101_layout.
*ALV fieldcatalogue
    PERFORM alv_101_fieldcat.
*Sorting the output by field position
    SORT it_zpp_proitem_log BY aufnr.
*ALV for display field details
    CALL METHOD c_alv2->set_table_for_first_display
      EXPORTING
        is_layout       = ty_lay2
      CHANGING
        it_outtab       = it_zpp_proitem_log[]
        it_fieldcatalog = it_fcat.
    IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
*Calling the interactive toolbar method of ALV
    CALL METHOD c_alv2->set_toolbar_interactive.
  ENDIF.
ENDMODULE. " ALV_101 OUTPUT
*&---------------------------------------------------------------------*
*& Module PAI_101 INPUT
*&---------------------------------------------------------------------*
MODULE pai_101 INPUT .
  CALL METHOD cl_gui_cfw=>dispatch.
  CASE ok_code.
    WHEN '&F12'.
      LEAVE SCREEN.
  ENDCASE.
ENDMODULE. " PAI_101 INPUT
*&---------------------------------------------------------------------*
*&      Form  ALV_OUTPUT
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*  -->  p1        text
*  <--  p2        text
*----------------------------------------------------------------------*
FORM alv_output .
  CALL SCREEN 100.
ENDFORM.                    " ALV_OUTPUT
*&---------------------------------------------------------------------*
*&      Form  ALV_100_LAYOUT
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*  -->  p1        text
*  <--  p2        text
*----------------------------------------------------------------------*
FORM alv_100_layout .
  ty_lay1-grid_title = 'Process order'.
  ty_lay1-zebra = 'X'.
  ty_lay1-no_toolbar = 'X'.
ENDFORM.                    " ALV_100_LAYOUT
*&---------------------------------------------------------------------*
*&      Form  ALV_100_FIELDCAT
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*  -->  p1        text
*  <--  p2        text
*----------------------------------------------------------------------*
FORM alv_100_fieldcat .


  CLEAR ty_fieldcat.
  ty_fieldcat-row_pos = 1.
  ty_fieldcat-col_pos = 1.
  ty_fieldcat-fieldname = 'AUFNR'.
  ty_fieldcat-tabname = 'GT_ZPP_PROCESS_LOG'.
  ty_fieldcat-coltext = 'Process Order Number'.
  ty_fieldcat-outputlen = 10.
  APPEND ty_fieldcat TO it_fieldcat.
  CLEAR ty_fieldcat.
  ty_fieldcat-row_pos = 1.
  ty_fieldcat-col_pos = 2.
  ty_fieldcat-fieldname = 'ERDAT'.
  ty_fieldcat-tabname = 'GT_ZPP_PROCESS_LOG'.
  ty_fieldcat-coltext = 'Created on'.
  ty_fieldcat-outputlen = 10.
  APPEND ty_fieldcat TO it_fieldcat.
  CLEAR ty_fieldcat.
  ty_fieldcat-row_pos = 1.
  ty_fieldcat-col_pos = 3.
  ty_fieldcat-fieldname = 'ERFZEIT'.
  ty_fieldcat-tabname = 'GT_ZPP_PROCESS_LOG'.
  ty_fieldcat-coltext = 'Time created'.
  ty_fieldcat-outputlen = 10.
  APPEND ty_fieldcat TO it_fieldcat.
  CLEAR ty_fieldcat.
  ty_fieldcat-row_pos = 1.
  ty_fieldcat-col_pos = 4.
  ty_fieldcat-fieldname = 'ZERNAM'.
  ty_fieldcat-tabname = 'GT_ZPP_PROCESS_LOG'.
  ty_fieldcat-coltext = 'Changed by'.
  ty_fieldcat-outputlen = 10.
  APPEND ty_fieldcat TO it_fieldcat.
  CLEAR ty_fieldcat.
  ty_fieldcat-row_pos = 1.
  ty_fieldcat-col_pos = 5.
  ty_fieldcat-fieldname = 'GAMNG'.
  ty_fieldcat-tabname = 'GT_ZPP_PROCESS_LOG'.
  ty_fieldcat-coltext = 'Total order quantity'.
  ty_fieldcat-outputlen = 10.
  APPEND ty_fieldcat TO it_fieldcat.
  CLEAR ty_fieldcat.
  ty_fieldcat-row_pos = 1.
  ty_fieldcat-col_pos = 6.
  ty_fieldcat-fieldname = 'GMEIN'.
  ty_fieldcat-tabname = 'GT_ZPP_PROCESS_LOG'.
  ty_fieldcat-coltext = 'Unit'.
  ty_fieldcat-outputlen = 6.
  APPEND ty_fieldcat TO it_fieldcat.
  CLEAR ty_fieldcat.
  ty_fieldcat-row_pos = 1.
  ty_fieldcat-col_pos = 7.
  ty_fieldcat-fieldname = 'GLTRP'.
  ty_fieldcat-tabname = 'GT_ZPP_PROCESS_LOG'.
  ty_fieldcat-coltext = 'Basic finish date'.
  ty_fieldcat-outputlen = 10.
  APPEND ty_fieldcat TO it_fieldcat.
  CLEAR ty_fieldcat.
  ty_fieldcat-row_pos = 1.
  ty_fieldcat-col_pos = 8.
  ty_fieldcat-fieldname = 'GSTRP'.
  ty_fieldcat-tabname = 'GT_ZPP_PROCESS_LOG'.
  ty_fieldcat-coltext = 'Basic Start Date'.
  ty_fieldcat-outputlen = 10.
  APPEND ty_fieldcat TO it_fieldcat.
  CLEAR ty_fieldcat.
  ty_fieldcat-row_pos = 1.
  ty_fieldcat-col_pos = 9.
  ty_fieldcat-fieldname = 'PRCTR'.
  ty_fieldcat-tabname = 'GT_ZPP_PROCESS_LOG'.
  ty_fieldcat-coltext = 'Profit Center'.
  ty_fieldcat-outputlen = 10.
  APPEND ty_fieldcat TO it_fieldcat.
  CLEAR ty_fieldcat.
  ty_fieldcat-row_pos = 1.
  ty_fieldcat-col_pos = 10.
  ty_fieldcat-fieldname = 'INSMK'.
  ty_fieldcat-tabname = 'GT_ZPP_PROCESS_LOG'.
  ty_fieldcat-coltext = 'Stock Type'.
  ty_fieldcat-outputlen = 6.
  APPEND ty_fieldcat TO it_fieldcat.
  CLEAR ty_fieldcat.
  ty_fieldcat-row_pos = 1.
  ty_fieldcat-col_pos = 11.
  ty_fieldcat-fieldname = 'WEBAZ'.
  ty_fieldcat-tabname = 'GT_ZPP_PROCESS_LOG'.
  ty_fieldcat-coltext = 'Goods receipt processing time in days'.
  ty_fieldcat-outputlen = 6.
  APPEND ty_fieldcat TO it_fieldcat.
  CLEAR ty_fieldcat.
  ty_fieldcat-row_pos = 1.
  ty_fieldcat-col_pos = 12.
  ty_fieldcat-fieldname = 'UNTTO'.
  ty_fieldcat-tabname = 'GT_ZPP_PROCESS_LOG'.
  ty_fieldcat-coltext = 'Underdelivery Tolerance Limit'.
  ty_fieldcat-outputlen = 6.
  APPEND ty_fieldcat TO it_fieldcat.
  CLEAR ty_fieldcat.
  ty_fieldcat-row_pos = 1.
  ty_fieldcat-col_pos = 13.
  ty_fieldcat-fieldname = 'UEBTO'.
  ty_fieldcat-tabname = 'GT_ZPP_PROCESS_LOG'.
  ty_fieldcat-coltext = 'Overdelivery Tolerance Limit'.
  ty_fieldcat-outputlen = 6.
  APPEND ty_fieldcat TO it_fieldcat.
  CLEAR ty_fieldcat.
  ty_fieldcat-row_pos = 1.
  ty_fieldcat-col_pos = 14.
  ty_fieldcat-fieldname = 'LGORT'.
  ty_fieldcat-tabname = 'GT_ZPP_PROCESS_LOG'.
  ty_fieldcat-coltext = 'Storage Location'.
  ty_fieldcat-outputlen = 10.
  APPEND ty_fieldcat TO it_fieldcat.
  CLEAR ty_fieldcat.
  ty_fieldcat-row_pos = 1.
  ty_fieldcat-col_pos = 15.
  ty_fieldcat-fieldname = 'VERID'.
  ty_fieldcat-tabname = 'GT_ZPP_PROCESS_LOG'.
  ty_fieldcat-coltext = 'Production Version'.
  ty_fieldcat-outputlen = 6.
  APPEND ty_fieldcat TO it_fieldcat.
  CLEAR ty_fieldcat.
  ty_fieldcat-row_pos = 1.
  ty_fieldcat-col_pos = 16.
  ty_fieldcat-fieldname = 'AUFLD'.
  ty_fieldcat-tabname = 'GT_ZPP_PROCESS_LOG'.
  ty_fieldcat-coltext = 'Date of BOM Explosion/Routing Transfer'.
  ty_fieldcat-outputlen = 10.
  APPEND ty_fieldcat TO it_fieldcat.
  CLEAR ty_fieldcat.
  ty_fieldcat-row_pos = 1.
  ty_fieldcat-col_pos = 17.
  ty_fieldcat-fieldname = 'PLNNR'.
  ty_fieldcat-tabname = 'GT_ZPP_PROCESS_LOG'.
  ty_fieldcat-coltext = 'Key for Task List Group'.
  ty_fieldcat-outputlen = 10.
  APPEND ty_fieldcat TO it_fieldcat.
  CLEAR ty_fieldcat.
  ty_fieldcat-row_pos = 1.
  ty_fieldcat-col_pos = 18.
  ty_fieldcat-fieldname = 'PLNAL'.
  ty_fieldcat-tabname = 'GT_ZPP_PROCESS_LOG'.
  ty_fieldcat-coltext = 'Group Counter'.
  ty_fieldcat-outputlen = 6.
  APPEND ty_fieldcat TO it_fieldcat.
  CLEAR ty_fieldcat.
  ty_fieldcat-row_pos = 1.
  ty_fieldcat-col_pos = 19.
  ty_fieldcat-fieldname = 'ZZVBELN'.
  ty_fieldcat-tabname = 'GT_ZPP_PROCESS_LOG'.
  ty_fieldcat-coltext = 'Sales Document'.
  ty_fieldcat-outputlen = 12.
  APPEND ty_fieldcat TO it_fieldcat.
  CLEAR ty_fieldcat.
  ty_fieldcat-row_pos = 1.
  ty_fieldcat-col_pos = 20.
  ty_fieldcat-fieldname = 'ZZVBELP'.
  ty_fieldcat-tabname = 'GT_ZPP_PROCESS_LOG'.
  ty_fieldcat-coltext = 'Sales Document Item'.
  ty_fieldcat-outputlen = 6.
  APPEND ty_fieldcat TO it_fieldcat.
  CLEAR ty_fieldcat.
  ty_fieldcat-row_pos = 1.
  ty_fieldcat-col_pos = 21.
  ty_fieldcat-fieldname = 'ZZNOQTY'.
  ty_fieldcat-tabname = 'GT_ZPP_PROCESS_LOG'.
  ty_fieldcat-coltext = 'No quantity updated'.
  ty_fieldcat-outputlen = 6.
  APPEND ty_fieldcat TO it_fieldcat.
  CLEAR ty_fieldcat.
  ty_fieldcat-row_pos = 1.
  ty_fieldcat-col_pos = 22.
  ty_fieldcat-fieldname = 'ZZEBELN'.
  ty_fieldcat-tabname = 'GT_ZPP_PROCESS_LOG'.
  ty_fieldcat-coltext = 'Purchasing Document Number'.
  ty_fieldcat-outputlen = 10.
  APPEND ty_fieldcat TO it_fieldcat.
  CLEAR ty_fieldcat.
  ty_fieldcat-row_pos = 1.
  ty_fieldcat-col_pos = 23.
  ty_fieldcat-fieldname = 'ZZEBELP'.
  ty_fieldcat-tabname = 'GT_ZPP_PROCESS_LOG'.
  ty_fieldcat-coltext = 'Item Number of Purchasing Document'.
  ty_fieldcat-outputlen = 6.
  APPEND ty_fieldcat TO it_fieldcat.
  CLEAR ty_fieldcat.
  ty_fieldcat-row_pos = 1.
  ty_fieldcat-col_pos = 24.
  ty_fieldcat-fieldname = 'ZZPLT'.
  ty_fieldcat-tabname = 'GT_ZPP_PROCESS_LOG'.
  ty_fieldcat-coltext = 'Internal Order Comments'.
*  ty_fieldcat-outputlen = 6.
  APPEND ty_fieldcat TO it_fieldcat.
  CLEAR ty_fieldcat.
  ty_fieldcat-row_pos = 1.
  ty_fieldcat-col_pos = 25.
  ty_fieldcat-fieldname = 'ZZPLM'.
  ty_fieldcat-tabname = 'GT_ZPP_PROCESS_LOG'.
  ty_fieldcat-coltext = 'Comment to MES'.
*  ty_fieldcat-outputlen = 6.
  APPEND ty_fieldcat TO it_fieldcat.
  CLEAR ty_fieldcat.
  ty_fieldcat-row_pos = 1.
  ty_fieldcat-col_pos = 26.
  ty_fieldcat-fieldname = 'ZZPLEXRE'.
  ty_fieldcat-tabname = 'GT_ZPP_PROCESS_LOG'.
  ty_fieldcat-coltext = 'Planned external reference'.
  ty_fieldcat-outputlen = 15.
  APPEND ty_fieldcat TO it_fieldcat.
  CLEAR ty_fieldcat.
  ty_fieldcat-row_pos = 1.
  ty_fieldcat-col_pos = 27.
  ty_fieldcat-fieldname = 'TCODE'.
  ty_fieldcat-tabname = 'GT_ZPP_PROCESS_LOG'.
  ty_fieldcat-coltext = 'Transction code'.
  ty_fieldcat-outputlen = 6.
  APPEND ty_fieldcat TO it_fieldcat.
  CLEAR ty_fieldcat.
  ty_fieldcat-row_pos = 1.
  ty_fieldcat-col_pos = 28.
  ty_fieldcat-fieldname = 'STTXT'.
  ty_fieldcat-tabname = 'GT_ZPP_PROCESS_LOG'.
  ty_fieldcat-coltext = 'Status'.
  ty_fieldcat-outputlen = 6.
  APPEND ty_fieldcat TO it_fieldcat.
  CLEAR ty_fieldcat.
  ty_fieldcat-row_pos = 1.
  ty_fieldcat-col_pos = 29.
  ty_fieldcat-fieldname = 'MATNR'.
  ty_fieldcat-tabname = 'GT_ZPP_PROCESS_LOG'.
  ty_fieldcat-coltext = 'Material Number for Order'.
  ty_fieldcat-outputlen = 10.
  APPEND ty_fieldcat TO it_fieldcat.
  CLEAR ty_fieldcat.
  ty_fieldcat-row_pos = 1.
  ty_fieldcat-col_pos = 30.
  ty_fieldcat-fieldname = 'WERKS'.
  ty_fieldcat-tabname = 'GT_ZPP_PROCESS_LOG'.
  ty_fieldcat-coltext = 'Plant'.
  ty_fieldcat-outputlen = 6.
  APPEND ty_fieldcat TO it_fieldcat.
  CLEAR ty_fieldcat.
  ty_fieldcat-row_pos = 1.
  ty_fieldcat-col_pos = 31.
  ty_fieldcat-fieldname = 'ERNAM'.
  ty_fieldcat-tabname = 'GT_ZPP_PROCESS_LOG'.
  ty_fieldcat-coltext = 'Created on'.
  ty_fieldcat-outputlen = 6.
  APPEND ty_fieldcat TO it_fieldcat.
  CLEAR ty_fieldcat.
  ty_fieldcat-row_pos = 1.
  ty_fieldcat-col_pos = 32.
  ty_fieldcat-fieldname = 'AENAM'.
  ty_fieldcat-tabname = 'GT_ZPP_PROCESS_LOG'.
  ty_fieldcat-coltext = 'Last changed by'.
  ty_fieldcat-outputlen = 6.
  APPEND ty_fieldcat TO it_fieldcat.
  CLEAR ty_fieldcat.
ENDFORM.                    " ALV_100_FIELDCAT
*&---------------------------------------------------------------------*
*&      Form  ALV_101_LAYOUT
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*  -->  p1        text
*  <--  p2        text
*----------------------------------------------------------------------*
FORM alv_101_layout .
  ty_lay2-grid_title = 'Process item'.
  ty_lay2-zebra = 'X'.
  ty_lay2-no_toolbar = 'X'.
ENDFORM.                    " ALV_101_LAYOUT
*&---------------------------------------------------------------------*
*&      Form  ALV_101_FIELDCAT
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*  -->  p1        text
*  <--  p2        text
*----------------------------------------------------------------------*
FORM alv_101_fieldcat .
  REFRESH it_fieldcat.
  REFRESH it_fcat.
  CLEAR ty_fcat.
  ty_fcat-row_pos = 1.
  ty_fcat-col_pos = 1.
  ty_fcat-fieldname = 'AUFNR'.
  ty_fcat-tabname = 'GT_ZPP_PROITEM_LOG'.
  ty_fcat-coltext = 'Order Number'.
  ty_fcat-outputlen = 10.
  APPEND ty_fcat TO it_fcat.
  ty_fcat-row_pos = 1.
  ty_fcat-col_pos = 2.
  ty_fcat-fieldname = 'RSPOS'.
  ty_fcat-tabname = 'GT_ZPP_PROITEM_LOG'.
  ty_fcat-coltext = 'Item Number of Reservation'.
  ty_fcat-outputlen = 6.
  APPEND ty_fcat TO it_fcat.
  ty_fcat-row_pos = 1.
  ty_fcat-col_pos = 3.
  ty_fcat-fieldname = 'ERDAT'.
  ty_fcat-tabname = 'AUFNR'.
  ty_fcat-coltext = 'Created on'.
  ty_fcat-outputlen = 10.
  APPEND ty_fcat TO it_fcat.
   ty_fcat-row_pos = 1.
  ty_fcat-col_pos = 4.
  ty_fcat-fieldname = 'ERFZEIT'.
  ty_fcat-tabname = 'AUFNR'.
  ty_fcat-coltext = 'Time created'.
  ty_fcat-outputlen = 10.
  APPEND ty_fcat TO it_fcat.
   ty_fcat-row_pos = 1.
  ty_fcat-col_pos = 5.
  ty_fcat-fieldname = 'ZERNAM'.
  ty_fcat-tabname = 'AUFNR'.
  ty_fcat-coltext = 'Entered by'.
  ty_fcat-outputlen = 10.
  APPEND ty_fcat TO it_fcat.
   ty_fcat-row_pos = 1.
  ty_fcat-col_pos = 6.
  ty_fcat-fieldname = 'XLOEK'.
  ty_fcat-tabname = 'AUFNR'.
  ty_fcat-coltext = 'Item is Deleted'.
  ty_fcat-outputlen = 10.
  APPEND ty_fcat TO it_fcat.
   ty_fcat-row_pos = 1.
  ty_fcat-col_pos = 7.
  ty_fcat-fieldname = 'MATNR'.
  ty_fcat-tabname = 'AUFNR'.
  ty_fcat-coltext = 'Material Number'.
  ty_fcat-outputlen = 10.
  APPEND ty_fcat TO it_fcat.
   ty_fcat-row_pos = 1.
  ty_fcat-col_pos = 8.
  ty_fcat-fieldname = 'WERKS'.
  ty_fcat-tabname = 'AUFNR'.
  ty_fcat-coltext = 'Plant'.
  ty_fcat-outputlen = 6.
  APPEND ty_fcat TO it_fcat.
   ty_fcat-row_pos = 1.
  ty_fcat-col_pos = 9.
  ty_fcat-fieldname = 'LGORT'.
  ty_fcat-tabname = 'AUFNR'.
  ty_fcat-coltext = 'Storage Location'.
  ty_fcat-outputlen = 8.
  APPEND ty_fcat TO it_fcat.
   ty_fcat-row_pos = 1.
  ty_fcat-col_pos = 10.
  ty_fcat-fieldname = 'BDMNG'.
  ty_fcat-tabname = 'AUFNR'.
  ty_fcat-coltext = 'Requirement Quantity'.
  ty_fcat-outputlen = 10.
  APPEND ty_fcat TO it_fcat.
   ty_fcat-row_pos = 1.
  ty_fcat-col_pos = 11.
  ty_fcat-fieldname = 'MEINS'.
  ty_fcat-tabname = 'AUFNR'.
  ty_fcat-coltext = 'Unit'.
  ty_fcat-outputlen = 4.
  APPEND ty_fcat TO it_fcat.
   ty_fcat-row_pos = 1.
  ty_fcat-col_pos = 12.
  ty_fcat-fieldname = 'TCODE'.
  ty_fcat-tabname = 'AUFNR'.
  ty_fcat-coltext = 'Transction code'.
  ty_fcat-outputlen = 5.
  APPEND ty_fcat TO it_fcat.
   ty_fcat-row_pos = 1.
  ty_fcat-col_pos = 13.
  ty_fcat-fieldname = 'STTXT'.
  ty_fcat-tabname = 'AUFNR'.
  ty_fcat-coltext = 'Status'.
  ty_fcat-outputlen = 6.
  APPEND ty_fcat TO it_fcat.
ENDFORM.                    " ALV_101_FIELDCAT
0 REPLIES 0