cancel
Showing results for 
Search instead for 
Did you mean: 

Query Syntax

Former Member
0 Kudos

Hi Guys,

Is there any where for me to lookup information of syntax that used in queries? I know stored procedure and able to write simply query with no problem

But i encounter a syntax from other partner like:

$[ORDR.DocNum]

$[38.1.0]

/* SELECT FROM [dbo].[OFPR] T0 */

DECLARE @tdocdate as datetime

/* WHERE */

set @tdocdate /* T0.T_RefDate */ = [%1]

this is the syntax i never encounter before... But i know their function. So where can i get more information on this?

Another question:

/* SELECT FROM [dbo].[OFPR] T0 */

DECLARE @tdocdate as datetime

/* WHERE */

set @tdocdate /* T0.T_RefDate */ = [%1]

This prompts the user to enter Posting Date From parameter before query is run. Now, i want to change "Posting Date From" to "Date Start From", how do i do it? And how do i add a new parameter?

I tried to look on SAP but found nothing about this.

I hope u guys can help..

Thanks

View Entire Topic
olivier_huet3
Participant
0 Kudos

Hi,

$[ORDR.DocNum] and $[38.1.0] are SAP variables for the formatted search.

When you are on an order window and you run the query, SAPB1 will replace $[ORDR.DocNum] by the num of the order where your are.

This allow the formatted search to get information about the opened order.

$[38.1.0] mean the field 1 of the window 38.

I don't know exactly which window or field it is...

You have to move the mouse cursor over the field, with "system information" enabled (in the "View" menu), to get information... (it will says the numbers for the field)

[%1] mean "parameter 1"

SAPB1 will ask the user for this parameter and then remplace [%1] by the user entry in the query.

I don't know exactly where to find more information about this, but all I've explained should be enough

Hope this help

Regards,

Olivier Huet

olivier_huet3
Participant
0 Kudos

About the "/* ... */", it's SQL comments.

The string between /* and */ will not be executed.... but will be parsed by SAPB1... and so it will know that [%1] is for which field....

(it seems SAPB1 search the nearest field from [%1] in the query string to know which field it is)