Show TOC
Copy Material
Master Fields Into The Sales Document
Procedure for
copying material master fields to the sales document
The system copies material master fields to the
sales document in two steps:
1. First, a
field in the material master table (MARA, MARC or MVKE) is copied into the
material view (MAAPV or MAEPV). The fields in the tables and views must have
the same name in order to ensure that the fields are supplied
automatically.
2.
Note
Fields from the material master table MARC
must first be copied to the material view, in order that transmission in MAPV
is successful.
The system copies the field from the relevant
customer view into the sales order table (VBAP). It supplies the field in
program MV45AFZZ per user exit (USEREXIT_MOVE_TO_VBAP).
Note
You can add new fields (ZZ...) to an existing
table. This does not
create problems
during a release upgrade because additional fields are
placed at the end of the table and cannot be overwritten due to
the
name range. The field names must begin with
"ZZ".
Example
The new fields are placed at the end of the table (before the
release
upgrade).
vbap-standard1
vbap-standard2
vbap-standard3
vbap-zzmodif1
<<< additional
vbap-zzmodif2 <<< fields
The fields are not overwritten during a release
upgrade. The new SAP fields are simply added (after the release upgrade):
vbap-standard1
vbap-standard2
vbap-standard3
vbap-zzmodif1
<<< additional
vbap-zzmodif2
<<< fields
vbap-standard4
<<< new
vbap-standard5
<<< standard fields
Overview of
data transfer basics
- When the system copies material master fields
into the sales document, the following communication structures are
relevant:
- MAAPV (for MARA and MVKE)
- MAEPV (for MARA and MVKE)
MAEPV (for fields from MARC)
- Transporting fields into the material
view
The fields are
transported automatically if the field names in the material master and the
view are identical.
- Transporting the material view into the sales
document table
The routines for
supplying sales document fields are stored in program MV45AFZZ. Enter the new
field names (beginning with "ZZ") here.
USEREXIT_MOVE_FIELD_TO_VBAP
Copying
material master fields into sales documents
The system can copy fields from the material
master records into the sales document. The following options
exist:
First case: MARA -> VBAP
A material field (basic data) is copied into
the sales document item.
Second case: MVKE -> VBAP
A material master record field (sales data) is
copied into the sales document item.
Third case: MARC -> VBAP
A material master record field (plant data) is
copied into the sales document item.
First case:
Copying a material master field (MARA) into the sales document item
(VBAP)
You want to use a material master field (MARA)
in the sales document item (VBAP). When the fields are copied, there are two
options which differ depending on how the fields are supplied:
- The field exists in MARA and can be copied in
the material view MAAPV and VBAP. The names are identical.
- The field does not exist in MARA or VBAP.
First, you must create it there. Note that new data elements and new field
names must begin with "ZZ". The names of the material fields and view fields
are identical.
Proceed as follows:
1. Make sure
that the field exists in the material view MAAPV.
2. Activate the
structure.
3. The system
supplies the new fields in MAAPV automatically.
4. Afterwards,
you must transport the field into the sales document item.
You do this by using
program MV45AFZZ in user exit USEREXIT_MOVE_FIELD_TO_VBAP. The following is an
example of the statement
FORM
USEREXIT_MOVE_FIELD_TO_VBAP.
VBAP-ZZFELD3 =
MAAPV-ZZFELD. ENDFORM.
Proceed in the same way for the second and
third case.
Case 2: Copying
material master field MVKE into sales document item VBAP
Add the field to MAAPV if it does not already
exist there. Supply the field in MV45AFZZ in
USEREXIT_MOVE_FIELD_TO_VBAP.
Case 3: Copying
material master fields MARC into sales document item VBAP
Add the field to MAEPV if it does not already
exist there. Supply the field in MV45AFZZ in
USEREXIT_MOVE_FIELD_TO_VBAP.