CLASS z2ui5_cl_app_hello_world DEFINITION PUBLIC. PUBLIC SECTION. INTERFACES z2ui5_if_app. DATA product TYPE string. DATA quantity TYPE string. DATA check_initialized TYPE abap_bool. PROTECTED SECTION. PRIVATE SECTION. ENDCLASS. CLASS Z2UI5_CL_APP_HELLO_WORLD IMPLEMENTATION. METHOD z2ui5_if_app~main. IF check_initialized = abap_false. check_initialized = abap_true. product = 'tomato'. quantity = '500'. ENDIF. CASE client->get( )-event. WHEN 'BUTTON_POST'. client->popup_message_toast( |{ product } { quantity } - send to the server| ). ENDCASE. client->set_next( VALUE #( xml_main = Z2UI5_CL_XML_VIEW=>factory( )->shell( )->page( title = 'abap2UI5 - z2ui5_cl_app_hello_world' )->simple_form( title = 'Hello World' editable = abap_true )->content( ns = `form` )->title( 'Make an input here and send it to the server...' )->label( 'quantity' )->input( value = client->_bind( quantity ) )->label( 'product' )->input( value = product enabled = abap_false )->button( text = 'post' press = client->_event( 'BUTTON_POST' ) )->get_root( )->xml_get( ) ) ). ENDMETHOD. ENDCLASS.