Skip to Content
avatar image
Former Member

POP UP ACTION

Hi,

I created one popup with buttons SUBMIT and NO.

In my code I am calliing popup on some condition, its going to the popup code, but without opening immediatly popup,

other code is executing and after that popup is openiing.

I need to call action when I click on submit. after that only rest of code has to work. I created action also.

How to stop the code up to popup.

How to get which button is triggered (eg Submit or No)

Regards,

sarath

Edited by: sarath kumar on Oct 9, 2009 7:41 AM

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    avatar image
    Former Member
    Oct 09, 2009 at 06:05 AM

    hi,

    SUBSCRIBE_TO_BUTTON_EVENT method of the interface if_wd_window registers the user action when a button is clicked.

    in order to the exection of ur rest of code , make a attribute of type WDY_BOOLEAN in ur component controller.

    IN the DOINIT of component controller set its value to ABAP_FALSE or blank

       DATA lo_nd_cn_check TYPE REF TO if_wd_context_node.
        DATA lo_el_cn_check TYPE REF TO if_wd_context_element.
        DATA ls_cn_check TYPE wd_this->element_cn_check.
        DATA lv_ca_check LIKE ls_cn_check-ca_check.
    *   navigate from <CONTEXT> to <CN_CHECK> via lead selection
        lo_nd_cn_check = wd_context->get_child_node( name = wd_this->wdctx_cn_check ).
    
    *   get element via lead selection
        lo_el_cn_check = lo_nd_cn_check->get_element(  ).
    
    *   set single attribute
        lo_el_cn_check->set_attribute(
          EXPORTING
            name =  `CA_CHECK`
          IMPORTING
            value = ' ' ).
    

    now in ur method , in which u r calling the popup , after ur logic for popup ; put a IF condition and write remaining of ur code there

    IF wd_comp_controller->ca_check = 'X'
    ..
    ur piece of code
    ..
    ENDIF
    

    set ca_check to 'X' after ur popup .It shud help

    regards,

    amit

    Edited by: amit saini on Oct 9, 2009 8:05 AM

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 09, 2009 at 05:45 AM

    Hi,

    Use this method GET_BUTTON_EVENT_SUBSCRIPTIONS of if_wd_window. You will get the button and their events.

    Regards,

    Lekha.

    Add comment
    10|10000 characters needed characters exceeded