How to get SapScript and Smartform printed in one spool request?

Hello experts,
I want to print the production order package in one spool request.
Print program consists of Smartform and SapScript.
First page is in landscape format with barcode(Smartform) and the rest is in portrait format(Sapscript).
In SAP documentation is written that it is possible for several Smartforms to be printed in one spool request.
Is it possible for 1 Smartform and 1 SapScript called from a single program to be printed in one spool request?
I have tested it with calling first the Smartform control-no_close= 'X' without success.
Can anyone tell me if this is possible and how?
Thank you.
Kind regards,
Danijela

Hi
In the driver program .
*"Selection screen elements............................................
SELECTION-SCREEN BEGIN OF BLOCK block  WITH FRAME.
PARAMETERS:
p_script   RADIOBUTTON GROUP rad1,
p_smartform RADIOBUTTON GROUP rad1,
SELECTION-SCREEN END OF BLOCK block.
*"Selection screen elements............................................
SELECTION-SCREEN BEGIN OF BLOCK block1 WITH FRAME.
PARAMETERS:
p_single RADIOBUTTON GROUP rad2,      " All the spool request
p_ind    RADIOBUTTON GROUP rad2.
SELECTION-SCREEN END OF BLOCK block1. " Single spool request
If p_script EQ 'x'.
w_form = 'Y_SCRIPT'.
  Elseif p_smartfom EQ 'X'.
   w_form = 'Y_SMARTFORM'.
ENDIF.
call function 'SSF_FUNCTION_MODULE_NAME'.
Call function 'SSFCOMP_OPEN'.
w_control-no_open   = ' '.
    w_control-no_close  = ' '.
*"Single spool request..................................................
    IF p_single EQ 'X'.
      w_control-no_open   = 'X'.
      w_control-no_close  = 'X'.
    ELSE.
*"Individual spool request.............................................
      IF w_flag NE '1'.
        w_control-no_open  = 'X'.
        w_control-no_close = ' '.
        w_flag = 1.
CALL FUNCTION '    '-----> smartform function module.
CALL FUNCTION 'SSFCOMP_CLOSE'.
Regards,
Sravanthi

Similar Messages

  • Display all sales order's smartform output in one spool request

    Hi,
    If suppose user has given sales order number from 01 to 14 then the output of all sales order should come in one print priview of spool request. How to do it?
    Please help.
    Thanks in advance,
    Rgds,
    Madhuri

    Hi Madhuri,
    Call open form write form and close form in loop so that till sales order remains in the loop the form will continue to print. In this way all sales order in internal table will print in the same spool.
    Hope this will help you.
    Regards,
    Vijay

  • How to get telephone and mobile phone for one partner

    Hello Expert,
    In VA03, I open one sales order and go into the partner tab. Then I selection one partner and click "Detail" button, one page with partner detailed information will pop up.
    In the pop-up window:
    There are two fields: Telephone and Mobile Phone.
    In my program, I want to get these two information. 
    I tried to call FM 'ADDR_COMM_GET' by passing address_number(VBPA-ADRNR), table_type('ADTEL'), iv_current_state(SPACE). For some partner, it works, but for others it doesn't work.
    Then I find table ADR2 which is used to keep phone infomration. There are two entries in the table. But how can I identity which one is telephone and which one is Mobile phone?
    So can any expert help me on how to get the telephone and Mobile Phone of the pop-up page?
    Thanks in advance,
    Best Regards, Johnny.

    Read ADR2-TEL_NUMBER where ADDRNUMBER = VBPA-ADRNR and R3_USER = '2' or '3'.
    These are the possible values
            Telephone is Landline Telephone
    1     Telephone is Default Under Landline Telephones
    2     Telephone is Mobile Telephone but Not Default Mobile Phone
    3     Telephone is Default Mobile Telephone
    X     Obsolete - No Longer Valid

  • All Labels in the Smartform  should be printed under one spool request ?

    Hi All,
    I need to print the labels with some data .At a time I have to print 10 labels with the same Spool request. I have required data in one internal table .I am looping the internal table and printing the label.In this case every time control leading to Print prview, and when i click on PRINT button then only It is leading to the Spool.For each print it is creating a new spool .
      But My requirement is , I need all the labels should be printed under only one spool .And I can see the print preview only once , and  if I click on print  button 10 labels(depending on the records in internal table) should be printed .Cotrol should not come again to the Print popup .
    Thanks,
    Suresh Kumar D.

    Hi,
    As per your requirement, if you want to print 10 labels, in same spool request, design your smart form like that,
    I mean design 10 labels in your smart forms.
    I hope this is easy solution.
    Regards,
    Sreenu.

  • Combining multiple smartform output in one spool request

    Hi,
    I'm calling 5 different smart forms from driver program based on some conditions and trying to merge the output of each of these smart forms in a single spool request. I achieved this by setting control parameters no_open and no_close based on first or last print.
    The problem i'm facing now is when i call one particular smart form ZSMARTFORM6 along with other smartforms i'm getting a error FORM SMARTFORM6 has wrong Page format.
    If i call only this smart form it is working correctly.
    Any idea how to avoid this error message.
    Regards,
    Raghavendra

    Hi
    In The control Parameters u have an Option NO_OPEN   and NO CLOSE  u have to use this to combine multiple SSF to one Spool
    DATA SSFCTRLOP LIKE SSFCTRLOP.
    CALL FUNCTION 'SSF_OPEN'
    SSFCTRLOP-NO_OPEN = 'X'.
    SSFCTRLOP-NO_CLOSE = 'X'.
    CALL FUNCTION SMART1
    EXPORTING
    CONTROL_PARAMETERS = SSFCTRLOP
    CALL FUNCTION SMART2
    EXPORTING
    CONTROL_PARAMETERS = SSFCTRLOP
    CALL FUNCTION SMART3
    EXPORTING
    CONTROL_PARAMETERS = SSFCTRLOP
    CALL FUNCTION SMART4
    EXPORTING
    CONTROL_PARAMETERS = SSFCTRLOP
    CALL FUNCTION 'SSF_CLOSE'
    Surya
    Edited by: suryareddy on Aug 27, 2009 9:24 AM

  • How to get count and other field in one select

    Hi,
    I am try to get total rows and some fields in two separate select:
    1. select count(id) into totalRows from mytable m where m.cat = 'CSV'
    2. select m.id, m.cat, m.updateTime from mytable m where m.cat = 'CSV'
    (all rows in mytable are distinct base on id field)
    How can I combine them into one query to make it faster so that no need to compare the m.cat field twice?
    Thanks.
    David

    Here's one solution :
    SQL> desc test;
    Name Null? Type
    ID NUMBER
    CAT VARCHAR2(10)
    UPDATE_TIME TIMESTAMP(6)
    SQL> select * from test;
    ID CAT UPDATE_TIME
    1 XYZ 09-JAN-04 09.04.17.000000 AM
    2 CSV 09-JAN-04 09.04.31.000000 AM
    4 ABCD 09-JAN-04 09.04.41.000000 AM
    5 CSV 09-JAN-04 09.04.53.000000 AM
    6 ABC 09-JAN-04 09.05.00.000000 AM
    7 CSV 09-JAN-04 09.05.06.000000 AM
    8 GGG 09-JAN-04 09.05.17.000000 AM
    7 rows selected.
    SQL> select id, cat, update_time
    2 ,Count(*) Over (Order By cat) As TotCnt
    3 from test
    4 Where cat = 'CSV'
    5 /
    ID CAT UPDATE_TIME TOTCNT
    2 CSV 09-JAN-04 09.04.31.000000 AM 3
    5 CSV 09-JAN-04 09.04.53.000000 AM 3
    7 CSV 09-JAN-04 09.05.06.000000 AM 3
    SQL>
    -- Shailender Mehta -

  • SAPScript ouput + Smartform Output in ONE SPOOL

    Hey folks,
    I have a single print program and I am using it for 1 SAPScript Layout and 1 Smartform Layout.
    Everything works great,except that the outputs get created in 2 separate spools after execution.
    Is there any way I can trigger both of them into a single spool?
    The SAPScript needs to be get printed first and then the Smartform.
    Help would be greatly appreciated!
    Thank you.

    Hi,
    you have to check the outputparameters of the smartform and the sapscript.
    You have several options for it. I do not know them all by head.
    for smartform you have ssfcompop-tdnewid. if this one is X you create a new spool it it is space it uses an open one.
    ssfcompop-tdfinal is to close a spool.
    I hope this offers you ebnough help to solve problem.
    Gr., Frank

  • Print multiple copies of a smartforms in a one spool request

    Dear all,
    I've a network printer "HP Laserjet 4250" configured with an output accessory "Sheet Stapler/Stacker".
    With these accessory all pages of the same spool are stapled together.
    For transaction VL02N we would print n copies of the same delivery using smartforms in this printer, so all copies will be stapled.
    The problem is that in SPAD Copy Counter options if we set the choice "Pass copy counter to the host spool system" only one copy is printed;
    it seems that copy counter parameters has no effects.
    If we set the choice "Pass copies as separate Output Requests", the spool system will send a separate print request for each copy of a document to be printed; but with this option multiple copies are not stapled since they belong to different spool.
    SAP System is ERP 6.0 EHP5 based on windows /SQL 2008 and the last kernel patch.
    Any idea to solve the problem ?
    Thanks
      Maurizio Manera

    Hello,
    By default the number of copies is transferred to the OS host spooler
    and handled by it.
    The flag to pass copies is set in the Output Device definition via
    transaction SPAD as follows:
      SPAD -> Output Device -> <Output Device name> -> Output Attributes ->
              'Pass Copy Counter to Host Spool System'
    Can you please change this flag to:
       'Pass Copies as Separate Output Request(in SAP System)'
    regards,
    John Feely

  • How to get the Double-sided print in SMARTFORM?

    Hi Folks,
    Can u  explain me , how to get the Double-sided print ?
    I create two pages : Page 1 and Page 2.
    Page 1 contains Main Window and some text data in it.....
    Page 2 contains  a secondary window with some TERMS & CONDITIONs data.
    Print Mode Settings:
    Page 1     Print Mode : D
    Page 2     Print Mode : Space
    I maintained all the above in my Smartform ,
    but i couldn't get my second page at all  and Double-sided print also....
    Is there any settings missing or any to be maintained ?
    GIve me a Solution....

    HI Surender,
    Check this one
    http://www.sdn.sap.com/irj/sdn/printing?rid=/library/uuid/90edfc78-dfc9-2b10-dcbe-d4612972ceb9&overridelayout=true
    Regards
    Ram

  • How to transport scripts and smartforms layouts

    Hi All,
              would you let me know how to trasport scripts and smartform along with layouts???
    thanks in advance for your replies.
    Regards,
    Riyaz

    SAP Script Form
    If you want to copy the forms between clients on the same system (between a client 100 and 150 on a DEV box for example) Use the copy between clients option available from the Utilities menu of SE71. If you want to transport the form between DEV & QA or QA & PRD then follow the normal transport
    procedure (ensuring that your BASIS team know to import your form into each client of the new box).
    Regarding the Print Program, follow the standard procedure for normal ABAP Objects. Do SCC1 for transfer between clients on same system and normal transport procedure to different system.
    SMART FORMS
    A Smartform is transported no differently than any other object. if it is assigned to a development class that is atteched to a transport layer, it will be transported. 
    The definition is transported, and when called, the function module is regenerated. 
    This leads to an interetsing situation. On the new machine, it is very likely the function module name will be different than the name on the source system. Make sure, before you call the function module, you resolve the external name to the internal name using the 'SSF_FUNCTION_MODULE_NAME' function module. 
    Typically, generate the SF, then use the pattern to being in the interface. Then change the call function to use the name you get back from the above function module. 
    Hope this helps.
    Vinodh Balakrishnan

  • Sapscripts and smartforms

    Hi,
    Please tell me how to do language translations in sapscripts and smartforms.
    I want to to each form in 12 languages.
    Please help me.
    Thanks,
    Ravi

    Hi
    You can assign the language directly by trx SE71 fot sapscript and SMARTFORMS for sm.
    In both trx you can see the section LANGUAGE ATTRIBUTES
    Here you can create a version of your form for all language you need.
    But all these versions'll be as original, so you need to change all texts you've inserted, i.e you have to translate all texts.
    For SAPSCRIPT you can do it by SE71 because you can choose the language (so the version) of the sapscript you want to translate, but for the SAMRTFORMS I believe you can only use trx SE63.
    Max

  • Differnce between SapScript And Smartform

    hi All,
    Can anyone tell me the difference between sapscript and smartforms.Which we have to use
    Points rewarded for answer
    Harpreet

    Hi harpreet,
    1. Can anyone tell me the difference between sapscript and smartforms
    some practical differences are :
    <b>*----
    One main difference which is
    visibility in the report is TABLES
    (in sapscript we cannot design MATRIX like tables,
    having grid lines,
    but in smartforms, it is much possible to
    design tables, having grid lines, color just
    like excel table)</b>
    a) sapscript requires
        - driver program (se38 program)
        - layout (se71 layout)
       smartforms just require
       smartform,
      (and a program is just required for
       selection screen purpose)
    b) the logic of printing (ie. sequence, flow)
        is CONTROLLED BY drier program,
       in case of sapscript.
      where as in smartform, it is inbuilt using TABLES element.
    c) In sapscript we cannot write our own logic for printing.
       where as in smartform,
      we can write our own logic for pritning.
      (we can even write SELECT Statements, DATA statements,
       and many program lines + logic to suit our requirements)
    2 Which we have to use
    If we are copying some standard sapscript,
      then we have to go for sapscript only.
    We can use both. but practically smartforms is easier to
      develop.
    regards,
    amit m.

  • Anyone know how to get pdf files to print on Mac

    anyone know how to get pdf files to print on  a Mac. When i bring pdf file up and press print a box comes up saying cannot print. When i press that one another comes up saying no pages selected. Everything up to date, rebooted, checked to make sure plugins are there and up to date.

    Might not be exactly what you want and I haven't had time to fully investigate this but take a look at http://www.hanynet.com/waterroof/

  • How to get gui_download and gui_upload with popup filename?

    how to get gui_download and gui_upload with popup filename?

    Here is a short example.
    report zrich_0003 .
    data: ifiletab type filetable.
    data: xfiletab like line of ifiletab.
    data: xstring type string.
    data: rc type i.
    data: itab type table of string.
    data: xtab type string.
    start-of-selection.
      call method cl_gui_frontend_services=>file_open_dialog
        changing
          file_table              = ifiletab
          rc                      = rc.
      read table ifiletab into xfiletab index 1.
      xstring = xfiletab-filename.
      check not xstring is initial.
      call method cl_gui_frontend_services=>gui_upload
        exporting
          filename                = xstring
      changing
        data_tab                = itab.
      loop at itab into xtab.
        write:/ xtab.
      endloop.
    Regards,
    Rich Heilman

  • How to get nodes and its attributes of an XML file usiong DOM parsing?

    how to get nodes and its attributes of an XML file usiong DOM parsing?
    i am new to XML parsing.......
    Thanking you........

    import org.w3c.dom.Document;
    import org.w3c.dom.*;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.parsers.DocumentBuilder;
    import org.xml.sax.SAXException;
    import org.xml.sax.SAXParseException;      ...
    //Setup the document
    DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance();
         DocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder();
         Document doc = docBuilder.parse (new File("MY_XML_FILE.xml"));
    //get elemets by name
         String elementValue = doc.getElementsByTagName("MY_ELEMENT").item(0).getTextContent();
    //This method can return multiple nodes, in this instance I get item(0) , first nodeRead the api for other methods of getting data.

Maybe you are looking for