Mostly about adventures with programming, focused on data processing/SQL and web apps/Python in general, but sometimes about Operating systems, PostgreSQL, Oracle, SAP and Audit Command Language.
Showing posts with label SAP. Show all posts
Showing posts with label SAP. Show all posts
2014-12-31
Dynamic/Metaprogramming in ABAP
http://scn.sap.com/thread/1374403#7695723
http://scn.sap.com/thread/699312
2014-10-27
SAP Internal Order Settlement Receiver Field
The value of this field depends on a business logic ruleset (thus, SAP GUI will report it as a structured field) when you inspect it from Internal Order display/Settlement rule tab.
Here is (part of) the ruleset for determining the Settlement Receiver value:
(Pseudo-SQL, NOT ABAP)
h/t (http://scn.sap.com/thread/3416443)
CASE
WHEN COBRB.KONTY = 'CTR'
THEN COBRB.KOSTL
WHEN COBRB.KONTY = 'FXA'
THEN COBRB.ANLN1
END
(FXA is fixed asset settlement).
h/t (http://scn.sap.com/thread/3416443)
2014-07-02
Stripping table name prefixes from SAP DirectLink fieldnames
So if you are using ACL DirectLink to do a full table extraction out of SAP, it will create an ACL Table whose fieldnames are prefixed with
%TABLENAME%_, so for example BUKRS from BSAK ends up as BSAK_BUKRS. When you are using DirectLink as an ETL shim to export a flatfile extraction, you sometimes want the native field names instead, without prefixes (Careful: if you have specified a server side join in DirectLink, it will use the tablename prefix to distinguish between the same fieldname in two different tables from the resulting join, for example: BKPF_BUKRS, BSAK_BUKRS. Of course, server side joins are to be avoided when doing this type of dump anyway).
From the ACL project, extract the table definition:
BSAK_MANDT UNICODE 1 6 AS "Accounting: Secondary Index for Vendors (Cleared Items);Client" BSAK_BUKRS UNICODE 7 8 AS "Accounting: Secondary Index for Vendors (Cleared Items);Company Code" BSAK_LIFNR UNICODE 15 20 AS "Accounting: Secondary Index for Vendors (Cleared Items);Account Number of Vendor or Creditor" BSAK_UMSKS UNICODE 35 2 AS "Accounting: Secondary Index for Vendors (Cleared Items);Special G/L Transaction Type" BSAK_UMSKZ UNICODE 37 2 AS "Accounting: Secondary Index for Vendors (Cleared Items);Special G/L Indicator" BSAK_AUGDT DATETIME 39 16 PICTURE "YYYYMMDD" AS "Accounting: Secondary Index for Vendors (Cleared Items);Clearing Date" BSAK_AUGBL UNICODE 55 20 AS "Accounting: Secondary Index for Vendors (Cleared Items);Document Number of the Clearing Document" ... etc
$ awk '{print $1}' bsak_all.txt | while read line; do echo "DELETE FIELD " $(echo $line | sed 's/[^_]*_\(.*\)/\1/') " OK" && echo "DEFINE FIELD " $(echo $line | sed 's/[^_]*_\(.*\)/\1/') " COMPUTED " $line && echo; done
Find which SAP roles provide access to what T-Codes
A lot of times, your SAP superuser wants you to request the specific role (or a template user) for which to provision a new account or role assignment you requested. Best way to determine that role is to search roles which fulfill the TCODEs you require access to.
To do this, make sure you can login with a user with a role that has access to SUIM.
SUIM -> Roles -> By Authorization Values
Set Authorization Object 1 to S_TCODE
Click Entry value
Specify the TCodes you want to look up roles for. Pay attention to the AND and OR boxes for multiple TCode criteria.
SUIM -> Roles -> By Authorization Values
Set Authorization Object 1 to S_TCODE
Click Entry value
Specify the TCodes you want to look up roles for. Pay attention to the AND and OR boxes for multiple TCode criteria.
Subscribe to:
Posts (Atom)