i am working on the dialog programing and i have a button with FCode 'DET' which is pressed after selecting some rows.
The problem is when i minimize the GUI window and maximize i keep on executing this FCOE 'DET" and check for selected rows and gives message which i had post. i am clearing the sy-ucomm afer my code but why i am getting the sy-ucomm as DET when minimize /maximize GUI window. how to avoid that.
Please help me.
Usually this happens in Dialog Program, for that you have to assign a name to the OK_CODE(Assign as OK_CODE) in the element list(the last entry) in your screen painter.
Then declare a variable with same name(OK_CODE) in your program. Also create a additional variable to hold the same.
In you Top include or program declare as;
Data : OK_CODE TYPE SY-UCOMM, SAV_OK_CODE TYPE SY_UCOMM.
Now on PAI the function code will be transfered to your program variable OK_CODE, use it as below in the PAI.
Module PAI. Clear SAV_OK_CODE. SAV_OK_CODE = OK_CODE. Clear OK_CODE. CASE SAV_OK_CODE. WHEN 'DET'. ---- ----- ----- ENDCASE. END MODULE.
Surely this will solve your problem.