Skip to content

Instantly share code, notes, and snippets.

View jasper07's full-sized avatar

John Patterson jasper07

View GitHub Profile
@jasper07
jasper07 / gist:613003213a32d35a52c1
Last active August 29, 2015 14:01
openui5 datepicker adjust date from to
(function() {
jQuery.sap.declare("openui5.DatePicker");
jQuery.sap.require("sap.ui.commons.DatePicker");
sap.ui.commons.DatePicker.extend("openui5.DatePicker", {
renderer: {
},
init: function() {
if (sap.ui.commons.DatePicker.prototype.init) { // check whether superclass has an init() method
sap.ui.commons.DatePicker.prototype.init.apply(this, arguments); // call super.init()
class ZCL_BSCL_SQL_STATEMENT definition
public
final
create private .
public section.
interfaces IF_BSCL_SQL_TYPES .
interfaces IF_BSCL_SQL_STATEMENT .
interfaces IF_BSCL_DDL_VIEW_STATEMENT .
<!DOCTYPE HTML>
<html>
<head>
<meta name="description" content="RowRepeater with Stackoverflow data" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title>Stackoverflow OData SAPUI5 tag</title>
<link rel="stylesheet" type="text/css" href="">
<style>
#sample1{
margin-left: auto ;
@jasper07
jasper07 / proxy.js
Last active June 2, 2019 12:19
Simple Node reverse proxy for UI5 development
var express = require('express'),
httpProxy = require('http-proxy'),
proxy = new httpProxy.createProxyServer();
var routing = {
'sapui5': {
target: 'http://localhost:8001' //sdk
},
'apps': {
target: 'http://localhost:8002' //applications
@jasper07
jasper07 / gist:8343250
Last active January 2, 2016 18:19
was calling /Products and should have been Products
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title>OData BlueCrystal Simple Example (Declaritive HTML)</title>
<script id="sap-ui-bootstrap" src="http://localhost:8888/sapui5/1.16/resources/sap-ui-core.js"
type="text/javascript" data-sap-ui-libs="sap.m, sap.me"
data-sap-ui-modules="sap.ui.core.plugin.DeclarativeSupport"
@jasper07
jasper07 / static_server.js
Last active January 2, 2016 02:39
Node and express serving compressed and cached static sapui5 content
var express = require('express'),
open = require('open'),
app = express(),
port = process.env.PORT || 8888,
sapui5 = '/sapui5',
url = 'http://localhost:' + port + sapui5, // + "/latest";
year = 60 * 60 * 24 * 365 * 1000;
// Use compress middleware to gzip content
app.use(express.compress());
@jasper07
jasper07 / gist:6017794
Created July 17, 2013 04:57
Android: Retrieve images from OData Media Link Entry
// cut down version
// for each customer
// retrieve image from OData Media Link Entries (Util.retrieveBitmap)
// store image on file (Util.writeBitmapToFile)
//
// later on when showing customer retrieve image from file (readBitmapFromFile - drawable)
public List<Customer> getCustomers() throws ProxyException {
List<Customer> customers = getContactsSVC().getCustomers();
@jasper07
jasper07 / base.css
Created July 2, 2013 13:17
Changes to base.css .sapUiTv, .sapUiBtnS #todo-list input:not([type='checkbox']) #filters .sapUiBtnFoc #filters .sapUiSegButtonSelected.sapUiBtnAct.sapUiBtnFoc
html,
body {
margin: 0;
padding: 0;
}
button {
margin: 0;
padding: 0;
border: 0;
@jasper07
jasper07 / UI5MobileOData.html
Created December 27, 2012 01:20
SAPUi5 Mobile OData demo App
<!DOCTYPE html>
<html>
<head>
<meta http-equiv='X-UA-Compatible' content='IE=edge' />
<meta charset="UTF-8">
<title>Mobile OData Demo</title>
<script id='sap-ui-bootstrap'
src='resources/sap-ui-core.js'
@jasper07
jasper07 / gist:3395428
Created August 19, 2012 15:10
abap_contacts_create_entity
METHOD contacts_create_entity.
CONSTANTS:
co_folder TYPE string VALUE '/SAP/PUBLIC/ATCONTACTS'.
*--- get the values passed in
io_data_provider->read_entry_data( IMPORTING es_data = er_entity ).
*--- set handle to first 3 letters of firstname and first letter of last name
er_entity-handle = |{ er_entity-firstname(3) }{ er_entity-lastname(1) }|.