Hi my colleague,
Â
Use the code snippet below.
Â
DECLARE
-- p0 -> g_Bind.n.0]
p0_ FLOAT := 0;
-- p1 -> g_Bind.s.0]
p1_ VARCHAR2(32000) := '';
-- p2 -> g_Bind.s.1]
p2_ VARCHAR2(32000) := 'TCLK';
-- p3 -> g_Bind.s.2]
p3_ VARCHAR2(32000) := '1';
-- p4 -> g_Bind.n.1]
p4_ FLOAT := 1;
-- p5 -> g_Bind.s.3]
p5_ VARCHAR2(32000) := '*';
-- p6 -> g_Bind.dtd0]
p6_ DATE := to_date('2022-01-14-00.00.00','YYYY-MM-DD-HH24.MI.SS','NLS_CALENDAR=GREGORIAN');
-- p7 -> g_Bind.s.4]
p7_ VARCHAR2(32000) := 'TRUE';
-- p8 -> g_Bind.s.5]
p8_ VARCHAR2(32000) := '!
$PART_NO=B000006
$VENDORS=!
-$VENDOR_NO=T000544
-$REVISIONS=!
--$REVISION_NO=1
--
-
';
vendors_ varchar2(32000);
revisions_ varchar2(32000);
attr_ varchar2(32000);
BEGIN
 Â
attr_ := Message_SYs.Construct('!');
Message_Sys.Add_Attribute(attr_,'PART_NO','B000006');
vendors_ := Message_SYs.Construct('!');
Message_Sys.Add_Attribute(vendors_,'VENDOR_NO','T000544');
revisions_ := Message_SYs.Construct('!');
Message_Sys.Add_Attribute(revisions_,'REVISION_NO',1);
Message_Sys.Add_Attribute(vendors_,'REVISIONS',revisions_);
Message_Sys.Add_Attribute(attr_,'VENDORS',vendors_);
IFSAPP.Qman_Control_Plan_API.Apply_Control_Plan_Template(p0_ ,
p1_ ,
p2_ ,
p3_ ,
p4_ ,
p5_ ,
p6_ ,
p7_ ,
attr_ );
END;
Hi @savasciftciÂ
Try below as well. Assigning a value for p8_ has moved to BEGIN END block.
PROCEDURE Copy_Purch_Cntrl_Plan (part_no_ Â VARCHAR2,
                 vendor_no_ VARCHAR2)
IS
     -- p0 -> g_Bind.n 0]
     p0_ FLOAT := 0;
     -- p1 -> g_Bind.sÂ0]
     p1_ VARCHAR2(32000) := '';
     -- p2 -> g_Bind.s>1]
     p2_ VARCHAR2(32000) := 'TCLK';
     -- p3 -> g_Bind.s<2]
     p3_ VARCHAR2(32000) := '1';
     -- p4 -> g_Bind.n01]
     p4_ FLOAT := 1;
     -- p5 -> g_Bind.sÂ3]
     p5_ VARCHAR2(32000) := '*';
     -- p6 -> g_Bind.dtÂ0]
     p6_ DATE := SYSDATE;
     -- p7 -> g_Bind.s<4]
     p7_ VARCHAR2(32000) := 'TRUE';
     -- p8 -> g_Bind.s<5]
  p8_ VARCHAR2(32000);
 Â
BEGIN
 Â
  p8_ VARCHAR2(32000) := '!
$PART_NO='||part_no_||'
$VENDORS=!
-$VENDOR_NO='||vendor_no_||'
-$REVISIONS=!
--$REVISION_NO=1
--
-
';
  FOR REC_ IN (SELECT PPS.* FROM PURCHASE_PART_SUPPLIER pps
        WHERE PPS.PART_NO=PART_NO_
        AND  PPS.VENDOR_NO=VENDOR_NO_
       )LOOP
        --error_sys.Record_GeneraL(lu_name_,'merhaba :P1 1. PARAMETRE :P2 2. PARAMETRE',part_no_,p8_);
 IFSAPP.Qman_Control_Plan_API.Apply_Control_Plan_Template(p0_ ,Â
                             p1_ ,Â
                             p2_ ,Â
                             p3_ ,Â
                             p4_ ,Â
                             p5_ ,Â
                             p6_ ,Â
                             p7_ ,Â
                             p8_);
END LOOP;
END Copy_Purch_Cntrl_Plan;
Â