Application Development 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: 

regarding grey out fields in module pool program

0 Kudos

hi team,

there are two tables ekko and ekpo .and there are two push button 1)exit 2)refresh when user click on refresh button

every fields should be grey out fields.1)using ekko in structure table 2)table control in ekpo.

would u please give me a solution for this one

8 REPLIES 8

FredericGirod
Active Contributor

Did you search for LOOP AT SCREEN inactive field dynpro ... ?

0 Kudos

sir i have done loop at screen but don't how define the fields in the loop at screen sir.please resolve solution

venkateswaran_k
Active Contributor
0 Kudos

Hi

Please

1. paste your sreenshot of fields - which you want to gray out

2. Send the code of PBO

3. Send the Fieldnames you defined in screens ( for which you want to grayout)

We shall help you further

anujawani2426
Active Participant
0 Kudos

Hi Alazhu,

You can gray out field using screen-input = 0. whatever field name you want to gray out write the name in screen-name.

I have shared sample code.

case sy-ucomm.
when 'REFRESH'.
LOOP AT SCREEN.
if screen-name = 'EKKO-EBELN' or screen-name = 'EKKO-BUKRS'.
screen-input = 0.
MODIFY SCREEN.
endif.
ENDLOOP.
endcase.

0 Kudos

MAM,

I HAVE DO FOR THE ITEM TABLE ALSO IN TABLE CONTROL TWO INPUT FIELDS SUCH AS KWMNG AND NETPR FIELDS SHOULD COMES AS GREY OUT WHILE CLICK ON REFRESH BUTTON,CAN U SUGGEST THE SOLUTION.

IT IS WORKING FOR HEADER TABLE MAM,AND I NEED FOR ITEM TABLE ALSO.

Sandra_Rossi
Active Contributor
0 Kudos

LOOP AT SCREEN won't work if you don't place it in the PBO of the exact same screen where the fields are located.

To know the screen field name, position your cursor in the field, press F1 and display "technical info". If it doesn't work, just debug > click "replace tool" of any tool > choose tool "screen Analysis", you'll see the exact structure of the displayed screens, including the contents of the "screen" system table of any part of the screen.

anujawani2426
Active Participant
0 Kudos

Hi Alazhu,

Same needs to be done for item table. I just tried sample one. I gray out 1st field of table control using below code.

Please write code in PBO. You just need to change the table name here and their corresponding field name.

loop AT SCREEN.
if screen-name = 'EKPO-EBELN'.
screen-input = 0.
MODIFY SCREEN.
endif.
ENDLOOP.

raymond_giuseppi
Active Contributor
0 Kudos

Create a variable to keep the fact that refresh pushbutton was clicked (Set it in PAI when this pushbutton is pressed, Clear it when exit oushbutton is pressed, or within a previous dynpro logic, initialization event, etc.)

In the PBO use this field in two LOOP AT SCREEN statements do deactivate input on required fields, one in a module of the main screen logic (header fields), one in a module executed within the LOOP, WITH CONTROL related to the table control (item fields)