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

Issue in MATERIAL_MAINTAIN_DARK

tanmay_soni
Explorer
0 Likes
1,117


Hi

When creating material using MM01. I understand:

1. Value of 'Procurement Type' (in 'MRP 2' view) is dependent on 'Internal/External Purchase Orders' values in material type settings (in T-code OMS2).

2. And if either of 'Internal/External Purchase Orders' settings is set to 0, we cannot change the procurement type settings at the material level i.e. procurement type is grayed out/disabled for input.

But when I am creating material using FM MATERIAL_MAINTAIN_DARK neither of the above two conditions apply.

Please suggest if point 1 and 2 are not correct (my understanding is wrong) or if I am using MATERIAL_MAINTAIN_DARK incorrectly

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,014

Hi,

I think you are using the value in a wrong way! In BAPI you need to pass the procurement type as the below values.

MARC_UEB-BESKZ =

Pass the correct value and try again! If the field enable and disable is depends the material type! nothing to do with the BAPI.


Hi

When creating material using MM01. I understand:

1. Value of 'Procurement Type' (in 'MRP 2' view) is dependent on 'Internal/External Purchase Orders' values in material type settings (in T-code OMS2).

2. And if either of 'Internal/External Purchase Orders' settings is set to 0, we cannot change the procurement type settings at the material level i.e. procurement type is grayed out/disabled for input.

But when I am creating material using FM MATERIAL_MAINTAIN_DARK neither of the above two conditions apply.

Please suggest if point 1 and 2 are not correct (my understanding is wrong) or if I am using MATERIAL_MAINTAIN_DARK incorrectly

3 REPLIES 3
Read only

Former Member
0 Likes
1,015

Hi,

I think you are using the value in a wrong way! In BAPI you need to pass the procurement type as the below values.

MARC_UEB-BESKZ =

Pass the correct value and try again! If the field enable and disable is depends the material type! nothing to do with the BAPI.

Read only

0 Likes
1,014

so if point 1 and 2 are correct.

and I am passing material type with 'Ext. Purchase Orders' as '2' and 'Int. purchase orders' as '0' in OMS2 and 'Procurement Type' as 'X'.

Why MATERIAL_MAINTAIN_DARK is creating material with 'Procurement Type' as 'X' (enable) w/o any error.

by default 'Procurement Type' should have been 'F' (grayed out).

Read only

0 Likes
1,014

Could be! It's all depends on your material type settings! However if you want to know that in the FM!

Check the below code and debug

FM : READ_MATERIALTYPE

perform beskz_vorschlagen.


inside the form!



if it134-bsext = besch_n and
      ( it134-bsint = besch_w or it134-bsint = besch_j ).
     mtart_beskz = beskze.
   endif.

   if it134-bsint = besch_n and
      ( it134-bsext = besch_w or it134-bsext = besch_j ).
     mtart_beskz = beskzf.
   endif.

   if ( it134-bsint = besch_w or it134-bsint = besch_j ) and
      ( it134-bsext = besch_w or it134-bsext = besch_j ).
     mtart_beskz = beskzx.
   endif.


The values are passing through the SPRO settings only