Application Development and Automation 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: 
Read only

user exit for va01

Former Member
0 Likes
698

i need to bolck the customer in va01 . suppose there are 5 customer in one group. if any one customer has exceeded the credit, the all customer should get block, it should a error message that one customer fro customer group has exceeded the credit limit.

any idea how to get it done.

regards

Chandramani

5 REPLIES 5
Read only

Former Member
0 Likes
664

What is the version of SAP that you are using in ECC 6.0 you have some enhancement-points check them.

for the below versions you have user exits where you can include your code and validation in the standard includes

INCLUDE MV45AOZZ. " User-modules PBO

INCLUDE MV45AIZZ

in Sales order program SAPMV45A

Read only

0 Likes
664

it is 4.7 version. any particular user exit?

Read only

0 Likes
664

i did in this way, i used one user exit for this.

FORM USER_CREDIT_CHECK1 USING UCC1_UPDATE

UCC1_KKBER

UCC1_KNKLI

UCC1_FLG_ORDER

UCC1_FLG_DELIVERY

CHANGING UCC1_RC.

CLEAR UCC1_RC.

data : begin of it_knkk occurs 0,

KUNNR type knkk-KUNNR, "Customer Number 1

KKBER type knkk-KKBER, "Credit control area

KLIMK type knkk-KLIMK, "Customer's credit limit

SKFOR type knkk-SKFOR, "Total receivables

GRUPP type knkk-GRUPP, "Customer Credit Group

end of it_knkk.

data : begin of it_knkk1 occurs 0,

KUNNR type knkk-KUNNR, "Customer Number 1

KKBER type knkk-KKBER, "Credit control area

KLIMK type knkk-KLIMK, "Customer's credit limit

SKFOR type knkk-SKFOR, "Total receivables

GRUPP type knkk-GRUPP, "Customer Credit Group

end of it_knkk1.

select

KUNNR

KKBER

KLIMK

SKFOR

GRUPP

from knkk

into table it_knkk

where

kunnr = UCC1_KNKLI

and KKBER = UCC1_KKBER .

select

KUNNR

KKBER

KLIMK

SKFOR

GRUPP

from knkk

into table it_knkk1

for all entries in it_knkk

where GRUPP = it_knkk-GRUPP .

data : cred_lim type knkk-KLIMK.

data : recev type knkk-SKFOR.

sort it_knkk1 DESCENDING by KLIMK .

read table it_knkk1 index 1.

cred_lim = IT_KNKK1-KLIMK .

**flag = '1'.

sort it_knkk1 DESCENDING by SKFOR .

read table it_knkk1 index 1.

recev = it_knkk1-SKFOR.

if recev GE cred_lim .

*read table it_knkk1 index 1.

*if it_knkk1-SKFOR GE IT_KNKK1-KLIMK.

message 'Customer Group Oldest Open Items Over due' type 'I'.

endif.

ENDFORM.

but now what is happening . suppose the customer is having group G1. and customer credit group

G1 is having 5 customer.

5 times it showing information message.

i need to get only one time. how to prevent going to same program again??

any help?

Read only

0 Likes
664

Hi CK ,

y its executing 5 times for one Customer ? , check for the customer types in debug mode, i'm assuming may be bcos of Partner types means ship-to-party , sold to party....etc.

regargds

Prabhu .

Read only

0 Likes
664

i used statics flag