out boolean OUT_Active; {default form to 'SOP_Entry';} {default window to 'Line_Scroll';} local integer l_type; local string l_number; local long l_sequence; local long l_component; local boolean l_found; local text code; local string complier_error; l_type = 'SOP Type' of window 'SOP_Entry' of form 'SOP_Entry'; l_number = 'SOP Number' of window 'SOP_Entry' of form 'SOP_Entry'; l_sequence = 'Line Item Sequence' of window 'Line_Scroll' of form 'SOP_Entry'; l_component = 'Component Sequence' of window 'Line_Scroll' of form 'SOP_Entry'; l_found = false; { Check in Omni Price Log } clear code; code = code + "in integer l_type; " + char(13); code = code + "in string l_number; " + char(13); code = code + "in long l_sequence; " + char(13); code = code + "in long l_component; " + char(13); code = code + "out boolean l_found; " + char(13); code = code + "clear table WDC_Pricing_TRX_LINE; " + char(13); code = code + "'WDC Module Mode' of table WDC_Pricing_TRX_LINE = 3 {SOP}; " + char(13); code = code + "'WDC Transaction Type' of table WDC_Pricing_TRX_LINE = l_type; " + char(13); code = code + "'WDC Transaction Number' of table WDC_Pricing_TRX_LINE = l_number; " + char(13); code = code + "'Line Item Sequence' of table WDC_Pricing_TRX_LINE = l_sequence; " + char(13); code = code + "'Component Sequence' of table WDC_Pricing_TRX_LINE = l_component; " + char(13); code = code + "get table WDC_Pricing_TRX_LINE; " + char(13); code = code + "if err() = OKAY then " + char(13); code = code + " l_found = true; " + char(13); code = code + "else " + char(13); code = code + " l_found = false; " + char(13); code = code + "end if; " + char(13); if execute(1999, code, complier_error, l_type, l_number, l_sequence, l_component, l_found) <> 0 then error complier_error; end if; if not l_found then warning "This Item is not on a Pricing Contract, please select another item."; '(L) Delete Flag' of window 'SOP_Entry' of form 'SOP_Entry' = 1; run script 'Delete Row Button' of window 'SOP_Entry' of form 'SOP_Entry'; focus 'Item Number' of window 'Line_Scroll' of form 'SOP_Entry'; OUT_Active = true; end if;