Quick SAP Script question New Page Print

Quick SAP Script question
I have added a new page to an existing SAP Script BUT only want it to print if a condition is true.
I need to do this from within the form as the print program is SAP Std.
Any idea how I can prevent the new page from printing?
i.e. I need the form NOT to call the new page if the condition is false. Is there a way of forcing an exit or stop from with in the form?

Hi,
To trigger a new page, there is script ediotr command NEW-PAGE.
so find where is that command is triggered and use the below code for trigger it on any specific condition....
if &condition& = 'True'
/*  NEW-PAGE
elseif
/: NEW-PAGE   
endif
so it means if condition is satisfied your new page will not work.. else it will...
Hope you got it...
Try this..
Best luck..
Regs,
Lokesh.

Similar Messages

  • Need to add a new page in the SAP Script as last page

    Hello,
    I need to add a new page in the SAP Script as last page.
    Currently I have three pages in the form(FIRST,NEXT,LAST). For this I created one more page END.
    FIRST page next page is NEXT
    NEXT page next page is NEXT
    LAST page next page is LAST
    END page next page is END.
    I used NEW-PAGE END in the main window but it is not working and also I trired with CONTROL_FORM this also not working.
    Thanks,
    Ravi.

    Hello,
    I need to add a new page in the SAP Script as last page.
    Currently I have three pages in the form(FIRST,NEXT,LAST). For this I created one more page END.
    FIRST page next page is NEXT
    NEXT page next page is NEXT
    LAST page next page is LAST
    END page next page is END.
    Create the text element in the main wondow of your form
    /E           ENDPAGE
    /:           NEW-PAGE END
    and call the element from your print program by using write_form, where you want the END page in your print.
      CALL FUNCTION 'WRITE_FORM'
        EXPORTING
          element = 'ENDPAGE'
        EXCEPTIONS
          element = 1
          window  = 2.
    Thanks,
    Ravi.

  • WARNING: NEW-PAGE PRINT can no longer be used to print dialog box

    i am getting a warning as 'NEW-PAGE PRINT can no longer be used to print dialog box'. Please suggest what method can i use otherwise

    Please create a screenshot of the problem you're seeing by following the guide mentioned at [[How do I create a screenshot of my problem?]].
    Once you've done this, attach the saved screenshot file to your forum post by clicking the '''Browse...''' button below the ''Post your reply'' box. This will help us to visualize the problem.
    '''Try the Firefox Safe Mode''' to see how it works there. The Safe Mode is a troubleshooting mode, which disables most add-ons.''
    ''(If you're not using it, switch to the Default theme.)''
    * You can open the Firefox 4.0+ Safe Mode by holding the '''Shift''' key when you use the Firefox desktop or Start menu shortcut.
    * Or use the Help menu item and click on the '''Restart with Add-ons Disabled...''' menu item while Firefox is running.
    ''Don't select anything right now, just use "'Start in Safe Mode"''
    ''To exit the Firefox Safe Mode, just close Firefox and wait a few seconds before using the Firefox shortcut (without the Shift key) to open it again.''
    '''''If it is good in the Firefox Safe Mode''''', your problem is probably caused by an extension, and you need to figure out which one.
    Please follow the [[Troubleshooting extensions and themes]] article for that.
    ''When you figure out what's causing your issues, please let us know. It might help other users who have the same problem.''

  • Regarding  new-page print off. warning, its very urgent

    Hi,
    For the below lines:
    1. new-page print off.
    2. new-page print off no-title.
    3. new-page print on parameters print_parms no-title no dialog.
    4. new-page print off no-title.
    In upgrde i am getting 1 warning as
    'NEW-PAGE PRINT  should no longer be used to generate a print dialog'
    what should i write instead of the above 4 lines, to avoid this warning.
    upgrade is from 4.7 to ecc6.0
    please do need ful.
    Thanks,
    Radhika

    Hi ambi,
    1. I just tried, and it works fine.
    2. It does not give any error /warning
       in ECC 5.0
    regards,
    amit m.

  • NEW-PAGE PRINT ON

    Hi all,
    I am in ECC 6.0 and my program is showing a warning at line
    NEW_PAGE PRINT ON.
    the warning is this
    "NEW-PAGE PRINT ON" should no longer be used to generate a print dialog box . . .          
    is this something I should worry about.
    or can I ignore this as it is only a warning.
    Thanks,
    Goldie.

    May be you can try with
      NEW-PAGE PRINT ON PARAMETERS print_parameters
                        NO DIALOG.
    and fill up the print_parameters by using fm
    CALL FUNCTION 'GET_PRINT_PARAMETERS'

  • SAP Script info req to print new line iten on new page

    hi
    i had an req to print the list of MATNR & KUNNR on script,but the req is like this,at NEW MATNR,the script shd start with new page,say,if there are 5 MATNR,2 are same & 3 are same with diff KUNNR.
    On first page:2 MATNR shd be printed
    On Second Page:3 MATNR shd be printed & so on each time on new page...
    Please tell me how to do it,in window MAIN,how shd i wirte code for this?
    regds

    hey,
    Check this,
    First in your print program call FM 'START_FORM'.
    Then call FM 'WRITE_FORM'
    After this call FM 'CONTROL_FORM' :
    CALL FUNCTION 'CONTROL_FORM'
    EXPORTING
    command = 'NEW-PAGE'
    EXCEPTIONS
    UNOPENED = 1
    UNSTARTED = 2
    OTHERS = 3
    IF sy-subrc 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    At last call FM 'CLOSE_FORM'.
    By using FM control_form and passing parameter 'NEW-PAGE' you will get one new page even thow if content of ur main window of previous page is not exceeding..
    hey call new-page for every new matnr
    Regards,
    Midhun Abraham
    Edited by: Midhun Abraham on Oct 11, 2008 8:47 AM

  • SAP script and External docs - print in PDF

    Hello,
    We are printing maintanence orders (SAP script) through IW32 and recently we have added custom logic to print the external docs(word or excel) attached to the maintanence orders. So if we print a maintanence order with two attachments, we would get Order, Attach_1 and Attach_2 printouts. This functionality is working fine but when we print several orders at the same time all prints are getting mixed up. I was wondering if somthing like this would be possible.... Let's say we have a order of one page with two attachments, Attach_1 & Attach_2, of one page each and we create one single PDF document with these three pages in the print program and print this PDF at the end of the print program so that all the prints associated with one order come out as a single doc.
    Any ideas / sample code is appreciated. Thanks.

    Hi Raju,
    You are in double-trouble   ... another moderator rejected your other post while I was locking this one here. But I did read your comment in it.
    Please resist the temptation to cross-post. It messes up the forums and is unfair on those who take the time to answer your questions.
    I'll make a deal with you: If you go back and close all your 115 unresolved questions which can be closed (or no longer need to be open) and assign ponits accordingly (note: you do not need to post anything to close it, the "post comment" field is not mandatory ) then I will unlock this thread for you and we can carry on.
    It will take you an hour or two, but people will respect you for it.
    Let me know (I will be watching your resolved posts number).
    Cheers,
    Julius
    PS: Top right hand corner => "Your Questions"...
    Edited by: Julius Bussche on Sep 15, 2008 10:45 PM

  • SAP Script output extra page is coming

    Dear friends
                             In my sap script output i m getting one extra page with empty main window. Even i have  not used NEW-PAGE Command,
    No Empty lines and window size also correct. Can anyone solute for this issue.
    Regards
    Balamurugan N

    Hi,
    check those details:
    1) In your SAPSCRIPT contains one page or two pages?
    2) In the sapscript check did u assign any nextpage as different page?
    Regards,
    Dhina..

  • How to change a SAP script output without changing Print Program

    Hi,
    I want to change output of standard PO report printing object. I have to change the ZSAPSCRIPT but I have to keep the print program intact. please give me ideas.

    Hi for that you have to do following.
    1. Create a ZPROGRAM
    2. Write a Perform in your SAP Script.
    3. Write Form inside it your ZPROGRAM.
    Hope this will help you.
    <i><b>Reward points for helpful ans.</b></i>

  • How do we enable cutter option in the SAP Script for Zebra Label Printer

    Hi Gurus,
    We use Zebra Label(ZM400) printers to print the material documents(SAP Script). Could someone please tell me how do we enable the cutter option in the Zebra printer for the SAP Script?
    Your vaulable answers will be highly appreciated.
    Thanks in advance.
    Regards,
    Manoj.

    Hi Manoj,
         In Script you dont want to add any logic for Label Cutter, It should be in the Zebra printer settings if the printing is over it should cut the paper. If the print area is predefined for your material label then you can make use of standard label papers (Like 2"x4", 3"x4"....)
    Regards
    GK.

  • SAP script question

    Hi all,
    I have changed footer page window in the form. But apparantly, the address page window is also changed. I dont know how, though I have not touched the address page window. As a result the whole output report layout is changed. Is there anyway I can get the origianl page windows and have the original form.
    Thanks for the great help.
    Sobhan.

    If you wish to keep a copy of your layout sets in your own hardisk.  You can run this SAP program.  You can keep it as a backup copy and upload it back whenever you need it again.
    RSTXSCRP - SAP Scripts Export/Import
    regards
    vinod

  • SAP Script : Control Commands for printing Label (barcode) by Zebra Printer

    Hello,
    I would like to know the control commands in sap script for Zebra Printer. The purpose of task is to print a field in barcode format in Right Bottom of the label.
    The sample code is placed below. Kindly have a look at it. The problem now i am facing is, the barcode for Customer PO is printing on the wrong place (Left Bottom, the text & barcode are overwriting). Can anyone suggest a possible way or can any one send the document for Barcode commands in SAP Script for Zebra Printer.
    Sample script code:
    Initialization and reset Barcode
    XAMCY^XZ
    Start
    ^XA
    Barcode setup
    ^BY3,2.7,2.2
    Set label home position
    ^LH
    ^FWN
    FO385,025A0R,40,50FDPN: &VBAP-MATNR&FS
    FO385,725A0R,40,50FD&VBAP-ARKTX&FS
    FO385,1710A0R,40,50FDRtns: &zsntsc-contr&FS
    FO345,025A0R,40,50FDService Order# &AUFK-AUFNR&FS
    FO345,725A0R,40,50FDSerial# &EQUI-SERNR&FS
    FO345,1710A0R,40,50FDRepair Order# &VBAP-VBELN&FS
    FO245,025B3R,N,90,N,NFD&AUFK-AUFNR&FS
    FO245,725B3R,N,90,N,NFD&EQUI-SERNR&FS
    FO245,1710B3R,N,90,N,NFD&VBAP-VBELN&FS
    FO138,1710A0R,40,35FDCustomer PO# &VBKD-BSTKD&FS
    FO98,025A0R,40,50FDWrnty: &W_WARRANTY&FS
    FO98,605A0R,40,50FDRoute: &W_ROUTE&FS
    FO58,025A0R,40,35FDShip-to-name: &W_NAME1&FS
    FO58,1325A0R,40,35FDMinor Group/Nr: &TVM5T-BEZEI&FS
    FO58,1325A0R,40,35FDMinor Group/Nr: &TVM5T-BEZEI&FS
    FO18,885A0R,40,35FDReported By: &QMEL-QMNAM&FS
    FO18,1710B3R,N,90,N,NFD&VBKD-BSTKD&FS
    ^XZ
    Thanks in Advance,
    Ramasamy

    HI
    GOOD
    GO THROUGH THIS
    A barcode solution consists of the following:
    - a barcode printer
    - a barcode reader
    - a mobile data collection application/program
    A barcode label is a special symbology to represent human readable information such as a material number or batch number
    in machine readable format.
    There are different symbologies for different applications and different industries. Luckily, you need not worry to much about that as the logistics supply chain has mostly standardized on 3 of 9 and 128 barcode symbologies - which all barcode readers support and which SAP support natively in it's printing protocols.
    You can print barcodes from SAP by modifying an existing output form.
    Behind every output form is a print program that collects all the data and then pass it to the form. The form contains the layout as well as the font, line and paragraph formats. These forms are designed using SAPScript (a very easy but frustratingly simplistic form format language) or SmartForms that is more of a graphical form design tool. 
    Barcodes are nothing more than a font definition and is part of the style sheet associated with a particular SAPScript form. The most important aspect is to place a parameter in the line of the form that points to the data element that you want to represent as barcode on the form, i.e. material number. Next you need to set the font for that parameter value to one of the supported barcode symbologies.
    The next part of the equation can be a bit tricky as you will need to get a printer to print that barcode font. Regular laser printers does not normally print barcode fonts, only specialized industrial printers that is specifically designed to support that protocol and that uses specialized label media and heat transfer (resin) ribbon to create the sharp image required for barcodes.
    Not to fear though, there are two ways to get around this:
    - You can have your IT department do some research - 
    most laser printers can accept a font cartridge/dimm chip (similar to computer memory), called a BarDIMM that will allow a laser printer to support the printing of barcodes.
    - Secondly, you can buy software that you can upload in your SAP print Server that will convert the barcode symbology as an image that will print on a regular laser printer. I found that this option results in less sharper barcodes. This option is really if you need to convert a large quantity of printers (>10) to support barcodes. 
    - Thirdly, you can buy a third party software like Barcode.dll and install on your frontend PC connected to the laser printer.
    Now you have a barcode printed - what next?
    Well there are two options, depending on your business requirements:
    - You can use an existing SAP transaction on a regular workstation and get a barcode wedge reader to hook up between the keyboard and the PC. These wedge readers comes in a wand or scanner format. There are even wireless wedge scanners available that allows you to roam a few yards from the workstation to scan a label. This approach is mostly used where you want to prevent human errors in typing in long material, batch or serial numbers in receiving or issuing of material. The problem is that it's just replacing the keyboard input and you are basically locked down in one location and have to bring all the material to that location to process.
    - Another solution is to use SAPConsole transactions
    or write your own ABAP Dialog programs that will fit onto a barcode enabled wireless handheld terminal and that will follow the business logic as executed on the shop floor. 
    These programs are highly complex exercises in industrial engineering and ergonomics because of the limited screen sizes and limited ability to accept keyboard input. The user is instructed step-by-step and only scan and push F-keys to interact with the SAP system. Scan, scan, beep, beep, enter - highly automated.
    GO THROUGH THESE LINKS
    http://www.sap-img.com/abap/details-information-about-sap-barcodes.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/68/4a0d5b74110d44b1b88d9b6aa1315b/content.htm
    THANKS
    MRUTYUN

  • Sap script question - char format

    Hi,
    What is the use of Selection checkbox available in character format of sap script?
    What willl happen if we check or uncheck that?
    Appreciate your suggestions.
    Regards,
    Guru

    its not like that gurus......
    c if u tick that check box in the top there is a field called mark
    it will ON ......the marker is used
    Character string attribute: marker
    This character string attribute allows search keys to be specified in
    the information within the angled brackets of the character string. In
    the output format created by SAPscript, the search key is entered
    explicitly when such a character string occurs.
    Example: The character string "MK" is used for marking (the marking
    attribute is set). The search keys are then entered in the text editor
    as follows:
    This is a <MK:KEY1234>Search key</>
    The word "Search key" is therefore marked with "KEY1234".
    Marking keys may not be more than 50 characters long. The characters " "
    (blank), "=", and ";" are not allowed in the key.
    if it is usefull....Plz Rewards
    Regards
    Anbu

  • Import Existing Sap Script into new script

    Hi all,
    I have a SAP Script object. I downloadd it now how to import that txt file into R/3 as a SAP Script.
    Suggess.
    Thanks
    Sanket

    hi,
    Use program RSTXSCRP

  • SAP Script : Printning Next Page.

    Dear SAP Seniors,
    I am modifying SAP standard Cheque, I have 2 pages, First & Next. Actually When main window is full, It has to go to Next page but It Automatically prints 2 Pages,
    Plese advice me ...
    Thanks and Regards.
    Venkat.

    Hi venkat,
    check printing program involves printing of void checks too..c the selection screen of program RFFOUS_C after executing it.. u have options like, print sample check, void checks n so on..these r the settings u need to maintain in consultation with ur functional guy to get the appropriate print. think u r taking the check print via some std transaction ( maybe F-58 )..
    r u getting ANYTHING in the 2nd page?? like only check at the bottom or some summary??
    also try printing the same using the standard form n print program n c how it comes..if its according to ur requirement, then ur customised form needs modification, else some config s required..
    hope it helps,
    Regards,
    Bikash

Maybe you are looking for

  • TS3850 How can I connect my mac air to my new Qumi5 to watch photos and movies?

    I have a Qumi5 and do not manage to connect my computer to watch movies and photos, can somebody help me?

  • Placing a vector graphic in an existing PDF

    I am using Acrobat 9 Pro Extended. I have created PDFs from the music notation software called Sibelius (by "printing" to PDF). I now want to add a graphic (a logo created in Illustrator). In the Acrobat Help, it says to use the TouchUp Object Tool a

  • UTF-16 support

    I'd like to determine what non-Latin characters can be displayed on my handset. Using the encoding UTF-16BE does not throw an exception and I can create Latin characters and basic symbols. However when I try Greek, Hebrew, and such the generated stri

  • Connect Audigy 2 ZS to Moni

    I have just purchased and installed a Hyundai BlueH HM9W 9in Wide MFM LCD-TV. Although it is primarily a PC Monitor,it also has a built in TV tuner and speakers. The sound quality is very poor. My PC has a Nvidia Geoforce 6200 Graphics Card and an Au

  • ORA-01502 error in case of unusable unique index and bulk dml

    Hi, all. The db is 11.2.0.3 on a linux machine. I made a unique index unusable, and issued a dml on the table. Howerver, oracle gave me ORA-01502 error. In order to avoid ORA-01502 error, do I have to drop the unique index ,and do bulk dml, and recre