ESC Commands on Reports

How do I can use ESC commands on Reports, like cutting the page after the report is finished, i'm using AS 10g and a EPSON TM-U220 A, and I need to print receipts

Yes you can do that. I've done that before with Oracle Reports 2.3.
We created a file which contains the printer commands and the equivalent codes that the report will use.
Then you will have to put this codes in the "Printer Code Before/After" properties of your report object ( i.e a frame or a text field).
Also you have to put specify the filename of this config file in your DESFORMAT system parameter. I think this option is more flexible as you dont have to change your code if ever you change a printer (assuming that printer commands are different). You only have to update the config file.
You may also use this SRW package :
SRW.SET_BEFORE_PRINTING_CODE

Similar Messages

  • Esc Command to serial Port

    I'd like to send an esc command to the serial port in my LV-application. how I can do that ??
    I tried to use write to serial port and \1b as string but it not worked.
    In a terminal programm it works with the ESC key and with ALT+027.

    Hi,
    You have to be careful with the kind of datas that you send...
    You told that you sent \1b or something like this, but did you sent this in Ascii mode or \ mode... It's very different for the device...
    Maybe you have to write as a constant in \ mode the code \1b, and after that convert this string type to ascii mode using the roght button on the constant and then send the character to the device

  • Unix command in Report Builder

    Is it possible to use UNIX command in Report builder because I am trying to move one file in UNIX directory to some other directory in UNIX also.
    Thanks
    Shishu Paul
    Chandigarh

    Hye, Basically , I have attached this report in Oracle Apps 11.5.10 and wants to output of this, always having specific output id for each report which have been completed in Apps to be move to some specified folder.
    Please provide some guidance.
    Thanks
    Shishu Paul

  • Is there any command in Reports 6i - which is similar to raise form_trigger

    Is there any command in Reports 6i - which is similar to raise form_trigger_failure in forms6i.

    This might be helpful,
    You must raise the exception from within your PL/SQL.
    SRW.PROGRAM_ABORT examples
    /* Suppose you want to put a border around the salary if it is greater
    than 0.
    ** Suppose, also, that if the report fetches a salary less than 0, you
    want to
    ** raise a customized error message (i.e., "FOUND A NEGATIVE SALARY. .
    ** then terminate the report execution. To do so, you could write the
    ** following format trigger for F_SAL.
    FUNCTION foo return boolean is
    BEGIN
    if :sal >= 0 then
    srw.attr.mask := SRW.BORDERWIDTH_ATTR;
    srw.attr.borderwidth := 1;
    srw.set_attr (0, srw.attr);
    else
    srw.message(100, 'FOUND A NEGATIVE SALARY.
    CHECK THE EMP TABLE.');
    raise srw.program_abort;
    end if;
    RETURN (TRUE);
    END;

  • Host command in reports 6i

    Is there a host command in reports 6i? I used this in forms 6i. When I tried to use in Reports 6i, I received a compile error.
    Thanks

    basically all I need to do is to get directory information. This can be easily done in forms using the host command. Is there any built in package or function to achieve this?

  • Host command in report

    i want to use host command in report
    but error happened
    any thing instead of host

    i use rep2excel
    i put button in report
    when a user press abutton in report appear
    report in excel format
    and i put this code
    procedure U_1ButtonAction is
    v_conn_str varchar2(50) := 'scott/ghrbia'; --To be changed
    v_rep2excel_path varchar2(100) := 'C:\thepath\rep2excel.exe';--To be changed
    v_cache_path varchar2(100) :='c:\Temp\';--To be changed
    v_random_name varchar2(100);
    v_cmd_rwrun varchar2(300);
    v_cmd_rep2excel varchar2(300);
    v_input_path varchar2(300) ;
    v_output_path varchar2(300) ;
    Begin
    select to_char(round(dbms_random.value(100000, 999999)))||to_char(sysdate,'DDHH24MISS')
    into v_random_name from dual;
    v_input_path := v_cache_path||v_random_name||'.htm' ;
    v_output_path := v_cache_path||v_random_name||'.xls' ;
    v_cmd_rwrun := 'RWRUN60 REPORT=D:\work\banner\report\excel.rdf USERID='||v_conn_str;
    v_cmd_rwrun := v_cmd_rwrun || ' DESTYPE=FILE DESFORMAT=HTML' ;
    v_cmd_rwrun := v_cmd_rwrun || ' DESNAME='||v_input_path||' batch=yes';
    v_cmd_rwrun := v_cmd_rwrun || ' P_dept='||:dept_id;
    --:cmd1 := v_cmd_rwrun ;
    host(v_cmd_rwrun);
    v_cmd_rep2excel:='cmd /c start '||v_rep2excel_path||' -i:'||v_input_path ||' -o:'||v_output_path ||' -open' ;
    -- :cmd2 := v_cmd_rep2excel;
    HOST(v_cmd_rep2excel);
    end;

  • Equivalent command in Reports like Sapscripts's PROTECT and ENDPROTECT

    Hi,
    What is the equivalent command in Reports like Sapscripts's PROTECT and ENDPROTECT?
    - Selva

    Hi,
    I don't think you have any particular command for that in reports. but if you are talking about headers / footers then you may use the events TOP-OF-PAGE and END-OF-PAGE.
    Regards,
    Anand Mandalika.

  • How to issue print command from report/form server to client printer on web

    1) We have a client server application which is to be deployed on the web environment. The reports generated in our application are having a destination type as File. These reports are printed after applying some print format (escape sequences) which are passed on to the printer programmatically at runtime while printing.
    Now when this application is shifted on to the Application server (Forms server & Reports Server )in web environment ,the report outputs would be generated in the application server as against the client in client server environment as the report server is on the application server.
    Now while printing/accessing the report the output file will not be available to the client unless it is pushed on to the client side from the server . I am able to see reports in pdf/html output but in this case layout of my reports gets changed and I dont want to change my layouts or reformat my report layouts.
    How do I redirect the report output from the application server on to the client within the D2k context and then execute print commands?
    Note: In this case we want to use both DMT and Laser printing. Also note that we use escape sequences to adjust reports in desired printing papers.
    2) We have second set of reports which we call as document because these are printed after capturing data from 'Form' using text_io utility (please note that for these documents we are not using any Report 6i functionality)and we print it from file using printing mechanism as mentioned above. These are working well in client server application. We adopted this methodology for getting better performance (in terms of speed as database server and network traffic is not involved) of printing. But now we are converting our application for web, we are finding it difficult how to capture Form's data from browser to client's machine and then executing printing commands which are stored in our application liabrary.
    If you help me out by giving some suggestions, I shall be grateful to you.
    null

    Hello
    I wonder if you ever solved this problem.
    I have a very similar problem with Photoshop CS5 on Mac OSX 10.6 + HP Photosmart C7180.
    If I choose "Photoshop Manages Colors" the results are lousy.
    If I choose "Printer Manages Colors" the results are OK. not necessarily great.
    I believe I have all the correct settings after going through books and web advice (and wasted a lot of paper and ink).
    As far as I can see, "ColorSync" is the internal Mac management which is the only option available with "Photoshop Manages Colors" and "Vendor Matching" appears to mean the printer vendor (ie HP) will provide the matching. Either can be selected if "Printer Manages Colors" is used. It seems the type of paper can be set in three different places. if That's all a bit academic as the results are poor regardless.
    My wife suggests I buy a new printer - Epson's looking good.
    Any words of wisdom would be appreciated.

  • How to run a HOST command from Report 2.5

    Hello everybody,
    I want to pass an unix command from a Report. I am running the report (Report 2.5) on an Unix server and I want to pass a unix host command inside the Before Report Trigger of the report. But Report2.5 is not recognising the HOST built-in. Is there is any way around?
    Thank in advance.
    Samujjwal Basu

    First off is that openssl command correct? Should it be this instead:
    openssl pkcs8 -inform der -nocrypt -in test.der -out result.pem
    Try out your openssl command within a command prompt so that you know that it works ok. I think the command line you specified waits on stdin (well it does for me).
    After that.....
    runtime.exec creates a Process object. If you do this:
    Process openssl = runtime.exec("....")
    then you can examine the return code from openssl to see the exit code - for instance if the input file does not exist then exit = 1. You can test for this with Java
    Alternatively you could get the stderr from the process and look inside it - if it is 0 length then all is good, if it has some text in there then it has likely failed. You could then throw an exception and include the stderr output in the exception messgae. You may need to experiment with this, runnig it first when openssl is happy then running it again when openssl is upset.
    M

  • Duplicate value in Command extract report

    Hi Experts
    I am getting a duplicate record when extracting the BOM which is so called Material Extract in my words
    when running the report I am getting the duplicate value for the cost estimate. near the form extract_bom_details under select queries
    Can anyone help me why I am getting so by seeing the coding please.
    TYPES:
      BEGIN OF ty_bom,
        matnr(12)  TYPE c,  " Material #
        werks(4)   TYPE c,  " Plant
        stprs(10)  TYPE c,  " Quantity
        meins(3)   TYPE c,  " Unit of Measure
      END OF ty_bom,
      it_ty_bom TYPE ty_bom OCCURS 0,
    *Start of block of changes for JPC20061107
      BEGIN OF ty_bom_sapfmt,
        matnr   TYPE MARC-MATNR,  " Material #
        werks   TYPE MARC-WERKS,  " Plant
        stprs   TYPE MBEW-STPRS,  " Quantity
        meins   TYPE MARA-MEINS,  " Unit of Measure
      END OF ty_bom_sapfmt.
    Report  COMMAND_EXTRACT_D                                      *
    REPORT  command_extract_d                    .
    *CLASS cl_gui_control DEFINITION LOAD.
    *CLASS cl_gui_frontend_services DEFINITION LOAD.
    Tables
    TABLES:
      kna1,
      knb1,
      knvv,
      mara,
      mast,                                       "JPC20061107
      marc,
      makt,mbew,
      sscrfields.
    CONSTANTS: BEGIN OF gc_status,
                 acc  TYPE zcrstat1 VALUE ' ACC',
                 hol  TYPE zcrstat1 VALUE ' HOL',
                 sto  TYPE zcrstat1 VALUE ' STO',
                 ok   TYPE zcrstat1 VALUE '  OK',
                 hold TYPE zcrstat1 VALUE 'HOLD',
               END OF gc_status.
    CONSTANTS: BEGIN OF gc_reason,
                 000 TYPE zreason VALUE '000',
                 001 TYPE zreason VALUE '001',
                 002 TYPE zreason VALUE '002',
                 003 TYPE zreason VALUE '003',
                 004 TYPE zreason VALUE '004',
                 005 TYPE zreason VALUE '005',
                 006 TYPE zreason VALUE '006',
                 007 TYPE zreason VALUE '007',
                 008 TYPE zreason VALUE '008',
                 010 TYPE zreason VALUE '010',
                 011 TYPE zreason VALUE '011',
                 021 TYPE zreason VALUE '021',
                 022 TYPE zreason VALUE '022',
                 023 TYPE zreason VALUE '023',
                 024 TYPE zreason VALUE '024',
                 025 TYPE zreason VALUE '025',
                 026 TYPE zreason VALUE '026',
                 999 TYPE zreason VALUE '999',
               END OF gc_reason.
    TYPES: BEGIN OF ty_kna1_fields,
             kunnr TYPE kna1-kunnr,
             sperr TYPE kna1-sperr,
             aufsd TYPE kna1-aufsd,
             lifsd TYPE kna1-lifsd,
             faksd TYPE kna1-faksd,
             loevm TYPE kna1-loevm,
           END OF ty_kna1_fields.
    TYPES: BEGIN OF ty_knb1_fields,
             kunnr TYPE knb1-kunnr,
             bukrs TYPE knb1-bukrs,
             sperr TYPE knb1-sperr,
             loevm TYPE knb1-loevm,
           END OF ty_knb1_fields.
    TYPES: BEGIN OF ty_knvv_fields,
             kunnr TYPE knvv-kunnr,
             vkorg TYPE knvv-vkorg,
             vtweg TYPE knvv-vtweg,
             spart TYPE knvv-spart,
             aufsd TYPE knvv-aufsd,
             lifsd TYPE knvv-lifsd,
             faksd TYPE knvv-faksd,
           END OF ty_knvv_fields.
    TYPES: BEGIN OF ty_knkk_fields,
             kunnr TYPE knkk-kunnr,
             kkber TYPE knkk-kkber,
             ctlpc TYPE knkk-ctlpc,
             crblb TYPE knkk-crblb,
             knkli TYPE knkk-knkli,
             klimk TYPE knkk-klimk,
             skfor TYPE knkk-skfor,
             ssobl TYPE knkk-ssobl,
           END OF ty_knkk_fields.
    TYPES: BEGIN OF ty_cust_stat_output,
             kunnr(10) TYPE c, "Customer #
             stat(4)   TYPE c, "Customer status
           END OF ty_cust_stat_output.
    TYPES:
      BEGIN OF ty_customers,
        kunnr(10)  TYPE c,  " Customer #
        div1(1)    TYPE c,  " Pipe delimiter
        name1(32)  TYPE c,  " Customer name
        div2(1)    TYPE c,  " Pipe delimiter
        altkn(8)   TYPE c,  " Old Customer #
        div3(1)    TYPE c,  " Pipe delimiter
        stras(30)  TYPE c,  " Street
        div4(1)    TYPE c,  " Pipe delimiter
        ort01(20)  TYPE c,  " City
        div5(1)    TYPE c,  " Pipe delimiter
        regio(3)   TYPE c,  " State
        div6(1)    TYPE c,  " Pipe delimiter
        pstlz(4)   TYPE c,  " Postcode
        div7(1)    TYPE c,  " Pipe delimiter
        telf1(14)  TYPE c,                                      " Phone 1
        div8(1)    TYPE c,  " Pipe delimiter
        telf2(14)  TYPE c,                                      " Phone 2
        div9(1)    TYPE c,  " Pipe delimiter
        erdat(10)  TYPE c,  " date
        div10(1)   TYPE c,  " Pipe delimiter
        splant(2)  TYPE c,  " plant
        div11(1)   TYPE c,  " Pipe delimiter
      END OF ty_customers,
      it_ty_customers TYPE ty_customers OCCURS 0,
      BEGIN OF ty_custstat,
        kunnr(11)  TYPE c,  " Customer #
        company(2) TYPE c,  " #
        status(3)  TYPE c,  " acc,cod,hol,
      END OF ty_custstat,
      it_ty_custstat TYPE ty_custstat OCCURS 0.
    TYPES:
      BEGIN OF ty_materialm,
        matnr(12)  TYPE c,  " Material #
        maktx2(40) TYPE c,  " Command sales desc.
        maktx(16)  TYPE c,  " Basic description
        extwg(6)   TYPE c,  " External Material Group
        flag1(1)   TYPE c,  "
        flag2(1)   TYPE c,  "
        flag3(1)   TYPE c,  "
        flag4(1)   TYPE c,  "
      END OF ty_materialm,
      it_ty_materialm TYPE ty_materialm OCCURS 0,
      BEGIN OF ty_materialp,
        matnr(12)  TYPE c,  " Material #
        werks(4)   TYPE c,  " plant
        batch(1)   TYPE c,  " download to batch
      END OF ty_materialp,
      it_ty_materialp TYPE ty_materialp OCCURS 0.
    TYPES:
      BEGIN OF ty_bom,
        matnr(12)  TYPE c,  " Material #
        werks(4)   TYPE c,  " Plant
        stprs(10)  TYPE c,  " Quantity
        meins(3)   TYPE c,  " Unit of Measure
      END OF ty_bom,
      it_ty_bom TYPE ty_bom OCCURS 0,
    *Start of block of changes for JPC20061107
      BEGIN OF ty_bom_sapfmt,
        matnr   TYPE MARC-MATNR,  " Material #
        werks   TYPE MARC-WERKS,  " Plant
        stprs   TYPE MBEW-STPRS,  " Quantity
        meins   TYPE MARA-MEINS,  " Unit of Measure
      END OF ty_bom_sapfmt.
    Selection screen definition
    SELECTION-SCREEN: BEGIN OF BLOCK bom WITH FRAME TITLE text-004.
    PARAMETERS:
      p_dbom LIKE filepath-pathintern DEFAULT 'Z_COMMAND_BOM_EXTRACT',
      p_fbom LIKE rlgrap-filename.
    SELECT-OPTIONS:
      s_bmatnr FOR MARA-MATNR,                                "JPC20061107
      s_bwerks FOR MAST-WERKS no-extension no intervals,      "JPC20061107
      s_bextwg FOR mara-extwg.
    SELECTION-SCREEN: END OF BLOCK bom.
    SELECT-OPTIONS:
      s_kunnr FOR kna1-kunnr.
    SELECTION-SCREEN: END OF BLOCK ccst.
    DATA: clsdir TYPE REF TO cl_gui_frontend_services.
    DATA: strfolder TYPE string.
    DATA: folderln TYPE i.
    DATA: gva_error(1) TYPE c VALUE ' '.
    Initial procedure on START ***************
    INITIALIZATION.
      p_fcust = 'CUST.prn'.
      p_fmatm = 'MATM.prn'.
      p_fmatp = 'MATP.prn'.
      p_fbom  = 'BOM.prn'.
      p_fccst = 'CCSTAT.prn'.
      p_fccst2 = 'CCSTATC.prn'.
      p_fccstl = 'CCSTATL.prn'.
      s_dextwg-option = 'BT'.
      s_dextwg-low = '1'.
      s_dextwg-high = '8'.
      APPEND s_dextwg.
      s_bextwg-option = 'BT'.
      s_bextwg-low = '1'.
      s_bextwg-high = '1'.
      APPEND s_bextwg.
    AT SELECTION-SCREEN.
      IF p_ccust EQ 'X' AND ( p_fcust IS INITIAL OR p_dcust IS INITIAL ).
        MESSAGE s000(zppu)
        WITH 'You must specify the file details for the customer data'.
        gva_error = 'X'.
      ENDIF.
      IF p_cmatm EQ 'X' AND ( p_fmatm IS INITIAL OR
                              p_fmatp IS INITIAL OR
                              p_dmatm IS INITIAL ).
        MESSAGE s001(zppu)
        WITH 'You must specify the file details for the material data'.
        gva_error = 'X'.
      ENDIF.
      IF p_cbom EQ 'X' AND ( p_fbom IS INITIAL OR p_dbom IS INITIAL ).
        MESSAGE s002(zppu)
        WITH 'You must specify the file details for the BOM data'.
        gva_error = 'X'.
      ENDIF.
      IF p_cbom EQ 'X'.
        IF s_bwerks-low is initial.
          MESSAGE s002(zppu)
            WITH 'You must specify a plant to run BOM extract for'.
          gva_error = 'X'.
        ENDIF.
        IF LINES( s_bwerks ) > 1.
          MESSAGE s002(zppu)
            WITH 'You can only specify 1 plant for BOM extract'.
          gva_error = 'X'.
        ENDIF.
      ENDIF.
      IF p_ccst EQ 'X' AND ( p_fccst IS INITIAL OR
                             p_fccst2 IS INITIAL OR
                             p_fccstl IS INITIAL OR
                             p_dccst IS INITIAL ).
        MESSAGE s002(zppu)
        WITH 'You must specify the file details for the customer'
             'status data'.
        gva_error = 'X'.
      ENDIF.
    AT SELECTION-SCREEN OUTPUT.
      PERFORM user_command.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_fcust.
      PERFORM get_gui_filename USING p_dcust p_fcust.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_fmatm.
      PERFORM get_gui_filename USING p_dmatm p_fmatm.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_fmatp.
      PERFORM get_gui_filename USING p_dmatm p_fmatp.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_fbom.
      PERFORM get_gui_filename USING p_dbom p_fbom.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_fccst.
      PERFORM get_gui_filename USING p_dccst p_fccst.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_fccst2.
      PERFORM get_gui_filename USING p_dccst p_fccst2.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_fccstl.
      PERFORM get_gui_filename USING p_dccst p_fccstl.
    END-OF-SELECTION.
    Data selection execution.
      DATA: lwa_kna1 TYPE kna1,
            lwa_knb1 TYPE knb1,
            lwa_knvv TYPE knvv.
      DATA: lwa_marc TYPE marc,
            lwa_mara TYPE marav,
            lwa_makt TYPE makt.
      DATA: lit_marav TYPE marav OCCURS 0.
      DATA: lit_customers TYPE it_ty_customers,
            lwa_customers TYPE ty_customers.
      DATA: lit_custstat  TYPE it_ty_custstat,
            lwa_custstat  TYPE ty_custstat.
      DATA: lit_materialm TYPE it_ty_materialm,
            lwa_materialm TYPE ty_materialm.
      DATA: lit_materialp TYPE it_ty_materialp,
            lwa_materialp TYPE ty_materialp.
    *(del)DATA: lwa_bomlist TYPE ty_bomlist,           "JPC20061107
    *(del)  lit_bomlist TYPE it_ty_bomlist.            "JPC20061107
      DATA: lwa_bom TYPE ty_bom_sapfmt,
            lit_bom TYPE it_ty_bom WITH HEADER LINE.   "JPC20061107
          lit_bom TYPE it_ty_bom.                    "JPC20061107
      DATA: output_file   TYPE string.
      DATA: lock_file     TYPE string.
      DATA: lva_mssage    TYPE string.
      DATA: lva_matnr(18) TYPE n.
      DATA: lva_date      TYPE datum.
      DATA: txtper(3)     TYPE c.
      DATA: custper       TYPE i.
      DATA: custcount     TYPE i.
      DATA: itemnum       TYPE i.
      CHECK gva_error <> 'X'.
      IF p_ccust EQ 'X'. " Do the customer file extract
        PERFORM extract_customer_details.
      ENDIF.
      IF p_cmatm EQ 'X'. " Do the Material file extract
        PERFORM extract_material_details.
      ENDIF.
      IF p_cbom EQ 'X'. " Do the BOM file extract
        PERFORM extract_bom_details.
      ENDIF.
      IF p_ccst EQ 'X'.  " Do the customer credit status file extract
        PERFORM extract_credit_status_details.
      ENDIF.
    *&      Form  extract_customer_details
          text
    -->  p1        text
    <--  p2        text
    FORM extract_customer_details.
      SELECT * FROM knb1
      INTO lwa_knb1
      WHERE bukrs = p_dcomp.
        MOVE-CORRESPONDING lwa_knb1 TO lwa_customers.
        MOVE-CORRESPONDING lwa_knb1 TO lwa_custstat.
        MOVE '#' TO lwa_custstat-company.
        MOVE p_dwerk TO lwa_customers-splant.
    --WG1K903075: Start Delete-
         move: '|' to lwa_customers-div1,
               '|' to lwa_customers-div2,
               '|' to lwa_customers-div3,
               '|' to lwa_customers-div4,
               '|' to lwa_customers-div5,
               '|' to lwa_customers-div6,
               '|' to lwa_customers-div7,
               '|' to lwa_customers-div8,
               '|' to lwa_customers-div9,
               '|' to lwa_customers-div10,
               '|' to lwa_customers-div11.
    --WG1K903075: End Delete---
    --WG1K903075: Start Insert-
        MOVE: ' ' TO lwa_customers-div1,
              ' ' TO lwa_customers-div2,
              ' ' TO lwa_customers-div3,
              ' ' TO lwa_customers-div4,
              ' ' TO lwa_customers-div5,
              ' ' TO lwa_customers-div6,
              ' ' TO lwa_customers-div7,
              ' ' TO lwa_customers-div8,
              ' ' TO lwa_customers-div9,
              ' ' TO lwa_customers-div10,
              ' ' TO lwa_customers-div11.
    --WG1K903075: End Insert---
        APPEND lwa_customers TO lit_customers.
        APPEND lwa_custstat TO lit_custstat.
      ENDSELECT.
      DESCRIBE TABLE lit_customers LINES custcount.
      LOOP AT lit_customers INTO lwa_customers.
        txtper = 100 * sy-tabix / custcount.
        custper = txtper.
        SELECT SINGLE * FROM kna1
        INTO lwa_kna1
        WHERE kunnr = lwa_customers-kunnr.
        MOVE-CORRESPONDING lwa_kna1 TO lwa_customers.
        lva_date = lwa_customers-erdat.
        CALL FUNCTION 'CONVERT_DATE_TO_EXTERNAL'
          EXPORTING
            date_internal            = lva_date
          IMPORTING
            date_external            = lwa_customers-erdat
          EXCEPTIONS
            date_internal_is_invalid = 1
            OTHERS                   = 2.
        REPLACE ALL OCCURRENCES OF '.'
        IN lwa_customers-erdat WITH '/'.
        CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
          EXPORTING
            input  = lwa_customers-kunnr
          IMPORTING
            output = lwa_customers-kunnr.
        WRITE: lwa_customers-kunnr RIGHT-JUSTIFIED TO lwa_customers-kunnr.
        MODIFY lit_customers FROM lwa_customers.
    Percentage indicator display
        lva_mssage = 'Extracting customers'.
        CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
          EXPORTING
            percentage = custper
            text       = lva_mssage.
      ENDLOOP.
      IF p_gui IS INITIAL.
        PERFORM get_file_path USING p_dcust p_fcust output_file.
        OPEN DATASET output_file FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
        IF sy-subrc EQ 0.
          LOOP AT lit_customers INTO lwa_customers.
            TRANSFER lwa_customers TO output_file.
          ENDLOOP.
          CLOSE DATASET output_file.
        ELSE.
          MESSAGE s002(zppu)
            WITH 'Dataset' output_file 'cannot be opened on the server'.
        ENDIF.
      ELSE.
        MOVE p_fcust TO output_file.
        CALL FUNCTION 'GUI_DOWNLOAD'
          EXPORTING
            filename = output_file
            filetype = 'ASC'
          TABLES
            data_tab = lit_customers
          EXCEPTIONS
            OTHERS   = 11.
      ENDIF.
      output_file = custcount.
      CONCATENATE
        output_file
        ' Customers extracted'
      INTO
        lva_mssage.
       message lva_mssage type 'I'.
    ENDFORM.                    " extract_customer_details
    *&      Form  extract_bom_details
          text
    -->  p1        text
    <--  p2        text
    FORM extract_bom_details.
        select MARAMATNR MBEWBWKEY MBEWSTPRS MARAMEINS  "JPC20061220
          into lwa_bom
          from ( MARAV AS MARA
               inner join MARC
               ON MARAMATNR = MARCMATNR
               INNER join MBEW
               ON MARCMATNR = MBEWMATNR
               AND MARCWERKS = MBEWBWKEY
             where MARA~MATNR in s_bmatnr
               and MBEW~BWKEY   in s_bwerks
               and MARA~EXTWG in s_bextwg.
        clear lit_bom.
        WRITE lwa_bom-matnr TO lit_bom-matnr.
        MOVE  lwa_bom-werks TO lit_bom-werks.
        MOVE: lwa_bom-stprs TO lit_bom-stprs,
              lwa_bom-meins TO lit_bom-meins.
        APPEND lit_bom.
      ENDSELECT.
      SORT lit_bom ascending.
    Ending for lines inserted for change 20061107
      IF p_gui IS INITIAL.  "write to server
        PERFORM get_file_path USING p_dbom p_fbom output_file.
        OPEN DATASET output_file FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
        IF sy-subrc EQ 0.
          custcount = lines( lit_bom ).
          LOOP AT lit_bom.
            txtper = 100 * sy-tabix / custcount.
            custper = txtper.
            lva_mssage = 'Extracting material B.O.Ms'.
            CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
              EXPORTING percentage = custper
                        text       = lva_mssage.
            TRANSFER lit_bom TO output_file.
          ENDLOOP.
          CLOSE DATASET output_file.
        ELSE.
          MESSAGE s002(zppu)
            WITH 'Dataset' output_file 'cannot be opened on the server'.
        ENDIF.
      ELSE.
        MOVE p_fbom TO output_file.
        CALL FUNCTION 'GUI_DOWNLOAD'
          EXPORTING
            filename              = output_file
            filetype              = 'ASC'
            write_field_separator = ' '
          TABLES
            data_tab              = lit_bom
          EXCEPTIONS
            OTHERS                = 11.
      ENDIF.
    ENDFORM.                    " extract_bom_details
    output with duplicate values
    MARA        BWKEY STPRS MEINS
    10004989    BN01    28.00 TO
    10004989    BN01    28.00 TO
    10005010    BN01    19.00 EA
    10005010    BN01    19.00 EA
    10005018    BN01   800.00 BAG
    10005018    BN01   800.00 BAG
    10005115    BN01    82.74 TO
    10005115    BN01    82.74 TO
    10005117    BN01   137.30 TO
    10005117    BN01   137.30 TO
    Regards
    Piroz

    Hi,
    Use this statement then duplicate entries removed.
    DELETE ADJACENT DUPLICATES FROM table-field.
    regards,
    Lakshminarayana

  • How should I use the 'COPY' & 'NAME_IN' command in Report Builder

    when I use 'NAME_IN' in report builder
    It always shows 'identifier 'NAME_IN' must be declared'!!
    Help me how to resolve or give me another command to get the same result!!!!!!!!!
    Thank you very much!!

    Please see note 137098.1 in metalink. name_in is a Forms specific built-in. In Reports, use srw.get_value, ie srw.get_value('FIELD').
    Hope that helps,
    Toby

  • Message command in report - Control M

    People,
    a basic question..
    I have a report scheduled in Control M, but this report has a lot of MESSAGE command.
    After this job runs, can I access these messages or they are lost?
    Thanks!

    ok

  • Call Unix Command From Reports Using Java

    Hi,
    Could somebody please show me a sample coding to call Unix command from 10g report using java?
    In metalink doc id 361857.1 does not show much.
    Thanks,
    neemin

    Hi,
    I have a problem with synchronization of the java commands.
    In the Before Parammeter Form trigger, I have:
    function BeforePForm return boolean is
    rt ORA_JAVA.JOBJECT;
    proc ORA_JAVA.JOBJECT;
    v_txt varchar2(32000);
    i integer := 0;
    v_cd_modulo int;
    v_arqlog text_io.file_type;
    cursor c_evento is
    select codigo,
    nome
    from
    (select e.cd_evento || e.cd_edicao codigo
    ,nm_evento nome
    from grh_ev_evento e
    where e.CD_GRUPO in (select cd_grupo
    from grh_ev_adm
    where cd_usuario = (select cd_usuario
    from usuario
    where login_usuario = :AUTHID)))
    order by substr(nome, 11);
    begin
    -- Create the context for logged user
    if instr(upper(nvl(:AUTHID,'RWCLIENT')),'RWCLIENT') > 0 then
    :AUTHID := :SSO_USUARIO;
    end if ;
    TCEENV.SET_TCEENV(:AUTHID);
    if PK_SCA.SCA_GET_USER_RIGHTS(:sca_module_name, :AUTHID) IS NULL then
    srw.message(100, 'Access denided!');
    return (FALSE);
    end if;
    -- Create file in Report Server (UNIX)
    v_txt := '<BR>' || htf.formSelectOpen('P_EV_EDICAO', 'Evento: ');
    :p_file := '/u03/SCAWEB/repout/' || :sca_module_name || '_' ||
    pk_sca.sca_encrypt(:AUTHID || to_char(systimestamp, 'ss.ff'));
    v_arqlog := text_io.fopen (:p_file, 'A');
    text_io.put_line (v_arqlog, v_txt);
    for reg in c_evento loop
    i := i + 1;
    if i = 1 then
    v_txt := '<OPTION SELECTED VALUE="' || reg.codigo || '">' || reg.nome;
    else
    v_txt := '<OPTION VALUE="' || reg.codigo || '">' || reg.nome;
    end if;
    text_io.put_line (v_arqlog, v_txt);
    end loop;
    v_txt := '</SELECT></CENTER></form></BODY> </HTML>';
    text_io.put_line (v_arqlog, v_txt);
    text_io.fclose (v_arqlog);
    SRW.SET_AFTER_FORM_HTML(SRW.FILE_ESCAPE, :p_file);
    rt := RUNTIME.GetRuntime();
    proc := RUNTIME.exec(rt,'rm ' || :p_file);
    return (TRUE);
    end;
    The problem is that there isn't a "synchronize" command, and the
    RUNTIME.exec(rt,'rm ' || :p_file) don't works (it does nothing) because
    the SRW.SET_AFTER_FORM_HTML has a large delay and the following
    command is ignored.
    How can I solve it?
    thanks,
    lmprestes

  • 'PICK' and User commands in reports

    I'm a bit confused about 'PICK' in PF_STATUS.
    I fI define it, does that mean It can only be recognised in LINE-SELECTION , and not in AT USER-COMMAND.
    I've defined a small program and thats what seems to be happening?

    You can see here that the function code PICK is automatically fired when a hotspot is involved and hence the AT LINE-SELECTION event is fired to handle it.
    report zrich_0001.
    data: itstc type table of tstc with header line.
    select-options : s_tcode for itstc-tcode.
    at line-selection.
      check sy-ucomm = 'PICK'.
      call transaction itstc-tcode.
    start-of-selection.
      select * into corresponding fields of table itstc
                 from tstc
                      where tcode in s_tcode.
      loop at itstc.
        format hotspot on.
        write:/ itstc-tcode.
        hide itstc-tcode.
        format hotspot off.
      endloop.
    Regards
    Rich Heilman

  • Intel Mac: unix command line reports powerpc hosttype?!?

    Our brand new Intel Mac reports that it's a powerpc from the command line! Open Terminal & type the two bash commands below to compare (set & uname -a). I think that's why FINK was confused when we tried to compile vncserver.
    What should hosttype be set to for an intel mac?
    set
    BASH_VERSINFO=([0]="2" [1]="05b" [2]="0" [3]="1" [4]="release" [5]="powerpc-apple-darwin8.0")
    BASH_VERSION='2.05b.0(1)-release'
    HOSTTYPE=powerpc
    MACHTYPE=powerpc-apple-darwin8.0
    TERM=xterm-color
    uname -a
    Darwin lifesaver 8.8.1 Darwin Kernel Version 8.8.1: Mon Sep 25 19:42:00 PDT 2006; root:xnu-792.13.8.obj~1/RELEASE_I386 i386 i386

    Is there anything useful here or here?
    (16635)

Maybe you are looking for

  • Getting values from a function module called in a WDA method

    Friends, I am trying to execute a function module from WDA. I have created a service call for the function module. The function module takes values from the user, looks up the corresponding values of another field and returns the values in an interna

  • I can't select lines in a pdf ? illustrator has already selected a series of blue rectangles that prevent me from select?

    Hi there, I'm new to illustrator I have been using it to change line weights in pdf's. however the last time i imported a pdf it opens with a series of blue selection boxes which prevent me from selecting individual lines. any ideas? any advice would

  • SAP Standard objects:modified ones.

    Dear all, my client wants to have a report where in he can see all the modified SAP standard object so that he can analyse his effort for the next upgrade. there is already a report existing which does this but not sure if the logic is correct. It is

  • Inventory value increase

    Hi, (Initially wrongly posted this in BI and hence repeating here) Is there any way I can post a transaction to increase the inventory value ? We have a requirement. After the product is manufactured it (Wine) is kept in warehouse for curing purpose

  • Group by error "ORA-00979: not a GROUP BY expression"

    I am working on class assignment. Looking to solve the error. Can anyone tell me what I did wrong? Data: Customer table [custid] Plant Order Table [orderid, cusid] PlantOrderDetail Table [orderid, plantid, quantity, unitprice] I am trying to get a to