To display a sapscript layout by cliking a Button

Hi Friends
Given a sapscript. When i execute the script prog the output should be
displayed
as a report first and when we click the button PRINT the same report
should be displayed in script layout .
But now iam able to disply only the header . unable to display the main
window...
why?.. I called the func modules as follows .. the windows are header
and main...
CASE in_ucomm.
    WHEN 'PRINT'.
      PERFORM print_sapscript.
  ENDCASE.
form print_sapscript .
  CLEAR options.
  options-tddest   = '*'.
  options-tdimmed  = '*'.
  options-tddelete = '*'.
  options-tdnewid  = 'X'.
  PERFORM print_popup_msg.
  PERFORM start_form.
  PERFORM write_report2.
  PERFORM end_form.
  PERFORM close_form.
endform.             
in print_popup_msg i called open_form..and  write_report as
form write_report2 .
      CALL FUNCTION 'WRITE_FORM'
        EXPORTING
          element = '100'
          window  = 'AAA'     " this is the element in header window
        EXCEPTIONS
          OTHERS  = 1.
endform.                    " write_report2
iam having six elements defined in MAIN window  how to call the six
elements....
Hope will suggest me as soon as possible.. Will be waiitng ..
Thank You

HI SAi,
to call the Text elements...
go to sapscript command editor.
select text element in command prompt.
/E 100
PR &fld1&
/E 200
PR &FLD2&
/E 300
PR &FLD3&
PR is paragraph format.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
<b>element = '100' " this is text element name
window = 'MAIN' " this is window name</b>
EXCEPTIONS
OTHERS = 1.
Regards
SAB

Similar Messages

  • Sapscript - layout form

    Hi,
    Can you explain about the sapscript layout, with example?
    Thanks in advance.

    Hi,
    Create the SapScript Layout using Tcode:SE71,then create a page called 'PAGE1', create a Paragraph called 'AS' and use the below code in the Text Element of the Main Window. Then the values will be displayed in the SapScript when you try to execute its Print Program supplied in the other post.
    Example Code:
    /E   MAIN    
    AS   &NAME&  
    Apart from this, TNAPR is the table which contains the details of the print program and form.
    Hope this helps.
    Please reward if useful.
    Thanks,
    Srinivasa

  • Data not display in background layout

    Hi Expert,
    This is regarding screen layout.
    FBL3N report.... I have create new layout for report FBL3N. when i run the report in foeground all data display in proper layout.
    But when i run this report in Background two fields are not display in layout.
    Please suggest me whern i do the changes....
    Regards
    PK.

    I think you should change the forum if you are asking Finance module related qwuestions.

  • Displaying large product layout on a page?

    I want to insert a product on a page but the module defaults to the small layout. Is there a way to display the large layout similarly?
    Thanks
    Tom

    Im including a seperate product onto a page for distirbutors sign up... we are doing it in stages though and the small product layout doesnt look right on the page -
    http://www.allnaturalassets.com/sign-up  as you can see the bottom where the item is, the small doesnt look good so im wanting to display the large layout for this one product on that page :-) The module doesnt allow it though out of the box :-)
    Thanks!
    Tom

  • Display Multiple ALV layouts on one screen

    Hi,
    I have created 4 ALV Catalogues named: ALVCAT1, ALVCAT2, ALVCAT3, ALVCAT4
    I have also created the corresponding internal tables with data for each catalogue: ALVITAB1, ALVITAB2, ALVITAB3, ALVITAB4
    I have so far used the following function to generate each of the catalogues above:
      CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
        EXPORTING
          I_PROGRAM_NAME     = SY-CPROG
          I_INTERNAL_TABNAME = 'ALVITAB1'
          I_INCLNAME         = SY-CPROG
        CHANGING
          ct_fieldcat        = ALVCAT1[].
    And I have used the following function module to display the table as ALV:-
    *DISPLAYING REPORT AS ALV GRID
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          I_CALLBACK_PROGRAM      = SY-CPROG
          I_CALLBACK_PF_STATUS_SET = 'SET_PF_STATUS'
          i_callback_user_command = 'USER_COMMAND'
          IT_FIELDCAT             = ALVCAT1[]
         i_screen_start_column = 10
         i_screen_start_line   = 15
         i_screen_end_column   = 200
         i_screen_end_line     = 20
        TABLES
          t_outtab                = ALVITAB1.
    How can I now using the above function modules or similar function modules to DISPLAY multiple ALV layouts on a single SCREEN. Each layout should be treated separately with their own ALV tool bar etc.
    In this case i need to display 4 screens but I have scenarios where i need to also display 5.
    Would be really grateful for your guidance with source code to achieve this.....
    Thnx
    Salman
    Edited by: Salman Akram on Sep 20, 2010 2:47 PM

    Hi
    Try this [Link|http://wiki.sdn.sap.com/wiki/pages/viewpage.action?pageId=61243570] or the below program
    BCALV_TEST_GRID_DRAG_DROP
    or else
    Try to use splitter container to display multiple ALVs on one screen
    here is the demo program RSDEMO_SPLITTER_CONTROL
    the below code will help you to call grid using splitter control
         EXPORTING
            container_name = 'CUSTOM'.
        CREATE OBJECT splitter
          EXPORTING
            parent  = container
            rows    = 1
            columns = 1
            align   = 15.
        CALL METHOD splitter->set_row_height
          EXPORTING
            id     = 1
            height = 1.
        CALL METHOD splitter->get_container
          EXPORTING
            row       = 1
            column    = 1
          RECEIVING
            container = container_1.
        CREATE OBJECT grid1
          EXPORTING
            i_parent = container_1.
        CALL METHOD grid1->set_table_for_first_display
          EXPORTING
            is_layout       = gss_layout
            is_variant      = lwa_variant
            i_save          = 'A'
          CHANGING
            it_outtab       = gt_report_list
            it_fieldcatalog = gtt_fld_cat.
    Regards
    Edited by: Anesht on Sep 20, 2010 11:49 PM

  • SAPscript layout -Repeating Main window in same page

    Hi,
    I have a requirement in sapscript layout to duplicate content within a page in two sections, of which the content can span across multiple pages.
    Can anyone give an idea how this can be achieved.
    This particular layout has 3 sections:
    1st window (Top window): invoice Details (multiple items)
    2nd window (Middle window): Check Details single item
    3rd window (Bottom window): invoice Details (multiple items) {same content of the 1st window}
    The invoice details can span across multiple pages.
    Main window alone works perfect with the requirement.
    I have attempted with a copy of a Main window for the 3rd window, and as it's specified it can only continue from the 1st main Window and i couldn't find a way to control it's value passing from the calling program.
    I have also tried using a dynamic window for the 3rd window, but haven't worked  to get the desired values shown across multiple pages. When it cross to a new page it repeats its last value across all pages.
    Please help me with this. Thanks in Advance.
    Regards,
    Viraj.

    The Standard layout only prints the invoice details once.
    If your existing layout prints invoice repeated, which means that already a customization is in place which repeats the invoice breakdown.
    If the items are being repeated in the main window, it could be that the repetition customization is done on the calling program, then a solution could be to remove/comment that call  in the calling program by searching text element name.
    If the items are being repeated from a non-main window, then a solution could be to remove/comment the entire element in the non-main window.
    hope this helps
    Best Regards,
    Viraj.

  • Attachment of Word/PDF to Sapscript layout

    Hello everyone,
    Need some help regarding attachment of document in script.
    I know that we can convert the ouput of a SAPscript form to a PDF in a mail attachment or a spool.
    But what we require is attaching a word/pdf document to an existing SAPscript so we can print it at the end of the existing SAPscript layout as terms & conditions.
    Has anyone does this before? I know how to upload word documents in ole and in document management, but am unsure if its possible to add it to a layout. We can add bmp/tiff files, but pdf files??
    Please advise! Thank you in advance.
    Regards,
    Ketaki

    Hi Rich
    Great to hear that someone has already solved the challenge we are facing now.
    We have to print some PDF’s which are stored in iXOS archiving system and linked with archive link to a SD invoice.
    Is it possible you describe a bit more detailed your solution and if possible you send a copy of the coding to me.
    Thanks in advance.
    Walter Wohlgemuth

  • How to design rows and columns in sapscript layout

    Hi friends,
    Please let me know how to design rows and columns in sapscript layout with example?
    Thanks,
    Yogesh

    Hi friends,
    Please let me know how to design rows and columns in sapscript layout with example?
    Thanks,
    Yogesh

  • To check the transport request of SAPScript layout

    Hi Experts,
    I'd like to ask how to check the transport request assigned to SAPScript layout created in SE71. Im using SAP version 4.5b.Thanks!
    Best Regards,
    Kurtt

    Hi,
    Go to transaction SE03, then select search for objects in request/ tasks, then click on execute button. Then pass required options like PgmID, Obj, Obj. name (Example: R3TR, FORM, Form name) then Execute.
    Reward points if useful.
    Thanks & Regards,
    Vasudeva Rao

  • Number pages in sapscript layout

    Hi experts,
    What type of variables normally used in sap script to output data? 
    How do you number pages in sapscript layout outputs? 
    Thanks and Regards,
    Logu.

    Hi,
    ·     &SAPSCRIPT-FORMPAGES&:
    This field contains a number representing the total number of pages of the currently formatted form (any output between START_FORM and END_FORM). The page counter mode (START, INC, HOLD) of the individual pages is ignored. You can use this symbol to formulate information like
    ‘Page x of y’ for your output.
    ·&SAPSCRIPT-JOBPAGES&:
    This field contains a number representing the total number of pages of all forms contained in the currently formatted print request, in other words, of all forms created using the OPEN_FORM, START_FORM.. ENDFORM, START_FORM.. END_FORM,..., CLOSE_FORM function modules.
    &PAGES& current page.
    Thanks,
    Arunprasad.P
    Reward if useful.

  • Addding body content to the mail sent by sapscript layout output report

    Hi,
    I have a report which sends the output of a sapscript layout  as an email.Is there any way i can add some body content to the mail which the report is sending.
    This include is getting called from my report to send email - RVADOPFO
    Thanks
    Bala Duvvuri

    Issue is fixed .instead of using the standard open_form functionality I am getting back the OTF output and converting into pdf and using mail fms i am sending it along with body.
    Thanks
    Bala Duvvuri

  • Where is the language derived for the sapscript layout?

    hi all ,
    where is the language derived for the sapscript layout? in the print program ? where should i control this ?
    best regards
    Kevin

    Hi,
         It may be depend upon the Vendor's or customer's language of the business documents used to print(Sales Orders, Purchase Orders)
    You can change in Layout
    Regards
    Bala Krishna
    Edited by: Bala Krishna on Dec 22, 2008 2:57 PM

  • How to retrieve the Sapscript layout changes for a particular Transport request in development server after this Transport request so many requests created  ?

    Dear Abapers,
    I request the Abapers kindly reply for this blog
    I want to retrieve the sapscript layout changes for a particular transport request in development server after that many transport request created and moved to quality ? 
    I checked in SE03 transaction the transport request was there.  But I want to retrieve the existing transport request which is not moved to Quality?
    Is it possible to retrieve the existing transport request in development which is not moved to quality ?
    Like how we retrieving the programs using versions in development server,  In the same way I want to retrieve the sapscript layout in development server ?
    Thanks & Regards
    Muzeebur Rahiman.S

    Hi,
    There is no version management for SapScript or Smartforms .
    When you write "transport request in development which is not moved to quality" - was the transport ever released and exported from the development system? If yes, and if the "Transport files" are still available in "Transport directory" (or if the transport files were backed up and could be retrieved), the transport could be imported again. If the TR was not exported, you are out of luck, I believe...
    I would not recommend you do it on your own even if you happen to have enough authorizations (consult with Basis and/or Transport Admin, if you have one in your organization). I would not recommend that it's imported on a development system or QA system, even if the transport contains no other objects - only the SapScript form in question. Import it on a "sand-box" that gets overwritten by system copy from time to time... Once the transport is imported, you should have the old version of SapScript in that system and could analyse the changes and perform manual merge.
    cheers
    Jānis

  • Download Smartform or Sapscript layout into Excel

    Hi ,
    Is there any way to download the sapscript layout or smartform layout into excel . I know that there is a report to download layout from spool into pdf with the RSTXPDFT4 program . But my requirement is to download the layout into excel and then use the excel sheet to manipulate the data.
    Thanks in advance.
    Narayani

    Hello,
    Very useful step by step approach for OLE by Serdar
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/technologies/an easy reference for ole automation.article
    Hope this helps you.
    Regards, Murugesh AS

  • How to convert PO sapscript layout to pdf - need VERY URGENT Help

    Dear All,
    Requirement: PO sapscript layout after some modifications (say, ZMEDRUCK) has to be converted to pdf. Through me9f user will be able to give ranges of PO numbers and can view the print preview for the po. After that on clicking the print button we get the printout of the pos one after another based on the user input of PO numbers.
    Our requirement is that when the user will click on the "Print Preview" of po (rather than pressing the print button) it i.e. PO sapscript layout has to get converted to pdf.
    If you have already encountered this scenario, could you please send me the source code regarding this at the earliest. If you want to email it to my personal id, please let me know so that I can give it to you. Thank you.
    It will be very beneficial for mine if you can send me some source code in this regard. (FYI. We want only “Print output” of PO sapscript. So, Print Program /SMB40/FM06P [after copying it to our ZSMB40/FM06P program] need to be modified for downloading the PO into PDF where there is no FMs like OPEN_FORM, WRITE_FORM, CLOSE_FORM. So already available source code in SAP forums can not help me.)). Kindly help me at the earliest. It’s VERY URGENT…
    Thank you.
    Thanks & Regards
    Sudipta

    Hi Chaith,
    Could you please provide me the source code regarding this at the earliest.
    We want only “Print output” of PO sapscript. So we need to modify only the Print Program SAPFM06P after copying it to ZSAPFM06P for downloading of modified PO (ZMEDRUCK) sapscript layout into PDF.
    I am already having some source code from sdn portral. I am attaching it herewith. But it's not working as some constants and variable values need to be given. We want to take download of PO into PDF from ME9F transaction itself.
    Could you please provide necessary values in the missing constants and variables and kindly resend the corrected modified Source code to me so that I can run the same code to  download the modified PO ZMEDRUCK into PDF . Need YOUR URGENT HELP...
    DATA: l_druvo LIKE t166k-druvo,
            l_nast  LIKE nast,
            aux_nast LIKE nast,
            l_from_memory,
            l_doc   TYPE meein_purchase_doc_print,
            ent_screen TYPE c,
            ent_retco TYPE i,
            toa_dara TYPE toa_dara,
            arc_params LIKE arc_params,
            aux_form LIKE tnapr-fonam.
      DATA: otf LIKE itcoo OCCURS 0 WITH HEADER LINE,
            lt_docs      TYPE TABLE OF docs,
            pdf_bytecount TYPE i,
            nom_archivo TYPE string.
      aux_form = 'ZMEDRUCK'.
      l_from_memory = c_true.
      SELECT *
        FROM nast
        INTO aux_nast
        UP TO 1 ROWS
        WHERE kappl = c_po     " Purchase Order
        AND   objky = t_datos-ebeln
        AND   aktiv = space
        ORDER BY erdat DESCENDING eruhr DESCENDING.
      ENDSELECT.
      aux_nast-sort1 = c_swp.
      CLEAR ent_screen.
      CLEAR ent_retco.
      IF aux_nast-aende EQ space.
        l_druvo = c_1.
      ELSE.
        l_druvo = c_2.
      ENDIF.
    l_druvo = '2'.
      CALL FUNCTION 'ME_READ_PO_FOR_PRINTING'
        EXPORTING
          ix_nast        = aux_nast
          ix_screen      = ent_screen
        IMPORTING
          ex_retco       = ent_retco
          ex_nast        = l_nast
          doc            = l_doc
        CHANGING
          cx_druvo       = l_druvo
          cx_from_memory = l_from_memory.
      CHECK ent_retco EQ 0.
      CALL FUNCTION 'ECP_PRINT_PO'
        EXPORTING
          ix_nast        = l_nast
          ix_druvo       = l_druvo
          doc            = l_doc
          ix_screen      = ent_screen
          ix_from_memory = l_from_memory
          ix_toa_dara    = toa_dara
          ix_arc_params  = arc_params
          ix_fonam       = aux_form                            
        IMPORTING
          ex_retco       = ent_retco.
      CLEAR otf.
      CALL FUNCTION 'READ_OTF_FROM_MEMORY'
        EXPORTING
          memory_key   = l_nast-objky  " PO Number
        TABLES
          otf          = otf
        EXCEPTIONS
          memory_empty = 1
          OTHERS       = 2.
      CALL FUNCTION 'CONVERT_OTF_2_PDF'
        IMPORTING
          bin_filesize           = pdf_bytecount
        TABLES
          otf                    = otf
          doctab_archive         = lt_docs
          lines                  = pdfout
        EXCEPTIONS
          err_conv_not_possible  = 1
          err_otf_mc_noendmarker = 2
          OTHERS                 = 3.
      CONCATENATE c_dest t_datos-ebeln c_ext INTO nom_archivo.
      CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
          bin_filesize = pdf_bytecount
          filename     = nom_archivo
          filetype     = c_bin
        IMPORTING
          filelength   = pdf_bytecount
        TABLES
          data_tab     = pdfout.

Maybe you are looking for

  • How do I determine/set the XML implementation for WLS 6.1?

    I can't find anywhere on the console that shows or allows one to change the XML implementation that is used in the Weblogic Server (6.1). I tried putting the xml jars prior to the weblogic.jar in the classpath, but did not see any changes to the prob

  • Print option in Actionscript 3.0

    Hi, I want to print movieclip. But the following code print the center of the pdf (small size movieclip). I want to print the movieclip full page (in pdf). function printMe(e:MouseEvent):void {         layoutimage_mc.addChildAt(layout_mc, 0)     var

  • Referencing Loader after created in loop

    I am creating a loop which loadsimages to newly created loaders.   After each loader completes, I'd like to pass it through another  function Here's my loop of loaders where loader_names is an array of my loader names and overlay_files is an array of

  • HT3275 Why does Time Machine say it's unable to back up because the disk is full -- even tho it's supposed to delete the oldest backups when that happens?

    I'm running OS 10.6.8 on an imac from around 2011.  I back up with Time Machine to an external hard drive that has about 500 GB.  Until now, I've had no problemsm, or at least that's what I thought.  But today I'm getting a message every hour saying

  • JSP, Bean, or Servlet?

    I've found that alot of the time, the systems I'm trying to design can use all of these to accomplish the same task. What's a good indicator of whether or not I should be using one technology over another? For example, most recently, I designed an ht