Application Development 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: 

Block material for a specific Plant in SO ?

Former Member
0 Kudos

Hi,

I have material maintained in Plant A, B and C,

but I want that when I create sales order only Material from Plant B should be allowed and the material from plant A and C should not be allowed.

Please help me how can I implement this.

Regards,

Kanwar

2 REPLIES 2

vinod_gunaware2
Active Contributor
0 Kudos

Hi

MV45AFZZ may be useful user exit for ur requirement.

the following program are the user exit for billing.

we often use RV60AFZC and RV60AFZZ.

RV60AFZA

RV60AFZB

RV60AFZC

RV60AFZD

RV60AFZZ

RV60BFZA

For Sales order

Pricing, item addtion deletion

MV45AFZZ

First, I did not find documentation for the BADI either. But at the first glance the process of implementing it looks quite straightforward. I assume you run R/3 Enterprise (4.7). So, you should implement BADI 'BADI_SD_SALES' - this must be done in transaction SE19. In particular for the purpose of adding some additional items into sales document I would implement method SAVE_DOCUMENT_PREPARE. This method has changing table parameter FXVBAP of type VA_VBAPVB_T - it holds all the sales document items. Just add items of yours to it. Certainly, you have to fill all the appropriate fields carefully.

Hope this helps somehow.

In that case you should use USEREXIT_DOCUMENT_SAVE_PREPARE subroutine (form). As far as I remember it has no parameters. To add items to the sales document you should modify internal table XVBAP.

regard

vinod

Former Member
0 Kudos

Try this form in the program MV45AFZB

&----


*& Form USEREXIT_CHECK_VBAP

&----


  • *

  • This Userexit can be used to add addtional logic for *

  • checking the position for completeness and consistency. *

  • *

  • US_DIALOG - Indicator, that can be used to suppress *

  • dialogs in certain routines, e.g. in *

  • copy mode. *

  • *

  • This form is called from form VBAP_PRUEFEN_ENDE. *

  • *

----


FORM USEREXIT_CHECK_VBAP USING US_DIALOG.

ENDFORM.

Regards,

BIkaSH