cancel
Showing results for 
Search instead for 
Did you mean: 

Controlling the SO (VA01 or VA02) Block and Release VBUK-CMGST = B or VBUK-CMGST = D

Former Member
0 Kudos

Hi Experts

I have the requirement like while creating or changing the sales order I need to check

the values of Financial Document and Down Payment and the Customer credit limit.

the summation of these values must match with the SO value

ie. l_total_amt = l_wrtak + l_dmbtr + l_klimk.

        IF xvbak-netwr <= l_total_amt.

          xvbuk-cmgst = D.

        ELSE.

          xvbuk-cmgst = B.

        ENDIF.

I wrote this in save_document_prepare user exit and

I can modify the XVBUK table to my own status, but after the document posting this is not getting updated.

eg: for l_total_amt  = 80000

          xvbak-netwr = 80000

      the status is xvbuk-cmgst = D.

But this is not getting updated, still in Blocked status.

Is there any other exit available to check the same , Please suggest

Thank you

Poobalachandar

Accepted Solutions (1)

Accepted Solutions (1)

Lakshmipathi
Active Contributor
0 Kudos

You can try with any of the following exits:-

  1. LVKMPFZ1: USER_CREDIT_CHECK1
  2. LVKMPFZ2: USER_CREDIT_CHECK2
  3. LVKMPFZ3: USER_CREDIT_CHECK3

G. Lakshmipathi

Former Member
0 Kudos

all 3 exits are not getting triggered in va01 and va02.

moazzam_ali
Active Contributor
0 Kudos

Dear

Mr. Lakshami has given you correct user exits and he is taking you to right direction. These exits are not being triggered because you are not testing them accurately. Please check Credit control area, risk category and document credit group in OVA8. Assign these values to your customer and sales document type. Also tick the User 1 option in Checks tab in OVA8.

This will work with automatic credit check.

Thank$

Former Member
0 Kudos

Hi MoazzaM

Yes, I checked the configurations in OVA8 which is not configured for Credit control area, User 1 option. Will Configure and check.

Thanks

Poobalachandar

Former Member
0 Kudos

Hi Laxmipathi and MoazzaM

In OVA8 I have these settings for CCAr 2001 ( Shown in Screen Shot ) i don't know which one i have to choose and what are the settings i need to do. I have mailed to FC regarding this. In the meanwhile please tell me which option i need to ask them to configure so that I can achieve the requirement.

And I am not sure which fields I need to change in the Exit(USER_CREDIT_CHECK1) if my conditions satisfy.

ie. FI Doc Value + Down Payment + Credit Limit >= SO Value  Need to set SO in Released (CMGST = D)

else SO needs to be blocked (CMGST = B).

Please suggest.

Thank you .

Bala.

satyajit_dalvi
Explorer
0 Kudos

Hello,

With reference to the details provided above, You need to write the code in one of the user exits given by Mr. and according select the check criteria in credit control configuration (i.e user1 / user2 / user3).

Thanks & Regards,

Satyajit Dalvi

moazzam_ali
Active Contributor
0 Kudos

Dear

From where you will get value of FI Doc and down payment? For writing logic in userexit you need these values but what will be origin of these two values?

Thank$

Former Member
0 Kudos

Hi MoazzaM

1)Using VBKD-LCNUM will get AKKP-WRTAK ( FI Doc Value)

2)Using VBELN and SP G/L Indicator (A or F) in BSID table

   will get the DP amount.

   

Summing FI Doc Value + DP + Credit Limit value should be greater or equal to SO value.

Based on this I need to Block or release the SO.

Thanks & Regards.

Poobalachandar


moazzam_ali
Active Contributor
0 Kudos

Thanks for sharing. Now can you tell the same logic to your ABAPER because from this point the ball is in ABAPER's court. Tell him to write this logic in program LVKMPFZ1 use exit USER_CREDIT_CHECK1. In OVA8 click on user1 and status/block. Check your combination of credit control area risk category and document credit group. I hope you are familiar with these three terms. Risk category and credit control area is in FD32. Document credit group is in VOV8.

Let me know if you need more clarification.

Thank$

Former Member
0 Kudos

This message was moderated.

Answers (0)