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: 

Function code variable on a BSP page

Former Member
0 Kudos

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.

4 REPLIES 4

viquar_iqbal
Active Contributor
0 Kudos

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

0 Kudos

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.

0 Kudos

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

Former Member
0 Kudos

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