Skip to content

Instantly share code, notes, and snippets.

View weiserman's full-sized avatar

Warren weiserman

  • Agile Business Technology
  • Cape Town
View GitHub Profile
@weiserman
weiserman / Table RTTS example
Created January 31, 2014 06:08
ABAP RTTS for describing a table
report ydemo1.
DATA:
gv_vendor type table of lfa1.
DATA:
gs_component TYPE abap_compdescr,
go_typedescr TYPE REF TO cl_abap_typedescr,
go_strucdescr TYPE REF TO cl_abap_structdescr,
go_tabledescr TYPE REF TO cl_abap_tabledescr.
@weiserman
weiserman / ABAP RTTS Example
Created January 31, 2014 06:16
Read components of a structure using ABAP RTTS
report ydemo1.
DATA: lo_sdescr TYPE REF TO cl_abap_structdescr,
ls_component TYPE abap_compdescr.
lo_sdescr ?= cl_abap_typedescr=>describe_by_name( 'LFA1' ).
LOOP AT lo_sdescr->components INTO ls_component.
WRITE: / ls_component-name.
ENDLOOP.
@weiserman
weiserman / Web Dynpro in ABAP
Created March 16, 2014 14:24
Example to call a Web Dynpro from within ABAP passing a paramter. Note this will launch the Web Dynpro application within SAPGUI
DATA: lt_param TYPE tihttpnvp,
ls_param TYPE ihttpnvp,
ls_url TYPE string.
* Set up configuration ID for calling the Web Dynpro
MOVE 'WDCONFIGURATIONID' TO ls_param-name.
MOVE 'ZSD_SD_INV_REQ_CREATE' TO ls_param-value.
APPEND ls_param TO lt_param.
* Set up the parameter that need to be passed into Web Dynpro
@weiserman
weiserman / FPM Event Raise
Created March 27, 2014 10:14
ABAP to raise a floorplan event
* Local data
data: lo_fpm type ref to if_fpm,
lo_event type ref to cl_fpm_event.
* Create the object
create object lo_event
exporting
iv_event_id ='DELETE_AIRPORT'.
* Set the parameters
@weiserman
weiserman / SAP UI5
Created October 5, 2014 08:50
Hello World SAP UI5
<!DOCTYPE html>
<html lang="en">
<head>
<title>SAPUI5 Hello World live demo</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<script id="sap-ui-bootstrap"
type="text/javascript"
src="/temp/ui5/resources/sap-ui-core.js"
Working as the CTO of Neptune Software for the last three and a half years, I have spent most of my time working with SAP mobility and User Experience, meeting and discussing with customers and helping in mobile SAP implementations all over the world. This post will look at the three major misconceptions I have observed that in my opinion dooms your mobility project.
1 - Responsive Web Design is sufficient for Enterprise Mobility
With the emergence of HTML5 and great frameworks like SAPUI5, it is possible to create responsive web pages enhanced for viewing on mobile devices and even optimized for touch events. It is tempting to view mobile web apps as the most cost efficient and best option to roll out mobility in an organization.
Unfortunately this solution is ill suited for any serious mobility project and more so in an enterprise setting. I see more and more of the SAP community considering mobility as inherent in all other topics, which is good, but I am afraid that projects downplay mobility into
@weiserman
weiserman / gist:8451695
Created January 16, 2014 08:46
Using script on SAP Adobe Interactive to check values are populated correctly, this is entered in the "Validate" Event
var string = this.rawValue;
var pattern = /[^A-Z]/;
if (!this.isNull)
{
if (pattern.test(string))
{
xfa.host.messageBox("Please enter Initials in UpperCase having no blank spaces. Do not use any special characters, for eg: ^ - \\\ . /", "UpperCase characters."); this.rawValue = null;
}
}
@weiserman
weiserman / FormCalc
Created January 16, 2014 08:48
Form Calc example on Adobe Interactive Form for checking address values
data.Page1.Personal_Details.Personal_Details_Fields.Original_Data1.HSNMR1[1]::preSave - (FormCalc, client)
if (STRAS1[0].rawValue <> null) then
if (ORT021[1].rawValue == null or PSTLZ1[0].rawValue == null or ORT011[0].rawValue == null or STRAS1[0].rawValue == null) then
xfa.host.messageBox("Please supply at least Street Name, District/Suburb, City and Postal Code. Full address must be supplied for changes.", "Residential Address", 3, 1)
endif
elseif (POSTA1[0].rawValue <> null) then
if (ORT021[1].rawValue == null or PSTLZ1[0].rawValue == null or ORT011[0].rawValue == null or STRAS1[0].rawValue == null) then
xfa.host.messageBox("Please supply at least Street Name, District/Suburb, City and Postal Code. Full address must be supplied for changes.", "Residential Address", 3, 1)
endif
elseif (LOCAT1[0].rawValue <> null) then
@weiserman
weiserman / BADI ME_PROCESS_PO_CUST
Last active January 4, 2021 20:56
Check Purchase Order Long Text in SAP ERP BADI. Example of implementation of BADI ME_PROCESS_PO_CUST sample code for checking long text and issuing errors.
METHOD if_ex_me_process_po_cust~check.
* Check the purchase order type and save the text
DATA: lv_tdid TYPE tdid,
lv_texttype TYPE mmpur_texttypes,
lt_text_lines TYPE mmpur_t_textlines,
lt_text_format TYPE mmpur_bool,
lv_header TYPE mepoheader,
lv_lines TYPE i.
@weiserman
weiserman / gist:85e67532ded325ba3e08d5813bb67030
Last active February 1, 2022 19:19
Upload file to process in robocorp
*** Settings ***
Documentation This robot will be run in robocloud, ask user for input file and then load work items
Library Collections
Library RPA.Tables
Library RPA.Dialogs
Library RPA.Robocorp.Process
Library RPA.Robocorp.Vault
*** Variables ***
${CSV_FILE} devdata${/}price_increase.csv