‎2008 Nov 25 5:59 AM
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
‎2008 Nov 25 7:03 AM
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
‎2008 Nov 26 3:27 AM
‎2008 Dec 04 9:34 AM
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?
‎2008 Dec 05 2:45 AM
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 .
‎2008 Dec 10 7:46 AM