Skip to content

Instantly share code, notes, and snippets.

@LogaliSAP
LogaliSAP / MainView.view.xml
Created May 26, 2021 22:29
File_Full_MainView.view.xml
<mvc:View
controllerName="logali.table.controller.MainView"
xmlns:mvc="sap.ui.core.mvc"
displayBlock="true"
xmlns="sap.m"
xmlns:core="sap.ui.core">
<Shell id="shell">
<App id="app">
<pages>
<Page id="page" title="{i18n>title}">
@LogaliSAP
LogaliSAP / MainView.controller.js
Created May 26, 2021 22:23
Creation_Funtion_onChangeUser
onChangeUser: function (oEvent) {
//Getting the input value
const value = oEvent.getSource().getValue();
//checking if the value is distinct from space
if (value !== "") {
//Getting the model
const oViewModel = this.getView().getModel("oViewModel");
@LogaliSAP
LogaliSAP / MainView.controller.js
Created May 26, 2021 22:19
Creation_Funtion_addItemSecondary
addItemSecondary: function () {
//getting the model
const oViewModel = this.getView().getModel("oViewModel");
//getting the "secondary" array
const secondary = oViewModel.getProperty("/secondary");
//getting the last id
let orderId = secondary.length + 1;
//adding the item to the model
@LogaliSAP
LogaliSAP / MainView.controller.js
Created May 26, 2021 22:17
Creation_Funtion_addItemMain
addItemMain: function () {
//getting the model
const oViewModel = this.getView().getModel("oViewModel");
//getting the "main" array
const main = oViewModel.getProperty("/main");
//getting the last id
let userId = main.length + 1;
//adding the item to the model
main.push({
@LogaliSAP
LogaliSAP / MainView.controller.js
Created May 26, 2021 22:14
Creation_Funtion_onInit
onInit: function () {
const oViewModel = new sap.ui.model.json.JSONModel({
main: [],
secondary: []
})
this.getView().setModel(oViewModel, "oViewModel");
}
@LogaliSAP
LogaliSAP / MainView.view.xml
Created May 26, 2021 22:07
Creation_Table_secondary
<Table items="{oViewModel>/secondary}">
<headerToolbar>
<Toolbar>
<ToolbarSpacer />
<Button icon="sap-icon://add" press="addItemSecondary"></Button>
</Toolbar>
</headerToolbar>
<columns>
<Column>
<Label text="{i18n>orderId}"></Label>
@LogaliSAP
LogaliSAP / MainView.view.xml
Created May 26, 2021 22:01
Creation_Table_maestra
<Table items="{oViewModel>/main}">
<headerToolbar>
<Toolbar>
<ToolbarSpacer />
<Button icon="sap-icon://add" press="addItemMain"></Button>
</Toolbar>
</headerToolbar>
<columns>
<Column>
<Label text="{i18n>userId}"></Label>
REPORT zbloqueo_logali.
CALL FUNCTION 'ENQUEUE_EZ_FACT_LOGALI'
EXPORTING
mode_zfact_logali = 'E'
mandt = sy-mandt
* factura =
* x_factura = ' '
_scope = '2'
_wait = ' '
CALL FUNCTION 'DEQUEUE_EZ_FACT_LOGALI'
EXPORTING
mode_zfact_logali = 'E'
mandt = sy-mandt
* FACTURA =
x_factura = ' '
_scope = '3'
_synchron = ' '
_collect = ' '.
DATA gs_factura TYPE zfact_logali.
gs_factura-factura = '0000000001'.
INSERT zfact_logali FROM gs_factura.