Skip to Content
avatar image
Former Member

/** and /* meaning in sap b1

Dear experts,

In my query reports in query manager, one of reports is running from store procedure. to run that store procedure , we have to pass the parameter. But this report is passing the parameter with /** and /*. Report is running correctly. But I want to know meaning of /** and /*. Here is parameter passing query in the report.

/**SELECT FROM [OITM] T0 **/

DECLARE @SerType as varchar(50)

/* WHERE */

Set @SerType = /* T0.U_Service */ '[%0]'

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • May 09 at 05:38 AM

    Hi,

    There is no functional difference.

    /* This is normal SQL comment syntax. */

    Anything in between /* and */ is a comment, and will not be executed by MS SQL Server. In the B1 client however, the SQL parser engine will recognize the query in the comment.

    The extra * in /** is simply interpreted as being a part of a comment, and the B1 SQL parser engine only recognizes the query SELECT FROM [OITM] T0.

    /**SELECT FROM [OITM] T0 **/
    DECLARE @SerType as varchar(50)
    /* WHERE */
    Set @SerType = /* T0.U_Service */ '[%0]'

    will work just the same as

    /* SELECT FROM [OITM] T0 */
    DECLARE @SerType as varchar(50)
    Set @SerType = /* T0.U_Service */ '[%0]'

    Regards,

    Johan

    Add comment
    10|10000 characters needed characters exceeded