3.3.9.1 Technical Information: Invoice Receipt and Verification (Purch.)
In order to uniquely identify an item/schedule line in a purchase order, you need the following information:
ALE ID
E1J3AI2: QUALF ("J30") BELNR(ALE-ID) or
Item
E1J3AI2: QUALF ("001") J_3APOSNR (item) J_3ABELNR (document) and J_3AETENR (schedule line)
All available material-specific data (for example, size, category)
If the ALE ID, item, schedule line are not completely available, it may not be possible to assign a confirmation to a purchase order/item/schedule line.
Technical Description of the IDoc Type
Document Type
Direction Logical Message
IDoc Type Output Type Process Code Invoice
Receipt
Inbound INVOIC /AFS/INVOIC02
INVL
SAP AFS Página 67 AFS-Specific Fields for the Invoice Receipt and Verification
Segment Field Explanation Origin
E1J3P01 POSEX Item Number EKPO-EBELP
PSTYP Item Category EKPO-PSTYP
KZABS Indicator for the order acknowledgment requirement
EKPO-KZABS
MENGE Quantity EKPO-KTMNG or
EKET-MENGE
MENEE Unit of Measure EKPO-MEINS
BMNG2 Quantity in Price Unit of Measure EKPO-KTMNG
PMENE Price Unit of Measure EKPO-BPRME
BPUMN Denominator for the Conversion BPRME into BME
EKPO-BPUMN
BPUMZ Numerator for the Conversion BPRME into BME
EKPO-BPUMZ
ABFTZ Agreed Cumulative Quantity EKPO-ABFTZ
VPREI Price (net) EKPO-NETPR or
KOMV-KBETR
PEINH Price Unit EKPO-PEINH
NETWR Value of Item (net) EKPO-NETWR or
KOMV-KWERT
AENTW Absolute Net Value of the Item EKPO-NETWR
NTGEW Net Weight EKPO-NTGEW
GEWEI Weight Unit EKPO-GEWEI
MATKL IDoc Material Class EKPO-MATKL
EVERS Shipping Instruction EKPO-EVERS
BRGEW Total Weight EKPO-BRGEW
VOLUM Volume EKPO-VOLUM
VOLEH Volume Unit EKPO-VOLEH
J_3APOSNR Item Number EKET-ETENR
J_3ASIZE AFS Grid Value EKET-J_3ASIZE
J_4KRCAT Requirements Category EKET-J_4KSCAT
J_4KSCAT Stock Category EKET-J_4KSCAT
E1JAIP J_3ASTORE MSO Stores
J_3APTYP VAS Packing Type
SAP AFS Página 68
J_3APMAT VAS Packing Material
J_3ACHARC VAS Charge Code
J_3AINCREM VAS Packing Increment
J_3AMIXIND VAS Packing Mix Indicator
J_3AFIELD1 VAS User-Defined Field 1
J_3AFIELD2 VAS User-Defined Field 2
J_3AFIELD3 VAS User-Defined Field 3
J_3AVASPQ Quantity
J_3AUPDKZ Update Indicator
J_3AVASPO VAS Generated Subitem Number
J_3AVASETE VAS Generated Sub-Schedule Line Number
E1J3AIS J_3ASTORE MSO Stores
J_3ASSTYP VAS Special Services Category
J_3ASSMAT VAS Special Services Material
J_3ACHARC VAS Charge Code
J_3AFIELD1 VAS User-Defined Field 1
J_3AFIELD2 VAS User-Defined Field 2
J_3AFIELD3 VAS User-Defined Field 3
J_3AVASPQ Quantity
J_3AUPDKZ Update Indicator
J_3AVASPO VAS Generated Subitem Number
J_3AVASETE VAS Generated Sub-Schedule Line
Number
3.3.10 Inventory Management
As a rule, one of the first things you should carry out during the SAP system start-up is the transfer of stock from a legacy system. This step is necessary because it is usually not possible to manually create initial data in the SAP system due to the multitude of stocks, or because you would like to post goods movements using IDocs.
You can transfer stock from external systems in one of two ways:
via direct input
via Application Link Enabling (ALE)
SAP AFS Página 69 During the data transfer you can maintain all stock with all required data exactly as you would in the dialog. If you use the data transfer with ALE, the data is transferred in an IDoc.
Typical application examples are:
The transfer of stock from an R/2 system or from external systems.
The transfer of goods movements from external systems.
AFS special features
With the AFS IDoc type you can process goods movements of standard materials as well as those of AFS materials. Only the inbound IDoc is implemented.
The mapping of the grid values using ALE works the same as in the dialog transaction. The mapping of the categories also works the same as in the dialog transaction.
3.3.10.1 Technical Information: Inventory Management
Technical Description of the IDoc Type
Document type Direction Logical Message
IDoc type Process Code
Goods movement Inbound WMMBXY /AFS/WMMBID02 WMMB
AFS-Specific Fields for Goods Movement
Segment Field Explanation Origin
E1J3XYI LFBJA Fiscal year of a reference document (required field for cancellations)
MSEG-LFBJA
LFBNR Document number of a reference document (required field for cancellations)
MSEG-LFBNR
LFPOS Item of a reference document (required field for cancellations)
MSEG-LFPOS
J_3ASIZE AFS grid value (required field for AFS material with dimensions)
MSEG-J_3ASIZE
J_3ABZUS Requirements grouping MSEG-J_3ABZUS
J_3AUANR AFS group requirements MSEG-J_3AUANR
J_3AUPOS AFS origin main item MSEG-J_3AUPOS
J_3AUEPS AFS origin plan MSEG-J_3AUEPS
J_4KSCAT Stock category (required field for AFS materials with category)
MSEG-J_4KSCAT
J_3AETENR Schedule line number (required field for all materials)
MSEG-J_3AETENR
J_3AVBELN Sales document number MSEG-J_3AVBELN
J_3APOSNR Item number of the sales document MSEG-J_3APOSNR
SAP AFS Página 70
J_3ALINUM Delivery number MSEG-J_3ALINUM
J_3ALIPOS Delivery item MSEG-J_3ALIPOS
J_3AUMSIZ AFS: receiving/issuing grid value (required field for stock transfer of AFS materials with grid values)
MSEG-J_3AUMSIZ
J_4KUMSCA AFS: receiving/issuing stock category (required field for stock transfer of AFS materials with category)
MSEG-J_4KUMSCA
J_4KUMSCA_4 AFS: receiving/issuing stock category MSEG-J_4KUMSCA_4 Dialog Functions and their Support in ALE
When data is transferred using Application Link Enabling (ALE), it is subject to the same checks as in dialog.
If a logical error caused by the material maintenance occurs when an IDoc is processed, the system terminates the relevant maintenance transaction and the IDoc is assigned the status incorrect. If no logical error occurs, the IDoc receives the status successful.
For IDocs with the status incorrect or successful, the application log receives the messages that were output during processing. After the logical errors have been resolved, you can reprocess the corresponding IDocs.
You can find information on troubleshooting and resolution of technical errors in the ALE documentation. To find errors, you should first check the settings that you have made in Customizing for Distribution (ALE).
Customer Enhancements (User Exits)
In order to process user-defined data using ALE, you need to:
activate the system enhancement MWMIDO08
For more information, see the documentation BC – Changes to the SAP Standard.
create the necessary source text for the user exit EXIT_SAPLLMDE_002, which is included in the system enhancement MWMIDO08
You can find further information in the system enhancement MWMIDO08 and user exit documentation.
create a new IDoc segment
3.4 Planning and Production (PP)
The following sections contain information on Planning and Production (PP).
3.4.1 Master Data: Material BOM
For an integrated materials management and shop floor control, BOMs and work plans contain critical basic or master data. In the engineering/design department the functional and production conform design takes place for a new product to be produced. The results of this product phase are drawings and a list of all necessary parts, the BOM.
SAP AFS Página 71 BOMs are found in varying forms everywhere where end products are composed of several basic parts or materials.
One of the steps you should carry out when you start up PP in the SAP system is the transfer of BOMs from a legacy system. This step is required because it is not usually possible to create initial data manually in the R/3 system due to the multitude of BOMs used.
Typical application examples are:
Transfer of BOMs from a non-SAP system
Transfer of data from data pools AFS Special Features
You can use the new AFS IDoc type to create AFS material BOMs. Only material BOMs are created. AFS does not currently support changing and deleting BOMs.
Mapping of Grid Values
Using ALE, grid values are mapped in the same way as in the dialog transaction.
Mapping of Categories
Using ALE, categories are mapped in the same way as in the dialog transaction.
3.4.1.1 Technical Information: Bill of Materials
Technical Description of the IDoc Type
Document type
Direction Logical Message
IDoc Type Process Code
Bill of material Inbound J3ABOM J3ABOM01 J3AP
AFS-Specific Fields for Bills of Materials
Segment Field Explanation Origin
E1J3ABG MSGFN Function No processing
J_3APGNR Material grid number J_3ABOMD-J_3APGNR
J_3AKORDX Grid value J_3ABOMD-J_3AKORDX
J_3AKORDXL Grid value
J_3ABOMD-J_3AKORDXL
MEINS Unit of Measure J_3ABOMD-MEINS
MENGE Quantity J_3ABOMD-MENGE
J_3AZFLG Quantity is zero J_3ABOMD-J_3AZFLG
E1J3ABC MSGFN Function No processing
J_4KSCAT Stock Category J_4KBOMC-J_4KSCAT
SAP AFS Página 72
J_4KKZEXCL Categories: excluding indicators
J_4KBOMC-J_4KKZEXCL
J_4KKZINCL Categories: including indicators
J_4KBOMC-J_4KKZINCL
ALE
When data is transferred using Application Link Enabling (ALE), it is subject to the same checks as in dialog.
If a logical error caused by BOM maintenance occurs when the IDoc is processed, the system terminates the corresponding maintenance transaction and the IDoc receives the status incorrect. If no logical error occurs, the IDoc receives the status successful.
For IDocs with the status incorrect or successful, the status record receives the messages that were issued during processing. After the logical errors have been resolved, you can reprocess the corresponding IDocs.
You can find information on troubleshooting and resolution of technical errors in the ALE documentation. To find errors, you should first check the settings that you have made in Customizing for Distribution (ALE).
Customer Enhancements (User Exits)
Using the following user exits, you can enhance the BOM creation function by adding your own table fields. The data in the user-defined fields can also be processed using ALE.
In order to process user-defined data using ALE, you need to:
Activate system enhancement J_3ABOM
For more information, see the documentation BC – Changes to the SAP Standard.
create the required source text for user exit EXIT_SAPLJ4AI_003 contained in system enhancement J_3ABOM
create a new IDoc segment
3.4.2 Planning: Distribution of Requirements
With the IDoc /AFS/DISREQ01 you can exchange (export and import) the distribution of requirements data between an AFS and a third-party system. This allows a third-party system to access data that you defined with the function AFS Maintain Distribution of Requirements (transaction J4A1).
The IDoc contains all data for the distribution of requirements with reference to a material or to a material-independent distribution profile.
3.4.2.1 Technical Information: Distribution of Requirements
Technical description of the IDoc Type
Direction Logical Message IDoc Type Operation code Inbound and
Outbound
/AFS/DISREQ /AFS/DISREQ01 /AFS/DISREQ
SAP AFS Página 73 AFS-Specific Fields
Segment Field Explanation Origin
/AFS/E1DR_HDR STYPE Distribution Type (material or profile) Value determined by generation program
SPROF Distribution Profile J_3APLPR-PROFP or
J_3ACAPR-PROFC or J_3AGRPR-PROFG or J_3APEPR-PROFT
MATNR Material J_3APLPR-MATNR or
J_3ACAPR-MATNR or J_3AGRPR-MATNR or J_3APEPR-MATNR /AFS/E1DR_TEXT SP_M_DESCR Description of the distribution profile
or material
MAKT-MAKTX or J_3ASPRT-SPRTX
LANGU_ISO Language, ISO code MAKT-SPRAS or
J_3ASPRT-SPRAS
/AFS/E1DR_OVR SPRTP Profile Category Value determined by
generation program
WERKS Plant J_3ACAPR-WERKS or
J_3AGRPR-WERKS or J_3APEPR-WERKS
RCATE Requirements Category J_3AGRPR-RCATE or
J_3APEPR-RCATE
SEASO Validity for Presizing J_3APLPR-SEASO or
J_3ACAPR-SEASO or J_3AGRPR-SEASO or J_3APEPR-SEASO
VERSB Version Number of the Distribution of
Requirements
J_3APLPR-VERSB or J_3ACAPR-VERSB or J_3AGRPR-VERSB or J_3APEPR-VERSB
SAP AFS Página 74
PRGRS Date Type (day, week, month, time
period)
J_3APEPR-ENTLI
ENTLUE Period Indicator J_3APEPR-ENTLI
converted with table TPRG
COVST Coverage Strategy J_3ACAPR-COVST
/AFS/E1DR_PGHD J_3APGNR Material Grid Number MARA-J_3APGNR or
J_3ASPR-MGRID
J_3AVDAT Material Grid Valid from date J_3AGRPR-VDATE
J_3ABZD1 ID of the first dimension J_3APGHD-J_3ABZD1
J_3ABZD2 ID of the second dimension J_3APGHD-J_3ABZD2
J_3ABZD3 ID of the third dimension J_3APGHD-J_3ABZD3
J_3ABZD1_NEW ID of the first dimension J_3APGHD-J_3ABZD1
J_3ABZD2_NEW ID of the second dimension J_3APGHD-J_3ABZD2
J_3ABZD3_NEW ID of the third dimension J_3APGHD-J_3ABZD3
/AFS/E1DR_PLPR WERKS Plant J_3APLPR-WERKS
FLWEI Distribution Profile Weight J_3APLPR-FLWEI
PERCE Distribution Profile Percentage Value determined by
generation program
SISQU Quantity of the last SIS selection J_3APLPR-SISQU
ISOCODE_UNIT Base Unit of Measure J_3APLPR-MEINS
/AFS/E1DR_CAPR RCATE Requirements Category Function:
J_4KG_GET_VALID_CAT Parameter:
J_3ACAPR-WERKS, J_3ACAPR-COVST,
‘R’ and ‘PRC’
FLWEI Distribution Profile Weight J_3ACAPR-FLWEI
PERCE Distribution Profile Percentage Value determined by
generation program
SISQU Quantity of the last SIS selection J_3ACAPR-SISQU
ISOCODE_UNIT Base Unit of Measure J_3ACAPR-MEINS
/AFS/E1DR_GRPR J_3AKORDX Grid value J_3APGEN-J_3AKORDX
J_3AKORD1 AFS: Coordinates of the first
dimension
J_3APGEN-J_3AKORD1
SAP AFS Página 75
J_3AKORD2 AFS: Coordinates of the second
dimension
J_3APGEN-J_3AKORD2
J_3AKORD3 AFS: Coordinates of the third
dimension
J_3APGEN-J_3AKORD3
FLWEI Distribution Profile Weight J_3AGRPR-FLWEI
PERCE Distribution Profile Percentage Value determined by
generation program
SISQU Quantity of the last SIS selection J_3AGRPR-SISQU
ISOCODE_UNIT Base Unit of Measure J_3AGRPR-MEINS
/AFS/E1DR_PEPR PPART Period Part J_3APEPR-PPART
FLWEI Distribution Profile Weight J_3APEPR-FLWEI
PERCE Distribution Profile Percentage Value determined by
generation program
SISQU Quantity of the last SIS selection J_3APEPR-SISQU
ISOCODE_UNIT Base Unit of Measure J_3APEPR-MEINS
/AFS/E1DR_DITX J_3ABZD1_NEW
J_3APGHD-J_3ABZD1 or
J_3APGHD-J_3ABZD2 or J_3APGHD-J_3ABZD3
J_3ABEZT Description of the dimension J_3ADITY-J_3ABEZT
LANGU_ISO Language, ISO code J_3ADITY-J_3ASPRA
/AFS/E1DR_USED MATNR Material number Generated from MARA
and MARC
WERKS Plant Generated from MARA
and MARC
IDPL Indicator: Distribution of
Requirements to Plants
Value determined by generation program
IDCA Indicator: Distribution of
Requirements to Categories
Value determined by generation program
IDGR Indicator: Distribution of
Requirements to Grid Values
Value determined by generation program
IDPE Indicator: Distribution of
Requirements to Periods
Value determined by generation program
E1MAKTM MSGFN Function No processing
SPRAS Language Key MAKT-SPRAS
MAKTX Description of the Material MAKT-MAKTX
SPRAS_ISO Language, ISO code MAKT-SPRAS
/AFS/E1DR_SEAS WERKS Plant J_3ASEAS-WERKS
SEASO Validity Period for Presizing J_3ASEAS-SEASO
SAP AFS Página 76
NPERI Number of Occurrence J_3ASEAS-NPERI
DATE_FROM Date starting on which the validity period applies
J_3ASEAS-DATE1
DATE_TO Date up to which the validity period applies
J_3ASEAS-DATE2
/AFS/E1DR_PRG PRGRS Date Type (day, week, month, interval)
J_3APEPR-ENTLI
PRGBZ External Date Type TPRG-PRGBZ
PRGTX Description of the Date Type TPRG-PRGTX
PRITX Period description in printout TPRG-PRITX
LANGU_ISO Language, ISO code TPRG-SPRAS
Remember that there are seven user exits for the IDoc /AFS/DISREQ01. You can find a description of these user exits in the enhancement J_3ADREQ. To see the relevant documentation, call transaction SMOD.
3.4.3 Shop Floor Control: Confirmations
SAP provides the automatic data transfer via IDoc (type CONF21) for the confirmation of production orders from subsystems.
For AFS confirmations, SKU data must also be transferred. The SKU data is stored in segment /AFS/CONF21. When the IDocs are processed, the data is stored temporarily in table RUECK and the AFS data table /AFS/RUECK.
Data can be transferred automatically when the IDoc is received. We advise against this, however, as most of the subsystems can only send one confirmation per IDoc. The processing of the confirmation is therefore usually scheduled as a job using report CIBDVERB to provide specific support to mass data processing.
Actual confirmation processing occurs as mass processing in the same way as the dialog transaction. The same checks are also run.
AFS Special Features
Overview: The AFS IDoc type can be used to create AFS confirmations.
Mapping grid values: The mapping of the grid values using ALE works the same as in the dialog transaction.
Mapping categories: Categories cannot be entered.
Cancellation of confirmations: A cancellation of confirmations per IDoc is not possible.
3.4.3.1 Technical Information: Confirmations
Technical Description of the IDoc Type
Document type
Direction Logical Message IDoc type Process Code
Confirmation Inbound CONF21 /AFS/CONF21 CON2
SAP AFS Página 77 AFS-Specific Fields for Confirmations
Segment Field Explanation Origin
/AFS/E1MARKER J_3ASIZE AFS grid value
/AFS/RUECK-J_3ASIZE
J_3AMKID Marker indicator in planned orders/production orders
/AFS/RUECK-J_3AMKID
J_3AMKNR Marker number
/AFS/RUECK-J_3AMKNR
J_3AMSECT Marker section
/AFS/RUECK-J_3AMSECT
J_3ALMNGA Yield IST in ASCII
/AFS/RUECK-J_3ALMNGA
J_3AXMNGA Scrap quantity IST in ASCII
/AFS/RUECK-J_3AXMNGA
J_3AMEINH Unit of Measure
/AFS/RUECK-J_3AMEINH
For technical reasons, you are required to use unique marker indicators for each size for production orders that were created with markers. (The marker indicators are created based on the field contents of the marker ID, marker number and marker section.) If this is not done, the data record cannot be uniquely identified in the database.
The reason for this is that the markers in the production order are identified internally using a sequence number. In the case of the IDocs, however, only the user ID can be used.
ALE
When data is transferred using Application Link Enabling (ALE), it is subject to the same checks as in the dialog.
If a logical error caused by confirmation maintenance occurs when processing the IDoc, the system terminates the corresponding maintenance transaction and the IDoc receives the status incorrect. If no logical error occurs, the IDoc receives the status successful.
For IDocs with the status incorrect or successful, the status record receives the messages that were issued during processing. After the logical errors have been resolved, you can reprocess the corresponding IDocs. performance are not negatively affected. IDoc handling only creates the data records. You must process errors that occur when posting is done subsequently, using the error handling function for confirmations.
SAP AFS Página 78
3.5 Warehouse Management
The following logical messages are supported in warehouse management in AFS:
Action/Object Logical Message IDoc Type
Transfer orders (issue and receipt) WMTORD /AFS/WMTOID01 for the issue
WMTOID01 for receipt
Transfer requirements (receipt) WMTREQ WMTRID01
Confirmation of transfer orders (receipt)
WMTOCO WMTCID02
Cancellation of a transfer order (issue and receipt)
WMCATO WMCAID01
Create physical inventory (receipt) WMINVE WMIVID01
AFS Special Features
Before using WM IDocs, ensure that each batch is assigned to a grid value and a category (SKU). In all inbound IDocs, the batch number is a required field and must be transferred in the IDoc.
SAP AFS Página 79
4. Archiving AFS Data
The following sections contain descriptions of the standard archiving objects that have been enhanced for AFS, and information on AFS grid archiving.
The enhancements are limited to additional archiving of AFS-specific database tables for the relevant SAP standard database tables. This means that AFS tables are archived along with the standard tables, if necessary.
Archiving in AFS is carried out using the standard objects and standard tools. However, there is an AFS-specific archiving object for grid archiving.
Example: Archiving material master data
Material master segments A and C (MARA and MARC) are archived using this archiving object.
The following AFS tables are updated in the application along with the two standard tables, and must also be archived along with the standard tables:
Standard table AFS tables
MARA J_3AQDST
J_3AMSEA
J_3AGMD
MARC J_3AMAD
J_3AMADKA
J_3ATRAME
For application-specific information on archiving, please see the SAP library under Cross-Application Components Archiving Application Data, then the relevant application area, for example, Logistics General (LO) or Materials Management (MM).
For general information on archiving, visit the SAP Marketplace at
For general information on archiving, visit the SAP Marketplace at