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

Use write statement within a Selection screen output

Former Member
0 Likes
2,571

Hello ABAP Experts:

I have a problem and do not know how to work on in.

I have a Z Report with a checkbox. I want to disable the textfields inside a block (screen-input = '0')  when the checkbox is not set.

I used for this purpose AT SELECTION-SCREEN OUTPUT, and everything works like I want.

But additionally, in this Z Report later on, I want to display some values and some numbers, and using the WRITE statement it does not work (together with selection screen output) and no value and no output was displayed.

Does anyone of you guys know how to use write and selection screen output together (if possible at all), or just know another alternative which I can use to do what I want?

(Using MESSAGE is just not possible, if I want to display f.e. 20 differents numbers at the end of the execution).

Thanks a lot in advance!

Jorge.

1 ACCEPTED SOLUTION
Read only

oliver_wurm
Active Participant
0 Likes
1,211

Hi Jorge,

WRITE will not work in AT SELECTION-SCREEN OUTPUT. But you can define some Parameters to Display the values you Need. Under AT SELECTION-SCREEN OUTPUT you can make sure that they are read-only.

Regards

Oliver

4 REPLIES 4
Read only

oliver_wurm
Active Participant
0 Likes
1,212

Hi Jorge,

WRITE will not work in AT SELECTION-SCREEN OUTPUT. But you can define some Parameters to Display the values you Need. Under AT SELECTION-SCREEN OUTPUT you can make sure that they are read-only.

Regards

Oliver

Read only

former_member183073
Active Participant
0 Likes
1,211

Understood that you have a selection screen for Input. may i know what you have as output(List or ALV etc..)

Read only

VenkatRamesh_V
Active Contributor
0 Likes
1,211

Hi,

Try,

SELECTION-SCREEN BEGIN OF  BLOCK b2 with frame TITLE text-002.

SELECTION-SCREEN COMMENT /1(50) text-001.  " Note:

SELECTION-SCREEN COMMENT /1(79) text-003.  "First line will be considered as heading,template "should contains sel. fields

PARAMETERS:

               matnr type c as checkbox DEFAULT 'X',

               werks type c as checkbox DEFAULT 'X'.

SELECTION-SCREEN END   OF  BLOCK b2.

Hope it helpful,

Regards,

Venkat.

Read only

Former Member
0 Likes
1,211

Thank you very much guys,

I could solve it just storing the values I wanted in internal tables, did what I want for the checkbox and disable of input textfields with the selection screen output, and later on in order to print the data I triggered a start-of-selection before.

Everything works like expected.

Regards and thanks a lot again, Jorge.