2007 Sep 21 11:43 AM
Hello Friends,
My Mara table has few custom fields using append structure.
And my requirement is that I need to change those custom fields of materials using function module MATERIAL_MAINTAIN_DARK.
While using this function module i am only able to change the standard field as SPART of MARA. I am unable to change the custom fields.
Please let me know how we can change the custom fields of MARA using this function module.
Thanking in advance,
Regards,
Nazir.
2007 Sep 21 12:44 PM
use the field exits available for MARA table to change its custom fields
for this follow the following procedure ....
go to transaction CMOD
then in transaction textbox enter PRFB
the new transaction will be opened...in this create the field exits using their Data elements...
<b><REMOVED BY MODERATOR></b>
Message was edited by:
Alvaro Tejada Galindo
2007 Sep 21 1:36 PM
Use BAPI_MATERIAL_SAVEDATA which is intended for developers...
This BAPI has a couple of table parameters designed to update customer specific fields.
<b>FU BAPI_MATERIAL_SAVEDATA EXTENSIONIN
____________________________________________________
Short text
</b>
<i> Reference structure for BAPI parameters EXTENSIONIN/EXTENSIONOUT </i>
<b>Description </b>
<i> You use this structure to transfer the material's customer-defined
fields. For information on transferring these fields, see the function
module documentation. </i>
<b>Note </b>
<i> Besides the table fields already defined, customer-defined table fields
can also be supplied with data. Since these fields are created by the
customer, they are known only during the runtime and must therefore be
determined dynamically.
The structures BAPI_TE_<NAME> (<NAME> = MARA, MARC, MARD, MBEW, MLGN,
MLGT, MVKE) and the relevant checkbox structures BAPI_TE_<NAME> (<NAME>
= MARAX, etc.) must first be extended by the customer to include the
fields required. The standard structures contain only the corresponding
key fields. When including new fields in these structures, make sure
that the field has the same name as the field in the database table. In
addition, the fields in the structures BAPI_TE_<NAME> may only be of the
type CHARACTER. The data element BAPIUPDATE must be used for the fields
in the checkbox structure (except for key fields).
The two parameters EXTENSIONIN and EXTENSIONINX are used to transfer the
data to the method. The field STRUCTURE contains the name of the
structure (for example, BAPI_TE_MARA or BAPI_TE_MARAX) used to identify
the work area (for example, WA_BAPI_TE_MARA or WA_BAPI_TE_MARAX) to
which the data is transferred. The remaining fields for the parameter
EXTENSIONIN or EXTENSIONINX contain the data for the key fields (for
example, the material number) and the data for the customer-defined
fields. The number of characters reserved in the two parameters for the
content of a customer-defined field must be the same as the number of
characters for the corresponding work area field. If the number of
characters required is smaller, the remaining characters in the two
parameters must be filled with blanks. Only then may the content of
another field be transferred. Here too, remember that the data is
written to the database only if the corresponding indicator has been set</i>
Regards
2007 Sep 24 12:20 PM
Hello Friends,
Thanks for all of your replies.
But I found the answer to my problem and would like to share it with all of you.
To change the custom fields using the function module MATERIAL_MAINTAIN_DARK we have to assign the custom fields to Field Selection group. at SPRO --Logistic General --Material Master Field SelectionAssign Fields to Field selection group. Please maintain there all the field attributes as Main. status, ALE field group. After doing these setting you can then custom fields using the fuunction module MATERIAL_MAINTAIN_DARK .