cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Quering document lines in user define values

ssierraSBI
Explorer
0 Kudos
544

Hello! Im trying to get the "Quantity" field on the document lines in a "User defined values" query. 

SELECT $\[$38.11.0]
FROM DUMMY

I've been trying to use the previous query, and after reading through other questions on the subject I've tried:
Removing the backslash
Leaving only the select line
Changing "$38" for "RDR1"
Changing "0" for "number"
Changing "11" for "Quantity"

None of these have worked for me so far, and it either gives me internal error 3006 or syntax error near "$"

I'd appreciate any help on the subject

Thanks!

 

View Entire Topic
WirkKarl
Explorer
0 Kudos

Hi! It sounds like you're close but hitting syntax limitations common with user-defined values in SAP B1. When dealing with User-Defined Values (UDVs), the syntax must strictly conform to what SAP's UI API expects. The $syntax works only in formatted search expressions, not in raw SQL queries like your example.

If you're trying to retrieve the "Quantity" from the line in a formatted search, your original $ is actually correct—but only when used in the right context (like linking the field to a formatted search in the UI, not directly running in Query Generator).

If your goal is to populate a field with values dynamically, consider restructuring your business logic. Platforms like Phonexa use structured data flow and custom field mapping to handle this type of dynamic value injection without the strict limitations of SAP’s query tools—might be worth looking at for more scalable automation.

Let me know if you need help crafting the correct formatted search or want an example for RDR1 joins!

ssierraSBI
Explorer
0 Kudos

Hi! Thanks for the answer.

I'll start by clarifying that I'm working with SAP B1 in Spanish, so I might get lost on some of the translations for the different functions and all.

With that out of the way, what I'm trying to do is applying a formated search in one of the lateral fields (a User-Defined one) which takes the amount in the Quantity of one specific line of the document and multiplies it by 24. I'm still trying to get the query to return anything, so I still haven't tried to get any filters or modifications on the value going.

I hope my explanation was clear enough. By your comment I understand that the $ syntax should be working properly in this case, but it's giving me internal error -3006