Skip to Content
-1
Jan 22, 2021 at 02:17 AM

How to transfer the value of field on selection screen to ALV?

53 Views

SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN: COMMENT 1(33) TEXT-S01(ANALYZE PERIOD)
PARAMETERS:P_YEAR_L TYPE ZYEAR_MONTH. 
SELECTION-SCREEN: COMMENT 54(5) TEXT-02(to).
PARAMETERS: P_YEAR_H TYPE ZYEAR_MONTH.
SELECTION-SCREEN END OF LINE. 

IF P_YEAR_L IS NOT INITIAL. 
  AND P_YEAR_H IS NOT INITIAL.
  LDS_ALV-ZYEAR_MONTH_LOW = P_YEAR_L. 
  LDS_ALV-ZYEAR_MONTH_HIGH = P_YEAR_H. 
 APPEND LDS_ALV TO LDT_ALV. 
ENDIF.

This is the coding.
But by this way,the field could not be showed on ALV. 
How to solve it?
Thanks a lot!