Hi,
One of the subroutine in my program checks whether case/pallet entered is valid or not and accordingly it displays message on the screen.
Currently it accepts case id and displays it on the screen as per program's flow but i just want to add a message on the screen that when any case id is entered that 'you entered case not pallet' and after this it should proceed like earlier i mean after overriding this message program's flow should be continued like earlier so i just wanted to introduce this warning kind of message only which should be overriden(soft warning).
my subroutine to validate pallet and case id is like below , kindly advise suitable changes in this subroutine to get this soft warning introduced in it.
[code]
**************************************************************************
* Subroutine VLDT1 - To validate scanned LPNs *
**************************************************************************
C Vldt1 BegSr
*
/Free
Wrk_Paid = *Blanks;
ItemClas = *Blanks;
em01 FlgProcess2 = 'N';
If WSCASN = *Blanks;
WsMsg = 'Scan Palet/Case';
Flg_Error = 'Y' ;
LeaveSr;
EndIf;
// Invalid case/Pallet scanned
Chain(N) WSCASN IDCASE00; //Single Case
IF Not %Found(IDCASE00);
Chain(N) (LdWhse:' ':WSCASN) IDCASE10;
If Not %Found(IDCASE10);
WsMsg = 'Not Valid Cs/Pl';
Flg_Error = 'Y' ;
LeaveSr;
Else ;
if PltOrCase = ' ' ;
PltOrCase = 'P' ;
em22 elseif PltOrCase = 'X' and idpaid <> *blanks;
| exec sql
| select count(*) into :count from idcasez3
| where idwhse = :ldwhse and idzone = :w_zone and
| idaisl = :w_aisl and idbay = :w_bay and
| idlevl = :w_levl and idposn = :w_posn and
| idpaid = ' ';
| if count > *zero;
| WsMsg = 'Scan ONLY Cases';
| Flg_Error = 'Y' ;
| LeaveSr;
| else;
| Exec Sql
| Select count(*) into :count from idcase36
| where idpaid = :idpaid;
| if count = stptqt or count = stnum5;
| WsMsg = 'Partial Pallet Only';
| Flg_Error = 'Y' ;
| LeaveSr;
| endif;
em22 endif;
else;
if PltOrCase = 'C' ;
WsMsg = 'Scan ONLY Cases';
Flg_Error = 'Y' ;
LeaveSr;
endif;
endif;
EndIf;
ELSE;
If PltOrCase = ' ' ;
PltOrCase = 'C' ;
Else;
if PltOrCase = 'P' ;
WsMsg = 'Scan ONLY Pallet';
Flg_Error = 'Y' ;
LeaveSr;
endif;
EndIf;
EndIf;
em22 // If called from TOM Back Order, check GTOBKORP
| if l00_inpln <> *blanks;
| chain(n) (l00_inlocn:l00_inpln:wscasn) gtobkorp;
| if not %found (gtobkorp);
| wsmsg = 'Invalid Pallet/Case';
| Flg_Error = 'Y';
| LeaveSr;
| else;
| if boflag = '1';
| wsmsg = 'Invalid Pallet/Case';
| Flg_Error = 'Y';
| LeaveSr;
| endif;
| endif;
em22 endif;
//Case or cases on pallet can NOT be locked with 'QH' lock
Chain(N) WSCASN IDCASE00; //Single Case
IF %Found(IDCASE00);
ra02 //if IdLkcd = 'QH' OR IdLkc2 = 'QH' OR IdLkc3 = 'QH' OR
ra02 // IdLkc4 = 'QH' OR IdLkc5 = 'QH' ;
ra02 //Lock code logic
ra02 exSr @getLockCodes;
ra02 If lockCodeErr;
WsMsg = 'No Locked Cases';
Flg_Error = 'Y' ;
LeaveSr;
endif;
//can NOT have SDC & SD2 Items. They belong to SDC/SD2
em01 Exsr Read_BNK012P;
| //GSITEM = %trim(IdStyl) + %trim(IdSsfx);
| //Chain GSITEM GSDCXREFP;
| //If %found(GSDCXREFP);
| // if (IDCASN < GSLOW OR IDCASN > GSHIGH OR
| // IDSC1 = GSREVS);
| // WsMsg = 'No SDC/SD2 units';
| // Flg_Error = 'Y' ;
| // LeaveSr;
| // endif;
em01 //EndIf;
ELSE;
SetLL (LdWhse:' ':WSCASN) IDCASE10; //Pallet is scanned
ReadE(N) (LdWhse:' ':WSCASN) IDCASE10;
DoW Not %Eof(IDCASE10);
Wrk_Paid = 'Y' ;
//Case or cases on pallet can NOT be locked with 'QH' lock
ra02 //if IdLkcd = 'QH' OR IdLkc2 = 'QH' OR IdLkc3 = 'QH' OR
ra02 // IdLkc4 = 'QH' OR IdLkc5 = 'QH' ;
ra02 //Lock code logic
ra02 exSr @getLockCodes;
ra02 If lockCodeErr;
WsMsg = 'No Locked Cases';
Flg_Error = 'Y' ;
LeaveSr;
endif;
//can NOT have SDC & SD2 Items. They belong to SDC/SD2
em01 Exsr Read_BNK012P;
| //GSITEM = %trim(IdStyl) + %trim(IdSsfx);
| //Chain GSITEM GSDCXREFP;
| //If %found(GSDCXREFP);
| // if (IDCASN < GSLOW OR IDCASN > GSHIGH OR
| // IDSC1 = GSREVS);
| // WsMsg = 'No SDC/SD2 units';
| // Flg_Error = 'Y' ;
| // LeaveSr;
| // endif;
em01 //EndIf;
ReadE(N) (LdWhse:' ':WSCASN) IDCASE10;
EndDo;
ENDIF;
//save item first time when you scanned
IF W_Styl = *Blanks;
W_Whse = IdWhse;
W_Co = IdCo ;
W_Div = IdDiv ;
W_Zone = IdZone;
W_Aisl = IdAisl;
W_Bay = IdBay ;
W_Levl = IdLevl;
W_Posn = IdPosn;
W_Styl = IdStyl;
W_Ssfx = IdSsfx;
W_Item = %trim(W_Styl) + %trim(W_Ssfx);
ELSE;
//can NOT have mixed SKU
If W_Styl <> IdStyl OR W_Ssfx <> IdSsfx ;
WsMsg = 'No Mixed SKUs';
Flg_Error = 'Y' ;
LeaveSr;
EndIf;
ENDIF;
em04 // Make sure full and partial pallet not being mixed
| PartialPalt = 'N';
em05 // Check if equipment
|| itnbr = %trim(W_Styl) + %trim(W_Ssfx);
|| Chain ('003':itnbr) itmrevl1;
em05 If %found (itmrevl1) and opegrp = 'EQ';
| Chain ('GOODMAN':'MFG':' ':' ':W_Styl:W_Ssfx) STSTYL00;
| If PltOrCase = 'C';
| If stptqt > 1 or stnum5 > 1;
| PartialPalt = 'Y';
| EndIf;
| Else;
| If PltOrCase = 'P';
| Exec Sql
| Select count(*) into :count from idcase36
| where idpaid = :idpaid;
| If count <> stptqt and count <> stnum5;
| PartialPalt = 'Y';
| EndIf;
| Else;
| If PltOrCase = 'X';
em22 if idpaid = *blanks;
|| PartialPalt = 'N';
|| else;
|| PartialPalt = 'Y';
em22 endif;
| EndIf;
| EndIf;
| EndIf;
|
| // Loop thru cases in Printer location/Pallet#/Case#
| // to check if it contains partial pallets
| Setll (LdWhse:' ':W_FlLocn) IDCASE10;
| Reade (LdWhse:' ':W_FlLocn) IDCASE10;
| If %eof (IDCASE10);
| P_Zone = %Subst(W_FLLOCN:1:2);
| P_Aisl = %Subst(W_FLLOCN:3:2);
| P_Bay = %Subst(W_FLLOCN:5:2);
| P_Levl = %Subst(W_FLLOCN:7:2);
| P_Posn = %Subst(W_FLLOCN:9:2);
| Setll (LdWhse:P_Zone:P_Aisl:P_Bay:P_Levl:P_Posn) IDCASEZ3;
| Reade(n) (LdWhse:P_Zone:P_Aisl:P_Bay:P_Levl:P_Posn) IDCASEZ3;
| EndIf;
| If not %eof (IDCASE10) or not %eof (IDCASEZ3);
| If IdPaid = *blanks;
| // Carton
| If stptqt > 1 or stnum5 > 1;
| PltOrCase = 'X';
| EndIf;
| Else;
| // Pallet
| Exec Sql
| Select count(*) into :count from idcase36
| where idpaid = :idpaid;
| If count <> stptqt and count <> stnum5;
| PltOrCase = 'X';
| EndIf;
| EndIf;
|
| // Set error if partial pallet in printer location
| // and non-partial pallet is being loaded
| If PltOrCase = 'X' and PartialPalt <> 'Y';
| WsMsg = 'Partial Pallet Only';
| Flg_Error = 'Y' ;
| LeaveSr;
| Else;
| If PltOrCase = 'C' and PartialPalt = 'Y';
| WsMsg = 'Scan ONLY Cases';
| Flg_Error = 'Y' ;
| LeaveSr;
| Else;
| If PltOrCase = 'P' and PartialPalt = 'Y';
| WsMsg = 'Scan ONLY Full Palt';
| Flg_Error = 'Y' ;
| LeaveSr;
| EndIf;
| EndIf;
| EndIf;
|
| EndIf;
em04
em05 EndIf;
kc01
| stprgr = *blanks;
| Chain ('GOODMAN':'MFG':' ':' ':W_Styl:W_Ssfx) STSTYL00;
| if stprgr = *blanks;
| Flg_Error = 'Y' ;
| wssku = W_Styl + W_Ssfx;
| WsMsg = 'New item - See Sup';
| LeaveSr;
kc01 endif;
/End-Free
*
* No Error ? then move units from EOL locn into Forklift locn
* Move scanned Pallet(s)/Case(s) from EOL locn into Forklift printer locn
C Exsr MvEOL2Prt
*
/Free
Chain(N) ISZ3Key1 ISLOCNZ3;
if %Found(ISLOCNZ3);
WsSKU = %trim(IsStyl) + %trim(IsSsfx);
W_Item = %trim(IsStyl) + %trim(IsSsfx);
WsInvu = IsInvu;
//find Item Class
chain (W_Item:'DDC') ITEMBL;
if %found(ITEMBL);
ItemClas = I_ITCLS; //ISSYR exist both in ITEMBL & ISLOCN files
endif;
endif;
/End-Free
C EndSr
**************************************************************************
[/code]
------------------------------
Kevin Steve
------------------------------