on 12-23-2014 7:09 PM
Hello friends,
My question is brief, I would like to know if there's a flag, database field or nested query to check if a business partner can be deleted from SAP. I know Balance and UpdateDate give not enough information.
Thank you in advance.
Hi,
BP can be deleted only when there is no transaction posted.
Thanks & Regards,
Nagarajan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
One quick way could be to query the BP mater data and see if they have any balances. Otherwise, as far as I'm aware, the only other way to achieve what you're trying to do is to query each document table and get a count of the BP code. If it's greater than 0 in any of the tables then the BP will not be able to be deleted from the system. Nagarajan or another member may be able to comment on a better method though.
Hi,
1. Try this query to get list of BP with no transactions:
SELECT T0.[CardCode], T0.[CardName], T0.[Balance] FROM OCRD T0 WHERE T0.[CardType] = 'c' and T0.[Balance] = '0' and T0.[CardCode] not in ( select t0.cardcode from ORDR t0) and T0.[CardCode] not in ( select t0.cardcode from ODLN t0) and T0.[CardCode] not in ( select t0.cardcode from OINV t0) and T0.[CardCode] not in ( select t0.cardcode from ORCT t0) and T0.[CardCode] not in ( select t0.cardcode from PWZ5 t0)
2. There is no one table to find BP to delete.
3. To know list of transaction for BP, in BP master data, right click and choose inventory posting list.
4. There was discussion in this forum, even with zero balance and no transactions, still system not allowed to delete. SAP fix this issue by query. You may refer this thread
Thanks & Regards,
Nagarajan
User | Count |
---|---|
108 | |
12 | |
11 | |
6 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.