SAP SCRIPT and the report
Hi Peers,
I am working on the report which calling the Form from SAP Script and displaying the form.
I wanted a selection screen in which if the user enters some value it should automatically preview in the form.
I am really new to the ABAP Pls some help on this .
Any code is appreciated.
Every answers will be rewarded.
Pls peers help on this.
Seema.
Hi,
where is a simple example:
PARAMETERS: KUNNR(10).
PARAMETERS: PREVI AS CHECKBOX DEFAULT 'X'.
START-OF-SELECTION.
PERFORM OPEN_FORM.
PERFORM START_FORM.
PERFORM PRINT_DATA.
PERFORM END_FORM.
PERFORM CLOSE_FORM.
*& Form OPEN_FORM
FORM OPEN_FORM.
CLEAR ITCPO.
ITCPO-TDCOPIES = 1.
ITCPO-TDDEST = PRINTER.
IF PREVI = 'X'.
ITCPO-TDPREVIEW = 'X'.
ENDIF.
ITCPO-TDNEWID = 'X'.
ITCPO-TDDATASET = 'test'.
ITCPO-TDSUFFIX1 = PRINTER.
ITCPO-TDSUFFIX2 = 'test'.
ITCPO-TDDELETE = ' '. " Não eliminar imediatamente
CALL FUNCTION 'OPEN_FORM'
EXPORTING
DEVICE = 'PRINTER'
DIALOG = ' '
FORM = 'YOUR_FORM_NAME'
LANGUAGE = SY-LANGU
OPTIONS = ITCPO
EXCEPTIONS
CANCELED = 1
DEVICE = 2
FORM = 3
OPTIONS = 4
UNCLOSED = 5
OTHERS = 6.
ENDFORM. " OPEN_FORM
*& Form START_FORM
FORM START_FORM.
CALL FUNCTION 'START_FORM'
EXPORTING
LANGUAGE = SY-LANGU.
ENDFORM. " START_FORM
*& Form PRINT_DATA
FORM PRINT_DATA.
SELECT * FROM KNA1 WHERE KUNNR EQ KUNNR.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
ELEMENT = 'TEST'
WINDOW = 'MAIN'.
ENDFORM. " PRINT_DATA
*& Form END_FORM
FORM END_FORM.
CALL FUNCTION 'END_FORM'.
ENDFORM. " END_FORM
*& Form CLOSE_FORM
FORM CLOSE_FORM.
CALL FUNCTION 'CLOSE_FORM'
EXCEPTIONS
UNOPENED = 1
OTHERS = 2.
ENDFORM. " CLOSE_FORM
Then, you must create your SapScript in order to print some information.
Regards,
Similar Messages
-
How to find out existing Reports and sap scripts and smartforms ?
Dear Friends ,
How to find out existing Reports and sap scripts and smartforms ?
( e.g: how many existing reports and SAP scripts are available in MM or SD module , What is the procedure to find out ? )
Thanking you.
Regards,
Subash.scripts r stored in TNAPR TABLES
-
What is the diff b/w Sap Scripts and Smart Forms
Hi,
Whats the diff b/w SAP Scripts and Smart Forms..
I need the internal explanation for both Smart Forms and SAP Scripts mean when we execute what happens whether Print Program r Forms starts execution 1st and SIMILARLY FOR SMARTFORMS WHETHER FM'S R FORMS.
Thanks & Regards,
Gopi.Hi
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.
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.
check out this link:
http://www.sap-img.com/smartforms/sap-smart-forms.htm
Reward points if helpful.
Regards,
Swathi. -
Customer Statement using SAP Script and Standard print program RFKORD10
Using sap script and standard print program RFKORD10 I need to create a customer statement where the main window will be as follows
Invoice # InvoiceDate CustomerPO Debit Amt Credit Amt Total
6 7 8 9 10 11
6 7 8 9 10 11
Totals 12 13 14
Where company code BKORM-KUKRS
Invoice BSID-BELNR
Invoice date BSID-BLDAT
Customer PO VBKD-BSTKD
For each document number selected there will be one to many records in VBRP. For each invoice item in VBRP:
u2022 Select BSTKD from VBKD where
o VBELN = VBRP-VGBEL and
o POSNR = VBRP-VGPOS
u2022 If no hits then select BSTKD from VBKD where
o VBELN = VBRP-VGBEL
If there is more than one PO per invoice then list them in the Customer PO field without repeating the other fields.PO shouldnu2019t come more than once per invoice.
Debit Amt if BSEG-SHKZG = S then WRBTR ELSE 0
Credit Amt if BSEG-SHKZG = H then WRBTR ELSE 0
Total Debit Amt u2013 Credit Amt
Totals Subtotals
It will be of great help if some one can help me with the script and the alterations required in standard print program RFKORD10
Points will b rewarded for sure.
Thanks.Hi Suganya,
The custom form is getting displayed properly. But the requirement is to have it as an editable PDF. So the functional team is working on configuring the settings of PDF forms with customers email address.
But for right now, i customized the standard form F140_ACC_STAT_01 and standard print program RFKORD10_PDF and did the configuration. It is getting displayed (I tested only with the transaction FBL5N - customer open line items..)
Please let me know any further details on this.
Poornima -
How to use msword as editor in sap script and smart form..
how to use msword as text editor in sap scripts and smartforms..
Hi
Go through the link given below :
Saptechnical. com
tutorials
smartforms
you will find solution for how to use MS word as editior.
Or
Call transaction I18N
go to I18N Customizing -> MS Word as Editor.Choose the Help-Button and follow the instructions.
If transaction I18N is not available in your system yet (see SAP Note 848036), you can also enable this feature via program RSCPINST.
Call transaction SE38, enter program RSCPINST and press F8. On the next screen,select Goto -> Set MS Word as Editor.
With Regard
Nikunj shah -
? MSWORD as EDITOR in sap script and smart forms ?
Hi friends,
How to use MSWORD as EDITOR in sap script and smart forms.
Edited by: Julius Bussche on Jul 17, 2008 12:45 PMhi,
Call transaction I18N
go to I18N Customizing -> MS Word as Editor.Choose the Help-Button and follow the instructions.
If transaction I18N is not available in your system yet (see SAP Note 848036), you can also enable this feature via program RSCPINST.
Call transaction SE38, enter program RSCPINST and press F8. On the next screen,select Goto -> Set MS Word as Editor. -
String search in SAP Script and Smartforms
Hi All,
We have an urgent requirement where we need to search for a character string in all SAP Scripts and Smartforms in our system.
It would also help if we can get the names of programs/function modules which are internally generated for the same.
Any pointers on the same would be helpful.
Regards,
SaurabhYou can create a variable window in the main window.
You can restrict the last item of the main window by varying the size of main window. In your wite-form ,
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'ITEM'
function = 'SET'
type = 'BODY'
window = 'MAIN'
EXCEPTIONS
element = 1
function = 2
type = 3
unopened = 4
unstarted = 5
window = 6
bad_pageformat_for_print = 7
spool_error = 8
codepage = 9
OTHERS = 10.
IF sy-subrc <> 0.
DO this. in the bottom of the main window, create a variable window.
you can add your text in the variable window inside main window.
it will be displayed just after the item ends.
Reagrds,
Pritha.
Message was edited by:
Pritha Agrawal -
Regarding debugging in sap script and smart forms
hi guys,
can any one tell me what are the different steps and options available to debug a SAP SCRIPT and a SMARTFORM.
thank you very much
pavanThere is a transaction 'SMARTFORMSTRACE' (or was it 'SMARTFORMS_TRACE') which will give you quite helpful information.
Try!
Sorry: Correct name is SMARTFORM_TRACE. You have lots of options for adequate analysis.
Regards,
Clemens
Message was edited by: Clemens Li -
Regarding debugging in sap script and smart form
hi guys,
can any one tell me what are the different steps and options available to debug a SAP SCRIPT and a SMARTFORM.
thank you very much
pavanScripts:
1. In the form, Utilities->debugger / RSTXDBUG FM for debugging script
2. Generally SAP script contains the Layout and corresponding print program.
First go to SE71 and enter ur script name. In the same screen go to Utilities->click on activate debugger option.
Now go to SE 38 and enter ur Print Program name and execute the program.
Now you can debug the script Page wise and window wise.
Smartforms:
In the Smartform, create a Code Node and within the Code Node you can hardcode a normal abap Break Point.
Insert a "Program Line" just above the node you want to debug and this program line write a normal abap breakpoint. So whenever you call the smartforms, it will stop at this breakpoint and you can debug onwards.
Other way to debug smartform is to debug the Function Module of that smartforms.
You can also use <b>smartform trace (transaction SFTRACE)</b>.
Have a look at below link.
http://help.sap.com/saphelp_erp2004/helpdata/en/49/c3d8a4a05b11d5b6ef006094192fe3/frameset.htm
I hope it helps.
Best Regards,
Vibha
*Please mark all the helpful answers -
Material for sap scripts and smartforms
hi SDNs,
can anyone send links to download SAP SCRIPTS and SMARTFORMS? thanks in advance.
regards,
aravind.hi Aravind,
check the below linkss for scripts
SAP Scripts
http://www.sap-img.com/sapscripts.htm
http://sappoint.com/abap/
http://www.henrikfrank.dk/abapexamples/SapScript/sapscript.htm
http://help.sap.com/saphelp_crm40/helpdata/en/16/c832857cc111d686e0000086568e5f/content.htm
http://www.sap-basis-abap.com/sapabap01.htm
http://www.sap-img.com/sapscripts.htm
http://searchsap.techtarget.com/tip/1,289483,sid21_gci943419,00.html
http://sap.ittoolbox.com/topics/t.asp?t=303&p=452&h2=452&h1=303
http://www.sapgenie.com/phpBB2/viewtopic.php?t=14007&sid=09eec5147a0dbeee1b5edd21af8ebc6a
Other Links
http://www.virtuosollc.com/PDF/Get_Reporter.pdf
http://help.sap.com/saphelp_47x200/helpdata/en/da/6ada3889432f48e10000000a114084/frameset.htm
http://help.sap.com/saphelp_erp2005/helpdata/en/66/bc7d2543c211d182b30000e829fbfe/frameset.htm
http://help.sap.com/saphelp_erp2005/helpdata/en/5b/d22cee43c611d182b30000e829fbfe/frameset.htm
http://www.virtuosollc.com/PDF/Get_Reporter.pdf
http://help.sap.com/saphelp_47x200/helpdata/en/da/6ada3889432f48e10000000a114084/frameset.htm
http://help.sap.com/saphelp_erp2005/helpdata/en/66/bc7d2543c211d182b30000e829fbfe/frameset.htm
http://help.sap.com/saphelp_erp2005/helpdata/en/5b/d22cee43c611d182b30000e829fbfe/frameset.htm
http://www.thespot4sap.com/Articles/Code_CostCentreReport.asp
http://www.allsaplinks.com/dialog_programming.html
http://help.sap.com/saphelp_webas630/helpdata/en/9f/db9cdc35c111d1829f0000e829fbfe/frameset.htm
http://www.allsaplinks.com/files/using_table_in_screen.pdf
http://www.geocities.com/ZSAPcHAT
and for smartforms
most imp link
http://www.sapbrain.com/ARTICLES/TECHNICAL/SMARTFORMS/smartforms.html
Check these links.In this,I am explaining everything step-by-step.Kindly reward points by clikcing the star on the left of reply,if it is useful.
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/ccab6730-0501-0010-ee84-de050a6cc287
https://sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/8fd773b3-0301-0010-eabe-82149bcc292e
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/3c5d9ae3-0501-0010-0090-bdfb2d458985
Check these links also.
http://www.sap-basis-abap.com/sapsf001.htm
http://www.sap-press.com/downloads/h955_preview.pdf
http://www.ossincorp.com/Black_Box/Black_Box_2.htm
http://www.sap-img.com/smartforms/sap-smart-forms.htm
http://www.sap-img.com/smartforms/smartform-tutorial.htm
http://www.sapgenie.com/abap/smartforms.htm
http://www.ossincorp.com/Black_Box/Black_Box_2.htm
http://sap.niraj.tripod.com/id67.html
http://myweb.dal.ca/hchinni/sap/smartforms_home.htm
Step by StepGood one):
http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Build_SMARTFORMS/How_To_Build_SMARTFORMS.html
if u need more info on either of these topics shoot me a test mail to [email protected]
If u find it useful plz mark the points
Regards,
Naveen -
Advantages of Adobe Form Vs Sap Scripts and smart forms
Hi All,
Can any body explain me clearly what are advantages of Adobe forms when compared to sap scripts and smart forms
Regards,
VenkatRefer to two Links below you will get all your answer
/people/markus.meisl/blog/2006/12/22/a-pdf-form-or-not-a-pdf-form--that-is-the-often-the-question
https://www.sdn.sap.com/irj/sdn/adobe
Cheers
Satya -
User Email Id on the SAP script for the balance confirmation
User needs mail id on the SAP script for the balance confirmation
I have checked the AR-->Correspondence but not able to figure out.
ThanksHi,
Actually the issue is:
User(Witty Lam) wants his official Email id while generating the SAP Script on header.
We are able to get the Fax and Telephone number but Email id is not coming.
Can you help me out in finding the place where we maintain the USER's phone, fax number and email id.
I have identified the Structure and field i.e FSABE-INTAD
My project is production support project..
Thanks,
Jittesh -
Question
I am not able to launch FF everytime i try to open it, it says FF has to submit a crash report,and restore yr tabs. I even tried doing that and the report was submitted too, but still FF did not start, and the problem still persists, please help me solve this issue
'''(in English)'''Hi Danny,
Per my understanding that you can't get the expect result by using the expression "=Count(Fields!TICKET_STATUS.Value=4) " to count the the TICKET_STATUS which value is 4, the result will returns the count of all the TICKET_STATUS values(206)
but not 180, right?
I have tested on my local environment and can reproduce the issue, the issue caused by you are using the count() function in the incorrect way, please modify the expression as below and have a test:
=COUNT(IIF(Fields!TICKET_STATUS.Value=4 ,1,Nothing))
or
=SUM(IIF(Fields!TICKET_STATUS=4,1,0))
If you still have any problem, please feel free to ask.
Regards,
Vicky Liu
Vicky Liu
TechNet Community Support -
How to change the Default login script and the USER login script in Netware3.12
I need to cut down the disk map from Neware 3.12 in Win98 client's PC.
please tell me
how to change the Default login script and the USER login script in
Netware3.12 ?
Or is there any other ways to do this thing?
Thanks a lot!On 4/6/2006 [email protected] wrote:
> how to change the Default login script and the USER login script in
> Netware3.12 ?
Please repost in the discontinued.forums.
Edison Ortiz
Novell Product Support Forum SysOp
(No Email Support, Thanks !) -
Ho to find script and the related print program for print preview of PO
Hi All,
We are getting some text output on the print preview of a purchase order.
How can we determine the driver script and the corresponding print program for this.
Can you please guide on this.
Thanks in advance.
Regards,
SanjeetU Can check Driver program and form related to that program table is TNAPPR
Goto NACE t.code
Selct Application ---> click on output types
then u wil get one window there select proper output type and
double click on processing routines u wil get form name and related driver program name also
Plz try this....
Edited by: Upender Verma on Feb 9, 2009 1:33 PM
Edited by: Upender Verma on Feb 9, 2009 1:37 PM
Maybe you are looking for
-
Sent mail disappears from Sent folder - VERY ANNOYING!
Sometimes when I send mail it does not appear in the Sent folder, or appears very briefly before disappearing. This is really annoying because I have no copy of the email to send it again, and have to check with the recipient to see if they got it. I
-
What is a good external battery pack for a 13" retina display?
what is a good external battery pack for my 13" retina display(macbook)
-
Problem in licence manager service
Hello, Even though the licence manager service is set as automatic is services, it stops suddenly and this happens many times. Each time, the service should be restarted manually. I need your help please. Thank you.
-
HT4623 Iphone 5 battery discharging too quicklu
Iphone 5 battery discharging too quickly, even with wifi, bluetooth and location services off. The battery is only lasting about 6 hours. How can i check what is causing this. It was lasting about 24 hours before.
-
How C++ client uses coherence message message pattern to subscribe/publish
Hi, I need to know how c++ client can subscribe/publish messages on queue or topic? I was able to find messaging jar and common jar for java but I was not able to find any sort of c++ implementation. I think this feature is definitely supported by c+