Skip to Content
0
Jul 13, 2023 at 09:44 AM

Sap Business One Query Parameter from more than 1 table

102 Views Last edit Jul 13, 2023 at 10:12 AM 3 rev

i have call procedure from query generator that have parameter

 

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

DECLARE Discount1 DECIMAL(38,2);

DECLARE Discount2 DECIMAL(38,2);

DECLARE Discount3 DECIMAL(38,2);

Discount1 = /* T0."U_STEM_Disc1" */ '[%0]';

Discount2 = /* T0."U_STEM_Disc2" */ '[%1]';

Discount3 = /* T0."U_STEM_Disc3" */ '[%2]';

CALL CKM.CKM_COO_Report_Master_StockNMarginPHILIPS (Discount1 , Discount2 , Discount3 ,'Personal Care', 'Jakarta',output );

select * from :output ;


i want to change the parameter 'Personal Care', 'Jakarta' with input parameter
'Personal Care' came from OITM table field and 'Jakarta' came from OWHS table field

anyone can help or give suggestion?
thanks in advance
Regards,

Hogianto