Quantcast
Channel: SCN : Blog List - SAP ERP SD Sales
Viewing all articles
Browse latest Browse all 37

How to debug - Why plant is not changeable at sales BOM main item

$
0
0

Issue:

 

  • At the main item it's impossible to change the plant.
  • In the sub item of sales BOM it's possible to change plant.

 

7.gif


Check in the customizing:

 

 

  1. Call transaction: VOV7 - item category

 

 

3.gif

 

2. Check field: Structure scope (TVAP-STRUM) in case of BOM item

 

10.gif

 

How do I find out why the plant in case of BOM is set to not ready for input?

 

Way to find out which group the field was assigned to:

 

1.  Call up program MV45AFFE_FELDAUSWAHL_STATUS and find the DA_REGEL for the field to be checked. In this case for field VBAP-WERKS.

 

12.gif


2.  Which group (DA_REGEL) does the field VBAP-WERKS (item plant) belong to? -> DA_REGEL = 'WERKS' that is, the item category belongs to group WERKS.

 

3.  Check where the group/rule WERKS is processed.

 

4.  Program MV45AFFE_FELDAUSWAHL_STATUS also checks the processing of the group and decides whether a field is ready for input or not. The relevant  part of the source code starts with:

...
case da_regel.
  when
space.
...

 

 

 

5.  Now you have to find the WHEN loop in which the required group/rule is processed.

 

In our example with the DA_REGEL = WERKS, you  find the relevant source code in the following part:

...
when 'WERKS'.
  perform feldauswahl_vbap-werks changing sy-subrc.
  if sy-subrc > 0.
    screen-input = 0.
  endif.
...

 

11.gif

 

6.  Go to PERFORM feldauswahl_vbap-werks

 

14.gif

 

Check issue after putting the breakpoint directly in sales order:

 

 

 

1.  Call transaction VA02 (change sales order) ->  PERFORM feldauswahl_vbap-werks and check following fields:

 

  • screen-name
  • screen-input
  • ch_subrc

 

 

After program MV45AFFE_FELDAUSWAHL_STATUS is run, you receive an exact list of the checked fields in table SCREEN with the indicator (field name SCREEN-INPUT) whether the field is ready for input (1) or not ready for input (0).

 

 

15.gif

 

2. Go further with F5 to PERFORM feldauswahl_setzen

16.gif

 

Cause and explanation:

 

Using BOMs (in TVAP-STRUM = A or B for main item category) it is not allowed to change the plant of the main item afterwards, because the BOM is defined plant dependent. If the plant would be changed on main item level after BOM explosion, it could come to inconsistencies in the system. The already created items would not fit any more to the definition of the BOM and the materials could be different in another plant.

 

Due to this, changing the plant on the main item is not allowed. But you can still change the plant of the sub items, because the composition of the BOM  would not change due to this. Single sub items can be taken from different plants.

 

 

 

Reference notes:

 

 

208245 - Availability of fields in sales orders

 

 

393798 - Plant changeable in spite of order BOM

 

 

901048 - Change of plant for configuration and bills of material


Viewing all articles
Browse latest Browse all 37

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>