Skip to content

Instantly share code, notes, and snippets.

View ikiw's full-sized avatar
💁‍♂️

Sakthi ikiw

💁‍♂️
View GitHub Profile
var style = document.createElement("style");
document.head.appendChild(style);
style.type = "text/css";
style.innerHTML = "";
var oDUmmy = new sap.ui.core.Control();
sap.ui.core.Control.prototype.changeColor = function(oColor){
style.innerHTML = style.innerHTML + '.' + oColor + '{background-color:' + oColor + ' !important;}';
this.addStyleClass(oColor);
}
sap.ui.core.Control.prototype.addCustomStyle = function(oClassName,oStyle){
@ikiw
ikiw / Draggable
Last active August 29, 2015 14:01
$.sap.require('sap.ui.thirdparty.jqueryui.jquery-ui-core');
$.sap.require('sap.ui.thirdparty.jqueryui.jquery-ui-widget');
$.sap.require('sap.ui.thirdparty.jqueryui.jquery-ui-mouse');
$.sap.require('sap.ui.thirdparty.jqueryui.jquery-ui-draggable');
$.sap.require('sap.ui.thirdparty.jqueryui.jquery-ui-sortable');
var oDummy = new sap.ui.core.Control();
sap.ui.core.Control.prototype.draggable = function(){
var id = this.getId();
$(document).ready(function(){
$('#'+id).draggable({
sap.ui.core.Control.extend("ref.google.Map", {
metadata : {
properties : {
address : "string"
}
},
init: function(){
this._html = new sap.ui.core.HTML({content:"<div style='height:100%;width:100%;' id='" + this.getId()+"-map'></div>"});
},
renderer : function(oRm, oControl) {
public class GetMetadata {
public static void main(String[] args) {
try {
Class.forName("com.sap.db.jdbc.Driver");
java.sql.Connection conn = java.sql.DriverManager.getConnection("jdbc:sap:host:port", "user", "pwd");
Statement stmt = conn.createStatement();
ResultSet rs = stmt.executeQuery("select * from \"_SYS_BIC\".\"sap.hana.democontent.epm.models/AT_BUYER\"");
ResultSetMetaData rsmd = rs.getMetaData();
System.out.println("Total No of Columns:" + rsmd.getTableName(1));
for (int i = 1; i <= rsmd.getColumnCount(); i++) {
package com.sap.refapp;
import java.util.List;
import java.io.IOException;
import java.security.Principal;
import java.sql.CallableStatement;
import java.sql.ResultSet;
import java.sql.ResultSetMetaData;
import java.sql.Statement;
import java.util.ArrayList;
<!DOCTYPE html>
<html><head>
<meta http-equiv='X-UA-Compatible' content='IE=edge' />
<title>test</title>
<script id='sap-ui-bootstrap' type='text/javascript'
src='https://openui5.hana.ondemand.com/resources/sap-ui-core.js'
data-sap-ui-theme='sap_goldreflection'
data-sap-ui-libs='sap.ui.commons,sap.ui.ux3,sap.ui.table'></script>
<!-- add 'sap.ui.table' and/or other libraries if required -->
@ikiw
ikiw / library.js
Created July 12, 2015 07:07
UI5 library with a custom control
<!DOCTYPE html>
<html><head>
<meta http-equiv='X-UA-Compatible' content='IE=edge' />
<title>Notepad control with its own control library, used in XMLView</title>
<!-- Load UI5, select blue crystal theme and the "commons" control library -->
<script id='sap-ui-bootstrap' type='text/javascript'
src='https://openui5.hana.ondemand.com/resources/sap-ui-core.js'
data-sap-ui-theme='sap_bluecrystal'
data-sap-ui-libs='sap.ui.commons'></script>
@ikiw
ikiw / vizFrameRules.js
Created July 17, 2015 13:41
Viz Frame Rules
<!DOCTYPE html>
<html><head>
<meta http-equiv='X-UA-Compatible' content='IE=edge' />
<meta http-equiv='Content-Type' content='text/html;charset=UTF-8'/>
<title>test</title>
<script id='sap-ui-bootstrap' type='text/javascript'
src='/sapui5/resources/sap-ui-core.js'
data-sap-ui-theme='sap_bluecrystal'
data-sap-ui-xx-bindingSyntax='complex'
@ikiw
ikiw / vizFrameSorting.js
Created July 17, 2015 13:46
viz frame sorting
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv='Content-Type' content='text/html;charset=UTF-8' />
<script src="/sapui5/resources/sap-ui-core.js" type="text/javascript" id="sap-ui-bootstrap" data-sap-ui-libs="sap.m,sap.viz,sap.ui.commons" data-sap-ui-theme="sap_bluecrystal">
</script>
</head>
@ikiw
ikiw / vizFramePie.js
Created July 17, 2015 13:52
viz frame pie chart xml view
<!DOCTYPE html>
<html><head>
<meta http-equiv='X-UA-Compatible' content='IE=edge' />
<meta http-equiv='Content-Type' content='text/html;charset=UTF-8'/>
<title>test</title>
<script id='sap-ui-bootstrap' type='text/javascript'
src='/sapui5/resources/sap-ui-core.js'
data-sap-ui-theme='sap_bluecrystal'
data-sap-ui-xx-bindingSyntax='complex'