on 2025 Mar 25 4:04 PM
Hello experts,
Can I join the activities from a Service Call in the Query API?
I tried to JOIN with IN statement, but I get the error message CA-127: Cannot perform operation: [REFERENCE in REFERENCE].
SELECT sc.id, ac.id
FROM ServiceCall sc
JOIN Activity ac ON sc.id IN ac.object.objectId
WHERE sc.code='5521620'
My aim is to get all timeeffort and mileage positions connected to a service call. As the timeefforts and mileages are in reference to the activites, I first need to join the activity table.
Is this possible or not?
Thanks a lot for your advice!
Best regards,
Deborah
#sapfsm #fsm #queryapi #join #activity #servicecall
Request clarification before answering.
Dear Deborah,
For joining Activity & ServiceCall Table
Could you please try
SELECT sc.id, ac.id,ac.code,sc.code FROM ServiceCall sc JOIN Activity ac ON ac.object=sc.id WHERE sc.code='5521620';
This will give you all activities linked to this ServiceCall
Similarly, for TimeEffort, Milleages
Can you try
SELECT te,sc.id, ac.id,ac.code,sc.code FROM ServiceCall sc JOIN Activity ac ON ac.object=sc.id JOIN TimeEffort te ON te.object=ac.id WHERE sc.code='5521620';
SELECT m,sc.id, ac.id,ac.code,sc.code FROM ServiceCall sc JOIN Activity ac ON ac.object=sc.id JOIN Mileage m ON m.object=ac.id WHERE sc.code='5521620';
Hope this helps
Kind Regards,
Shubham
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
7 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.