Skip to Content
0

Batch number Creation FMS

Feb 02 at 06:38 AM

49

avatar image
Former Member

Hi Experts

I made the follwoing FMS to create Batches during Receipt from production

IF $["OBTN"."U_MixNo"] <> ' ' THEN

SELECT 'MNo'||'-'||$["OBTN"."U_MixNo"]||'-'||$["OBTN"."U_ProNo"]||'-'||$["OBTN"."U_MachNm"]||'-'||Round($["OBTN"."U_Packwght"],2) FROM DUMMY;

ELSE

IF $["OBTN"."U_MixNo"] = ' ' THEN

SELECT 'SF'||'-'||$["OBTN"."U_ProNo"]||'-'||$["OBTN"."U_MachNm"] FROM DUMMY;

ELSE

IF $["OBTN"."U_LotNo"] <> ' ' THEN

SELECT

REPLACE (IFNULL($["OBTN"."U_LotNo"],''), '-','') || '-' ||

(SELECT T0."U_BatchPrefix" FROM "@OSTG" T0 WHERE T0."Code" = $["OBTN"."U_ProdStage"])

|| IFNULL($["OBTN"."MnfSerial"],'')

||'-'|| IFNULL($["OBTN"."LotNumber"],'')

||'-'|| IFNULL($["OBTN"."U_MachineNo"],'')

FROM DUMMY;

ELSE

SELECT LEFT($[$35.5.0],3) || '-' || (count(*) + 1) FROM OIBT T0;

END IF;

END IF;

END IF;

you can see after each IF statement condition will concatenate these fields values and make a batch number only First 2 IF statements are concatenating values but last two are not.

My SAP Business one version 9.2 PL06 HANA

Can anyone help me out Plz

Kind Regards,

Jamil Siddiqui

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

0 Answers