Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Update custom fields of MARA using MATERIAL_MAINTAIN_DARK

Former Member
0 Likes
2,951

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.

3 REPLIES 3
Read only

Former Member
0 Likes
1,233

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

Read only

RaymondGiuseppi
Active Contributor
0 Likes
1,233

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>

Look at for a sample

Regards

Read only

Former Member
0 Likes
1,233

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 .