Application Development and Automation 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: 
Read only

selction-screen

naveen_inuganti2
Active Contributor
0 Likes
410

hi all..

iam having date field in the selction screen.... so if i click f4 i can get calander and i can enter specific date...

now my requirement is to i hav ti enter month end year only....

so if i click any date in the seach help calender.... the input field of the selection screen has to avoid date and need to capture month and year....

plz replay with code...

Thank you,

Naveen.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
391

Here's an example. Note that update occurs when the user hits Enter


PARAMETERS:
  mydate  TYPE datum OBLIGATORY.
PARAMETERS:
  mymm(2) TYPE c MODIF ID xxx,
  myyy(4) TYPE c MODIF ID xxx.

AT SELECTION-SCREEN OUTPUT.

  mymm = mydate+4(2).
  myyy = mydate+0(4).

  LOOP AT SCREEN.
    CASE screen-group1.
      WHEN 'XXX'.
        screen-input = 0.
        MODIFY SCREEN.
    ENDCASE.
  ENDLOOP.

START-OF-SELECTION.

  mymm = mydate+4(2).
  myyy = mydate+0(4).

2 REPLIES 2
Read only

Former Member
0 Likes
391

Naveen,

With the field defined as a DATE field (which allows the calendar dropdown) you wouldn't be able to show the MM and YYYY in that field, but add 2 PARAMETER fields one for MM and one for YYYY but do not allow input to these fields. Upon the changing of your DATE field, extrapulate the MM and YYYY from it ( date0(4) = YYYY and date4(2) = MM) and put these values in the parameter fields.

Read only

Former Member
0 Likes
392

Here's an example. Note that update occurs when the user hits Enter


PARAMETERS:
  mydate  TYPE datum OBLIGATORY.
PARAMETERS:
  mymm(2) TYPE c MODIF ID xxx,
  myyy(4) TYPE c MODIF ID xxx.

AT SELECTION-SCREEN OUTPUT.

  mymm = mydate+4(2).
  myyy = mydate+0(4).

  LOOP AT SCREEN.
    CASE screen-group1.
      WHEN 'XXX'.
        screen-input = 0.
        MODIFY SCREEN.
    ENDCASE.
  ENDLOOP.

START-OF-SELECTION.

  mymm = mydate+4(2).
  myyy = mydate+0(4).