0 Replies Latest reply on Sep 30, 2015 11:15 PM by 1567114

    PL/SQL Concurrent Program got getting Printed for Zebra Language

    1567114

      Hello,

       

      I have a requirement where I have to Print a Bar Code Label in Zebra Printer.

       

      For the testing purpose I have created a Packaged Procedure where the call is been made.

       

      Below example:

       

      create or replace package test_label_pkg AUTHID CURRENT_USER

      AS

      --g_printer_name   CONSTANT VARCHAR2(50):='ZBR123467';

       

       

      PROCEDURE TEST_PRINT_LABEL

      (

      ERRBUF  OUT VARCHAR2,

      RETCODE OUT NUMBER,

      TAG     IN NUMBER

      );

      END;

       

      CREATE OR REPLACE PACKAGE BODY apps.test_label_pkg

      AS

      g_printer_name   CONSTANT VARCHAR2(50):='ZBR6242455';

      procedure write_line

      (

      p_buffer_line IN VARCHAR2)

      IS

      BEGIN

        --+--------------------------------------+

        --Write the Buffer

        --+--------------------------------------+

        --Write buffer to the Concurrent Manager output.

        fnd_file.put_line(fnd_file.output,p_buffer_line);

        DBMS_OUTPUT.put_line(p_buffer_line);

      END write_line;

       

       

      PROCEDURE TEST_PRINT_LABEL

      (

      errbuf  OUT VARCHAR2,

      retcode OUT NUMBER,

      P_TAG     IN NUMBER

      )

      IS

      v_lpn_data VARCHAR2(30) := '1234AB';

      BEGIN

        fnd_file.put_line(fnd_file.LOG,'+---------------------------------+');

        fnd_file.put_line(fnd_file.LOG,'TAG PRINTING STARTS');

        fnd_file.put_line(fnd_file.LOG,'+---------------------------------+');

        write_line('<STX><ESC>c<ETX>'); --Set 86xx emulation mode.

        write_line('<STX><ESC>P<ETX>'); --Enter Program mode.

        write_line('<STX>E4;F4;c<ETX>'); --Erase previous format#4.

        write_line('<STX>H1;o580,20;f3;c20;h1;w1;d3, Custom Lable Print - ORATEST;<ETX>');

        write_line('<STX>B2;o550,30;f3;c6,0,1;h100;w2.85;i0;d3,'||v_lpn_data||';p@;<ETX>');

        write_line('<STX>H18;o38,225;f3;c30;h2;w1;d3,' ||TO_CHAR(SYSDATE, 'MON/DD/RR HH24:MI:SS')||' ;<ETX>');

        write_line('<STX>H18;o38,225;f3;c30;h2;w1;d3,' ||TO_CHAR(SYSDATE, 'MON/DD/RR HH24:MI:SS')||' ;<ETX>');

        write_line('<STX>R<ETX>');--Enter data mode

        write_line('<STX><ESC>E4<CAN><ETX>');--Access format #4 clear data

        write_line('<STX><ETB><ETX>');--Print the Label

      EXCEPTION

      WHEN OTHERS THEN

        FND_FILE.PUT_LINE(FND_FILE.LOG,'Unhandled exception occurred in package. ErrMsg: '||SQLERRM);

              retcode:='2';

      END;

       

      END test_label_pkg;

       

      In the Concurrent program I have created a Printer driver for the ZEBRA one:

       

      In the Printer Driver Setup :

       

      Driver Name:PASTA_ZEBRA001

      User Driver:PASTA_ZEBRA001

       

      Driver Methods Parameters:

       

      Checked Spool File

      Program Name:FNDPSTAX

       

      -pn$PROFILES$.PRINTER -t"$PROFILES$.TITLE" -f$PROFILES$.FILENAME -c$PROFILES$.CONC_COPIES -ZBR6242455.cfg

       

      Please need urgent help on this as I am not getting any error in the Concurrent Program while running .