08-24-2009 5:43 AM
Hi experts,
I have made use of the sy-ucomm variable in my BADI. The BADI executes on an appraisal form. When I run appraisal forms from ecc that is pahap_admin the sy-ucomm is set, but when I execute the BSP page I get the sy-ucomm variable as initial.
Please let me know how do I capture function code from a BSP page. That is when I click on save where will the function code for save be available.
Thanks in advance.
08-24-2009 6:08 AM
Hi
In BSP page you can get it under event handler ->oninput processing .
Here you can execute a code if the function code associated with Save button is activated.
Every button displayed on a BSP page has an id.
So this id with get displayed in the class cl_htmlb_manager=>event_id.
SO just capture the event id.
Thanks
Viquar Iqbal
08-24-2009 7:07 AM
Hi Viquar
Thanks for your reply but I am unable to get into the event handler. Can u please tell me how do I get into the event handler.
08-24-2009 9:47 AM
Hi
go to SE80 select BSP application, enter the name of your BSP program .
go to pages with flow logic-> expand the page and youll find event handler .
Hope this resolves your query
Thanks
Viquar Iqbal
08-24-2009 7:51 AM
Hi,
Please refer the link below....
[Create a Application in BSP|http://wiki.sdn.sap.com/wiki/x/agTEB ]
[Events in BSP|http://wiki.sdn.sap.com/wiki/x/0gSXB ]
[Sample Program|http://wiki.sdn.sap.com/wiki/x/DoD8B ]
LayoutCode:-
To Clear the Button
<htmlb:button text = "Submit"
id = "submit"
on Click = "on InputProcessing()" />
Event Handler-onInputProcessing
DATA:
w_object TYPE REF TO object,
w_event TYPE REF TO cl_htmlb_event.
* To Get the Event Triggered.
CALL METHOD cl_htmlb_manager=>get_event
EXPORTING
request = runtime->server->request
RECEIVING
event = w_event.
CASE w_event->id.
when 'submit'.
............Logic..........
endcase.
Hope they are clear let me know if still have any concern.
Thanks
kalyan