cancel
Showing results for 
Search instead for 
Did you mean: 

User Exit during sales order cration for changing the customers kna1-aufsd

Former Member
0 Kudos

Hi experts,

our cusomers that do not order anything for a defined period of time get a special block in KNA1-AUFSD to "mark" them as inactive. Customers that do order after they have been blocked (=marked with a orderblock) have to be unblocked before the order can be created... thats ok for most cases; it is the standard behaviour.

I want to check if the cusotmer has the special order block in KNA1-AUFSD that marks it as inactive and change this automatically bevore the order creation is blocked due to the value in KNA1-AUFSD.

What userexit is bevore the


PERFORM TVASP_SELECT USING KUAGV-KUNNR
                           KUAGV-AUFSD
                           VBAK-AUART 
                           US_DIALOG  
                           CH_SUBRC.  

(in MV45AF0A_AG_PRUEFEN)

that checks the block?

Best Regards

Manfred

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

I solved it.

Former Member
0 Kudos

Hi,

Please follow the approach below:

If you are on SAP ECC6.0 then use implicit enhancement point that ia available in ecah subroutine.

So u will get an implicit enhancement in the below subroutine.

PERFORM TVASP_SELECT USING KUAGV-KUNNR

KUAGV-AUFSD

VBAK-AUART

US_DIALOG

CH_SUBRC.

inside the implicit enhacement u need to check whether KUAGV-AUFSD is space or not. If it is not equal to space then u need to use a standard FM to unblock the customer (KUAGV-KUNNR) and clear KUAGV-AUFSD.

Take help of ur ABAPER to find the FM & implicit point in the sub-routine.

Regards,

Former Member
0 Kudos

Hi Innovator,

unfortunately I cant use enhancement points as my release is not up to date. If there is no other solution (well, I dont want to modify sap coding) then I think can't do it. But maybe there is a different way?

Regards

Manfred

bcrao
Active Contributor
0 Kudos

Hi ,

If you donot want development use XD05

Thanks

Chidambaram

Former Member
0 Kudos

Hi Chidambaram,

I think you missunderstand me.

1. I blocked all customers that did not order anything the last 24 ( for example ) months. I use the kna1-aufsd field that I manipulated with transaction mass. This block is my "Inactivity-Mark". We do have other blocks like the customer died or has blocks due bad payment behaviours.

2. sometimes a customer that I blocked (marked as inactive) does order again. The sales guy cant place an order because of the block so someone with the permission has to remove it. We can use xd05 as you mentioned but that is not the problem.

Problem is: I would like to remove the order block automatically when someone tries to place an order for that coustomer. In that peace of code that has to be done maybe I will check the nature of the block. If it is my "Inactivity-Mark" it will be removed from the cusotmer automatically, if its any other block it will stay of course.

But I dont know a place to put my coding... it has to be before the coding i mentioned and I cant use enhancements as my release is too old. Any ideas?

Regards

Manfred