Smartform - Output window (Accept, Cancel, Print, Preview)

Dears experts,
when i execute a preview of a Purchase Order, a message windows appears and you can select the diferents message( print, external send) and  Accept, Cancel, Print or Preview.
I want to do 2 things.
- I only want to view Accept and Cancelled button in the Output Message window. how can i do it? with the parameters output?
- I want that when I accept the message with the OK ICON, execute the code to send the purhcase order as email. nowadays, the pdf code is execute when I chose Preview.
Any idea?
thanks a lot!

Hi friend sure.
You need to increment the index only at the loop no where else and the variable for holding the index value is global.
If you create before the read every time it gets trigerred.
After each loop you assign the sy-tabix value to that variable.
Just like this ,
v_index = sy-tabix.
Then at the window just read the table as shown
READ TABLE t_chq INTO x_chq INDEX v_index.
This will do friend.
I will update the flow of my code here, then you many understand it much clear.
Page1
  Main window (below page1)
    Loop (inside Main win)
      program lines. code : v_index = sy-tabix. v_lines =  lines( t_chq ). (inside loop)
      Condition (inside loop)
         True
            check the v_index < v_lines if true break page, for page break create a command and do it (Inside true condition)
         false
           blank.
  Secondary window (below page1)
    program line (inside sec wind)
    Inside program lines the code is READ TABLE t_chq INTO x_chq INDEX v_index. (inside sec wind)
  Secondary window2  (below page1)
     program line (inside sec wind2)
    Inside program lines some other code. (inside sec wind2)
This is my logic try like this friend.
I think for other records its coming fine because since it is an local variable its getting updated some where and also showing 1 bec its always initializing.
Try this you will get if any issues please revert back to me
Thanks,
Sri Hari
Edited by: srihari.kumar on Jan 6, 2012 11:04 AM
Edited by: srihari.kumar on Jan 6, 2012 11:05 AM

Similar Messages

  • Smartforms main window is not printing

    Hi,
    I would like to ask what to do with this problem.
    The smartform main window is not printing in all the pages.  All the other windows, even the window with the total data is printing.  The only problem is the contents of the main window is not printing.
    Also, the problem only happens when the I've changed printer.
    When I use LOCL as printer, the smartform is OK but when I change the printer, the problem is encountered.
    This also happens when I change environment from development server to production server.  In production server, even the LOCL printer is encountering the problem.
    thanks.

    Hi Mike,
    Have you checked the device type in transaction SPAD? Try to click on Full Admininstration from application toolbar and select device types.
    Hope the above helps.
    Cheers,
    Patrick

  • '#' 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.

  • Smartform All pages in one print preview problem

    Hi
         I am displaying the employee data in ALV with checkbox selection.. i put two user defined buttons like print and print preview. when user clicks on print button, smartform will call for very employee in loop and print it employee wise. But my problem is when user clicks on print preview by selecting multiple checkboxes , I need all pages(employee wise like page1,2,3..) in one print preview. I done but for every employee,i have to press the BACK button. But I need all pages in one preview. I'm pasting my code here. Can anyone suggest??
    WHEN 'PREVIEW'.
    w_cparam-no_dialog = 'X'.
      w_cparam-preview = 'X'.
       w_cparam-getotf = ' '.
       w_outoptions-tddest = 'LOCL'.
       w_outoptions-tdnoprev  = ' '.
        w_outoptions-tdimmed  = 'X'.
    * to reflect the data changed into internal table
          IF ref_grid IS INITIAL.
            CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
              IMPORTING
                e_grid = ref_grid.
          ENDIF.
          IF NOT ref_grid IS INITIAL.
            CALL METHOD ref_grid->check_changed_data.
          ENDIF.
    loop at i_data into wa_data where SEL = 'X'.
    MOVE-CORRESPONDING WA_DATA TO WA_PRINT.
      APPEND WA_PRINT TO I_PRINT.
        CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
          EXPORTING
            FORMNAME                 = 'ZHRF1_PTAR1001'
    *       VARIANT                  = ' '
    *       DIRECT_CALL              = ' '
         IMPORTING
           FM_NAME                  = FM_NAME
    *     EXCEPTIONS
    *       NO_FORM                  = 1
    *       NO_FUNCTION_MODULE       = 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.
        ENDIF.
      CALL FUNCTION FM_NAME
        EXPORTING
    *     ARCHIVE_INDEX              =
    *     ARCHIVE_INDEX_TAB          =
    *     ARCHIVE_PARAMETERS         =
         CONTROL_PARAMETERS         = W_CPARAM
    *     MAIL_APPL_OBJ              =
    *     MAIL_RECIPIENT             =
    *     MAIL_SENDER                =
         OUTPUT_OPTIONS             = W_OUTOPTIONS
         USER_SETTINGS              = 'X'
          FR_DATE                    = PN-BEGDA
          TO_DATE                    = PN-ENDDA
       IMPORTING
    *     DOCUMENT_OUTPUT_INFO       =
        JOB_OUTPUT_INFO            = T_OTF_FROM_FM
    *     JOB_OUTPUT_OPTIONS         =
        TABLES
          ITAB                       = I_PRINT
    *   EXCEPTIONS
    *     FORMATTING_ERROR           = 1
    *     INTERNAL_ERROR             = 2
    *     SEND_ERROR                 = 3
    *     USER_CANCELED              = 4
    *     OTHERS                     = 5
      IF SY-SUBRC <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    CLEAR: WA_DATA,WA_PRINT.
    CLEAR: I_PRINT.
      ENDLOOP.

    Hi friend sure.
    You need to increment the index only at the loop no where else and the variable for holding the index value is global.
    If you create before the read every time it gets trigerred.
    After each loop you assign the sy-tabix value to that variable.
    Just like this ,
    v_index = sy-tabix.
    Then at the window just read the table as shown
    READ TABLE t_chq INTO x_chq INDEX v_index.
    This will do friend.
    I will update the flow of my code here, then you many understand it much clear.
    Page1
      Main window (below page1)
        Loop (inside Main win)
          program lines. code : v_index = sy-tabix. v_lines =  lines( t_chq ). (inside loop)
          Condition (inside loop)
             True
                check the v_index < v_lines if true break page, for page break create a command and do it (Inside true condition)
             false
               blank.
      Secondary window (below page1)
        program line (inside sec wind)
        Inside program lines the code is READ TABLE t_chq INTO x_chq INDEX v_index. (inside sec wind)
      Secondary window2  (below page1)
         program line (inside sec wind2)
        Inside program lines some other code. (inside sec wind2)
    This is my logic try like this friend.
    I think for other records its coming fine because since it is an local variable its getting updated some where and also showing 1 bec its always initializing.
    Try this you will get if any issues please revert back to me
    Thanks,
    Sri Hari
    Edited by: srihari.kumar on Jan 6, 2012 11:04 AM
    Edited by: srihari.kumar on Jan 6, 2012 11:05 AM

  • Printer output does not match Print Preview

    I'm just starting out with this and did a layout of some photos I took with captions. Using File>Print and then clicking "Preview in the resulting dialogue box shows that everything fits on the sheet of paper. HOWEVER, after printing the page, the bottom is cut off. What is the problem? The printer is an HP DeskJet 5150. As a work-around I've started doing the layouts as if the paper is 8" x 10".
    Also, what does the "Soft Proof" check box do in the Print Preview window?

    OK romad, the memory problem isn't the Macs but it could be the printers. I have seen this many years ago.
    You could also create a test page with one long line from top to bottom and print it. Does the problem still show?
    Does it happen if you print a full page photo from i.e. iPhoto directly.
    Do you still have AW on this machine? can you paste the content of your problem page into an AW page and print? What is the result?
    Somehow we need to do tests to pin down from where the problem is emanating from.
    I agree that AW does have a lot that isn't implemented in iWorks, but there are other features that are much better in Pages.

  • Problem with window.close() and print preview in IE

    Hi all,
    In IE, when window.close() or self.close() is executed, the window is closing perfectly. But when after opening a print preview window from file menu in IE and after closing the print preview with [X] button, then the window.close() is not working. Is there any solution to close the window even after closing the print preview window? here is the sample code.
    1) Close.htm
    <HTML>
    <TITLE>TEST</TITLE>
    <BODY>
    <SCRIPT LANGUAGE="javascript">
    function CloseMe()
    window.close();
    //self.close();
    </SCRIPT>
    <INPUT TYPE="button" ONCLICK="CloseMe()" VALUE="Close Me">
    </BODY>
    </HTML>
    Thanks,

    masijade. wrote:
    nogoodatcoding wrote:
    Crosspost: http://forum.java.sun.com/thread.jspa?threadID=5227849&tstart=0
    Why'd you start a new thread once you got an answer on the thread linked above ( and even acknowledged it ) about the fact a that it was not a Java query?Because last time it was a JSP forum, which is not JavaScript obviously, but this is a Java forum, and the designers, obviously, simply neglected to include Script in the name, of course. ;-):D Why, oh, why did they have to call it JavaScript! (And before someone starts, that was a rhetorical question!)

  • Problem while viewing print preview in Portal(EP7.0)

    Hello Experts,
    We have prepared an ABAP report which generates an output in print format.We have used standard function module(SSF_FUNCTION_MODULE_NAME) and the smartform gets displayed correctly in print preview on R/3 side.But when i create a transaction iview and use this report in portal,  the output gets generated in pdf format directly.I do not want to display the report in .pdf format but i would like the users to view the output same as in R/3 format.
    Please advise.
    Thanks in advance.
    Regards,
    Subodh

    Hello Experts,
    Can anyone reply to this thread?

  • Canon printer / unable to print a brcode / print preview ..

    Hi ,
    After all those sdn searching and googling i still not in the correct way
    Barcode is not getting displayed in either print preview or in print output .
    1. SAPSCRIPT-BARCODETEST - (so10) standard text is displaying barcode in atleast in print preview .
    2. *In smartform *is displaying barcode in print preview .
    3. In sap scripts  unable to get print preview . (Wt am lookin for )
    4. Printer device / output types is perfect .
    If i could atleast see a print preview with barcode that would atleast solve ma issue ..
    Tried with several sdn  ways .and . tired of installing barode s/ws and barcode.dll
    Printer is canon IR 3570 ..
    regards ,

    does the canon IR 3570 support barcodes (or through your .dll or whatever)?
    If so, did you correctly define your barcode in SAPScript as a character format?  Did you choose/insert the barcode name in the barcode field?  In the layout, do you have the character format and barcode field?.  In the example below, a barcode B3, described of 3of9 would output the barcode in the ITEM_LINE element:
    /E ITEM_LINE
    /    ,,<B3>&VBDPA-MATNR& < / >  -note:remove the spaces....
    You can control the length like <B3>&VBDPA-MATNR(12)&< / >

  • Smartform output : Articles are getting disorder

    Hi all,
    In the smartform output the articles are displaying disorder, i want to display the articles as ascending order kindly help me on this issue..
    Eg: vf03>billingdocument>issueoutput>select output type-->click on print preview is getting output, in this outptu articles are not getting ascending order.
    Regards
    Suni

    Hi Suni,
    Take the function module, which is generated after executing the smartform and add L and F01 to that. Suppose ur function module is
    /1BCDWB/SF00000161
    like this
    /1BCDWB/LSF00000161F01
    u add and open it in SE38, then it will act as a include program, then you can put break point where ever is required. Hope this helps u.
    Regards,
    Chandu.
    Edited by: chandra sekhar narra on Oct 27, 2010 9:29 AM

  • Smartforms output copy

    i want to output the smartforms with 2 copies .
    i have set the parameter ssfcompop-tdcopies with value '2' , so when i click preview in output , it's show "print preview of Email Page 00001 of 00001 (copy 001 of 002 )"  ,the parameter tdcopies is effect , but when i output it by Email with pdf attachment , the pdf file just 1 page , not 2 pages.
    how can i get the pdf with 2 pages??
    thanks!

    You can call the form twice and pass the copy-count as parameter to the smartform.

  • Print Preview problem in Invoice

    Hi experts,
                    i have the following problem, when i go to the VF02 and use the document 9000040 i go to billing document, then issue output to and choose print preview i have one item for USD1000 and the item can have a text (via SO10), when i get another document, for example 9000060 the print preview shows the item with USD1000 but the text assigned is not being displayed, the first document is a credit memo, the second one is a debit memo,  thanks in advance.

    Hi
      you have mentioned that you have pass the window and the window itself,what do you mean here actually bcz there is only 4 paramters to be passed
    EXPORTING
       ELEMENT                        = 'TEXT1'
       FUNCTION                       = 'SET'
       TYPE                           = 'BODY'
       WINDOW                         = 'MAIN'
    So here you r passing only the window.
    check out the paramters that you are passing i hope there must be some problem in passing the parameters properly in the print program.
    I hope this will help you to solve your problem.
    Thanks
    Mrutyunjaya Tripathy

  • Print preview invoice issue for a parcular invoice in vf03

    Hi,
    I am facing an issue with the print preview invoice. I have 2 billing document nos., for billing document 3117101008 when I go to "Billing Document"->"Issue to output"-> and click on "print preview" I get an output, but for the other billing document 3117101007 when I click on "Print preview" nothing happens, it just keeps on loading and everything gets hanged.
    Do I need to do any modifications in my custom include "YV0023INV_PRINT_F01" or is there anything linked with the header details table 'IT_HU_HEAD'.
    Please advise, appreciate your efforts.
    Thanks

    Hello Bawneet,
    Are you facing this issue only to this billing document ?
    Did you check the same for 1008 billing document ? First try to open 1007 and then next open 1008 document, here please check are you facing the same issue like screen keeps on loading issue.
    Please check this and come back with your issues.
    Thanks & Regards,
    Lakshmi S

  • GUI JAVA 7.20 rev.2 (on Mac OSX 10.6.3): Print preview does not work!

    I've just started using rev 2 of java sapgui and print preview is not working anymore.
    Client: OSX 10.6.3
    SAP: ERP5.0 on WAS 640
    Has anyone experienced the same problem?

    This is the output in console when print-previewing:
    I'm going to open a support message as adviced.
    <code>
    04/05/10 10.45.41     [0x0-0x3e63e6].com.sap.platin[6491]     Exception in thread "Loader for htmlViewer8_XZ_7" java.lang.NullPointerException
    04/05/10 10.45.41     [0x0-0x3e63e6].com.sap.platin[6491]          at com.sap.plaf.frog.FrogListUI.updateColors(FrogListUI.java:63)
    04/05/10 10.45.41     [0x0-0x3e63e6].com.sap.platin[6491]          at com.sap.plaf.frog.FrogListUI.propertyChange(FrogListUI.java:48)
    04/05/10 10.45.41     [0x0-0x3e63e6].com.sap.platin[6491]          at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:339)
    04/05/10 10.45.41     [0x0-0x3e63e6].com.sap.platin[6491]          at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:276)
    04/05/10 10.45.41     [0x0-0x3e63e6].com.sap.platin[6491]          at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:318)
    04/05/10 10.45.41     [0x0-0x3e63e6].com.sap.platin[6491]          at java.awt.Component.firePropertyChange(Component.java:8233)
    04/05/10 10.45.41     [0x0-0x3e63e6].com.sap.platin[6491]          at javax.swing.JComponent.firePropertyChange(JComponent.java:4428)
    04/05/10 10.45.41     [0x0-0x3e63e6].com.sap.platin[6491]          at javax.swing.JComponent.setEnabled(JComponent.java:2638)
    04/05/10 10.45.41     [0x0-0x3e63e6].com.sap.platin[6491]          at org.icepdf.ri.common.annotation.ActionsPanel.setEnabled(ActionsPanel.java:418)
    04/05/10 10.45.41     [0x0-0x3e63e6].com.sap.platin[6491]          at org.icepdf.ri.common.annotation.ActionsPanel.<init>(ActionsPanel.java:106)
    04/05/10 10.45.41     [0x0-0x3e63e6].com.sap.platin[6491]          at org.icepdf.ri.common.annotation.AnnotationPanel.setGUI(AnnotationPanel.java:128)
    04/05/10 10.45.41     [0x0-0x3e63e6].com.sap.platin[6491]          at org.icepdf.ri.common.annotation.AnnotationPanel.<init>(AnnotationPanel.java:73)
    04/05/10 10.45.41     [0x0-0x3e63e6].com.sap.platin[6491]          at org.icepdf.ri.common.SwingViewBuilder.buildAnnotationPanel(SwingViewBuilder.java:1574)
    04/05/10 10.45.41     [0x0-0x3e63e6].com.sap.platin[6491]          at org.icepdf.ri.common.SwingViewBuilder.buildUtilityTabbedPane(SwingViewBuilder.java:1541)
    04/05/10 10.45.41     [0x0-0x3e63e6].com.sap.platin[6491]          at org.icepdf.ri.common.SwingViewBuilder.buildUtilityAndDocumentSplitPane(SwingViewBuilder.java:1501)
    04/05/10 10.45.41     [0x0-0x3e63e6].com.sap.platin[6491]          at org.icepdf.ri.common.SwingViewBuilder.buildContents(SwingViewBuilder.java:499)
    04/05/10 10.45.41     [0x0-0x3e63e6].com.sap.platin[6491]          at org.icepdf.ri.common.SwingViewBuilder.buildViewerPanel(SwingViewBuilder.java:482)
    04/05/10 10.45.41     [0x0-0x3e63e6].com.sap.platin[6491]          at ice.pilots.pdf.ThePilot.createComponent(ThePilot.java:149)
    04/05/10 10.45.41     [0x0-0x3e63e6].com.sap.platin[6491]          at ice.storm.Viewport.setPilot(VCDO)
    04/05/10 10.45.41     [0x0-0x3e63e6].com.sap.platin[6491]          at ice.storm.StormBase.append(VCDO)
    04/05/10 10.45.41     [0x0-0x3e63e6].com.sap.platin[6491]          at ice.storm.StormBase.do_clear_content(VCDO)
    04/05/10 10.45.41     [0x0-0x3e63e6].com.sap.platin[6491]          at ice.storm.StormBase.do_render_content(VCDO)
    04/05/10 10.45.41     [0x0-0x3e63e6].com.sap.platin[6491]          at ice.storm.Viewport.runAsynchronousLoad(VCDO)
    </code>
    Edited by: Lorenzo Nicora on May 4, 2010 10:52 AM

  • Junk Characters are coming in the Print Preview of True Type Font

    Hi
    I am facing one issue. Here I have installed on one of the True type font of Gujarati (one of Regional language for India) language.When I see Print preview using LP01 Output device (which has SWIN Device Type) these true type font coming as Junk characters. But when I take print it is coming perfectly Ok. I want to know is there any setting required to maintain for Output device to see Print Preview in Gujarati also ?
    I feel that when System is generating output for Preview it is ignoring true type font..
    If there is any solution kindly let me know
    Regards
    Bhavin Shah

    Hi,
    Try creating the spool using the unicode device type SWINCF(see note #812821) and check the result.
    regards,
    Aidan

  • Adobe 9 standard print preview not updating

    I am having a issue with Adobe 9 stardard on win7 64bit. The issue is happening on more then on pc. The issue is, when the page size is changed in the print menu, by clicking the properties button. The preview of the document does not update to the page size that I chose. For instance the user is usually changing the page size to 11 x 17 and when they choose that the preview does not change the 11x17, but when they print it will print at 11x17. Is there anything that I can do so that the preview image updates. If they go back in and change the paper size again it updates the preview image.
    Thank You

    Hi Sonika,
    That is not required functionality. it should display a Adobe Form for Invoice processing.
    I doubt there might be some problem with ADS configuration.
    Can you please do the following test and let me know the result ?
    If the Adobe Interactive Forms have been installed correctly, the
    following tests should run without errors:
    First test:
    1) Call transaction SE38.
    2) Enter the report name "FP_PDF_TEST_00" and choose "Execute" (or press F8).
    3) Enter "ADS" in the entry field for the connection, and choose
    "Execute" (or press F8).
    4) The system should issue a dialog box containing the current version
    information.
    Second test:
    1) Call transaction SE38.
    2) Enter the report name "FP_TEST_00" and choose "Execute" (or press
    F8).
    3) Enter "FP_TEST_00" for the form, "2" for the number of output pages,
    and "ADS" for the ADS connection. The choose "Execute".
    4) Enter a valid output device and choose "Print Preview".
    5) The Adobe Reader should be displayed in the GUI, and display two
    pages with numbered lines.
    Third test:
    1) Call transaction SE38.
    2) Enter the report name "FP_TEST_IA_01" and choose "Execute" (or press
    F8).
    3) Enter "FP_TEST_IA_01" for the form, "ADS" for the ADS connection, and
    any data in the other entry fields (these are already filled with
    default values). Then choose "Execute" (or press F8).
    4) Enter a valid output device and choose "Print Preview".
    5) The Adobe Reader should be displayed in the GUI, and display a page
    with address fields.
    6) Scroll down to the frame for the new address, and fill in those
    fields.
    At the end of the form, an entry field for the date and a value help
    exists. Choose the input help button and check if the system displays
    the datepicker.
    Now you will know yourself if there is any problem with ADS configuration.
    Cheers
    Satya

Maybe you are looking for