cancel
Showing results for 
Search instead for 
Did you mean: 

error in using popup to confirm dialog

Former Member
0 Kudos

I am using a set of coding given in book. Follows :

I am giving the essential only here.....

DATA : LT_TEXT TYPE STRING_TABLE,

LR_COMPONENT_API TYPE REF TO IF_WD_COMPONENT,

LR_POPUP TYPE REF TO IF_WD_POPUP_TO_CONFIRM,

LR_VIEW_CONTROLLER TYPE REF TO IF_WD_VIEW_CONTROLLER.

CALL METHOD CL_WD_POPUP_FACTORY=>POPUP_TO_CONFIRM

EXPORTING

COMPONENT = LR_COMPONENT_API

TEXT = LT_TEXT

WINDOW_TITLE = 'DELETE CONFIRMATION'

RECEIVING

POPUP_TO_CONFIRM = WD_THIS->LR_POPUP.

Now I am getting the error like WD_THIS->LR_POPUP not defined .

i checked with the class CL_WD_POPUP_FACTORY and method POPUP_TO_CONFIRM and LR_POPUP declaration for type compatibility, every this is fine but not working. can anyone help on this ?

Accepted Solutions (0)

Answers (2)

Answers (2)

rainer_liebisch
Contributor
0 Kudos

Hello,

please read my answer in

CL_WD_POPUP_FACTORY is deprecated.

Regards,

Rainer

Former Member
0 Kudos

Hi Rainer,

I have tried with your codings , it is not working. I wanted to mention one information here. I dont have any special view for this popup. Instead i am raising this popup when clicking a button (after validating the row was selected or not) .

When i tried with your coding and with window type ref to if_wd_window in the attribute , i got the message like window is not known.

can you please suggest on this ?

Madhu2004
Active Contributor
0 Kudos

did u try by declaring the lr_popup in the attribtes as per ur earlier coding

rainer_liebisch
Contributor
0 Kudos

Hello,

my coding is only an example for a popup. In your case you can also use the method CREATE_POPUP_TO_CONFIRM instead of CREATE_WINDOW of the interface IF_WD_WINDOW_MANAGER. Have a look at the parameters of this method and fill them accordingly.

Regards,

Rainer

Former Member
0 Kudos

Try the following code:

DATA lo_api_componentcontroller TYPE REF TO if_wd_component.

DATA : lr_popup TYPE REF TO if_wd_popup_to_confirm.

DATA l_controller_api TYPE REF TO if_wd_controller.

DATA : l_configuration TYPE wdr_popup_to_confirm.

DATA : l_text_table TYPE string_table,

ls_text_table TYPE string .

*

lo_api_componentcontroller = wd_this->wd_get_api( ).

l_controller_api = wd_this->wd_get_api( ).

ls_text_table = 'Are you sure you want to Delete record?'.

APPEND ls_text_table TO l_text_table .

TRY.

CALL METHOD cl_wd_popup_factory=>popup_to_confirm

EXPORTING

component = lo_api_componentcontroller

text = l_text_table

window_title = 'Confirmation'

configuration = l_configuration

RECEIVING

popup_to_confirm = wd_this->popup.

CATCH cx_wd_runtime_repository .

ENDTRY.

wd_this->popup->subscribe_to_events(

controller = l_controller_api

handler_name = 'CONF_DELETE' ).

Madhu2004
Active Contributor
0 Kudos

Hi ,

if u use wd_this->lr_popup, then declare the lr_popup under the attributes of the corresponding controller or instead of wd_this->lr_popup use only lr_popup.

Madhu

Former Member
0 Kudos

Hi madhu,

I tried with lr_popup also, again i am getting the error message like it is not declared , although I declared. One more information i am using this in a button click event.

Madhu2004
Active Contributor
0 Kudos

can you try by declaring the lr_popup in the attributes and use wd_this->lr_popup.