Script Printing

I am making changes to existing check printing process in a custom sap script. We are including a $ sign in the amount field (i.e. $*****145.00 ).
But it is appearing as ( s with a line on top and bottom ).In spool file $ appears correctly and when I print it shows up as s.
I have put a write statement in Abap and printed - it appears as s. I have put the same $ in a word doc with same font & size defined in character format of sap script and it prints as single line $. I have checked the character format in SPAD and it appears as $ only. Please help.
Thanks,
Kamala

To further isolate your issue, try changing the charecter format in your SAP Script,,
Let me know the results, so that we can proceed further.

Similar Messages

  • Acrobat 9 Pro-Is it possible to script Print with Preset?

    Hello,
    Does anyone know if this is possible? From what I understand, even if you create a batch to print, you have to set the print presets in Acrobat to how you want the PDFs to print. Sometimes we need duplexed pages, sometimes we need marks, etc. I can't imagine I'm the only one who has dealt with this, but I can't find any scripts that are even in the ball park.
    If anyone has a script available or can create a script to print with a preset or print with static settings, I will try modifying it to my needs.
    Thanks for any assistance with this.
    Danny

    The options availible for scripted print settings are all shown in the entry for "PrintParams" object in the Acrobat JavaScript Reference.  Have you looked to see if these options fit your needs?  If they do, and if the script can detect which PDF requires which options, then  you're in business.  But if the options you need are not there, then your only option is to set the batch process to display the print dialog for every PDF.
    Thom Parker
    The source for PDF Scripting Info
    pdfscripting.com
    The Acrobat JavaScript Reference, Use it Early and Often
    http://www.adobe.com/devnet/acrobat/javascript.html
    Then most important JavaScript Development tool in Acrobat
    The Console Window (Video tutorial)
    The Console Window(article)

  • SAP Script Printing

    Hi,
    Can we have 'Collate' functionality as in Word document in SAP script printing.

    Hi Rathakrishnan,
    It's not a functionality of SAP script, but you have to set an attribute of the output device. Use transaction SPAD, select your printer and hit button Output Device. Then go to Tab 'Output attributes' and set 'Copies as separate output requests (in SAP System)'. This is similar to the collate functionality.
    Does this solve your problem?
    Regards,
    John.

  • List of standard sap scripts/print programs in SAP MM and SD modules ??

    Hi,
    I have worked in medruck only. Can anyone give me a list of other standard sap scripts/print program names in SAP MM, FI/CO and SD modules, which often needs to be  modified by the client ?
    thanks

    press f4 in SE71
    then press application heirarchy, expand the modules which ever u want.
    regards.
    santhosh reddy
    Reward if useful

  • How can I download a Generic Post Script printer Driver  for Windows 7 .

    How can I download a Generic Post Script printer Driver  for Windows 7

    We used to install this PostScript printer  for previous Windows releases from
    (winsteng) and run it to install the driver from the below location
    http://www.adobe.com/support/downloads/detail.jsp?ftpID=1500
    This doesnt work with Win 7 (The install crashes ) , Basically looking to do the same process with Win 7

  • Problem in script printing

    Hi Guru's
    I have a problem in script printing.
    The quantity and netprice are printing incorrectly. i.e., quantity should print as 1.000 where as it is printing as 1,000 and net price is printing as 5,30 instead of 5.30.
    I have checked in the owndata settings it is like 1,234,56.00.
    I would like to know whether any settings will be there or i need to do any modificatione
    Waiting for you reply.

    Hi!
    Here you can find the SAPScript formatting options.
    http://help.sap.com/saphelp_47x200/helpdata/en/d1/803411454211d189710000e8322d00/content.htm
    If it is not good for you, you might code it in your printer program and put it into a character variable.
    Regards
    Tamá

  • Locating a post script printer

    Hi all,
    Its my understanding that MacBook Pro with Mountain Lion have a post script printer loaded up. When I try to select this printer, I do not see it. How can I find it? If there is not one built in, what is a good driver to get?
    Thanks!

    Apple does not make printers as far as I know, you must choose a printer that fits your needs, then download the drivers from the manufacturers site.
    I think they refer to them as "air printers"

  • Script printing changes when transport from QTY to Production.

    Hi all,
    i m having a problem with sap script printing. i have a report which prints well in a perticular printer when it is in Quality server. but when i transport it to Production it gets different fonts style and the alignment of the fonts gets disturb, like out of 10 values in amount fields 1 or 2 amounts alignments gets changed.
    what could be the reason for this. and what could be its solution.
    plzz help me to solve this problem..
    thanx...

    Hi,
    Please check the printers in both the Servers. The printer settings will do the change. Contact the Basis guys or the hardware guys there and check the printer settings.
    Check the request numbers of the FORMS so that any other code replaces that old code you are telling.
    But i strongly believe that it will be the printer settings.
    Regards,
    SUBBU.

  • All values in internal table are not displaing in the script print program

    Hi,
    I am calling the script program.In main window all values in the internal table are not displaying. I wrote
    write-form statement in loop. But not all the values are getting displayed. Only thel ast values getting dispalyed. 
    *& Report  ZSCRIPT_116719
    REPORT  ZSCRIPT_116719.
    ************Table decleration***************
    TABLES: mara, mbew, makt.
    loop at i_makt into wa_makt.
      endloop.
    loop at i_MARA into wa_mara.
      endloop.
    LOOP AT I_MBEW INTO WA_MBEW.
      ENDLOOP.
    lv_price = 0.
    ********************Total Price******************
      LOOP AT i_mbew INTO wa_mbew.
        lv_price = lv_price + wa_mbew-stprs.
      ENDLOOP.
    end-of-selection.
    CALL FUNCTION 'OPEN_FORM'
    EXPORTING
      APPLICATION                       = 'TX'
      ARCHIVE_INDEX                     =
      ARCHIVE_PARAMS                    =
      DEVICE                            = 'PRINTER'
      DIALOG                            = 'X'
       FORM                              = 'ZSCRIPT_719'
       LANGUAGE                          = SY-LANGU
      OPTIONS                           =
      MAIL_SENDER                       =
      MAIL_RECIPIENT                    =
      MAIL_APPL_OBJECT                  =
      RAW_DATA_INTERFACE                = '*'
      SPONUMIV                          =
    IMPORTING
      LANGUAGE                          =
      NEW_ARCHIVE_PARAMS                =
      RESULT                            =
    EXCEPTIONS
       CANCELED                          = 1
       DEVICE                            = 2
       FORM                              = 3
       OPTIONS                           = 4
       UNCLOSED                          = 5
       MAIL_OPTIONS                      = 6
       ARCHIVE_ERROR                     = 7
       INVALID_FAX_NUMBER                = 8
       MORE_PARAMS_NEEDED_IN_BATCH       = 9
       SPOOL_ERROR                       = 10
       CODEPAGE                          = 11
       OTHERS                            = 12
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    CALL FUNCTION 'START_FORM'
    EXPORTING
      ARCHIVE_INDEX          =
       FORM                   = 'ZSCRIPT_719'
       LANGUAGE               = SY-LANGU
      STARTPAGE              = ' '
       PROGRAM                = 'ZSCRIPT_116719'
      MAIL_APPL_OBJECT       =
    IMPORTING
      LANGUAGE               =
    EXCEPTIONS
      FORM                   = 1
      FORMAT                 = 2
      UNENDED                = 3
      UNOPENED               = 4
      UNUSED                 = 5
      SPOOL_ERROR            = 6
      CODEPAGE               = 7
      OTHERS                 = 8
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    *LOOP AT I_MBEW INTO WA_MBEW.
    CALL FUNCTION 'WRITE_FORM'
    EXPORTING
       ELEMENT                        = 'DATA'
       FUNCTION                       = 'SET'
       TYPE                           = 'BODY'
       WINDOW                         = 'MAIN'
    IMPORTING
      PENDING_LINES                  =
    EXCEPTIONS
       ELEMENT                        = 1
       FUNCTION                       = 2
       TYPE                           = 3
       UNOPENED                       = 4
       UNSTARTED                      = 5
       WINDOW                         = 6
       BAD_PAGEFORMAT_FOR_PRINT       = 7
       SPOOL_ERROR                    = 8
       CODEPAGE                       = 9
       OTHERS                         = 10
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    *ENDLOOP.
    If I give only one value it is showing the output. When I am fetching the data for range of values it i sshowing start_form is not there.
    Plz let me know how to get the aa  internal table values  to be displayed

    hi
    I shortened your program a bit. So we can go to essentials of your question.
    You said you put in it in a loop.
    What i see in your prog is:
    REPORT zscript_116719.
    ************table decleration***************
    TABLES: mara, mbew, makt.
    LOOP AT i_makt INTO wa_makt.
    ENDLOOP.
    LOOP AT i_mara INTO wa_mara.
    ENDLOOP.
    LOOP AT i_mbew INTO wa_mbew.
    ENDLOOP.
    lv_price = 0.
    ********************total price******************
    LOOP AT i_mbew INTO wa_mbew.
      lv_price = lv_price + wa_mbew-stprs.
    ENDLOOP.
    END-OF-SELECTION.
      CALL FUNCTION 'OPEN_FORM'
        EXPORTING
          form     = 'ZSCRIPT_719'
          language = sy-langu.
      CALL FUNCTION 'START_FORM'
        EXPORTING
          form     = 'ZSCRIPT_719'
          language = sy-langu
          program  = 'ZSCRIPT_116719'.
    *LOOP AT I_MBEW INTO WA_MBEW.
      CALL FUNCTION 'WRITE_FORM'
        EXPORTING
          element  = 'DATA'
          function = 'SET'
          type     = 'BODY'
          window   = 'MAIN'.
    *endloop.
    1. Your loop is not a loop with this '*' in front of it.
    2. Are you printing &wa_mbew-???& variables in your sap-script
    3. is itab I_MBEW properly filled
    Let me know.
    Gr. Frank

  • Script print proble if odd page

    how to print blank page if page is odd in sap script  ( DUPLEX mode (double-sided)

    Hi,
    Put condition directly to windows on page in order to not print on ODD page. Means Put condition first for any code of window
    IF &PAGE& = EVEN NO...
    xxxxx
    xxxx
    xxxx
    Endif.
    Edited by: MR Venkat on Sep 3, 2009 1:49 PM

  • Need to print a text of 255 char from a Ztable into sap script printing.

    Hi All,
    I Have a requirement where I have to fetch an incoterm description maintained in Z table according to incoterm key and print it via SAP script.
    I am getting the complete 255 char data in the variable which I am passing to the script from the driver program, However in the output I can see only 80 characters getting printed.
    My code
    Subroutine created in se71
    DEFINE &L_VTEXT& = SPACE
    PERFORM GET_INCOTERMS IN PROGRAM ZMM_MEDRUCK
    USING &EKKO-INCO1&
    CHANGING &L_VTEXT&
    ENDPERFORM
    Form created in Driver program:
    FORM get_incoterms TABLES pt_input STRUCTURE itcsy
                                                 pt_output STRUCTURE itcsy.
       DATA: l_vtext TYPE zincoterms-vtext.
       READ TABLE pt_input WITH KEY name = 'EKKO-INCO1'.
       SELECT SINGLE vtext FROM zincoterms INTO l_vtext
           WHERE inco1 = pt_input-value.
       CLEAR pt_output.
       pt_output-value = l_vtext.
       MODIFY pt_output TRANSPORTING value WHERE name = 'L_VTEXT'.
    ENDFORM.                 
    Note: Here pt_output-value is having a complete 255 char data
    I have tried printing it using offset as well, However complete text is not getting printed.
    Please help me in solving this issue as it is urgent requirement.
    Thanks and Regards,
    Ankit

    Hi Ankit,
       pt_output-value = l_vtext.
       MODIFY pt_output TRANSPORTING value WHERE name = 'L_VTEXT1'.
       pt_output-value = l_vtext+80.
       MODIFY pt_output TRANSPORTING value WHERE name = 'L_VTEXT2'.
       pt_output-value = l_vtext+160.
       MODIFY pt_output TRANSPORTING value WHERE name = 'L_VTEXT3'.
       pt_output-value = l_vtext+240.
       MODIFY pt_output TRANSPORTING value WHERE name = 'L_VTEXT4'.
    I guess it's a workaround if it's really urgent. Present variables next to one another.
    regards,
    Edgar

  • Script Print Program Logic.......

    Hi All
    This is the print program of my script, i am not getting the logic..can any body help me with this..
    INCLUDE rvadtabl.
    TABLES: vbuk,                          "Vertriebsbeleg (Kopf)-Status
            vbco3,                         "Schlüsselfelder Vertriebsbeleg
            vbpla,                         "Allgemeine Transportdaten
            vbplk,                         "Versandelement Kopfdaten
            vbplp,                         "Versandelement Positionsdaten
            vbpls,                         "Verpackung Summendaten
            vekp,
            adrc,
            vbfa.                                               "DEVK937590
    TABLES: vbkd.                                               "DEVK942078
    *DEVK9A0EB4 - Add define
    TYPES:
      ty_itcsy TYPE STANDARD TABLE OF itcsy.
    start of change for DEVK937590
    DATA:   BEGIN OF t_deliveryflow OCCURS 0, "VBFA delivery flow
              vbeln LIKE vbfa-vbeln,          "Subsequent sales and distribu
            END OF t_deliveryflow.
    DATA:  v_lin      TYPE i.
    CONSTANTS: c_x(1) TYPE c VALUE 'X'.
    end of change for DEVK937590
    DATA: BEGIN OF xvbplk OCCURS 10.
            INCLUDE STRUCTURE vbplk.
    DATA: END OF xvbplk.
    DATA : BEGIN OF vbdkl OCCURS 10.
            INCLUDE STRUCTURE vbdkl.
    DATA : END OF vbdkl.
    DATA: BEGIN OF tvbdpl OCCURS 0.        "Internal table for items
            INCLUDE STRUCTURE vbdpl.
    DATA: END OF tvbdpl.
    DATA: BEGIN OF xvbplp OCCURS 50.
            INCLUDE STRUCTURE vbplp.
    DATA: END OF xvbplp.
    DATA: BEGIN OF xvbpls OCCURS 10.
            INCLUDE STRUCTURE vbpls.
    DATA: END OF xvbpls.
    DATA: retcode LIKE sy-subrc.
    DATA: xscreen(1) TYPE c.         "Ausgabe auf Drucker oder Bildschirm
    DATA: t_vepo LIKE vepo OCCURS 0 WITH HEADER LINE, "VEPO internal table
    BEGIN OF t_cartons OCCURS 0,     "Internal table for cartons
      venum LIKE vepo-venum,         "Shipping unit # for carton
    END OF t_cartons,
    BEGIN OF t_boxes OCCURS 0,       "Internal table for BOXES
      venum LIKE vepo-venum,         "Shipping unit # for BOXES
      laeng LIKE vekp-laeng,
      breit LIKE vekp-breit,
      hoehe LIKE vekp-hoehe,
      meabm LIKE vekp-meabm,
    END OF t_boxes,
    BEGIN OF t_pack_dim OCCURS 0,
      laeng LIKE vekp-laeng,
      breit LIKE vekp-breit,
      hoehe LIKE vekp-hoehe,
      meabm LIKE vekp-meabm,
      box_qty TYPE i,
    END OF t_pack_dim,
    v_venum LIKE vepo-venum,         "Shipping unit number
    i_cartons TYPE i,                "# of cartons (Integer type)
    i_boxes TYPE i,                  "# of boxes (Integer type)
    i_box_count TYPE i,              "# of boxes/carton   "DEVK926768
    c_cartons(4) TYPE c,             "# of cartons (Character type)
    c_boxes(4) TYPE c,               "# of boxes (Character type)
    c_bolnr(35) TYPE c,
    v_tel_number LIKE adrc-tel_number,
    v_adrnr LIKE adrc-addrnumber,
    v_kdmat LIKE lips-kdmat,
    v_btgew LIKE likp-btgew,
    v_gewei LIKE likp-gewei,
    v_arktx LIKE lips-arktx.
    ******DEVK9A0IK7 Addition by RAMARAJG Starts here
    types : BEGIN OF t_item ,
             posnr1 type vbplp-posnr,
             material1 TYPE mara-matnr,
             brgew1 type vbplp-brgew,
             vemeh1 type vbplp-vemeh,
             item_weight1 TYPE n,
             arktx1 type vbplp-arktx,
             vboxcnt type n,
           end of t_item.
    *types : BEGIN OF t_item1 ,
            posnr1 type vbplp-posnr,
            material1 TYPE mara-matnr,
            vemng1 type vbplp-brgew,
            vemeh1 type vbplp-vemeh,
            item_weight1 TYPE n,
            arktx1 type vbplp-arktx,
            v_boxcnt type n,
          end of t_item1.
    DATA: it_item TYPE TABLE OF t_item,
          wa_item TYPE t_item.
    data: it_item1 type table of t_item,
          wa_item1 type t_item.
    *data: wa_itab1 like itab1.
    data: v_grwt type lips-brgew,     "Gross Weight in KG
          v_gunit type likp-gewei,     "Gross Weight Unit
          v_netwt type lips-ntgew,    "Net Weight
          v_unit type likp-gewei.     "Net Weight Unit
         v_tboxes type i,
    ******DEVK9A0IK7 Addition by RAMARAJG ends here
    A. Nachricht (allgemein)                                             *
    FORM entry USING return_code us_screen.
      CLEAR retcode.
      xscreen = us_screen.
      PERFORM processing USING us_screen.
      IF retcode NE 0.
        return_code = 1.
      ELSE.
        return_code = 0.
      ENDIF.
    ENDFORM.                    "entry
          FORM PROCESSING                                               *
    -->  PROC_SCREEN                                                   *
    FORM processing USING proc_screen.
      PERFORM get_data.                    " <-- speziell
      PERFORM form_open USING proc_screen vbpla-land1.
      CHECK retcode = 0.
      PERFORM shipping_point_tel_no.
      PERFORM boxes_and_cartons.
      PERFORM gross_weight.
    ***********DEVK9A0IK7 starts here
    *******Perform to get the Net weight
    *******Perform to get Total weight for each line item
      Perform net_weight.                                   "DEVK9A0IK7
    Perform Total_weight.                                 "DEVK9A0IK7
    ***********DEVK9A0IK7 ends here
      PERFORM bill_of_lading.
      CHECK retcode = 0.
      PERFORM check_repeat.
      PERFORM text_print.                  " <-- speziell
    begin shb
      PERFORM get_end_customer_po.
    *end shb
      PERFORM packing_dimensions.
      PERFORM remarks.
      CHECK retcode = 0.
      PERFORM form_close.
      CHECK retcode = 0.
    ENDFORM.                    "processing
          FORM FORM_OPEN                                                *
    -->  US_SCREEN                                                     *
    -->  US_COUNTRY                                                    *
    FORM form_open USING us_screen us_country.
      INCLUDE rvadopfo.
    ENDFORM.                    "form_open
          FORM FORM_CLOSE                                               *
    FORM form_close.
      CALL FUNCTION 'CLOSE_FORM'           "...Ende Formulardruck
           EXCEPTIONS OTHERS = 1.
      IF sy-subrc NE 0.
        retcode = 1.
        PERFORM protocol_update.
      ENDIF.
      SET COUNTRY space.
    ENDFORM.                    "form_close
          FORM CHECK_REPEAT                                             *
    FORM check_repeat.
      SELECT * INTO *nast FROM nast WHERE kappl = nast-kappl
                                    AND   objky = nast-objky
                                    AND   kschl = nast-kschl
                                    AND   spras = nast-spras
                                    AND   parnr = nast-parnr
                                    AND   parvw = nast-parvw
                                    AND   nacha BETWEEN '1' AND '4'.
        CHECK *nast-vstat = '1'.
        CALL FUNCTION 'WRITE_FORM'
          EXPORTING
            element = 'REPEAT'
            window  = 'REPEAT'
          EXCEPTIONS
            element = 1
            window  = 2.
        IF sy-subrc NE 0.
          PERFORM protocol_update.
        ENDIF.
        EXIT.
      ENDSELECT.
    ENDFORM.                    "check_repeat
          FORM PROTOCOL_UPDATE                                          *
    FORM protocol_update.
      CHECK xscreen = space.
      CALL FUNCTION 'NAST_PROTOCOL_UPDATE'
        EXPORTING
          msg_arbgb = syst-msgid
          msg_nr    = syst-msgno
          msg_ty    = syst-msgty
          msg_v1    = syst-msgv1
          msg_v2    = syst-msgv2
          msg_v3    = syst-msgv3
          msg_v4    = syst-msgv4
        EXCEPTIONS
          OTHERS    = 1.
    ENDFORM.                    "protocol_update
    B. Packliste (speziell)                                              *
    Die Verpackung von Lieferungen wird durch Versandelemente (VSE)
    realisiert. Technisch ist ein Versandelement ein Beleg mit Kopf-
    und Positionsdaten (Strukturen VBPLK/XVBPLK und VBPLP/XVBPLP).
    Eine Position in einem VSE ist entweder wieder ein VSE oder Teil
    eine Lieferposition (also mit den zum VSE gehörenden Materialen/
    Versandhilftsmitteln verpackt). Der Zusammenhang zur Lieferung
    wird durch die beiden Felder VBELN (Lieferung) und POSNR (Position)
    in der Struktur VBPLP realisiert. Es ist zu beachten, daß ein VSE
    keine Positionsdaten enthalten muß: Die Lieferung wurde dann nicht
    vollständig verpackt.
    Mathematisch gesehen stellen die VSE einen Wald (aus Bäumen) dar.
    An den Knoten können noch Lieferpositionsdaten hängen. Um zu
    erkennen ob ein Knoten eine Wurzel oder (und) ein Blatt ist, gibt
    es im VSE-Kopf Kennzeichen. Ist KZOBE gesetzt, so ist das VSE ein
    oberes Element, also eine Wurzel. Ist KZUNT gesetzt, stellt das VSE
    ein unteres Element dar, also ein Blatt. Ist keines der beiden
    Kennzeichen gesetzt dann ist das VSE ein innerer Knoten. Es ist
    zu beachten, daß beiden Kennzeichen gesetzt sein können: Der Baum
    besteht aus einem Knoten. Die Tiefe eines Knotens durch das Feld
    TIVEL gegeben.
    Weiterhin ist der Baum doppelt verkettet. Es ist also möglich,
    nicht nur einen Weg von der Wurzel (eines Teilbaums) zu einem
    Blatt zu finden, sondern auch umgekehrt von einem Blatt zur Wurzel
    zu gelangen. Dazu existiert (im VSE-Kopf) das Feld UEVEL, also
    das übergeordnete VSE.
    Um schließlich zu entscheiden, ob ein VSE-Position ein VSE oder
    eine Lieferposition ist, wird das Feld POSNR ausgewertet. Ist
    das Feld initial, stellt die Position ein VSE dar, im anderen Fall
    enthält es die Lieferposition. Ist die Position ein VSE, steht im
    Feld UNVEL das zugehörige untergeordnete VSE.
    FORM get_data.
      vbco3-vbeln = nast-objky.
      vbco3-spras = nast-spras.
      vbco3-kunde = nast-parnr.
      vbco3-parvw = nast-parvw.
    *mod+
      CALL FUNCTION 'RV_DELIVERY_PRINT_VIEW'
        EXPORTING
          comwa = vbco3
        IMPORTING
          kopf  = vbdkl
        TABLES
          pos   = tvbdpl.
      CALL FUNCTION 'SD_PACKING_PRINT_VIEW'
        EXPORTING
          comwa     = vbco3
        IMPORTING
          vbpla_wa  = vbpla
        TABLES
          vbplk_tab = xvbplk
          vbplp_tab = xvbplp
          vbpls_tab = xvbpls
        EXCEPTIONS
          OTHERS    = 01.
      LOOP AT xvbplk WHERE kzobe = 'X'.
        EXIT.
      ENDLOOP.
      IF sy-subrc > 0.
        syst-msgid = 'VL'.
        syst-msgno = '490'.
        syst-msgty = 'E'.
        PERFORM protocol_update.
        retcode = 1.
      ENDIF.
    ENDFORM.                    "get_data
          FORM TEXT_PRINT                                               *
    FORM text_print.
    Die Kopfdaten werden implizit ausgegeben, ...
    ... dann die Überschriften der Positionen ...
      CALL FUNCTION 'WRITE_FORM'
        EXPORTING
          element = 'HEADER'
          type    = 'TOP'.
    ... und schließlich die Positionen ausgeben ...
      LOOP AT xvbplk WHERE kzobe = 'X'.
        PERFORM packing_tree USING xvbplk-venum.
      ENDLOOP.
    ENDFORM.                    "text_print
    Rekursive Prozedur
    FORM packing_tree USING value(shenr).
    Daten des Versandelements shenr ausgeben, also Wurzel des Teilbaums
      MOVE space TO xvbplk.
      xvbplk-venum = shenr.
      READ TABLE xvbplk.
      vbplk = xvbplk.
      READ TABLE t_cartons WITH KEY venum = vbplk-venum.
      IF sy-subrc = 0.
        IF vbplk-brgew <> 0.
          PERFORM set_textsymbol USING '&CARTON_WEIGHT&'
                                       vbplk-brgew.
        ELSE.
          PERFORM set_textsymbol USING '&CARTON_WEIGHT&'
        ENDIF.
        CALL FUNCTION 'WRITE_FORM'
          EXPORTING
            element = 'SHELEM'.
      ENDIF.
    Nun die Positionen abarbeiten (Teilbäume durchlaufen).
    Hier wäre eventuell ein Sortierung zwischen Lieferpositionen
    und weiteren Versandelementen sinnvoll. Alle nachgeordneten
    Positionen liegen eine Stufe tiefer.
      LOOP AT xvbplp WHERE venum = shenr.
        IF xvbplp-posnr IS INITIAL.
        Versandelement
          PERFORM packing_tree USING xvbplp-unvel.
        ELSE.
        Lieferposition (Anteil)
          vbplp = xvbplp.
          PERFORM customer_material.
    ***ramarajg starts.
          perform item_list.
    ***ramarajg end.
          IF vbplp-brgew <> 0.
            PERFORM set_textsymbol USING '&ITEM_WEIGHT&'
                                         vbplp-brgew.
          ELSE.
            PERFORM set_textsymbol USING '&ITEM_WEIGHT&'
          ENDIF.
             CALL FUNCTION 'WRITE_FORM'
              EXPORTING
              element = 'DELPOS'.
        ENDIF.
      ENDLOOP.
    ***ramarajg starts.
    perform TOTAL_WEIGHT.
    loop at it_item into wa_item.
          CALL FUNCTION 'WRITE_FORM'
            EXPORTING
              element = 'ITEMPOS'.
    endloop.
    break ramarajg.
    ***ramarajg end.
    ENDFORM.                    "packing_tree
          FORM SET_TEXTSYMBOL                                           *
    FORM set_textsymbol USING text_symbol
                              text_value.
      CALL FUNCTION 'TEXT_SYMBOL_SETVALUE'
        EXPORTING
          name  = text_symbol
          value = text_value.
    ENDFORM.                    "set_textsymbol
    *&      Form  BOXES_AND_CARTONS
          text
    -->  p1        text
    <--  p2        text
    FORM boxes_and_cartons.
      CLEAR: t_cartons,
             t_boxes,
             i_cartons,
             i_boxes.
      REFRESH: t_cartons,
               t_boxes.
    start of change for DEVK937590
      CLEAR t_deliveryflow[].
      SELECT vbeln
      FROM vbfa
      INTO CORRESPONDING FIELDS OF TABLE t_deliveryflow
      WHERE vbelv = vbpla-vbeln AND vbtyp_n = c_x.
    Select data
      DESCRIBE TABLE t_deliveryflow LINES v_lin.
      CHECK v_lin GT 0.
      SELECT venum vbeln
      FROM vepo
      INTO CORRESPONDING FIELDS OF TABLE t_vepo
      FOR ALL ENTRIES IN t_deliveryflow
      WHERE venum = t_deliveryflow-vbeln.
    SELECT VENUM
           VBELN
      FROM VEPO
      INTO CORRESPONDING FIELDS OF TABLE T_VEPO
      WHERE VBELN = VBPLA-VBELN.
    end of change for DEVK937590
      SORT t_vepo BY venum.
      DELETE ADJACENT DUPLICATES FROM t_vepo COMPARING venum.
    Determine the number of cartons and boxes to be shipped.
    To determine the number of cartons, shipping unit number (VENUM) is
    checked if it a lower-level shipping unit. This is done by reading
    table VEPO and checking if VENUM exist in UNVEL (Lower-level shipping
    unit). If it does, this means that VENUM is contained within
    another container. If it does not exist, it is considered the highest
    level of packing for that specific delivery.
      LOOP AT t_vepo.
    check if VENUM is a lower level shipping unit.
        SELECT SINGLE venum INTO v_venum
        FROM vepo
        WHERE unvel =  t_vepo-venum.
    If shipping unit number is found, count as carton.
        IF sy-subrc = 0.
        check if carton already exist for the carton.
          READ TABLE t_cartons WITH KEY venum = v_venum.
        if carton does not exist, append table
          IF sy-subrc <> 0.
            t_cartons-venum = v_venum.
            APPEND t_cartons.
          ENDIF.
        ENDIF.
      ENDLOOP.
    count boxes and cartons
      DESCRIBE TABLE t_vepo LINES i_boxes.
      DESCRIBE TABLE t_cartons LINES i_cartons.
    Convert cartons and boxes field values to CHARACTER type FORMAT.
    In order to save the output values to the output fields, the
    fields are converted to CHARACTER type formats.
      MOVE: i_cartons TO c_cartons,
            i_boxes TO c_boxes.
      PERFORM set_textsymbol USING '&BOXES&'
                                   c_boxes.
      PERFORM set_textsymbol USING '&CARTONS&'
                                   c_cartons.
    ENDFORM.                               " BOXES_AND_CARTONS
    *&      Form  BILL_OF_LADING
          text
    -->  p1        text
    <--  p2        text
    FORM bill_of_lading.
      SELECT SINGLE bolnr
          FROM likp
          INTO c_bolnr
          WHERE vbeln = vbpla-vbeln.
      PERFORM set_textsymbol USING '&BILL_OF_LADING&'
                                   c_bolnr.
    ENDFORM.                               " BILL_OF_LADING
    *&      Form  PACKING_DIMENSIONS
          text
    -->  p1        text
    <--  p2        text
    FORM packing_dimensions.
    CLEAR: T_BOXES,
            T_PACK_DIM.
    REFRESH: T_BOXES,
              T_PACK_DIM.
    SELECT VENUM
            LAENG
            BREIT
            HOEHE
            MEABM
    FROM VEKP
    INTO CORRESPONDING FIELDS OF TABLE T_BOXES
    FOR ALL ENTRIES IN T_VEPO
    WHERE VENUM = T_VEPO-VENUM.
    LOOP AT T_BOXES.
       READ TABLE T_PACK_DIM WITH KEY LAENG = T_BOXES-LAENG
                                      BREIT = T_BOXES-BREIT
                                      HOEHE = T_BOXES-HOEHE
                                      MEABM = T_BOXES-MEABM.
       IF SY-SUBRC = 0.
         T_PACK_DIM-BOX_QTY = T_PACK_DIM-BOX_QTY + 1.
         MODIFY T_PACK_DIM INDEX SY-TABIX.
       ELSE.
         T_PACK_DIM-LAENG = T_BOXES-LAENG.
         T_PACK_DIM-BREIT = T_BOXES-BREIT.
         T_PACK_DIM-HOEHE = T_BOXES-HOEHE.
         T_PACK_DIM-MEABM = T_BOXES-MEABM.
         T_PACK_DIM-BOX_QTY = 1.
         APPEND T_PACK_DIM.
       ENDIF.
    ENDLOOP.
    LOOP AT T_PACK_DIM.
       AT FIRST.
      CALL FUNCTION 'WRITE_FORM'
        EXPORTING
          element = 'PACKING_DIMENSIONS_HEADER'.
       ENDAT.
       CLEAR: VEKP,
              C_BOXES.
       VEKP-LAENG = T_PACK_DIM-LAENG.
       VEKP-BREIT = T_PACK_DIM-BREIT.
       VEKP-HOEHE = T_PACK_DIM-HOEHE.
       VEKP-MEABM = T_PACK_DIM-MEABM.
       MOVE: T_PACK_DIM-BOX_QTY TO C_BOXES.
       PERFORM SET_TEXTSYMBOL USING '&BOX_QTY&'
                                    C_BOXES.
       IF VEKP-LAENG <> 0 AND
          VEKP-BREIT <> 0 AND
          VEKP-HOEHE <> 0.
      CALL FUNCTION 'WRITE_FORM'
        EXPORTING
          element = 'PACKING_DIMENSIONS'.
       ENDIF.
    ENDLOOP.
    ENDFORM.                               " PACKING_DIMENSIONS
    *&      Form  REMARKS
          text
    -->  p1        text
    <--  p2        text
    FORM remarks.
      CALL FUNCTION 'WRITE_FORM'
        EXPORTING
          element = 'REMARKS'.
    ENDFORM.                               " REMARKS
    *&      Form  SHIPPING_POINT_TEL_NO
          text
    -->  p1        text
    <--  p2        text
    FORM shipping_point_tel_no.
      SELECT SINGLE adrnr
      FROM tvst
      INTO v_adrnr
      WHERE vstel = vbpla-vstel.
      SELECT SINGLE tel_number
      FROM adrc
      INTO adrc-tel_number
      WHERE addrnumber = v_adrnr.
    ENDFORM.                               " SHIPPING_POINT_TEL_NO
    *&      Form  CUSTOMER_MATERIAL
          text
    -->  p1        text
    <--  p2        text
    FORM customer_material.
      CLEAR: v_kdmat.
    begin of mod*
      IF vbdkl-lfart = 'LO'.
        SELECT SINGLE kdmat postx
          INTO (v_kdmat , v_arktx)
            FROM knmt
            WHERE vkorg = vbdkl-vkorg
            AND   vtweg = '01'
            AND   kunnr = vbdkl-kunag
            AND   matnr = vbplp-matnr.
        IF NOT v_kdmat IS INITIAL.
          vbplp-matnr = v_kdmat.
          vbplp-arktx = v_arktx.
        ENDIF.
      ELSE.
        SELECT SINGLE kdmat
          FROM lips
          INTO v_kdmat
          WHERE vbeln = vbplp-vbeln AND
                posnr = vbplp-posnr AND
                matnr = vbplp-matnr.
      ENDIF.
    **ramarajg
    IF v_kdmat <> ' '.
       PERFORM set_textsymbol USING '&MATERIAL&'
                                   v_kdmat.
    ELSE.
       PERFORM set_textsymbol USING '&MATERIAL&'
                                   vbplp-matnr.
    ENDIF.
    ENDFORM.                               " CUSTOMER_MATERIAL
          FORM ITEM_WEIGHTS                                             *
    -->  IN_TAB4                                                       *
    -->  OUT_TAB4                                                      *
    FORM item_weights TABLES in_tab4 STRUCTURE itcsy
    out_tab4 STRUCTURE itcsy.
      DATA: n_vbeln(10) TYPE n,
           v_btgew LIKE likp-btgew,
            v_ntgew1 LIKE vekp-ntgew,
            v_btgew1 LIKE likp-btgew,
            v_ntgew2 LIKE likp-ntgew,
            v_btgew2 LIKE likp-btgew,
            BEGIN OF t_venum OCCURS 0,
              venum LIKE vepo-venum,
            END OF t_venum.
      READ TABLE in_tab4 INDEX 1.
      CHECK sy-subrc = 0.
      MOVE in_tab4-value TO n_vbeln.       "convert to numeric type.
    start of change for DEVK937590
    *break ramarajg.
      CLEAR t_deliveryflow[].
      SELECT vbeln
      FROM vbfa
      INTO CORRESPONDING FIELDS OF TABLE t_deliveryflow
      WHERE vbelv = n_vbeln AND vbtyp_n = c_x.
    Select data
      DESCRIBE TABLE t_deliveryflow LINES v_lin.
      CHECK v_lin GT 0.
      SELECT venum
      FROM vepo
      INTO CORRESPONDING FIELDS OF TABLE t_venum
      FOR ALL ENTRIES IN t_deliveryflow
      WHERE venum = t_deliveryflow-vbeln.
    SELECT VENUM
    FROM VEPO
    INTO CORRESPONDING FIELDS OF TABLE T_VENUM
    WHERE VBELN = N_VBELN.
    end of change for DEVK937590
      CLEAR v_btgew.
      DESCRIBE TABLE t_venum LINES v_lin.                       "DEVK937590
      CHECK v_lin GT 0.                                         "DEVK937590
      SELECT ntgew
      FROM vekp
      INTO v_btgew
      FOR ALL ENTRIES IN t_venum
      WHERE venum = t_venum-venum.
        v_btgew1 = v_btgew1 + v_btgew.
      ENDSELECT.
      SELECT SUM( ntgew )
      FROM lips
      INTO v_ntgew1
      WHERE vbeln = n_vbeln.
      SELECT SINGLE ntgew
                    btgew
      FROM likp
      INTO (v_ntgew2, v_btgew2)
      WHERE vbeln = n_vbeln.
      IF v_ntgew1 = v_ntgew2 AND
         v_btgew1 = v_btgew2.
        READ TABLE out_tab4 WITH KEY name = 'PRINT_WEIGHT'.
        IF sy-subrc = 0 .
          out_tab4-value = 'X'.
        ELSE.
          out_tab4-value = ' '.
        ENDIF.
        MODIFY out_tab4 INDEX sy-tabix.
      ENDIF.
    ENDFORM.                    "item_weights
    *&      Form  GROSS_WEIGHT
          text
    -->  p1        text
    <--  p2        text
    FORM gross_weight.
      CLEAR: v_btgew.
      SELECT SINGLE btgew
                    gewei
      FROM  likp
      INTO (v_btgew, v_gewei)
      WHERE vbeln = vbpla-vbeln.
      PERFORM set_textsymbol USING '&GROSS_WEIGHT&'
                                   v_btgew.
      PERFORM set_textsymbol USING '&GROSS_WEIGHT_UNIT&'
                                   v_gewei.
    changes added by RAMARAJG starts here
      clear v_grwt.
      clear v_gunit.
      v_grwt = v_btgew.
      v_gunit = v_gewei.
      if v_gunit = 'G'.
         v_grwt = v_grwt / 1000.
         v_gunit = 'KG'.
      endif.
      PERFORM set_textsymbol USING '&GROSS_WEIGHT1&'
                                   v_grwt.
      PERFORM set_textsymbol USING '&GROSS_WEIGHT_UNIT1&'
                                   v_gunit.
    changes added by RAMARAJG ends here
    ENDFORM.                               " GROSS_WEIGHT
    *&      Form  GET_END_CUSTOMER_PO
          Retrieve End Customer PO#
    -->  p1        text
    <--  p2        text
    FORM get_end_customer_po.
      DATA: v_zvgbel LIKE lips-vgbel.
      DATA v_bstkd_e TYPE bstkd_e.
      CLEAR: v_bstkd_e, v_zvgbel.
      SELECT SINGLE vgbel INTO v_zvgbel
        FROM lips
          WHERE vbeln = vbpla-vbeln.
      SELECT SINGLE bstkd_e INTO v_bstkd_e
      FROM vbkd
      WHERE vbeln = v_zvgbel
      AND bstkd_e > ''.
      PERFORM set_textsymbol USING '&V_BSTKD_E&'
                                v_bstkd_e.
    ENDFORM.                    " GET_END_CUSTOMER_PO
    *DEVK9A0EB4 - Add a form
    *&      Form  shipper_acct
          Get shipper account at customer
    FORM shipper_acct TABLES in_tab1 TYPE ty_itcsy
                            out_tab1 TYPE ty_itcsy.
      DATA: v_kunag TYPE likp-kunag,  " Sold to party
            v_eikto TYPE knvv-eikto.  "Shipper account number at customer
    DATA v_strlen(10) TYPE c.
      DATA wa_tab1 TYPE itcsy.
      DATA n_vbeln(10) TYPE n.
    Get kunnr  from likp
      CLEAR wa_tab1.
      READ TABLE in_tab1 INTO wa_tab1 WITH KEY name = 'VBPLA-VBELN'.
      IF sy-subrc = 0.
        n_vbeln = vbpla-vbeln.
      ENDIF.
      CHECK sy-subrc = 0.
      SELECT kunag
      FROM likp
      INTO v_kunag
      WHERE vbeln = n_vbeln.
      ENDSELECT.
      IF sy-subrc = 0.
    Get shipper account
        SELECT eikto INTO v_eikto
        FROM knvv
        WHERE kunnr = v_kunag.
        ENDSELECT.
        IF sy-subrc = 0.
    *append  the field  to the out_tab1 printing output
          wa_tab1-name = 'VKNN-EIKTO'.
          wa_tab1-value = v_eikto.
          APPEND wa_tab1 TO out_tab1.
        ENDIF.
      ENDIF.
    ENDFORM.                    "shipper_acct
    ***********DEVK9A0IK7 starts here
    *&      Form  net_weight
          text
    -->  p1        text
    <--  p2        text
    form net_weight .
      CLEAR: v_btgew.
      SELECT SINGLE ntgew
                    gewei
      FROM  likp
      INTO (v_netwt, v_unit)
      WHERE vbeln = vbpla-vbeln.
      if v_unit = 'G'.
        v_netwt = v_netwt / 1000.
        v_unit = 'KG'.
      endif.
      PERFORM set_textsymbol USING '&NET_WEIGHT&'
                                   v_netwt.
      PERFORM set_textsymbol USING '&NET_WEIGHT_UNIT&'
                                   v_unit.
    endform.                    " net_weight
    ***********DEVK9A0IK7 ends here
    *&      Form  item_list
          text
    -->  p1        text
    <--  p2        text
    form item_list.
    move vbplp-posnr to wa_item-posnr1.
    *move material to wa_itab1-material1.
    move vbplp-brgew to wa_item-brgew1.
    move vbplp-vemeh to  wa_item-vemeh1.
    *move item_weight to wa_itab1-item_weight1.
    *move gross_weight_unit to wa_itab1-gross_weight_unit1.
    move v_arktx to wa_item-arktx1.
    if v_kdmat <> ' '.
    move v_kdmat to wa_item-material1.
    else.
    move vbplp-matnr to wa_item-material1.
    endif.
    wa_item-vboxcnt = 1.
    append wa_item TO it_item.
      CLEAR : wa_item1, wa_item.
      it_item1[] = it_item[].
      REFRESH it_item[].
    break-point.
    endform.                    " item_list
    *&      Form  TOTAL_WEIGHT
          text
    -->  p1        text
    <--  p2        text
    form TOTAL_WEIGHT .
      LOOP AT it_item1 into wa_item1.
        READ TABLE it_item INTO wa_item WITH KEY material1 = wa_item1-material1 posnr1 = wa_item1-posnr1.
        IF sy-subrc NE 0.
          APPEND wa_item1 TO it_item.
        ELSE.
          wa_item1-brgew1 =   wa_item1-brgew1 +  wa_item-brgew1.
          Wa_item1-vboxcnt = wa_item1-vboxcnt + wa_item-vboxcnt.
          MODIFY it_item FROM wa_item1 TRANSPORTING brgew1 vboxcnt
                         WHERE material1 = wa_item1-material1
                              AND posnr1 = wa_item1-posnr1.
        ENDIF.
      ENDLOOP.
    endform.                    " TOTAL_WEIGHT

    the Logic to be added is this
    b.     Remove the carton ID & box ID from the print out,  the line item should just print the total delivery quantity, do not split the printing by different box ID or carton ID.
    i.     Delivery Item= LIPS-POSNR
    ii.     Delivery Qty for Item = LIPSD-G_LFIMG= LIPSD-PIKMG
    c.     Add Total Boxes for each item, this should be a calculation field for each material HUMV4-MATNR, count how many handling unit  VEKPVB-EXIDV has been used to pack the same material , output the total boxes for each delivery item.
    d.     Add Gross Weight for each  item , retrieve data from LIPS-BRGEW
    e.     Add Net weight to the print out, below the gross weight – retrieve data from LIKP-NTGEW

  • Sap script: Printing the values got from work area in a row

    Hi ,
    I need to print the values which I m getting from a work area like
    A1     A2
    A3     A4
    and so on
    but I m getting it as
    A1
    A2
    A3
    A4.
    Any solutions to this will be highly appreciated.
    Regards,
    Vivek

    Dear vivek,
    how is your work are structure - is it only with single field ?
    In your script after the each value give an extended line comman "=" which will take first and second values for print and after the second value give "line feed" or "carriage return"  command.
    Hope this solves your problem
    Thanks
    venugopal
    Reward accordingly

  • '#' unexpectedly inserted into output fields in script print preview

    Hello Experts,
    I came across a problem that confused me so much that when i try to see the print preview of a script form, the output fields in Main window were all printed with '#' inserted, as below:
    the output is like 7#8#0#0#0#....but it should be 7800017167
    and also, for other fields like date and amount, the same problem occurs.
    But the most weird thing is that, the issue only occurs in the Main Window of the second page of the form, but not in the first page although they share the same  Main Window. And what's more, it only happened in the Testing System, I can not replicate them in develop system...
    I know it may be a very isolate problem, but i just want to try my luck to see if any of you could shed me some light~
    Thanks!

    Hi Siva,
             Can you tell me please, wheather its a "Z" driver program or Standard driver program.
             After execution of the program/transaction code go for <b>systems</b>> then for <b>Status></b> then you can find the <b>program name.</b> You can go into that and search for  the <b>Open_form</b>. Before Open form set the <b>BreakPoint</b> there you can find the form name which will pass during run time through variable.
             other option is that go for <b>NACE</b> transaction and see for <b>routine,</b> <b>for example</b> If it is invoice then it will be Billing. select your that<b> area</b> and click on <b>Output type button.</b> there you can see the output types You can go in that and see for program and form name, then you can confirm the output type.
    reward point if it is helpful.
    Regards
    Sagun Desai.

  • Script print preview

    hi all,
    i am seeing the print preview in tcode recpa520, giving company code,f8,press print preview. i am seeing the invoice print preview,i want to find the output type,application type,form name for this.in this tcode there i no messages option to see the output type.
    recpa520 is tcode for invoice correspondence. can any body help me how to find the script name,output type,application type for this.
    thank in advance
    siva

    Hi Siva,
             Can you tell me please, wheather its a "Z" driver program or Standard driver program.
             After execution of the program/transaction code go for <b>systems</b>> then for <b>Status></b> then you can find the <b>program name.</b> You can go into that and search for  the <b>Open_form</b>. Before Open form set the <b>BreakPoint</b> there you can find the form name which will pass during run time through variable.
             other option is that go for <b>NACE</b> transaction and see for <b>routine,</b> <b>for example</b> If it is invoice then it will be Billing. select your that<b> area</b> and click on <b>Output type button.</b> there you can see the output types You can go in that and see for program and form name, then you can confirm the output type.
    reward point if it is helpful.
    Regards
    Sagun Desai.

Maybe you are looking for

  • What is the use of HTTPS 8181 port

    Hi, I am wondering what is the use of the port 8181 on the EE5 application server. the second question. Why the application server open so many port on the same local machine. I agree that for security raison it is a good idea. But does application s

  • Problem configuring PC Suite - "There is no availa...

    Hi I've just changed from an ancient Nokia 7110e (using Fonesync 4 on my Windows/XP laptop and built in infrared link)to a 7250i. I downloaded PCSuite 6.6.18 from the Nokia website and installed it without apparent problems. However the "Get Connecte

  • How can I tell if icloud has been installed

    icloud is on my iphone and ipad but how can i tell if my mac is set up

  • Lightroom trial won't install-error 1

    Trying to download/install Lightroom 4 trial. Terrible with computers but it looks like it downloads but when I go to open the installer it says "Operation could not be completed.  (com.apple.installer.pagecontroller error-1)" Help please!

  • Center a cell in custom package

    Is there a way to center a cell in a custom package with precision?  I just want to place one cell in the exact middle of the page.  Eyeballing it even with the grid isn't accurate enough.