cancel
Showing results for 
Search instead for 
Did you mean: 

Check sales group in VA01

Former Member
0 Kudos

Hi,

How can I implement a check on the sales group in VA01? On the selection screen on VA01 the user should get a message if the sales group is no longer active. Active and inactive sales groups I will mark in a Z-table.

I checked some user exits in SAPMV45A but most of them will check in the details of the sales order. I prefer that the user will get a message and he will be forced to change the sales group before he gets into the detail screen.

Has anybody an idea?

br

Peter

Accepted Solutions (1)

Accepted Solutions (1)

bsivasankarreddy_reddy
Active Contributor
0 Kudos

Hi

use this include : FV45KF0V_VBAK-AUART_PRUEFEN

here you write logic (implement enhancement ) and write your logic take help for abaper

if vbak-VKGRP IS INITIAL.

       IF SY-SUBRC EQ 0.

MESSAGE 'Please Enter  valid sales group    TYPE 'E'.

     ENDIF.

   ENDIF.

try this

jobis
Contributor
0 Kudos

Hi,

I have a query on this. Just if you can explain a bit more about the business scenario please..Why do you have inactive sales group which are being passed on to sales orders..?

If you maintain the correct sales group in CMR, then there will not be such issue no?

Thanks

Jobi

Former Member
0 Kudos

Hi,

the reason is that we want to keep the old sales groups in the system because of reports. We do not delete them, but we want to force the users to use only the "active" groups.

br

Peter Piry

Former Member
0 Kudos

Hi,

thank you for your answer. I'll try to check this.

Thank you,

br

Peter

Answers (1)

Answers (1)

Lakshmipathi
Active Contributor
0 Kudos

You can also try with USEREXIT_CHECK_VBAK in program MV45AFZB where you can validate the zee table

G. Lakshmipathi

Former Member
0 Kudos

Hi Mr. Lakshimipathi,

this userexit USEREXIT_CHECK_VBAK will be called on 2nd screen of VA01. I need a userexit called on 1st screen of VA01 so that the user can't get to the 2nd screen when the sales group is inactive.

br

Peter Piry

jignesh_mehta3
Active Contributor
0 Kudos

Hello Peter,

I believe inserting a Custom Code in anyone of the following User Exits -  userexit_field_modification or  userexit_move_field_to_vbak will suffice your requirement.

Thanks,

Jignesh Mehta