This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CLASS lcl_alv_writer DEFINITION INHERITING FROM lcl_persistent FINAL. | |
PUBLIC SECTION. | |
//Our abstract Method | |
METHODS : show_data REDEFINITION. | |
PROTECTED SECTION. | |
PRIVATE SECTION. | |
ENDCLASS. | |
CLASS lcl_alv_writer IMPLEMENTATION. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CLASS lcl_alv_grid DEFINITION INHERITING FROM lcl_persistent FINAL. | |
PUBLIC SECTION. | |
//Abstract Method from our base class | |
METHODS : show_data REDEFINITION. | |
PROTECTED SECTION. | |
PRIVATE SECTION. | |
DATA : lo_alv TYPE REF TO cl_salv_table, | |
lv_msg TYPE REF TO cx_salv_msg, | |
lo_function TYPE REF TO cl_salv_functions_list. | |
ENDCLASS. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CLASS lcl_persistent DEFINITION ABSTRACT. | |
PUBLIC SECTION. | |
// Internal table to hold data from DB | |
DATA : lt_data TYPE REF TO data. | |
METHODS: constructor IMPORTING !iv_table_name TYPE string, | |
get_data, | |
show_data ABSTRACT. | |
// Hold desired table name | |
PROTECTED SECTION. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TRIGGER "SAPABAP1"."BUT000_D" AFTER DELETE ON "SAPABAP1"."BUT000" | |
REFERENCING OLD ROW BUT000_REF FOR EACH ROW | |
BEGIN | |
IF :BUT000_REF.CLIENT = '100' | |
THEN INSERT | |
INTO "SAPABAP2"."ZBUT000" VALUES('100', | |
:BUT000_REF.CLIENT, | |
:BUT000_REF.PARTNER, | |
CURRENT_UTCTIMESTAMP, | |
'D' ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TRIGGER "SAPABAP1"."BUT000_U" AFTER UPDATE ON "SAPABAP1"."BUT000" | |
REFERENCING NEW ROW BUT000_REF FOR EACH ROW | |
BEGIN | |
IF :BUT000_REF.CLIENT = '100' | |
THEN INSERT | |
INTO "SAPABAP2"."ZBUT000" VALUES('100', | |
:BUT000_REF.CLIENT, | |
:BUT000_REF.PARTNER, | |
CURRENT_UTCTIMESTAMP, | |
'U' ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Give name to a trigger | |
CREATE TRIGGER "SAPABAP1"."BUT000_I" | |
// State which schema and table to replicate | |
AFTER INSERT ON "SAPABAP1"."BUT000" | |
// Give reference name for each row | |
REFERENCING NEW ROW BUT000_REF FOR EACH ROW |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sap.ui.define([ | |
'sap/m/MessageToast', | |
"sap/ui/core/mvc/Controller" | |
], function(MessageToast, Controller) { | |
"use strict"; | |
return Controller.extend("SAPUI5_Demo.controller.MainView", { | |
onSend: function(oEvent) { | |
var oView = this.getView(); | |
var sName = this.getView().byId("name_text").getProperty("text"); | |
var sSurname = this.getView().byId("surname_text").getProperty("text"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<f:content> | |
<Label id="name_text" text="Name"/> | |
<Input id="name_value" value="NULL"/> | |
<Label id="surname_text" text="Surname"/> | |
<Input id="surname_value" value="NULL"></Input> | |
<Label id="age_text" text="Age"/> | |
<Input id="age_value" value="NULL"> | |
<layoutData> | |
<l:GridData span="XL2 L1 M3 S4"/> | |
</layoutData> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sap.ui.define([ | |
'sap/m/MessageToast', | |
"sap/ui/core/mvc/Controller" | |
], function(MessageToast, Controller) { | |
"use strict"; | |
return Controller.extend("SAPUI5_Demo.controller.MainView", { | |
onSend: function(oEvent) { | |
var oView = this.getView(); | |
console.log(oView); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<mvc:View controllerName="SAPUI5_Demo.controller.MainView" xmlns:html="http://www.w3.org/1999/xhtml" xmlns:l="sap.ui.layout" | |
xmlns:f="sap.ui.layout.form" xmlns:mvc="sap.ui.core.mvc" xmlns:core="sap.ui.core" xmlns="sap.m"> | |
<VBox class="sapUiSmallMargin"> | |
<f:SimpleForm id="SimpleFormToolbar" editable="true" layout="ResponsiveGridLayout" labelSpanXL="4" labelSpanL="3" labelSpanM="4" | |
labelSpanS="12" adjustLabelSpan="false" emptySpanXL="0" emptySpanL="4" emptySpanM="0" emptySpanS="0" columnsXL="2" columnsL="1" columnsM="1" | |
singleContainerFullSize="false"> | |
<f:toolbar> | |
<Toolbar id="TB1"> | |
<Title text="Personal Details" level="H4" titleStyle="H4"/> | |
</Toolbar> |