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: 

dialog programing

Former Member
0 Kudos

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

1 ACCEPTED SOLUTION

Former Member
0 Kudos

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

4 REPLIES 4

saranwin
Contributor
0 Kudos

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

Former Member
0 Kudos

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

0 Kudos

Hello Mahesh,

Did you try using some other Fcode??

Regards

Farzan

Former Member
0 Kudos

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