on 12-29-2021 5:57 AM
Sir while using SAP B1 Sales Order, on header level, I am trying to call CardName with FMS, so I used these codes
SELECT distinct T0."CardName" FROM OCRD T0 INNER JOIN ORDR T1 ON T0."CardCode" = T1."CardCode" WHERE T1."CardCode" =$[ocrd."CardCode"]<br>
The codes work fine no issue but when I use below codes then codes do not work
SELECT distinct T0."CardName" FROM OCRD T0 INNER JOIN ORDR T1 ON T0."CardCode" = T1."CardCode" WHERE T1."CardCode" =$[$139.4]<br>
I used correct column identification $[$139.4] like shown in image
Please help
Hi,
Your first query is unnecessarily complicated. This will suffice:
SELECT T0."CardName" FROM OCRD T0 WHERE T0.CardCode = $[ORDR.CardCode]
Your second query does not work because you have used the table index instead of the field index. When you look at the system information, you only need the item number:
The syntax would be $[$4.0] to get the CardCode. This query will work on all document forms (sales order, delivery notes, invoices, etc.):
SELECT T0."CardName" FROM OCRD T0 WHERE T0."CardCode" = $[$4.0]
Regards,
Johan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.