Month Input with Value Help

Select-option for month input can be created using dictionary field S012-SPMON and the code to display a pretty value help is in sap standard include RMCS0F0M.
Here is a sample code.

REPORT  zpwtest8.

INCLUDE rmcs0f0m .

TABLES  s012.

*--------------------------------------------------------------------*
* Selection screen
*--------------------------------------------------------------------*
SELECT-OPTIONS s_months FOR s012-spmon.

*--------------------------------------------------------------------*
* At selection screen on value request
*--------------------------------------------------------------------*
AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_months-low.
  PERFORM monat_f4.

*--------------------------------------------------------------------*
* At selection screen on value request
*--------------------------------------------------------------------*
AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_months-high.
  PERFORM monat_f4.

This is how value help looks.

value help report month sap

Leave a Reply