Workarounds

Jimbo's picture

Memory exhausted when reading files into LSMW

When handling exceptionally large files, LSMW will sometimes throw an error like this one returning a mysterious "Return code = 14" instead of declaring that the source data is too large to read into memory. The 14 comes from the GUI_UPLOAD function throwing an error when it runs out of memory because the EXCEPTION for dp_out_of_memory is assigned to 14 in the /SAPDMC/SAP_LSMW_READ_FORMS include.

Jimbo's picture

Link MATNR to OBJEK in SQ00 by Recycling an Existing Join

Connect MATNR to OBJEKPerforming a simple table join between MARC-MATNR and AUSP-OBJEK would be the easiest way to create a report of characteristic values for materials in a specific plant. In SAP, nothing is ever easy.

The ability to link MARA-MATNR and KSSK-OBJEK could be used to create a report of material classifications easily and cheaply. When dealing with a Big 4 consulting firm, nothing is ever simple or cheap.

Jimbo's picture

How to Simulate a Where Clause in SQ00 without ABAP

A thin veneer of ABAP . . .Putting the veneer of ABAP on something that is not ABAP is never quite as good as the real thing, but in a pinch it sometimes has to suffice. Reporting with the ability to recurse queries, call functions and perform complex string functions is always more desirable than calling a simple query.

Simple reporting backed by ABAP in the form of a report is a great solution for many organizations, but it is a costly endeavor for large bureaucratic organizations that have outsourced the management of their SAP implementation to larger, more bureaucratic organizations. Empowering clients to produce their own reports by embedding simple ABAP in SQ02 Infosets eliminates the need for costly external development which leads to arbitrary prohibitions against complex queries "because performance issues (sic)".

Jimbo's picture

Using LSMW as a Framework for Reporting

The ability to quickly develop, test and execute LSMW objects makes it a great tool for reporting and not just for validating source data. In many cases the need to generate a one-time-use report does not justify the time and effort of traditional report writing.

Jimbo's picture

How to use URLs longer than 132 Characters in CV01N

http://www.animalspot.net/wp-content/uploads/2012/03/Nubian-Ibex.jpg|http://album.udn.com/community/img/PSN_PHOTO/debby927/f_3764285_1.jpg|https://upload.wikimedia.org/wikipedia/commons/thumb/e/ed/Capra_ibex_ibex_%E2%80%93_03.jpg/400px-Capra_ibex_ibex_%E2%80%93_03.jpg|https://upload.wikimedia.org/wikipedia/commons/thumb/6/6a/Bouquetin_adulte_couch%C3%A9.jpg/800px-Bouquetin_adulte_couch%C3%A9.jpg|https://pixabay.com/static/uploads/photo/2015/12/11/16/12/animals-1088374_960_720.jpgModern URLs tend to be much longer than when they were originally supported by SAP in CV01 and CV02 (now replaced by CV01N and CV02N). It may have been thought by SAP's developers that URLs would never exceed 132 characters and that might be why a 255-character table field is limited to 132 characters in Screen Painter.

Jimbo's picture

Recycle a logical path for converted data

No logical path.When creating LSMW objects of type "Standard Batch/Direct Input" it is necessary to create a Logical Filename in a Logical Path and associate it with a Physical file. The reason why is not important or necessarily known, but the system will throw the "No logical path specified for the converted data" error when the user lacks the permissions necessary to create these things.

Jimbo's picture

File Name 'Converted Data': Max. 45 Characters. Remaining data saved.

SAP automatically generates a filename by concatenating the project, subproject and object name with underscores and that filename can exceed the maximum length of 45 set by the system for some import interfaces. When naming conventions run long for LSMW projects, the default file name can run too long.
Proposed values for file names created.

Jimbo's picture

Simulate MM17 transaction using LSMW

Z-fields (and some standard fields) are inaccessible in MASS and MM17; the program cannot be modified without extreme difficulty. This LSMW object creates a BDC with a separate transaction for each material to be updated. The batch can then be managed and monitored in SM35.

Jimbo's picture

Resolving "Conflict at characteristic ?: old value ?, new value ?" problem with BAPI_OBJCL_CHANGE.

When changing numeric values using BAPI_OBJCL_CHANGE the program will sometimes throw an inexplicable "Conflict at characteristic ?: old value ?, new value ?" error. This happens only when attempting to change the existing values of characteristics that expect floating point values.

Jimbo's picture

Logical file name is not permissible when loading classifications with LSMW

In some newer releases of SAP (somewhere around SAP_BASIS 701) some logical file names are forbidden even though they are apparently defined in the FILE transaction. The program that LSMW relies on to load classifications (RCCLBI02) uses the logical file name during during its execution. In previous releases simply specifying a logical file name in LSMW would create it along with the physical file, but now the system throws a SG809 message including this bad advice:

Procedure

Jimbo's picture

Define Fields in LSMW Structures Using Source Data

It is a rare occasion when data is produced to fit an LSMW object. Usually, LSMW objects are produced to fit around source data. Manually typing each field into SAP takes a lot of time and increases the chance for error. Making this process a semi-automated task greatly reduces the time spent and nearly eliminates the chance for errors caused by manual keying.

Jimbo's picture

Populate Multiple Structures With A Single Source File

File already used.LSMW blocks the use of a single source file to fill multiple structures. SAP clearly intended that each file loaded to fill a structure be unique as each structure is related in a hierarchy to other structures by fieldname(s). If a file is related to itself then every record is related to at least one other record in the same file.

Jimbo's picture

Generate a new license key for MiniSAP

The MiniSAP 6.2 Web Application Server software included with the book The Official ABAP Reference from SAP is very easy to install, but comes with a license that expires after just 30 days. The SAPGUI software refuses to log in and gives the following message.

Logon refused (license has expired)

There are several workarounds for this issue, the first being the most legitimate solution.

Jimbo's picture

Log on to SAP automatically without being prompted for credentials

The few seconds it takes for the SAP Logon tool to open can be annoying when in a rush. When one connects invariably to just a single server then there is no need to be shown a confusing list of alternate servers and given the chance to connect to the wrong one. This simple trick makes it easy to connect to an SAP server with just a single (or double) click.

Jimbo's picture

Update Characteristic Values with Transaction CL20

The standard transaction for assigning classifications and characteristics to materials is CL20. The only way to run this transaction is in batch mode; SAP launches CL20N when CL20 is called from the command field.