Service call in WebDynpro application

...Previous

Click on the check box itab for the internal table name and continue

Give the method name and some description and continue

Click on complete to complete the service call.

In the component controller context the node itab is created with the desired fields.

Step 5

Just drag and drop node itab to the view context.

Step 6

Insert a table element in the view layout and bind it with the node itab.

Step 7

Insert a button element and in the on action method call the executemd method given in the step 4 .

Code is :

  wd_Comp_Controller->Executemd(   ).

It calls the Executemd method of the component controller and populates the data into the table

Step 8

In the second view insert three input elements and bind them with respective fields of itab, also insert two buttons for update and back actions.

Step 9

Copy the code in the update action method implementation.

data : lo_window_manager type ref to if_wd_window_manager.
data : lo_api_component type ref to if_wd_component.
data : lo_window type ref to if_wd_window.

lo_api_component = wd_comp_controller->wd_get_api( ).
lo_window_manager = lo_api_component->get_window_manager( ).

data : lt_string type table of string,
ls_string like line of lt_string.
ls_string = 'do you want to update the data base'.
insert ls_string into table lt_string.

CALL METHOD LO_WINDOW_MANAGER->CREATE_POPUP_TO_CONFIRM
EXPORTING
TEXT = lt_string
BUTTON_KIND = 4
RECEIVING
RESULT = lo_window.
.
data:
l_Api_Secondview type ref to IF_WD_VIEW_CONTROLLER.

l_Api_Secondview = wd_This->Wd_Get_Api( ).

lo_window->open( ).

CALL METHOD LO_WINDOW->SUBSCRIBE_TO_BUTTON_EVENT
EXPORTING
BUTTON = if_wd_window=>co_button_yes
ACTION_NAME = 'YES'
ACTION_VIEW = l_api_secondview .
CALL METHOD LO_WINDOW->SUBSCRIBE_TO_BUTTON_EVENT
EXPORTING
BUTTON = if_wd_window=>co_button_no
ACTION_NAME = 'NO'
ACTION_VIEW = l_api_secondview .

Click here to continue...

 

Please send us your feedback/suggestions at webmaster@SAPTechnical.COM 

HomeContribute About Us Privacy Terms Of Use • Disclaimer • SafeCompanies: Advertise on SAPTechnical.COM | Post JobContact Us  

Graphic Design by Round the Bend Wizards

footer image footer image