Skip to content

Instantly share code, notes, and snippets.

Avatar

Nigel James njames

View GitHub Profile
@njames
njames / get_caller_id.abap
Created Aug 14, 2019
example determining user from service now
View get_caller_id.abap
method get_caller_id.
data: uri type string
, body type string
, token type string
, agreements type string
, lo_response type ref to if_rest_entity
* , parser TYPE REF TO /ui5/cl_json_parser
, user type ref to data
, user_row type ref to data
@njames
njames / get_assignement_group.abap
Created Aug 14, 2019
example code for integrating into service now from fiori
View get_assignement_group.abap
method get_assignment_group.
data: uri type string
, group type ref to data
, group_row type ref to data
, group_name type string
, response type ref to if_rest_entity
.
* read the group name from config * hard coded from now
@njames
njames / markdown.md
Created Dec 10, 2015
Example markdown file to use with Reveal.js showing horizontal and vertical transitions and builds and formatting with html comments
View markdown.md

#Reveal.js Markdown starter (for 10)

Getting started with Reveal.js with an external markdown file


###Grocery List

  • Goat
@njames
njames / base-reveal.js.html
Last active Dec 10, 2015
Base file for Reveal.js presentation using markdown
View base-reveal.js.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Using reveal.js with external markdown</title>
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<link rel="stylesheet" href="/js/reveal.js/css/reveal.css"/>
<style type="text/css">code{white-space: pre;}</style>
@njames
njames / handleError.js
Created Nov 29, 2015
function for handling odata error calls
View handleError.js
function(oError) {
this.setBusy(false);
// var msg = $(oError.response.body).find('message').first().text();
try {
var msg = JSON.parse( oError.response.body).error.message.value;
msg = msg.split("|")[1];
} finally {
msg = "An error occurred on requesting access.";
}
jQuery.sap.require("sap.m.MessageBox");
@njames
njames / ModelData.js
Created Nov 29, 2015
Get data from the Model for a event (sim for a control)
View ModelData.js
// get data from the Model for a event (sim for a control)
var path = oEvent.getSource().getBindingContextPath(),
data = this.getView().getModel().getProperty( path );
@njames
njames / forloops.js
Last active Nov 28, 2015
Favorite for loops
View forloops.js
for (var i = 0, m = array.length; i < m; i++){ /// ... }
/// this pattern reduces the cost of counting the array or other object more than once
@njames
njames / SAP GUI Favourites
Last active Aug 29, 2015
SAP GUI Favourites
View SAP GUI Favourites
0000100016 BC
0000100002 GW
0000100003 CRM
0000100009 PI
TR0000200007SEGW Gateway Service Builder
TR0000300015ZBP_SELECTOR
@njames
njames / oDataSearch.js
Created Jan 30, 2015
template for searching with custom search with odata and not a filter
View oDataSearch.js
oList.bindItems({path: listPath, parameters: { custom: { search: searchString }}, template: oTemplate });
// equivalent to passing ?search=searchString on the uri
You can’t perform that action at this time.