‎2006 Apr 24 3:31 PM
Hello Everyone!
I have some stupid beginner questions... and it would be great i someone could help me!
For now i learned how to make some buttons on a Toolbar via cl_gui_custom_container & cl_gui_toolbar.
This one is for now cristal clear!
But stupid thing is that I'm not able to make my simple program with few pushbuttons work!!!
First i've docked some PushButtons trough the ScreenPainter and assigned them Function Codes, TextDisplay & Name. and then i'm not able to get any actions of that pushbuttons when i executes the program. When i click tem they simply do nothing!!!
i checked and my screen is activated tough...
stupid thing is when i Test my screen trough Sscreen painter one of buttons, explicitly the EXIT button do work and is exiting my program, but the other one does nothng, just like they bth do when i execute my program.
Please Can anyone help me with this one???
if u have some, please do provide me a sample code but not the simpliest one, because i do write my programs with classes, modules and etc...
Thank you all in advance!
kind regards, mya
‎2006 Apr 24 3:43 PM
Hi ,
in your PAI, the name of the <b>fcode</b> for the particular push button should be used .
Regards,
Kunal.
‎2006 Apr 24 3:39 PM
Hi mya,
In PAI of your screen write something like this...
CASE SY-UCOMM.
WHEN 'DISP'.
*-- Write some logic
WHEN 'CHNG'.
*-- Write some logic
WHEN 'BACK' OR 'CANC'.
LEAVE PROGRAM.
ENDCASE.
Here 'DISP','CHNG','BACK','CANC' are the function codes of my buttons
Thanks,
Sreekanth
‎2006 Apr 24 3:43 PM
Hi ,
in your PAI, the name of the <b>fcode</b> for the particular push button should be used .
Regards,
Kunal.
‎2006 Apr 24 3:51 PM
Hi i've done this in:
MODULE user_command_0100 INPUT.
CASE ok_code.
WHEN 'EXIT'.
LEAVE TO SCREEN 0.
WHEN 'DIALOG'.
PERFORM show_dialog_box.
ENDCASE.
ENDMODULE. " USER_COMMAND_0100 INPUT
is a simple button that, i put in ScreenPainter, aka dynpro button??? or for that kind of button i need extra things to do???
Thanks!
‎2006 Apr 24 3:59 PM
hi,
To do some action on the button click you need to write some code in the PAI(Process after input) of the screen. The code in PAI is executed once the user do some action, example a button click, selecting a radio button or checking a check box...
So in PAI, you can write the code and do various things on click of differed button with different function codes.
Also you need to capture the ok_code. So you need to define an element in element list : OK_CODE.
Case OK_CODE.
when 'FCODE1'
perform FUNC_BUTTON_1
when 'FCODE2'
perform FUNC_BUTTON_2
when 'FCODE3'
perform FUNC_BUTTON_3
endcase.
in this way you can write different functionalities for different buttons.
Regards,
Richa
‎2006 Apr 24 4:00 PM
Hi Maja,
Goto Screen List tab of the screen painter.
Have you declared the variable OK_CODE...?
Regards,
SP.
‎2006 Apr 24 4:01 PM
Hi Maja,
A small correction. Goto <b>Element list</b> of the screen painter. Declare a variable OK_CODE. This should work fine.
Regards,
SP.
‎2006 Apr 24 4:03 PM
‎2006 Apr 24 4:05 PM
The Thing With the Element List solved the problem!!!!
Thank you alll!!!
‎2006 Apr 24 4:05 PM
go to se51.
Enter Program name and screen number.
choose the radio-button for Element list.
and press change/display.
Regards,
Ravi
‎2006 Apr 24 4:06 PM
Hi Maja,
In the main program, where you write CALL SCREEN 200.
Double clicking on 200 will lead you to screen painter window.There are 3 tabs
1.Attributes
2.Element List
3.Flow Logic
In the element list, corresponding to ok code, you have to declare a variable (OK_CODE in your case).
Activate it and come back.
Activate the main program and execute.
This should work.
Regards,
SP.
‎2006 Apr 24 4:07 PM
hi
Its simple.
Goto SE80 and enter your program name or se51 and enter your screen name and no.
on right side you will get 3 tab strips.
Attribute /element list and flow logic.
In the tabstrip element list you need an element with the name OK_CODE
Regards,
Richa