Skip to content

Instantly share code, notes, and snippets.

View weiserman's full-sized avatar

Warren Eiserman weiserman

View GitHub Profile
@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 / SAP Vendor
Created January 14, 2014 07:46
Create a vendor in SAP using the Vendor API
*&---------------------------------------------------------------------*
*& Report Creating a vendor, sample API coding
*&
*&---------------------------------------------------------------------*
*& Test for creation of vendor
*&
*&---------------------------------------------------------------------*
REPORT ydemo.
@weiserman
weiserman / ZPO_TEXTS
Created December 11, 2013 14:20
SAP Report to display long texts contained in a Purchase Order
REPORT zpo_texts.
TABLES: ekko.
TYPE-POOLS : abap, slis, rsanm, icon.
DATA: lt_ekko TYPE STANDARD TABLE OF ekko.
DATA: l_rec(5) TYPE n.
@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.