【正文】
ne access. Solution1. Accesses to transport requestsa) via the storage unit numberIncorrect: SELECT FROM LTAP WHERE VLENR = ....oderSELECT FROM LTAP WHERE NLENR = ...Correct:SELECT FROM LEIN WHERE LENUM = ...SELECT FROM LTAP WHERE LGNUM = LEINLGNUM andAND TANUM = LEINBTANRAND TAPOS = LEINBTAPS.b) via the SD delivery noteIncorrect: SELECT FROM LTAP WHERE NLPLA = LIPSVBELN AND POSNR = LIPSPOSNR.Correct:SELECT FROM VBFA WHERE VBELV = LIPSVBELNAND POSNV = LIPS POSNRAND VBTYP_N = 39。.SELECT FROM LTAP WHERE LGNUM = LIPSLGNUMAND TANUM = VBFAVBELNAND TAPOS = VBFAPOSNN.Remark:This access mode only exists if the transport orders were created on account of deliveries in Sales and Distribution. In this case the respective transport orders can be determined via the document flow table VBFA.The field LTAPNLPLA is filled with the delivery note number via the dynamic storage bin assignment. This automatic assignment can be deactivated in WM Customizing (see movement types in WMS). This side effect must be considered when field NLPLA is used for data selection.2. Access to material documentsa) via the purchase order numberIncorrect: SELECT FROM MSEG WHERE EBELN = ... and EBELP = ...Correct:SELECT FROM EKBE WHERE EBELN = ..AND EBELP = ... AND VGABE IN (1,6,7,8,9).SELECT FROM MSEG WHERE MBLNR = EKBEBELNRAND MJAHR = EKBEGJAHRAND ZEILE = EKBEBUZEI.Remark:The fiscal year must be specified so that the system has effective access possibilities via the primary the fiscal year is missing, the database can no longer effectively use the item number for the search (this is a problem, especially for material documents with many items).If the operation type VGABE is specified, the values can be additionally restricted to the corresponding goods movements that are relevant.b) via the transport order numberIncorrect: SELECT FROM MSEG WHERE TANUM = ...Correct:SELECT FROM LTAP WHERE TANUM = ...SELECT FROM MSEG WHERE MBELN = LTAPWENUMAND MJAHR = requested yearAND ZEILE = LTAPWEPOS.c) via transfer requirementIncorrect: SELECT MSEG WHERE TBNUM = ...Correct:SELECT LTBK WHERE TBNUM = ....SELECT MSEG WHERE MBLNR = LTBKMBLNR AND MJAHR = LTBKMJAHR.Remark:All items of the material document are returned. It is possible to have a restriction to one individual item of the material document by specifying the material number.d) Via the vendor numberIncorrect: SELECT FROM MSEG WHERE LIFNR = ...Correct:SELECT EKKO WHERE LIFNR = ....SELECT EKBE WHERE EBELN = EKKOEBELNAND VGABE = 39。.