06-25-2008 7:53 AM
Hello All,
I have already looked through the forum, but couldn't find something relevant.
I am using MATERIAL_MAINTAIN_DARK FM to update material master, and everything else seems to be working fine. Only when I try to update a custom or Z field, then it doesn't update it.
I also tried saving it by also changing another custom field, but it doesn't work....
Am stuck...any help would be highly appreciated.
Thanks,
Tatvagna.
06-25-2008 9:22 AM
06-25-2008 9:31 AM
Hi,
The following is the complete information about the function module.
Material Master Maintenance Without Screens
You can call up this function module from any application you like. Special initiators, such as material group maintenance or CAD, must identify themselves using the parameter CALL_MODE or CALL_MODE2. Special processing exists for these cases, for example, material number assignment.
The material data to be maintained is transferred using tables AMARA_UEB, AMARC_UEB, and so on, in internal format.
The data is processed in logical transactions; that is, only data that can be created or changed jointly in an online transaction is created or changed jointly.
An AMARA_UEB record must exist for each of these logical transactions.
For this reason, a transaction code (Create Material or Change Material) must also be transferred for each MARA record.
In addition, a unique transaction counter must also be transferred - also to dependent tables AMARC_UEB, and so on. This transaction counter groups together the related records in the tables. (The material number cannot do this with internal number assignment.)
All related MAKT and MARM records can be transferred for a record in AMARA_UEB as well as a
MARC record
MBEW record (must be consonant with MARC in accordance with the assignment of plant to valuation key)
MARD record for the MARC record
MVKE record and all MLAN records for the MVKE record
MLGN record
MLGT record for the MLGN record
With regard to MLAN, please note that MLAN records are logically linked to the combination of sales organization and distribution channel via the country. You can therefore maintain only those records that are consonant with the MVKE record (can be determined with function module Steuertab_Identify). To transfer MLAN data, MVKE must always be transferred.
For an AMARA_UEB record, you can also transfer all related
MVEG records (total consumption)
MVEU records (unplanned consumption)
LTX1 records (long texts)
MPRW records (forecast values)
Notes
The extension of a material previously created with an internal number is recognized as before by the special material number '0 '. In this case, the special material number is replaced with the previously determined internal number. The initiator must ensure that materials with an internal number are created and extended within a call package.
The commit work must be carried out by the initiator.
KZ_MATNR_RES is used to determine whether the material number has already been reserved. In this case, the material number is treated like an internal number; in particular, no check is made to see whether the material already exists.
Fields that are to be reset to their initial value are transferred using exception table AMFIELDRES.
The successfully updated records are removed from the transfer tables.
If you want to transfer the maintenance statuses to be maintained, you must fill field VPSTA in table MARA accordingly.
The maintenance statuses possible are as follows:
Maintenance status Description
A Work scheduling
B Accounting
C Classification
D MRP
E Purchasing
F Production resources/tools
G Costing
K Basic data
L Storage
P Forecasting
Q Quality management
S Warehouse management
V Sales
If you do not specify a maintenance status, the system determines it automatically from the maintenance status determination type.
The following data is not supported:
Document data
Execution of forecasts
Average plant stock
Scheduling of changes
Production versions
Classification
Joint production
Units of measure group
QM inspection data
Revision level
Sales price
Reference material
Customs tariff preferences and export licenses
Assignment of configurable material and respective variant configuration
Appendix
The material master "thinks" in the combinations of material master table and maintenance status. The combinations to be maintained are determined for each maintenance transaction from the data transferred. There are several maintenance status determination types (which can currently be specified for each transaction type in Customizing). For more information, see the documentation on the maintenance status determination type.
In the standard system, the third determination type is currently used.
This has the following consequences:
A maintenance status is not created if a single status field has not been transferred for it and if all other fields for the status are already covered by the creation of other maintenance statuses. This can also result in a complete table entry not being created (for example, MLGN/MLGT - only a single maintenance status).
Normally, this has no effect since the maintained views of productively used materials contain sufficient entries.
If accounting data is transferred, the maintenance statuses Accounting and Costing are both created since all accounting fields have both maintenance statuses. (You must have sufficient authorization for this, otherwise only the status for which you are authorized will be created.)
This is of practical value since there are two separate maintenance statuses essentially for authorization reasons. The data maintained in the Costing view is only proposed in the Accounting view.
If warehouse management data is transferred in another transaction separately from the relevant plant, the corresponding MARC is not given the maintenance status Warehouse Management.
If document management is active and if document data fields are transferred, they are included in table MARA. This contrasts with the old batch input method, where this was not possible due to either the documents subscreen or the MARA drawing fields subscreen being active.
Reference data is used for all relevant tables/maintenance statuses (only for fields on the processed screen in the old material master). This concerns the following in particular:
Defaults from the MRP profile or forecast profile
Variance key from T001W for costing
Product hierarchy in MVKE from product hierarchy in MARA (general departure from the old material master)
Regards,
Jagadish
06-25-2008 9:43 AM
Hi,
Atleast read what you are replying to before posting.
This is the Function Module documentation availiable with my version of SAP too....
But it doesn't mention anything about the Custom fields to be updated. so doesn't even touch my query..!!
Thanks anyways,
Tatvagna.
07-15-2008 1:52 PM
07-29-2008 10:21 AM
Hi All,
Actually, We got the solution to the problem after a lot of debugging with MATERIAL_MAINTAIN_DARK.
We found that the fields were not assigned to a group in material configuration and hence it was failing. We had to assign it to a group(actually in our case we made a new group).
You see in the above figure, all the Z fields are assigned to a group. This group determines when the fields will be enabled/disabled/active/inactive etc.
Just wanted to share this with you guys...!
Hope this helps.
Thank you,
Regards,
Tatvagna Shah,
PS: Sorry...couldn't put the figurwe here..!
Edited by: Tatvagna Shah on Jul 29, 2008 2:52 PM
06-08-2009 8:24 AM
Hi,
I am struck with the same problem as you did last year. Could you please tell me in which transaction we define the groups or add the customer fileds.
thank you,
Greetings
Satish
09-07-2009 2:08 PM