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

Problem in Selection Screen

Former Member
0 Likes
792

Hi everyone,

I want to dispaly a variable in my selection screen.

If i use comment stmt its showing some error.

SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.

PARAMETERS: PDATE LIKE PA0000-BEGDA DEFAULT SY-DATUM

SELECTION-SCREEN END OF BLOCK B1 .

MOVE PDATE(4) TO WK_YR1.

SELECTION-SCREEN SKIP 2.

After this stmt i want to display WK_YR1.

Plz solve this problem, its vry urgent.

thanks in advance.

regards

stanley

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
755

Hi Stanley

Please check if this is what you are looking for:

SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
  PARAMETERS: PDATE LIKE PA0000-BEGDA DEFAULT SY-DATUM.
SELECTION-SCREEN END OF BLOCK B1 .

SELECTION-SCREEN SKIP 2.

SELECTION-SCREEN BEGIN OF LINE.
  SELECTION-SCREEN COMMENT (4) WK_YR1.
SELECTION-SCREEN END OF LINE.

AT SELECTION-SCREEN OUTPUT.
  MOVE PDATE(4) TO WK_YR1.

Regards

Eswar

9 REPLIES 9
Read only

Former Member
0 Likes
755

Hi Stanley ,

Why this statement MOVE PDATE(4) TO WK_YR1. in the selection screen.

The reason why you can be getting an error when you use the comnment statement is that the screen space for two elemnt must be overlapping , so just change the coordinates of the screen.

If you want to assign a value to WK_YR1 , you can use the event AT SELECTION-SCREEN or you can use the fm 'DYNP_VALUES_READ'TO read the value of pdate and the use the fm DYNP_VALUES_UPDATE to assign value to WK_YR1

Regards

Arun

Message was edited by:

Arun R

Read only

Former Member
0 Likes
755

Try like this

SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.

PARAMETERS: PDATE LIKE PA0000-BEGDA DEFAULT SY-DATUM

SELECTION-SCREEN END OF BLOCK B1 .

SELECTION-SCREEN skip 2.

SELECTION-SCREEN COMMENT /1(80) TEXT-002 .

Read only

Former Member
0 Likes
755

Declare like this -

SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.

PARAMETERS: PDATE LIKE PA0000-BEGDA DEFAULT SY-DATUM.

SELECTION-SCREEN END OF BLOCK B1 .

SELECTION-SCREEN SKIP 2.

parameters: WK_YR1(4).

initialization.

MOVE PDATE(4) TO WK_YR1.

Read only

Former Member
0 Likes
755

sorry can not get your exact requirement but

you can do like this.

selection-screen begin of line.

selection-screen comment WK_YR1 [for p_date1].

selection-screen end of line.

regards

shiba dutta

Read only

Former Member
0 Likes
755

sorry can not get your exact requirement but

you can do like this.

selection-screen begin of line.

selection-screen comment /1(10) WK_YR1 [for p_date1].

selection-screen end of line.

regards

shiba dutta

Read only

Former Member
0 Likes
755
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
PARAMETERS: PDATE LIKE PA0000-BEGDA DEFAULT SY-DATUM 
parameters :WK_YR1(4).
SELECTION-SCREEN END OF BLOCK B1 .
SELECTION-SCREEN SKIP 2.


INITIALIZATION.
loop at screen.
  if screen-name = 'WK_YR1'.
     screen-input = 0
     modify screen.
  endif.
endloop.
MOVE PDATE(4) TO WK_YR1.
Read only

Former Member
0 Likes
756

Hi Stanley

Please check if this is what you are looking for:

SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
  PARAMETERS: PDATE LIKE PA0000-BEGDA DEFAULT SY-DATUM.
SELECTION-SCREEN END OF BLOCK B1 .

SELECTION-SCREEN SKIP 2.

SELECTION-SCREEN BEGIN OF LINE.
  SELECTION-SCREEN COMMENT (4) WK_YR1.
SELECTION-SCREEN END OF LINE.

AT SELECTION-SCREEN OUTPUT.
  MOVE PDATE(4) TO WK_YR1.

Regards

Eswar

Read only

0 Likes
755

hi Eswar,

Thanks for solving the problem.

regards,

Stanley

Read only

0 Likes
755

Glad could help you Stanley.

Regards

Eswar