How to disable print button in outoput screen from vf03

hi,
i have a requirement to display error message and, disable the print and print preview button.
below its the step,
1)vf03
2)key in document type
3)select output type
4)if there's error, display error message and disable print and print preview button.
what i have done was
1) i've put the error message in my 1st part of code,
*determine discount
it_zmas-discount = it_zmas-gross_value - zkwert.
MODIFY it_zmas.
ELSE.
MESSAGE ID 'Z0' TYPE 'S' NUMBER '999' WITH 'Please maintain cust pricing grp 34 for ' wa_zmas-matnr.
p_proc_screen = 'X'.
ENDIF.
CLEAR zknumh.
2)then i set itcpo-tdpreview = ' ' to display my print button after display the error message
CLEAR itcpo.
MOVE-CORRESPONDING nast TO itcpo.
itcpo-tdcover   = nast-tdocover.
itcpo-tddest    = nast-ldest.
itcpo-tddataset = nast-dsnam.
itcpo-tdsuffix1 = nast-dsuf1.
itcpo-tdsuffix2 = nast-dsuf2.
itcpo-tdimmed   = nast-dimme.
itcpo-tddelete  = nast-delet.
itcpo-tdcopies  = nast-anzal.
itcpo-tdprogram = sy-repid.
IF us_screen NE space
AND p_var EQ space.
itcpo-tdpreview = 'X'.
itcpo-tdnoprint = 'X'.
ELSE.
itcpo-tdpreview = ' '.
ENDIF.
CASE nast-nacha.
WHEN '1'.
xdevice = 'PRINTER'.
itcpo-tdnewid = 'X'.
itcpo-tdgetotf = 'X'.
WHEN '2'.
xdevice = 'TELEFAX'.
itcpo-tdtelenum = nast-telfx.
itcpo-tdteleland = us_country.
itcpo-tdsenddate = nast-vsdat.
itcpo-tdsendtime = nast-vsura.
WHEN '3'.
xdevice = 'TELETEX'.
itcpo-tdtelenum = nast-teltx.
itcpo-tdteleland = us_country.
itcpo-tdsenddate = nast-vsdat.
itcpo-tdsendtime = nast-vsura.
3) my last problem its, i am not sure how to disable the print button.i need  to show an error message for my invoice via vf03 when error occur when user click print or print preview button. however with my code above, i am only able to display the error message and disable the print preview.
could anyone guide me how do i disable my print button? really appreciate your help.
regards,
sw

Instead of disabling the print buttons, you can restrict creating the actual output message for a specific output type.
You can achieve it by creating the Output Requirement in transaction VOFM. You need to assign this requirement to your Output type. In this Requirement you can check all your conditions. If they all validation pass through than and than create the Output.
Regards,
Naimesh Patel

Similar Messages

  • How to disable save button on selection screen (1000) run from other report

    Hi Experts,
    Can any one let me know how to disable save button on selection screen (1000) run from other report.
    Say I am running from report R1 which submits report R2, but the save button should be disabled on
    report R2(selection screen 100).
    Thanks in advance.
    Regards
    RP.

    Hi RPReddy16 ,
    Try this:
    DATA :BEGIN OF t_extab occurs 0,
                     fcode like rsmpe-func,
                 END OF t_extab.
    REFRESH T_EXTAB.
    MOVE 'SAVE' TO T_EXTAB-FCODE.
    APPEND T_EXTAB.
    CLEAR T_EXTAB.
    SET PF-STATUS 'STATUS' EXCLUDING T_EXTAB.
    Regards,
    José

  • How to Disable Print Button in document.htm?

    Hi,
       I'am using HAP_DOCUMENT BSP applications for Appraisal.I had creatde iViews for that BSP's in Portal and am able to acess all the BSP's.
       I'am using document_created.htm BSP for displaying Created Appraisals and it is working fine.When i click on particular Appraisal mentioned in that iview it will move to next page i..e.,document.htm where we can see the complete description of the Appraisal.Now we had 5 buttons in that page
    Action Log,Exit,Display Scorecard,Disaply Qualifications and Print.
      Now i want to disable Print Button.I searched a lot but am unable to find the exact code written for this Print button.I dnt know much abt the coding of BSP's,please anybody guide me with a solution.
    With Regards
    Praveen

    Instead of disabling the print buttons, you can restrict creating the actual output message for a specific output type.
    You can achieve it by creating the Output Requirement in transaction VOFM. You need to assign this requirement to your Output type. In this Requirement you can check all your conditions. If they all validation pass through than and than create the Output.
    Regards,
    Naimesh Patel

  • How to disable Print button on WebDynpro ABAP ALV

    In WebDynpro ABAP, a standard menu appears around the ALV,  that has a PRINT button and an EXPORT button.
    Is there anyway to disable those buttons????
    Thanks
    John

    Hi John,
    Check the interface if_salv_wd_std_functions. It contains methods which are used to hide the standard ALV toolbar buttons.
    Also refer : Removing "print version" button in alv
    How to hide Print and Filter option from dynamic ALV

  • How ti disable enter button in selection screen.

    Hi,
    Developed a  report and when execute the Tx code first i get selection screen and when inputs are given in selection screen and hit enter it will direct to module pool screen.. here after giving inputs in selection screen,ENTER and F8 button are working but i want to disable ENTER button ....
    Regards,
    Venkat.

    Hi venkat,
    I am also fasing same problem plz help me how to call form in start-of-selection please help me with any sample as soon as possible,
    Regards
    sridevi.V

  • How to disable Print button in Report Manager in SSRS 2008

    I have a report with long list of columns. Currently we are supporting only excel export and we do not want user to print reports. I know we can disable export options by editing Render extensions in rsreportserver.config. Kindly suggest me how I can stop
    user from printing reports.
    Thanks.

    Please refer the link below:
    http://msdn.microsoft.com/en-us/library/ms155874.aspx
    "Report server administrators have the option of disabling the print feature by setting the report server system property
    EnableClientPrinting to false. This will disable client-side printing for all reports managed by that server. By default,
    EnableClientPrinting is set to true. You can disable client-side printing in the following ways:
    Select Enable download for the ActiveX client print control on the Server Properties page in Management Studio. To open Server Properties pages, connect to a report server instance in Management Studio, right-click on the report server node,
    and select Properties.
    Write script or code that sets the report server system property EnableClientPrinting to
    false."
    Thanks, Michael Mei
    Is there a way to enable or disable printing and export facility in the client based on report server roles. In our case some group of users only needs read access and so we want to prohibit export and print facility.
    bhav27

  • How to disable execute button in selection-screen

    Hi,
    I have already placed a execute button in selection screen but now I want to diable
         1. All std  buttons including F8
         2.   but excluding F1
    regards
    paul

    Hi
    Check this FM : RS_SET_SELSCREEN_STATUS
    sample code :
    DATA: BEGIN OF i_exc OCCURS 0,
           code LIKE sy-ucomm,
       END OF i_exc.
      DATA: ws_repid like sy-repid.
      CLEAR i_exc.
      i_exc-code = 'ONLI'.
      APPEND i_exc.
      MOVE: sy-repid TO ws_repid .
      CALL FUNCTION 'RS_SET_SELSCREEN_STATUS'
        EXPORTING
          p_status  = ' '
          p_program = ws_repid
        TABLES
          p_exclude = i_exc.
    Laxman
    Message was edited by: Laxmana Kumar

  • How To Disable Print Button And Download Button In PDFViewer In Firefox? I just love the pluggin but my boss want it can be disabled, just to show the pdf.

    I just develop a web based program that my boss want to just show a pdf to his employee... but that my boss just want to show that pdf and cant print or save or download it... thanks... sorry for my english...

    Sorry, your boss can't control what happens on a users PC. A website can't change what plugin is used to display a PDF file in Firefox, not can a website disable or block access to features or controls in the PDF Viewer.

  • Reader XI has the print button off the screen when on 800x600 resolution

    Reader XI has the print button off the screen when on 800x600 resolution as well, how to fix without changing resolution?  A user needs the resolution set to that for her eyes.
    I see that this was an issue in Reader X and update 10.1.3 resolved it.  What was the fix?

    The scrollbar appears and works but unfortunately the dialog size is still too big therefore the print button ends up being hidden by the windows taskbar. Could you please make sure that the print dialog size is calculated against the work area (desktop size minus the taskbar, there's a win32 API to get that) rather than the whole desktop to fix the issue?
    That would also fix another issue: when the taskbar is sized higher than usual whatever the resolution you have it could still end up covering the print buttons but if you calculate against the work area rather than the desktop area that issue would be fixed as well.
    Please don't leave it unfixed because even if the requirements say 1024x768 if you have higher DPI settings or have a taskbar with a non-default size the print button could easily become unreacheable.

  • Suppress or Disable SAVE button in Approval screen (BBPSC07)

    Dear Experts,
    i would like to ask how to suppress or disable SAVE button in Approval Screen (BBPSC07). Thanks in advance..
    Edited by: Mochamad Affan Rasyidi on Oct 3, 2009 6:38 AM

    Hi
    If you mean disabling the Variant Save Option of the SAVE button in a Selection-Screen without getting rid of the button in the screen you can do this.
    FIELD-SYMBOLS <fs>.
    AT SELECTION-SCREEN.
      IF sy-ucomm EQ 'SPOS'.
        ASSIGN ('(RSDBRUNT)<SSCRFIELDS>-UCOMM') TO <fs>.
        <fs> = ''. 
    *  Logic you want to apply to the SAVE button
      ENDIF.

  • How to disable a button

    Hy Experts,
    I am a Basis guy and I want to know how to disable a button from any screen.
    Basically I have to Disable a button "Save as Completed" from the screen of t.code MIR7.
    Is there any way to hide it. If it is then please let me know, I will be thankful to you.

    Dear Aplesh,
    Check this:
    It will give you the description along with screen-shots.
    http://husnie.wordpress.com/
    Regards,
    Rakesh

  • Disabling Print button on report

    Can sm1 help me how 2 disbale print button on report
    tia

    Hassan,
    I am not sure if this is possible. Can you ask this question in the Reports forum here on OTN.
    Frank

  • How to disable hold button in purchase order creation.

    hi
    how to disable hold button in purchase order creation.

    Select single * from VBAK where clause
    ---It fetches single record from the database, based on the condition you specified in the where clause.
    Where as select * from VBAK up to 1 row
    ---Fetches first record if the condition specified in the where clause is satisfied, otherwise it doesn't fetch any record

  • How to Add Print Button in the Online Payslip

    Dear Friends,
    How to Add Print Button in the Online Payslip (Employee Self Service). Can anyone pls let me know about this ..
    with regards
    Swpana

    Hi,
    Please review the following documents.
    Note: 332402.1 - Can You Mass Print Of Online Payslips?
    https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=332402.1
    Note: 256072.1 - Payslip V4.0 Print Button Is Missing
    https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=256072.1
    For details about Deposit Advise and Checkwriter, please refer to:
    Note: 459306.1 - XML Checkwriter/Deposit Advice
    https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=459306.1
    Regards,
    Hussein

  • How to Add Push Button On Selection Screen

    Hi Experts,
    How to add Push button on Selection Screen.
    Points will b rewarded for useful help.
    Bohra.

    Hi,
    To create a pushbutton on the selection screen, you use:
    SELECTION SCREEN PUSHBUTTON [/]<pos(len)> <push>
    USER-COMMAND <ucom> [MODIF ID <key>].
    The [/]<pos(len)> parameters and the MODIF IF addition have the same function as for the formatting options for underlines and comments.
    <push> determines the pushbutton text. For <push>, you can specify a text symbol or a field name with a maximum length of eight characters. This character field must not be declared with the DATA statement, but is generated automatically with length <len>. The field must be filled before the selection screen is called.
    For <ucom>, you must specify a code of up to four characters. When the user clicks the pushbutton on the selection screen, <ucom> is entered in the UCOMM of the SSCRFIELDS interface work area. You must use the TABLES statement to declare the SSCRFIELDS structure. The contents of the SSCRFIELDS-UCOMM field can be processed during the AT SELECTION-SCREENevent.
    Ex.
    REPORT DEMO.
    TABLES SSCRFIELDS.
    DATA FLAG.
    SELECTION-SCREEN:
    BEGIN OF SCREEN 500 AS WINDOW TITLE TIT,
    BEGIN OF LINE,
    PUSHBUTTON 2(10) BUT1 USER-COMMAND CLI1,
    PUSHBUTTON 12(10) TEXT-020 USER-COMMAND CLI2,
    END OF LINE,
    BEGIN OF LINE,
    PUSHBUTTON 2(10) BUT3 USER-COMMAND CLI3,
    PUSHBUTTON 12(10) TEXT-040 USER-COMMAND CLI4,
    END OF LINE,
    END OF SCREEN 500.
    AT SELECTION-SCREEN.
    CASE SSCRFIELDS.
    WHEN 'CLI1'.
    FLAG = '1'.
    WHEN 'CLI2'.
    FLAG = '2'.
    WHEN 'CLI3'.
    FLAG = '3'.
    WHEN 'CLI4'.
    FLAG = '4'.
    ENDCASE.
    START-OF-SELECTION.
    TIT = 'Four Buttons'.
    BUT1 = 'Button 1'.
    BUT3 = 'Button 3'.
    CALL SELECTION-SCREEN 500 STARTING AT 10 10.
    CASE FLAG.
    WHEN '1'.
    WRITE / 'Button 1 was clicked'.
    WHEN '2'.
    WRITE / 'Button 2 was clicked'.
    WHEN '3'.
    WRITE / 'Button 3 was clicked'.
    WHEN '4'.
    WRITE / 'Button 4 was clicked'.
    WHEN OTHERS.
    WRITE / 'No Button was clicked'.
    ENDCASE.
    This example defines four pushbuttons on a selection screen that is displayed as a
    dialog box. The selection screen is defined in a statement chain for keyword
    SELECTION-SCREEN.
    If the text symbols TEXT-020 and TEXT-040 are defined as 'Button 2' and 'Button 4',
    the four pushbuttons appear as follows on the selection screen displayed as a dialog box.
    Regards,
    Bhaskar

Maybe you are looking for