Skip to content

Instantly share code, notes, and snippets.

@hugo-dc
hugo-dc / rfc_test.py
Created March 13, 2013 03:07
Pysap Code Example
# This examples show how to perform remote function calls
import pysap
# Set configuration file (contains server, mandant, user, password, etc)
sap_conn = pysap.Rfc_connection(conn_file='sapconn.ini')
# Open connection
sap_conn.open()
@hugo-dc
hugo-dc / sapconn.ini
Created March 13, 2013 03:15
Sapconn.ini example
; This is sample .ini files containing connection definitons.
; Modify values to suit your needs.
; Any connection parameter recognized by SAP connection string may be used as key
; To connect to system defined as 'Connection 1' use:
; conn=pysap.Rfc_connection(conn_file='/path/to/this/file',conn_name='Connection 1')
; conn.open()
[DEFAULT]
@hugo-dc
hugo-dc / filltable.py
Created May 10, 2013 16:31
Fill RFC Table (easysap)
rfc.init_table('TNAME')
line = rfc.tables['TNAME'].struc()
line['FIELD1'] = value
rfc.tables['TNAME'].append(line)
x = traceback.print_exc(file=open('exc.txt', 'w'))
@hugo-dc
hugo-dc / borrar_tablas_z.txt
Created May 16, 2013 21:44
Borrar datos de tabla Z con mandante cerrado
Entrar a la SE16N
Escribir en el campo donde se escribe la transacción: &sap_edit
Ejecutar la selección con F8, eliminar lo que se necesite.
@hugo-dc
hugo-dc / mail.py
Created May 16, 2013 22:52
Send SMTP email
import smtplib
SERVER = 'server.com'
FROM = 'hugo.delacruz@server.com'
TO = ['test.server.com']
SUBJECT = 'New Subject'
TEXT = 'This is the text'
ls -la | awk ' {print $6,$7,$9; }' | sed "1,4d"
git submodule add http://github.com/tpope/vim-fugitive.git bundle/fugitive
--------------------------------------------------------------------------
git submodule init
git submodule update
@hugo-dc
hugo-dc / call_browser.abap
Created April 11, 2014 18:16
Call Browser
REPORT ZBROWSER .
call method cl_gui_frontend_services=>execute
exporting
document = 'http://hugo-dc.com'
exceptions
others = 1.
@hugo-dc
hugo-dc / pil_raw_encoder.md
Created October 14, 2014 04:46
pil_raw_encoder.md

Raw Encoder

1 1-bit bilevel, stored with the leftmost pixel in the most significant bit. 0 means black, 1 means white.

1;I 1-bit bilevel, stored with the leftmost pixel in the most significant bit. 0 means white, 1 means black.