SAPscript print program

Hi All
I have the SAPscript form name. I need to find out the name of the print program.
The table TNAPR gives the standard program name attached to the SAPscript.
But, I need to find out the Z* program name associated with the SAPscript.
Pls do help on this.
Thanks,
Zahabia.

hI
Sapscripts are client dependend and smartforms are client independet.
SAPscript are CLient Dependent, SmartForms are Client Independent. The reason why SmartForms are client independent is because when you activate a SMartForm, SAP actually generates a Function Module (which as you know is client independent). The Print Program (or as SAP likes to refer to them these days - Application Program) calls your generated FM.
In the "smartforms" transaction, when you are viewing a smartform, you can go to the Environment->Function Module Name menu path to see the FM name.
Look at the "Application Program" for the Invoice SmartForm (RLB_INVOICE):
determine smartform function module for invoice
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING formname = lf_formname
variant = ' '
direct_call = ' '
IMPORTING fm_name = lf_fm_name
EXCEPTIONS no_form = 1
no_function_module = 2
OTHERS = 3.
call smartform invoice
CALL FUNCTION lf_fm_name
EXPORTING
archive_index = toa_dara
archive_parameters = arc_params
control_parameters = ls_control_param
mail_appl_obj =
mail_recipient = ls_recipient
mail_sender = ls_sender
output_options = ls_composer_param
user_settings = space
is_bil_invoice = ls_bil_invoice
is_nast = nast
is_repeat = repeat
importing document_output_info =
job_output_info =
job_output_options =
EXCEPTIONS formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5.
Difference with SMARTFORMS vs. SapScript (SE71)
The Following are the differences :-
a) Multiple page formats are possible in smartforms which is not the case in SAPScripts
b) It is possible to have a smartform without a main window .
c) Labels cannot be created in smartforms.
d) Routines can be written in smartforms tool.
e) Smartforms generates a function module when activated.
Contributed by : SAP ABAP/4 Programming, Basis Administration, Configuration Hints and Tips
f) Unlike sapscripts (RSTXSCRP), you cannot upload/download Smartform to your local harddisk.
It was said that it was provided in CRM 3.0 version, but not available in R/3. You can download smartforms into Local PC in a XML format. In the same way you can upload this XML format into Smartform. From the smartform editor itself you can call download option, if you are working in CRM 3.0 environment.
In R3 also, you can download into XML format. However, it's not sure about uploading. Refer to the program 'SF_XSF_DEMO'.
In 4.7 Enterprise, other have seen this utlity which is completey missing in 4.6c. There is functionality to downlaod a complete form or only a particular node. (Utilities -> Download form). It will create a XML file and save it in the hard disk.
For others, if you want to download/upload the Smartforms source, you will need the help from the Basis people. What you can do is to create a Transport and then FTP down to your local harddisk. When you need the Smartform source in another system, you have FTP up the Smartforms file back to the SAP server. Finally, the Basis team, will tp it into your system.
g) The protect and endprotect command in sapscript doesn't work with smartforms. For example on a invoice: First data of position no 80. is printed on page one, other data of position no 80 is printed on page 2. And there's nothing you can do about it. Actually, there is something you can do about it. By using a folder node and checking the 'protect' checkbox, everything in that folder will be page protected.
i) The main difference is that SAP script is client-dependant, while smartform is independent. Also there are some advanced and intreractive features available in smartforms.
You can use an External subroutine-call in sapscript editor like:
/: perform <form_name> in program <program_name>
/: using <var1>
/: using <var2>
/: changing <return1>
/: changing <return2>
/:endperform

Similar Messages

  • SAPscript print program for multiple pages

    Hello friends,
    How to write SAPscript print program for multiple pages? please help me.
    Thanks and regards,
    Shivanand.

    I believe you have posted this question in the wrong forum.  There is an ABAP Forms Printing Forum.

  • Migrating SAPscript print program to Smartform

    hello everyone,
    Requirement is to print transfer orders. Current functionality supports SAPscripts and its print program. Since we are going to be using Smartforms, I need to change the print program so that it calls the custom smartform created by me.
    Can anybody help me out by telling me a step-by-step process as to WHERE and WHAT changes I can do in the SAPscript print program so that I can use it for my Smartform?
    The SAPscript print program that needs to be changed is: RLVSDR40.
    Thanks in advance.
    Regards,
    Fred.

    Hi Fred,
    The system does not migrate the print program (data retrieval) or the form logic contained in the print program. You must make the required changes to the respective print program yourself. PL take a look at the following
    <a href="http://help.sap.com/saphelp_47x200/helpdata/en/9d/9599386185c064e10000009b38f8cf/frameset.htm">SAP help</a>
    Regards,
    Suresh Datti

  • SAPScript Print Program Entry Point

    Dear all,
      I try to modify the standard SAPScript form and its related print program.  What is the program entry point for those associated print program??  Since, i want to add my own logic and don't know where should i start.  I can only find the subroutine FORM_OPEN and ENTRY.
    Regards,
    Kit

    hi,
    u can add u r logic by using form routines.
    FORM .. ENDFORM is used when retrieved data
    needs to sent back to print program.
    In SAPscript:
    PERFORM < routine_name> in <report_name>
                USING  &var1&
            CHANGING &var2&.
    ENDPERFORM.
    in case of reports,
    i am giving the sample example for this,
    FORM < routine_name> in_tab type ITCSY
                                out_tab type ITCSY
    READ TABLE in_tab WITH KEY NAME = ‘var1’.
    {Data Selection based on above value. It returns ret_value.}
    READ TABLE out_tab WITH KEY name = ‘var2’.
                out_tab-value = ret_value.
                MODIFY out_tab.
    ENDFORM.
    Reward points if useful,
    Thanks,
    usha

  • Transaction code(s)- that trigger 'Cheque' SAPscript & print program

    Hi,
    I have to do some modifications in the cheque (CANADA) SAPscript form and the corresponding print program as per the user requirements.
    <b><u>Form Output and Debugging</u></b>:
    Can you please let me know which transaction code(s)
    trigger(s) the cheque SAPscript form and its corresponding print program.
    Version: SAP 4.6c
    Thanks in advance.
    With Best Regards,
    Vidya

    F110

  • Payment program F110 - how to add second print program in customizing

    Hello all,
    i would like to add second (another print program after standard sapscript print program customized in table T042Z) print program in transaction F110. This second smartform print program should be customizable  and triggered automatically within payment run.
    Thanks, zd.

    Hi,
    You can assign two forms in FBZP.
    Payment methods per company code
    Double click on payment method
    In Form Data
    You can assign Next Form 
    Both the forms should get printed when you run F110.
    Thanks,
    Ravi

  • Print program name for the dunning form F150_FR_DUNN_01 in sapscript

    Hi,
          I am not getting the exact print program name for the dunning form F150_FR_DUNN_01 in sapscript. After an extensive search I have come across few names of print program like SAPF150D2 and SAPLF150. But still I am not understanding which one to use for the form and also how to use it. I am unable to understand which include I should use to write my code.
    Kindly help me.
    Thanking you.
    Pujarini Patra

    Hi,
    Yes, you should be able to assign F150_FR_DUNN_01 in Dunning Forms customizing:
    and yes, I too would absolutely try to go for either a Smartform or even a PDF Form (if i'd have all the necessary setup for them, like Adobe Document Services, in the system already). I have Basis 702 SP  0011and FINBASIS 600 SP 0021, so all the following technicalities refer to those releases:
    The corresponding SAP sample Forms are:
    - F150_DUNN_SF for Smartform; and
    - F150_DUNN_SF for pdf Form (don't let the name confuse you )
    I'm not entirely sure if it's a good idea to try to convert/migrate Sapscript to Smartform and the Smartform to PDF Form - have never done that  myself and don't know how good/usable the migration result is. I just take the interface of Smartform from SAP and do the rest from scratch or by copying over the common parts of our existing custom forms.
    There are the SAP Standard wrapper FMs for SF and PDF forms already in the System:
    - FI_PRINT_DUNNING_NOTICE_SMARTF calling PRINT_DUNNING_NOTICE_SF and
    - FI_PRINT_DUNNING_NOTICE_PDF calling PRINT_DUNNING_NOTICE_PDF.
    So, theoretically, all you had to do to replace SapScripts (or even to enable all three form types) is to assign a custom BTE Event handler FM to event 1720 (for correct Application), which could detect, what type of form is assigned in Customizing and call the corresponding wrapper FM.
    As a sample for coding PDF form wrapper call one could take FI_PSO_EVENT_00001720_PDF (if you have IS-PS) in the system. I'd take out the IS-PS specific "business logic" like posting dunning charges (if it does not apply to my solution) and add the logic to decide, which wrapper to call.
    The confusing part about the customizing (Table T047E) to me is that there seems to be no form type defined anywhere in there... just the FORNR field for form name, which should apparently take the names of all three form types... I'd  try to extend that table with custom Form type field and try to regenerate Table Maintenance dialog for  view Cluster VC_T047_F... That would save the whole effort to try to detect the type for  form assigned...
    Another tip, in case you didn't know it already: you should be able to see all the Customizing paths, where T047E is involved, when you enter table name in SM30 and press "Customizing" and then "Continue w/o Specifying Project":
    The selected entry is the one you are looking for to assing your custom forms, I believe.
    cheers
    Janis

  • SAPscript: breakpoint in print program

    Hi all,
    I have put a breakpoint (tried both hardcoded and session break) in my print program of my SAPscript, but it is not 'breaking' at that point. I am sure this is the correct print program and have also looked in the forums, but have found nothing.
    Has anyone experienced this before? This is for opening the packing slip in VL02N

    Ended up using /h
    The reason why it didn't break is because the code wasn't under a 'form'.

  • CHANGE OF PRINT PROGRAM IN SAPSCRIPTS

    CAN ANYBODY EXPLAIN HOW WE CAN CHANGE THE PRINT PROGRAM IN SAPSCRIPTS?

    Hi Kumar,
    Go to NACE transaction, Based on the Output type take the Driver program related to your Script
    copy it to Zreport and do the changes as per your requirement.
    When we wants to fetch data from some other tables into that program we have to write code and to fetch the data into internal tables or variables, and they are used in Script.
    reward points if useful
    regards,
    ANJI

  • Detect print program name from within Sapscript. Is this possible?.

    We have a situation whereby for the single and group delivery we have two print programs printing to one Sapscript form. This is exactly what we need, with one exception being the title. What I would like to do is detect the print program and change the title accordingly. Does anyone know if this is possible?.
    regards
    Jason

    Hi Jason,
    hhhmm, the obvious answer sy-repid is of course bogus, because that would contain the program from the SAPscript environment. I wonder though if sy-cprog is of any use - probably not, but was too lazy to test this...
    In general though I'd recommend though to use some better marker than program name. E.g. don't you have any existing global field that can be used (e.g. are you using the same delivery type, same output type, ...)? If you don't have one, maybe you should consider putting a global variable in both print programs that you fill to indicate which type you're processing.
    In theory you could of course determine the program name, even from SAPscript, with the help of a ABAP form routine that evaluates the call stack and returns the program name of the print program. Or you could evaluate TNAPR as suggested by the previous poster, but I'm not sure if that's available by default (like the NAST record); I thought not, but my memory might serve me wrong. If not, I'd personally go with the markup variable (ideally existing content, if not available new one) as this seems the cleaner approach.
    Cheers, harald

  • Copying print program for sapscript

    Hello all,
    I would like to customize the print program PSFCPICK which we are using to print a sap script for shop orders.
    So I did a copy of the program and named the new one ZPSFCPICK and assigned the copied print program to the list in OPK8. I know the copied print program is called when printing the script,
    but no output is coming out of the printer. When I change it back to the original program, it is working fine.
    Is there anything I have to pay attention when copying a print program??
    Thanks
    Anne

    HI Anne,
    Check in this custom program or copied program whether you are calling FM -  CLOSE_FORM
    The function module closes the layout set opened using OPEN_FORM. The system executes any terminating processing steps for the last opened layout set. You must use this function module to close layout set printing. Otherwise, no output appears on printer or screen.
    Best Regards,
    Krishna

  • How to pass text from print program to SAPSCRIPT

    Hi Friends ,
    I need to print this 4 line text on the invoice form between the INFO window and MAIN window . I created a new window in the form and included the text . using include command . The requirement is that if a certain condition is met in the print program then only this 4 line text should be printed on the form .
    Any suggestions .
    Thank you ,
    Hari

    Hi Naren ,
    Just to verify .
    I need to define something like this below in the print program ?
    data : v_flag type c .
    If customer = 'R' .
      v_flag = 'X'.
    PERFORM WRITE_FORM.
    endif.
    In the SAPFORM I defined a new var window "ADD_TEXT"
    IF v_flag = 'X'.
    INCLUDE Z_TEXT OBJECT TEXT ID ST LANGUAGE ES  PARAGRAPH EE
    ENDIF.
    Please let me know if it is correct and also about the write_form . What paramenters do i pass in the write_form ????
    Thanks for your help .
    Hari

  • Runtime error in print program of a smartform

    Hi,
    While trying to execute the print program of a smartform I am getting the following runtime error.
    The reason for the exception is:
    The call to the function module "/1BCDWB/SF00000288" is incorrect:
    In the function module interface, you can specify only
    fields of a specific type and length under "IT_BOOKINGS".
    Although the currently specified field
    "IT_BOOKINGS" is the correct type, its length is incorrect.
    In the form interface of the smartform under tables parameters I have declared like this.
    IT_BOOKINGS      LIKE      SBOOK
    IT_SCHEDULE      LIKE      SPFLI
    Can anyone tell me why do we get this error?
    Regards,
    Hema

    Hello,
    program to call smartform is really simple :
    -> function SSF_FUNCTION_MODULE_NAME give you the name of the function link to your sapscript.
    -> function WFMC_PREPARE_SMART_FORM help your to prepare your options to your smartform.
    -> function xxx  to call your smartform (find with the first function).
    Sometimes you have to play with values of NAST (for ex) to find the language (set in control_parameters) or for example if you want to print without display (when it ask you for print / print preview  and the name of the print device) .....
    Frédéric

  • RFKORDC1: print program: fbcj receipts - printing out two copies of screen

    Hi,
    fairly new to sapscript (only attended the SAP training 3 weeks ago) but this one has me baffled already. The business have requested that I modify the output from FBCJ (cash journals for SK) in various ways. I have done this and created a new sapscript form, however, no matter what I do (or change) the output is coming out twice.
    I have managed to get spaces between the output but I am unable to supress the output. The sapscript is now only 1 page long! I have put a breakpoint in the print program RFKORDC1 and it only seems to hit this once! So not sure why the output is coming out twice...
    Any ideas? Using 4.7 Enterprise.
    Cheers

    Hi,
    I think that the problem is in the transaction that trigger that form, because maybe in some variables there is the number of copies ( in this case 2), delete it and try it again.
    or maybe in the customazing.
    Regards

  • Problems with Print Program of Production Order (CO03) !!

    Hi all,
      I have a question about Print program of Production Order. I created a new Order in CO01. Then, in CO03, I call Print Program ( menu <b>Functions >> Print</b>). At the first time, it printed a so-called original version. Later, when i printed it again, it informed me that just was a copy. Now, that's ok.
    I made some modification of Print Program by copying and changing the code (let's call it Z_PSFCOBJL) and SAPScript form. However, When I call Print function in CO03 for that Order, it didn't show any changes which I made. What's wrong? I checked in the code by debug mode, the variable that I transfered to the form was correct with its value.
    <b>I think that because SAP just make a print copy so that it will not reflect any changes that I made to the program, right? Is there any way to overcome this because I don't want to create new Orders just for testing every modification</b>?
    Thank you in advance.

    Hi MURUGESAN THANGATHURAI  ,
        Yes, I did assign the new program and new form for this before printing. But I wanna know if there is any way that allows me to view those changes I made?
    When I change the code in Print Program, print-out includes this update (although it still informs me that is a copy version). But when I make changes in the SAPScript form (for example, adding a variable for display), <b>it will not update this</b>?
    What's problem?
    Thank you guys.

Maybe you are looking for