Change variables before print?  'REUSE_ALV_GRID_DISPLAY'

Hello SAPients.
I'm using 'REUSE_ALV_GRID_DISPLAY' to display a list. I need to change some variables (flags) when the user clicks on the print button and then continue with the standard printing functionality.
How can I do that?
Thanks!

Hi,
Check the code below.
DATA: gt_events     type slis_t_event,
       gd_prntparams type slis_print_alv.
call function 'REUSE_ALV_GRID_DISPLAY'
       exporting
            i_callback_program      = gd_repid
            i_callback_top_of_page   = 'TOP-OF-PAGE' 
            is_layout               = gd_layout
            it_fieldcat             = fieldcatalog[]
            it_events               = gt_events 
            is_print                = gd_prntparams 
            i_save                  = 'X'
       tables
            t_outtab                = it_ekko
       exceptions
            program_error           = 1
            others                  = 2.
perform build_events.
perform build_print_params.
*&      Form  BUILD_EVENTS
*       Build events table
form build_events.
  data: ls_event type slis_alv_event.
  call function 'REUSE_ALV_EVENTS_GET'
       exporting
            i_list_type = 0
       importing
            et_events   = gt_events[].
  read table gt_events with key name =  slis_ev_end_of_page
                           into ls_event.
  if sy-subrc = 0.
    move 'END_OF_PAGE' to ls_event-form.
    append ls_event to gt_events.
  endif.
    read table gt_events with key name =  slis_ev_end_of_list
                           into ls_event.
  if sy-subrc = 0.
    move 'END_OF_LIST' to ls_event-form.
    append ls_event to gt_events.
  endif.
endform.                    " BUILD_EVENTS
*&      Form  BUILD_PRINT_PARAMS
*       Setup print parameters
form build_print_params.
  gd_prntparams-reserve_lines = '3'.   "Lines reserved for footer
  gd_prntparams-no_coverpage = 'X'.
endform.                    " BUILD_PRINT_PARAMS
*&      Form  END_OF_PAGE
form END_OF_PAGE.
  data: listwidth type i,
        ld_pagepos(10) type c,
        ld_page(10)    type c.
  write: sy-uline(50).
  skip.
  write:/40 'Page:', sy-pagno .
endform.
*&      Form  END_OF_LIST
form END_OF_LIST.
  data: listwidth type i,
        ld_pagepos(10) type c,
        ld_page(10)    type c.
  skip.
  write:/40 'Page:', sy-pagno .
endform.
Rgds,
Naren

Similar Messages

  • Where do I find the printer dialog box to change the setting that asks me to save a file before printing

    Where do I find the printer dialog box to change the setting that asks me to save a file before printing

    Hi Sara,
    The problem is every time I try to copy a page from a website or attachment sent to me or anything that I don't create, the dialog box says I have to save it before I can print -- there are no other options on the dialog box.  Very frustrating -- one of the girls in my office is having the same problem and we can't find a way around it.
    Hope you can help
    Thanks
    Carol Laskos
    "Sara.Forsberg" <[email protected]> wrote:
    Sara.Forsberg  created the discussion
    "Where do I find the printer dialog box to change the setting that asks me to save a file before printing"
    To view the discussion, visit: https://forums.adobe.com/message/7070517#7070517
    >

  • History report page prints before printing each new document?cc=us

    How do i stop my HP Officejet 6700  Premium from printing a history report page before printing each new document, using Windows 7 & Using Microsoft Word? When I open a document and print it, it prints a history including: File Name; Directory; Template; Title; Subject; Keywords; Comments; creation Date; Change Number; Last Saved On; Last Saved By; Total Editing; Last Printed On; As of Last Printing....
    Everything worked perfectly for a year, then I had to reinstall the printer because I deleted it by mistake. I cary it with me when I travel to meetings and didn't have my install disk, so I had to download the install software. I haven't changed any settings in Word, but it appears that the report is generated from Word.
    Help will be appreciated. I can't find any other topic like mine to see an already presented solution.
    This question was solved.
    View Solution.

    Hi,
    The report indeed being generated by Word and not by the pritner driver.
    As you did not clarify your MS Office version I included the steps for Word 2010, I believe the same should also apply for Word 2007:
    From Word click the File menu, then select Options.
    Select Display from the left pane.
    Under the Printing Options sections, uncheck the box next to Print document properties.
    Click OK and try printing again.
    If you cannot find the specific option, please clarify your exact Microsoft Wiord version.
    Shlomi
    Say thanks by clicking the Kudos thumb up in the post.
    If my post resolve your problem please mark it as an Accepted Solution

  • SAP should retrieve print preferences in a Crystal report before printing

    I would like to submit an enhancement... or a "come back" of something that was working fine before.
    Missing functionality referring to message #88318 opened at the end of January 2011
    Version: 8.8 u2013 PL18
    Description of requirements:
    Automatically select the appropriate page layout in SAP B1 when the page layout has been saved in a Crystal report.  So, the user wonu2019t have to change his u201CPrint preferencesu201D in SAP before printing a document with a different layout.
    Valid as of: N/A
    Business needs: (Please describe the impact on your business, if the functionality is not realized)
    Any people who has to print a report doesnu2019t want to always think about what should be the layout of this specific report and then have to change it in B1 before printing. This is a loss of time, more over when the layout has been saved in the u201CPrint preferencesu201D of the report itself (for example, 8½ X 14 or Landscape) so the user should not have to manually select it in addition.
    The print preview is correct in CR and in B1 but then, when sending the preview to the printer, the printing is not correct.  It is not on the same format.
    Examples: (Please describe a typical example, how the functionality should work.)
    I have a Crystal Report saved in 8½ X 14 format.
    I preview it within Crystal Report --> Ok
    I send it to the printer via Crystal Report --> Ok
    I preview it within SAP --> Ok
    I send it to the printer via SAP --> THIS SHOULD BE PRINTED THE WAY IT IS PREVIEWED
    Current Workaround: (Please describe the workarounds you are using at the moment)
    The users have to change their print preferences in B1 before printing the report !  This is a loss of time !
    Proposed solution:
    SAP should take in consideration the printing preferences saved in Crystal, so it will print the report accordingly to the print definition, using the appropriate tray. Since the print preview is okay, it should print that way.
    This was working fine in 8.8-PL11u2026

    Thank you for your reply. It works in this specific report.
    But we have both PLD and Crystal Report in the system, changing the settings means the PLD will lose their watermark...
    Also, I don't know how the Draft is displayed, but when select Print Preview for Draft, it's asking for parameter (DocEntry), which I have setup a DocKey@ in Crystal Report and set it in the Selection Manager. Does SAP provide DocEntry in Draft Invoice (ODRF) the same way as in Invoice (OINV)?
    Thanks,
    Grace

  • Require name and date before printing form

    I have a 13 page PDF that a customer or our staff prints from our website. Often the customer or staff does not name and date each page of the form. Not having a name and date on each page of the form causes problems when they customer returns the form to the office, and the form pack gets divided for scanning into different areas of the customer file. 1) Is there an Adobe product that changes a PDF to require the downloader of the form to place a first and last name in the name field before printing. 2) Also, I would need a date stamp placed on the form when it prints. Is there I product that could help me program this PDF to do these 2 things?  This post is the first time I can recall posting in this community. Any other suggestions are welcome. Thank you.

    >> 1) Is there an Adobe product that changes a PDF to require the downloader of the form to place a first and last name in the name field before printing.
    Many fields have a "Required" property. This is used when a form is submitted to a scripted web page for processing to throw an error message if any required fields are not completed.
    One can use this property within a an action for a form to check if required fields are competed.
    >> 2) Also, I would need a date stamp placed on the form when it prints.
    I would add a form field that is filled in with the print date and time by some JavaScript in the Will Print action.

  • SaveAsRtf; Preview before print

    I'm a newbie to Reader 9 and have to "Windows Vista" questions:
    1. very can I find/install addin SaveAsRtf
    2. is there an addin, program; other that let you preview "pdf printout" before printing
    What i'm trying to do is to find a way to
    1. print an "web-document" to a driver (virtual driver)
    2. preview the printout not the pdf document
    3. save it as TXT,RTF or Excel and if needed make changes
    The reason is that the documents only can be printed to a printer.

    Hi
    data:
       w_ctrlop type ssfctrlop,
       w_compop type ssfcompop,
       w_return type ssfcrescl.
    w_ctrlop-getotf = 'X'.
    w_ctrlop-no_dialog = 'X'.
    w_compop-tdnoprev = 'X'.
    Regards,
    Sravanthi

  • Removing white space in .pdf files before printing?

    Want to remove white margins when printing, which states click on tools/margins,etc. But when I click on tools, nothing changes or comes up differently. So there is no option to eliminate the white margins.
    How do I get rid of the white margins before printing?
    Thanks

    WHAT/where states you can click on Tools/Margins etc in Adobe Reader? In following advice please be sure to notice the difference between Adobe Reader (free) and Adobe Acrobat ($$).

  • BEx Analyzer Not showing report result in canceling "Change variable Icon"

    Hi Experts,
    Do we have any settings in BEx Analyzer for retrive the Result set even after I click 'Change variable Icon' in Toolbar and cancel the variable pop-up window??
    Eg: My query Result is displayed in Analyzer selecting some vaues in Selection screen.And when I click the Change Variable Icon from 'Analyzer Toolbar' its showing me 'Select values for variable' window.If I select the cancel button in it, then Query result becom blank showing the message "There are variables; change variable values". Do Analyzer having an option or settings to keep the result even if i cancel the variable selection from "change variable icon".
    Thanx in advance..

    Sari-
    If SAP provides such a function, I have not found it. The way I understand it., the change variable value initiates the OLAP back end. This clears the Presentation Manager front end, and clears the 'results' that are displayed on your workbook. If you cancel the OLAP run, the front end clear still executes.
    HOWEVER... if you turn OFF Automatic Refresh before clicking on Change Variable Values and then clicking on Cancel, the presentation manager will not write any changes to your workbook. So that is your best solution.

  • Can you Soft-Proof in PSE 6 before printing?

    Is there a way to soft-proof in PSE? I have createded custom ICC profiles for my monitor and printer/ink/paper combinations (using SpyderPrint) and would like to soft-proof the image on my monitor before printing. I know you can do this in Photoshop CS3, and it can save lots of of ink and paper, as compared to proofing from prints. Thanks.

    Thanks, Richard. I should mention that there's at least one add-on program that claims to add soft proofing to PSE, but in my opinion it's not useful, since to really see what something looks like on paper you need to have access to CMYK and nothing can make PSE able to do that. I've tried the add-on and it brings up the softproof dialog box, but the changes you make there mostly have no effect on what you see onscreen, unfortunately, due to the limitations in the PSE code base.
    Don't forget that as PSE owner you can usually upgrade to full PS for $299. Adobe sends email about this periodically, but in my experience, if you call adobe sales you can usually talk someone into letting you have it even when it's not officially offered, although you might have to call a couple of times till you get lucky.

  • Converting colour profile of final print package before printing

    How do I convert the colour profile of a Lightroom custom printing package from Adobe Prophoto to sRGB before printing? For that matter, how do I save the thing? I have no interest in saving the template, or the collection separately, since neither has any use without the other. And without saving them as one finished item, I have no way to convert the colour profile of that item. I can see clearly from the appearance of the print preview that the above mentioned colour profile conversion is required.

    You cannot change the profile in Lr to <sRGB>.
    If you want to print sRGB, select  <Managed by Printer> for Color Profile under Color Management.
    Then in your printer's dialog select <sRGB> instead of <Application managed> (or similar wording - depending on your printer).
    BTW: the term is not "Adobe proPhoto" it's "proPhoto RGB".

  • Set mp600 to default "Preview before printing" win 8

    I have a mp600 that serves me well.  I had it set up on an XP desktop to always "preview before printing" as the default.   Now I have replaced that desktop with a win 8 laptop and after some effort found drivers for it but I can't find a way to set the default mode to "Preview".     Each time I print, I can change it to preview before print in the settings and it works fine but I have to remember to do that each time I open the printer.   
    Is this just because Canon doesn't support win 8 on this printer or am I missing something obvious?
    Thanks,
    John

    Hi LocalHero,
    Windows or the application you are printing from may have a "preview" feature.   Also, the Canon drivers for your printer will contain a "Print Preview" option.  Since drivers for Windows 8 with the MP600 are not available, you are likely using the application or Windows "preview".  For additional support with setting preview this to be "on" by default, I recommend contacting MIcrosoft.
    Did this answer your question? Please click the Accept as Solution button so that others may find the answer as well.

  • How do I change font size printing emails. font normal on viewing but when printed is very tiny

    When I go to print an email the text comes out too small to read. How do I change the font size. Also, page sometimes moves up and down when I'm typing a reply to an email. Upon viewing before printing the email text, it appears normal font size, but when it prints out the text is too small to read.

    It was already on 100 per cent. I clicked it just in case. Nothing happerned.

  • Cartridge holder makes a sound like a machine gun when it moves to the right just before printing

    Product is HP Deskjet 4440 all in one.  OS is Windows XP.  
    When the cartridge holder goes clear to the right just before printing it makes a loud noise like a machine gun just before it starts printing.  It prints fine.  But sounds like the cartridge holder is sticking and makes this machine gun like sound.

    Hi @gramdeb, 
    I see by your post that the carriage makes a loud noise when it moves to the right, but you can still print. I can help you with this.
    I would do a hard reset to see if that will resolve the issue.
    Leave the printer on and unplug the power cable from the printer and wall outlet for 60 seconds.
    Then reconnect the power cable to the printer and wall outlet rather than a surge protector.
    This ensures the printer is receiving full power and may help this situation.
    Remove and reinsert the cartridges, to make sure that they are correctly installed in the unit.
    I have provided this document for different areas of the printer to check for any obstructions or broken parts in the carriage path. 'Paper Jam' Message Displays on the Computer. Disregard the title.
    Did you just change out any of the cartridges?
    If you need further assistance, just let me know.
    Have a nice day!
    Thank You.
    Please click “Accept as Solution ” if you feel my post solved your issue, it will help others find the solution.
    Click the “Kudos Thumbs Up" on the right to say “Thanks” for helping!
    Gemini02
    I work on behalf of HP

  • BEx crashes when changing variable values

    Hi all,
    We're having a problem with BEx.
    It crashes when trying to change variable values.
    We've been looking into syslogs and dev logs and so on,
    and found that the cpic connection has been disconnected
    before the crash. BUT we cannnot find out what is actually
    disconnecting the session.
    Well, at least F/W wasn' the cause. Have check the logs.
    Any ideas? Thx in advance!
    Yuko
    Below is our info.
    BEx: BI 7.10 sp7
    BI: BI 7.0 SAPKW70017
    <BI syslog at the time of BEx crash>
    15:40:36 RD                                 Q0  I Operating system call recv failed (error no. 232 )
    15:40:36 RD                                 S2  3 Connection to CPI-C client 586 was closed
    15:40:36 RD                                 S7  4 > Partner LU name:
    15:40:36 RD                                 S0  R > Host: 172.19.xx.xxx
    15:40:36 RD                                 S0  I > Partner TP Name: EXCEL
    15:40:36 DIA  000 500 BIB103                R4  9 Communication error, CPIC return code 020, SAP return code 223
    15:40:36 DIA  000 500 BIB103                R5  A > Conversation ID: 82142217
    15:40:36 DIA  000 500 BIB103                R6  4 > CPI-C function: CMSEND(SAP)
    <dev_rd log trace level 3>
    GWRD LOOP **********
    I'm in GwReceive
    SiSelPSelect: start select (timeout=20000)
    Thu Apr  9 15:40:36 2009
    SiSelPNext: an error occurred in sock 31
    NiSelISelectInt: error detected on hdl 18 / sock 31
    NiSelIListInsert: add hdl 18 [17] to sel-list (0) of set0
    NiSelISelectInt: 1 handles selected (0 buffered)
    main: NiSelNext (ni_hdl=18, read=1, write=0, connect=0, hdl_info=0x6000000000587400)
    request from CLIENT
    GwRequest: request from client 586
    GwGetMemory: allocated 0x600000000089bee0 (len=34615)
    NiHsLGetHostName: found address 172.19.xx.xxx in cache
    ***LOG Q0I=> NiIRead: recv (232: Connection reset by peer) [nixxi.cpp 4423]
    ERROR => NiIRead: SiRecv failed for hdl 18 / sock 31
        (SI_ECONN_BROKEN/232; I4; ST; 172.19.xx.xxx:1097) [nixxi.cpp    4423]
    Adresse   Offset  bad request
    GwSaveErrInfo2: save err info (225)
    ***LOG S23=> GwIDisconnectClient, client disconnected (586) [gwxxrd.c     11657]
    ***LOG S74=> GwIDisconnectClient, client disconnected ( SY08472) [gwxxrd.c     11665]
    ***LOG S0R=> GwIDisconnectClient, client disconnected () [gwxxrd.c     11704]
    ***LOG S0I=> GwIDisconnectClient, client disconnected ( EXCEL) [gwxxrd.c     11713]
    LOCATION    SAP-Gateway on host mxxx112 / sapgw01
    ERROR       connection to partner '172.19.xx.xxx:1097' broken
    TIME        Thu Apr  9 15:40:36 2009
    RELEASE     700
    COMPONENT   NI (network interface)
    VERSION     38
    RC          -6
    MODULE      nixxi.cpp
    LINE        4423
    DETAIL      NiIRead
    SYSTEM CALL recv
    ERRNO       232
    ERRNO TEXT  Connection reset by peer
    COUNTER     790

    Just FYI.
    After all, we ended up applying BEx addon patch 9.
    The problem about the BEx crash seemed to be fixed in patch 8, but another problem (I heard it was about something to do with report jump function) was not fixed. As a result, we skipped patch 8 and applied 9.
    Both problems were fixed in patch 9.
    Many thanks to SDN informations.
    Yuko

  • HP Deskjet 3512 spews out blank sheet before printing shipping label

    Hi,As my title says, the printer pops out a blank sheet before printing my shipping label.This has been going on for about a week. Nothing has changed or is different.If it can't be fixed i want to get a new one so i don't get behind in my work.Just wondering if this happens when an inexpensive printer is on it's last legs. Thanks, Sandi

    Not saving the label. When i get an order Right on that page is a box "print shipping label'Another page shows where you put the weight in and you check a couple other sequential thingsand the printer pops out the label. Super duper simple. When the first blank sheet comes out i don't have to touch anything for the label to begin printing...it does it on it's own.. maybe the printer needs a vacation as i do!  Sandi

Maybe you are looking for

  • Can't Get My Dell Downloads to Work

    Hi, I'm new to the community so I have no idea where this topic should be posted (I can't find an appropriate sub-topic under software to post this). Basically my problem is that I can't get My Dell Downloads to register my system so that I can downl

  • Field "quantity" in accounting document

    Hi experts, Found a field named "quantity" in accounting document (after release invoice F2 to accounting). The explanation from the system as following. But I got some questions about that. Q1: What scenario does this field apply to? Would you pls i

  • Naming pics in an album

    I'm new to iPhoto. I have hundreds of pics from a recent vacation. I believe I understand the concept of albums and keywording; however I would like to have many pictures labeled so others viewing them will know what they are of, town they are in, sp

  • Iphone 3G - Youtube Native App Problem

    Hi all, I'm using Iphone with with firmware 3.1.3. For last 3-4 days Iphone cannot connect to Youtube. Every time I try "Cannot connect to Youtube" screen appears prior to the "No Videos" screen. So far I tried different networks as Edge/3G/Wi-fi but

  • Bridge CS6  too bright

    My Bridge CS6 has suddenly become too bright.  Any fixes?