‎2022 Jun 16 6:36 AM
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
‎2022 Jun 16 6:40 AM
Did you search for LOOP AT SCREEN inactive field dynpro ... ?
‎2022 Jun 16 6:56 AM
sir i have done loop at screen but don't how define the fields in the loop at screen sir.please resolve solution
‎2022 Jun 16 6:59 AM
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
‎2022 Jun 16 7:19 AM
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.
‎2022 Jun 16 8:47 AM
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.
‎2022 Jun 16 8:05 AM
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.
‎2022 Jun 16 9:47 AM
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.

‎2022 Jun 16 11:09 AM
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)