on 03-19-2010 12:48 PM
Hello Experts:
Am trying to create a formatted search to provide a suggested RMA Number on the Business Partners > Activity window in a UDF.
While in Activity, the user should get a list of ONLY the one customer they are currently working with. So if C0001 is being used in the Activity window, the list should show all suggested RMA numbers just for that customer of C0001, not any other customer.
When I use the following it shows all customers.
--FMS 6BP Automated RMA Number
SELECT
T1.[CardCode] + ' - ' + ltrim(str(T0.[ClgCode]))
FROM OCLG T0
INNER JOIN OCRD T1
ON T0.CardCode = T1.CardCode
ORDER BY
T1.CardCode Desc,
T1.[CardCode] + ' - ' + ltrim(str(T0.[ClgCode])) Desc
When I put in WHERE T1.CardCode = $[$ 9.0.0 ] in the right place it shows nothing...
Any ideas on how to make only the one current customer in Activity window appear in the list???
Thanks in Advance - Zal
You may try this one:
SELECT T0.CardCode + ' - ' + ltrim(str(T0.ClgCode))
FROM OCLG T0
WHERE T0.CardCode = $[$9.0.0\]
ORDER BY ltrim(str(T0.ClgCode)) Desc
Thanks,
Gordon
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Istvan and Gordon...
Istvan - that is the same as my SQL - just do not know how to show the $[$... correctly in this forum - it always goes to that http thing.
Gordon - tried to use your SQL but it gave me an error of "Internal Error (-1003) Occured [Message 131-183] every time I tried to click on the magnifying glass. However, due to your last line in the SQL it gave me an idea that eventually they were OK with - namely, the highest number to the top of T0.ClgCode...
Thanks again guys - Zal
trying to give pnts but the system is not letting me...ohhhhhhhh - I see what is happening - the system has taken everyone's pnts away and they are down to zero - sorry guys - SAP has changed something...
Edited by: Zal Parchem on Mar 20, 2010 6:10 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I tried this one and it worked:
SELECT
T1.CardCode + ' - ' + ltrim(str(T0.ClgCode))
FROM OCLG T0
INNER JOIN OCRD T1 ON T0.CardCode = T1.CardCode
Where T1.CardCode= $[$9.0.0]
ORDER BY T1.CardCode + ' - ' + ltrim(str(T0.ClgCode)) Desc
Edited by: István K#rös on Mar 19, 2010 3:48 PM
Sorry, at first I copied here the query with the replaced value!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
104 | |
12 | |
11 | |
6 | |
6 | |
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.