09-23-2008 10:58 AM
hi,
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.
Mahesh
09-23-2008 2:30 PM
Hi mahesh,
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.
Regards
Karthik D
09-23-2008 11:02 AM
Hi,
Check your 'pf-status' GUI status what you have cassign in screen. Otherwise use some other user command instead of DET and try.
Regards,
Saran
09-23-2008 11:06 AM
hi,
i have tried for that but still its giving same. i am refringabout the right side top GUI buttons( minimize,maximize,close window)
plz help
09-23-2008 2:03 PM
09-23-2008 2:30 PM
Hi mahesh,
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.
Regards
Karthik D