Programme SAP SAPDBLNM - Access Program for Database LNM

Description
Program SAPDBLNM contains the access routines for reporting. All reportsthat use the database LNM in the attributes can analyze materialdocuments.
The standard selection screen is generated automatically.
Selection can be made according to the following criteria:
a) By fields from the MM document header
- material document
- material document year
- transaction/event type
- material document item
b) By fields from the MM document item
- material document item
- material
- plant
- storage location
- batch
- movement type
- special stock
Parameter 'LN_NMKPF" ("Suppress Document Header MKPF WithoutItems MSEG")
This hidden parameter "LN_NMKPF" can be used to control the availabilityof the MM document header records MKPF for the application report. Thisparameter can be filled in the application report. It is only effectiveif the application report requests both nodes MKPF and MSEG. It has thefollowing functions:
"LN_NMKPF" = ' ' (default)
All selected MKPF records are made available. The logical database LNMtherefore returns all MM document header records MKPF according to therelevant restrictions at MM document header level. MM document headerrecords MKPF can also be made available for which no document items havebeen selected.
"LN_NMKPF" = 'X'
Only MKPF records for MM documents are made available for which MSEGrecords were also selected. This allows you to suppress the MM documentheaders MKPF if the user does not have authorization for MM documentitems, or if the values do not correspond to the restrictions.
Authorization checks
Authorization checks are carried out by the logical database. The usermust have display authorization for each of the following authorizationobjects:
"Material documents: Movement type"
"Material documents: Plant"
"Goods movements: Storage location"
Field selection
The logical database LNM enables you to work with the field selectionfor both database tables MKPF and MSEG. You can use the functions "GETMKPF FIELDS---" and "GET MSEG FIELDS..." to reduce the number of fieldsto be transported, and so to improve performance.
Sorting
The logical database LNM makes available the MM documents and thedocument items in ascending order, sorted by document number, fiscalyear, and posting line.