Disadvantage of Smartform and Advantages of SAP script
Good day Gurus.,,
Can anyone please tell me the Advantages of SAP Script over Smartforms and
Disadvantages of Smartforms over SAP script.
Also is there any special scenario where only sapscript could be used but not Smartforms.
Please enlighten me....
Many thanks
hi,
Smartforms are came into picture in 4.6 version to overcome the disadvantages of scripts.
Disadvantages of Scripts
1.scripts are client dependent.
2.we can't add colors in scripts.
3.It is paragraph dependent.
4.In this main window is compulsory.
5.mutiple page formats are not availble.
6.we can't add background pictures.
Adavantages of smartforms
smartforms are advanced versions of sap scripts,
1.smartforms are client independent.
2.we can add colors in smartforms.
3.It is not a paragraph dependent.
4.In this main window is not compulsory.
5.mutiple page formats are possible.
6.we can add background pictures.
7. it will generate one function module when activating it.
8. total code can be written in smartforms itself.
sap scripts used to use in previous versions if they dont upgrate current version of sap then they have to use sap scripts because smartforms are not available in the previous versions.
Similar Messages
-
Advantage of SAP Script over Smart forms
Hi Friends,
Can you please let me know some ten points on Advantages of SAP Scripts over Smart Forms.
Thanks,
GokulHi Gokul,
Major Differences between smart form and Scripts are
Multiple page formats are possible in smartforms which is not the case of SAP Scripts
It is possible to have a smartform without a main window
Labels cannot be created in smartforms.
Routines can be written in smartforms tool.
Smartforms generates a function module when activated
Background graphics are possible in case of SMARTFORMS
Assigning the font colours to the text are not possible in the case SMARTFORMS.
Creating and maintaining SMARTFORMS requires half the time compared to SAP Scripts
Smart Forms SAP Scripts
1)Form, Text Module, Styles are Form, So10 are
client independent client dependent
2)In a form diff pages can have In a form all pages should
different page formats follow one page format
3)Back ground picture is possible Not Possible
4)Maintenance cost is low Heavy
5)Web publishing is possible Not Possible
using XML
rewards if helpful........................
Regards,
Maha. -
How to display Lines and Boxes in SAP Script
hi,
Can any one help me how to display Lines and Boxes in SAP Script.
Regards
kiranThe SAP printer drivers based on page-oriented printers use these commands when creating output whereas the line printers and non-supported page-oriented printers ignore these commands.
Syntax:/: BOX [XPOS] [YPOS] [WIDTH] [HEIGHT] [FRAME] [INTENSITY]
This command draws a box of the specified size at the specified position.
The following calculation is performed internally to determine the absolute output position of a box on the page:
X(abs) = XORIGIN + XPOS
Y(abs) = YORIGIN + YPOS
WIDTH determines the width of the box.
Default: WIDTH value of the SIZE command.
HEIGHT determines height of the box.
Default: HEIGHT value of the SIZE command.
FRAME determines the thickness of frame.
Default: 0 (no frame).
INTENSITY determines the box contents as a grayscale percentage.
Default: 100 (full black)
The other details I guess is provided by friends who have posted before me.
Regards,
K.Sibi -
Issue with the font and alignment in SAP Script PDF
Hi Experts,
I have a problem with the font in SAP Script PDF conversion.
The output of the form is working fine but in the PDF the output is wrong.
There is a dutch letter ' ï ' which is pinted in the form output correctly but in the PDF output the character
has been changed to '#'.
and also the alignment of some text has beed changed without line spacing in between.
Please let me know what could be the problem and how to solve this issue.
Thanks in advance,
Regards,
Sankara Chakradhar.Hi Prabhudas,
I am using the FM 'CONVERT_OTF' to convert the data to pdf.
The FM CLOSE_FORM is creating the IT_OTF internal table and the CONVERT_PDF uses that internal table to populate the IT_PDF internal table and then using the FM 'SO_OBJECT_SEND' to send the PDF file to mail.
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
format = 'PDF'
IMPORTING
bin_filesize = g_filesize
TABLES
otf = it_otf
lines = it_pdf.
Regards,
Sankara Chakradhar. -
Steps to develop smartforms and sap scripts
hi experts,
I want to learn smartforms and sapscripts from the scratch step by step. i have gone through few threads, but iam not clear with the declarations.
thanks in advance
maayaMaaya,
Go thru these links...
SAPScripts
Link for SAP Scripts (step by step procedure)
http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Create_A_SAPSCRIPT_Form/How_to_Create_SAPSCRIPT.html
http://esnips.com/doc/1ff9f8e8-0a4c-42a7-8819-6e3ff9e7ab44/sapscripts.pdf
http://esnips.com/doc/1e487f0c-8009-4ae1-9f9c-c07bd953dbfa/script-command.pdf
http://esnips.com/doc/64d4eccb-e09b-48e1-9be9-e2818d73f074/faqss.pdf
http://esnips.com/doc/cb7e39b4-3161-437f-bfc6-21e6a50e1b39/sscript.pdf
http://esnips.com/doc/fced4d36-ba52-4df9-ab35-b3d194830bbf/symbols-in-scripts.pdf
http://esnips.com/doc/b57e8989-ccf0-40d0-8992-8183be831030/sapscript-how-to-calculate-totals-and-subtotals.htm
SAP SCRIPT FIELDS
http://help.sap.com/saphelp_erp2005vp/helpdata/en/d1/8033ea454211d189710000e8322d00/content.htm
scripts easy material
http://www.allsaplinks.com/sap_script_made_easy.html
for Smartforms material
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
How to trace smartform
http://help.sap.com/saphelp_47x200/helpdata/en/49/c3d8a4a05b11d5b6ef006094192fe3/frameset.htm
http://www.help.sap.com/bp_presmartformsv1500/DOCU/OVIEW_EN.PDF
http://www.sap-img.com/smartforms/smart-006.htm
http://www.sap-img.com/smartforms/smartforms-faq-part-two.htm
Re: Need FAQ's
check most imp link
http://www.sapbrain.com/ARTICLES/TECHNICAL/SMARTFORMS/smartforms.html
step by step good ex link is....
http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Build_SMARTFORMS/How_To_Build_SMARTFORMS.html
Subtotals - Check the link...
Re: Subtotal with Table Node in smartforms
Smarforms
http://www.sap-img.com/smartforms/smart-006.htm
http://www.sap-img.com/smartforms/smartforms-faq-part-two.htm
Re: Need FAQ's
SmartForms : some links
http://www.sapgenie.com/abap/smartforms.htm
http://www.sap-img.com/smartforms/sap-smart-forms.htm
http://help.sap.com/saphelp_46c/helpdata/en/a5/de6838abce021ae10000009b38f842/frameset.htm
http://help.sap.com/printdocu/core/Print46c/en/Data/htm/english.htm
http://www.sap-img.com/smartforms/smart-001.htm
http://www.sap-img.com/smartforms/smartform-tutorial.htm
http://www.sap-img.com/smartforms/smart-002.htm
http://www.sapgenie.com/abap/smartforms.htm
http://www.sap-img.com/smartforms/sap-smart-forms.htm
http://www.sap-img.com/smartforms/sap-smart-forms.htm
http://www.sapgenie.com/abap/smartforms.htm
http://www.sap-basis-abap.com/sapsf001.htm
http://www.sap-img.com/smartforms/smartform-tutorial.htm
http://www.sapbrain.com/TUTORIALS/TECHNICAL/SMARTFORMS_tutorial.html
http://www.allsaplinks.com/smartform_example.html
http://www.sap-basis-abap.com/sapsf001.htm
Smart Form PDF Link
http://help.sap.com/bp_presmartformsv1500/DOCU/OVIEW_EN.PDF
http://sap.ionelburlacu.ro/sap0/sapsf001.htm
http://help.sap.com/saphelp_erp2004/helpdata/en/a9/de6838abce021ae10000009b38f842/frameset.htm
http://help.sap.com/saphelp_nw04s/helpdata/en/a5/de6838abce021ae10000009b38f842/content.htm
http://help.sap.com/saphelp_nw2004s/helpdata/en/16/a369b1800e4bdda978ee0fe3b7bd2c/content.htm
http://help.sap.com/saphelp_nw04s/helpdata/en/a5/de6838abce021ae10000009b38f842/content.htm
http://www.sap-basis-abap.com/sapsf001.htm
http://www.sap-img.com/smartforms/smart-001.htm
Re: How to Debug a Smartform
Debug of smartform and sapscript.
Debugging SmartForms
Debugging of a subroutine pool.
http://help.sap.com/saphelp_erp2004/helpdata/en/49/c3d8a4a05b11d5b6ef006094192fe3/frameset.htm
SRIPTS
http://wiki.ittoolbox.com/index.php/Sap_script#7.6.7.09Space_Compression
SCRIPT OUTPUT TO PDF
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/49e15474-0e01-0010-9cba-e62df8244556
Reward if helpful,
Karthik -
This is regarding totals and sub totals in sap-scripts
Hi to all...............
1...How to print totals and subtotals in sap-scripts? where we have to code the logic.what sort of logic is needed to print the same?
regards,
swaminath.Hi
HI,
To calculate totals and sub totals in sap scripts you have to use subroutines.
Say if you have to add the unit price (KOMVD-KBERT) then in the main window whereever tat value is picked write this routine
/: DEFINE &TOT_PRICE&
/: PERFORM F_GET_PRICE IN PROGRAM <subroutine prog name> /:USING &KOMVD-KBERT& /:CHANGING &TOT_PRICE& /:ENDPERFORM
Then write the variable where ever you want it to be printed (mostly it will be in footer window)
Then create subroutine pool program and you have to write the code.
FORM F_GET_PRICE tables int_cond structure itcsy
outt_cond structure itcsy. data : value type kbert.
statics value1 type kbert.
Read int_cond table index 1.
value = int_cond-value.
value1 = value1 + value.
Read outt_cond table index 1.
outt_cond-value = value1.
Modify outt_cond index 1.
ENDFORM.
To know more, have a look at this thread ..
Re: SAP Script: Display Total calculated on page 2 in page 1
<b>Reward if usefull</b> -
Sap scripts(from scratch)
Hi all
Can you tell me how to write sapscripts and how to execute it as iam new to it....
say it from scartch as you tel as even layman can understand .....
Rewards for all useful answers......Hi
<b><u>I'm having a good material on scripts If u want i'll provide that material to you</u></b>
<u><b>
scripts</b></u>
Link for SAP Scripts (step by step procedure)
http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Create_A_SAPSCRIPT_Form/How_to_Create_SAPSCRIPT.html
SAPScripts
http://esnips.com/doc/1ff9f8e8-0a4c-42a7-8819-6e3ff9e7ab44/sapscripts.pdf
http://esnips.com/doc/1e487f0c-8009-4ae1-9f9c-c07bd953dbfa/script-command.pdf
http://esnips.com/doc/64d4eccb-e09b-48e1-9be9-e2818d73f074/faqss.pdf
http://esnips.com/doc/cb7e39b4-3161-437f-bfc6-21e6a50e1b39/sscript.pdf
http://esnips.com/doc/fced4d36-ba52-4df9-ab35-b3d194830bbf/symbols-in-scripts.pdf
http://esnips.com/doc/b57e8989-ccf0-40d0-8992-8183be831030/sapscript-how-to-calculate-totals-and-subtotals.htm
SAP SCRIPT FIELDS
http://help.sap.com/saphelp_erp2005vp/helpdata/en/d1/8033ea454211d189710000e8322d00/content.htm
scripts easy material
http://www.allsaplinks.com/sap_script_made_easy.html
http://www.sappoint.com/abap/ssintro.pdf
http://www.sappoint.com/abap/sscript.pdf
http://www.sappoint.com/abap/sscript.pdf
http://www.sappoint.com/abap/lsetssap.pdf
http://www.sappoint.com/abap/sscrtpex1.pdf
http://www.sap-img.com/sapscripts.htm
http://www.thespot4sap.com/Articles/SAPscript_Introduction.asp
http://www.sapbrain.com/TUTORIALS/TECHNICAL/SAPSCRIPTS_tutorial.html
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVSCRPROG/BCSRVSCRPROG.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVSCRRDI/BCSRVSCRRDI.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVSCREDIT/BCSRVSCREDIT.pdf
http://www.sappoint.com/abap/sscrtpex1.pdf
http://www.sap-img.com/sapscripts.htm
http://www.esnips.com/doc/1ff9f8e8-0a4c-42a7-8819-6e3ff9e7ab44/sapscripts.pdf
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
DIFF BETWEEN SCRIPTS N SMARTFORMS
SAPscript technology is based on a mainframe product from the 1980s, while Smart Forms have only been around since (roughly) 2001. With that sort of time gap, there are bound to be significant differences between the two tools. Client dependence is a fundamental one. Although SAPscript has had some incremental improvements over time, its forms have always been -- under the hood -- relatively ...
1. script is client dependent one while smartform is client independent.
2. In scripts we have to write print program while in smart forms it is not necessary.
3. In scripts we can print background logo while in smartforms we cant print background logo
4. In scripts we have 99 main windows while in smartforms we have only 1 main window.
5. In scripts we should write paragraph format otherwise we cant execute program while in smartforms no need to create paragraph formats .
6. In scripts we can print the text in only two character formats.
while in smartforms we can do with more.
7. In scripts we dont have line types while in smartforms we have linetypes.
also refer
difference between smartforms and scripts
Diff betwen Scripts & smartforms
advantages of smartforms over scripts
the main diffarences between smart form and script form are:
1) smart forms are clinent independent where as scripts are client dependent.
2) smart form require half the time to create and maintain forms compare with
script.
3) smart forms provide multiple page formats where as in script not possible
4) smart forms exisist without main window also where as in script not possible.
5) smart form is entairely graphical user interface comapre with script.
6) labeling is not possible in smart form where as it is possible in script.
7) smart form genarate function module whenver it activate where as script
doesn't genarate.
8) smart form can easily web publishing using the genarated XML output compare
with script.
9) using smart forms we can design web forms but bot possible with script.
10) we can maintain background graphics in smartform wher as in script not
possible.
11) in smart form we use transaction codes SMARTFORM for designing FORM
and SMARTSTYLES to create differnt styles of text, where as in script we
use SE71 for form painter and SE72 for different styles of text and font.
12) we can migrate script to smart form vice-versa is not possible.
Reward all helpfull answers
Regards
Pavan -
Creation of New Page in SAP Script
Hi Experts,
Please advice when will a new page trigger in SAP Script :
As per my requirement I need to create a new page for an existing layout and make changes to the second page alone...
but this page should be triggered only for a specific condition. Is it possible to trigger second page when it satisfies certain conditon?
I have searched SDN regarding the same but most of them have recommended to use NEW-PAGE...but as per my understanding NEW-PAGE is used when certain data needs to be printed on the next page ( not on the new page ).
Thanks
Karthik.ROk friend,
Try using the conditions in your driver program using 'CONTROL_FORM' function module. or using some other condition in it.
You can also give conditions in text editors and you can trigger the pages.
i think these links will help you in solving your solution just check these Link: [new page based on condition in sap script|new page based on condition in sap script; this is just an hint from this you can develop the idea.
Link: [Breaks in Smartforms|LAST PAGE FOR SAP SCRIPT;.
Also there are other few related links in SDN which will help you.
I think this must solve your issue if you still face any queries please revert back to me i will help you.
Thanks,
Sri Hari -
Hi,
can we use samrt forms instead of SAP scripts in production order forms.
If yes please tell me how.
I know OPK8 transactiona and over there we can use either SAP scripts or pdf forms.Hi,
Satandard SAP doesn't allow you to use Smartforms for Production Order Printouts. You can however use the Printprogram and get it to trigger a smartform instead of a SAP script. Work with your technical team for more details on that.
Arvind Rishi -
HI,
Please give me documents on sapscript..Check these links.
SAP Scripts
https://forums.sdn.sap.com/click.jspa?searchID=1811669&messageID=2969311
https://forums.sdn.sap.com/click.jspa?searchID=1811669&messageID=2902391
https://forums.sdn.sap.com/click.jspa?searchID=1811669&messageID=3205653
https://forums.sdn.sap.com/click.jspa?searchID=1811669&messageID=3111402
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
drawing lins, boxes and shadings
http://help.sap.com/saphelp_46c/helpdata/en/d1/802ec5454211d189710000e8322d00/frameset.htm
How to create Box in scripts
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
How to copy standard scripts
There are some Standard Sap Scripts in SAP. We cant directly execute them in scripts we have to use some T-codes and by giving some input to the required fields we can see the output printform.
I will show one example. There are some Standard Sap Scripts such as MEDRUCK which is a standard Sap Script for Purchase Order and RVINVOICETH for Sales Order billing and so on...
To see oupt of MEDRUCK go to T-code ME9F give purchase order number and execute select one number and click on dislplay messages button on application tool bar you can find the print form of MEDRUCK.
You cannot change the Standard Sap Scripts but you can use Standard Sap Scripts and Copy them to userdefined Script and can make changes to them and replace standard Sap Script with usedefind script.
Ex: Go to SE71,
on menu bar u find Utilities->copy from Client. click on it u ll find new screen showing
Form name:
Source Clinet:
Target Form:
give Form name as usedefined form name EX: ZFORM1
Source client as 000 and
Target form as MEDRUCK.
execute.
Now, the standard from MEDRUCK is copyied to your form ZFORM1.
NOW, go to SE71 and give form name as ZFORM1 and do some changes to the form such as adding logo any thing. save and Activate.
Now, you have done changes to the Form ZFORM1 and u have to replace your form with standard SAP Script.
Go to NACE Transaction.
on Applications select EF for purchase order and click Output types button on application tool bar.
now select NEU as output types dobule click on Processing Routines.
now click on Change option on application tool bar and on right side u find MEDRUCK in form place replace MEDRUCK with ZFORM1 and SAVE.
go back twice and now go to T-code ME9F give the purchase order number and execute and select one option and click on display messges button .
you will find the changes that you have done in ZFORM1. so we cant chage the standard Sap Scripts by copying the Standard Sap Scripts we can chage and replace with our forms.
Standard SapScripts
SALES ORDER
Output type : BA00
ScriptForm Name : RVORDER01
Driver Program Name : RVADOR01
DELIVERY NOTE
Output type : LD00
ScriptForm Name : RVDELNOTE
Driver Program Name : RVADDN01
smartform name : LE_SHP_DELNOTE
Smartform Driver Pgm: RLE_DELNOTE
INVOICE
Output type : RD00
ScriptForm Name : RVINVOICE01
Driver Program Name : RVADIN01
smartform name : LB_BIL_INVOICE
Smartform Driver Pgm: RLB_INVOICE
PUCHASE ORDER
Output type : NEU
ScriptForm Name : MEDRUCK
Driver Program Name : SAPMF06P
smartform name : /SMB40/MMPO_L
smartform driver program: /SMB40/FM06P
Output Type
OUTPUT Type or Message Type or Condition Type is the same which is used to determine the Output of an Application document, when to send out from the orgn. It may be sent in different mediums like Printout, fax,Mail,edi etc.
We have to some config in SPRO as well as in the application document and in the NACE Tcode.
NACE is the Tcode used to link the Application type, Output Types and its processing Routines like ( Driver programs and attached Script forms or Smartforms).
You should know the Application of a document first Like:
for PO it is EF, for sales Doc's it is V1, for Delivery docs it is V2, for billing Doc's it is V3 etc.
so first select the Application type (ex: EF) for PO and press OUtput types
then a list will come in that you should know the related output type for PO.
in this case it is NEU,
select that and click on the processing Routines button on the left side
it will display the Medium, Driver Program and the Script form or smartform related to that document..
different application documents have different output types;
example:
document Output type
Pur order NEU
Sales order BA00
Delivery LD00
Invoice RD00 -
Hi experts,
I am new in smartform and IDOC. if you can give me documents from which i can update my knowledge pl give it to me.
thanks in advance
Kapilhi,
go through the links
Start with this.Refer this
http://www.sapbrain.com/FAQs/TECHNICAL/SAP_ABAP_DATADICTIONARY_FAQ.html
http://www.****************/InterviewQ/interviewQ.htm
http://help.sap.com/saphelp_46c/helpdata/en/35/2cd77bd7705394e10000009b387c12/frameset.htm
Reports
http://www.sapgenie.com/abap/reports.htm
http://www.allsaplinks.com/material.html
http://www.sapdevelopment.co.uk/reporting/reportinghome.htm
http://www.sapfans.com/forums/viewtopic.php?t=58286
http://www.sapfans.com/forums/viewtopic.php?t=76490
http://www.sapfans.com/forums/viewtopic.php?t=20591
http://www.sapfans.com/forums/viewtopic.php?t=66305 - this one discusses which way should you use - ABAP Objects calls or simple function modules.
ALE/ IDOC
http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm
http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419
http://www.netweaverguru.com/EDI/HTML/IDocBook.htm
http://www.sapgenie.com/sapedi/index.htm
http://www.sappoint.com/abap/ale.pdf
http://www.sappoint.com/abap/ale2.pdf
http://www.sapgenie.com/sapedi/idoc_abap.htm
http://help.sap.com/saphelp_erp2005/helpdata/en/0b/2a60bb507d11d18ee90000e8366fc2/frameset.htm
http://help.sap.com/saphelp_erp2005/helpdata/en/78/217da751ce11d189570000e829fbbd/frameset.htm
http://www.allsaplinks.com/idoc_sample.html
http://www.sappoint.com/abap.html
http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm
http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419
http://www.netweaverguru.com/EDI/HTML/IDocBook.htm
http://www.sapgenie.com/sapedi/index.htm
http://www.allsaplinks.com/idoc_sample.html
Check these step-by-step links
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
for Smartforms material
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
How to trace smartform
http://help.sap.com/saphelp_47x200/helpdata/en/49/c3d8a4a05b11d5b6ef006094192fe3/frameset.htm
http://www.help.sap.com/bp_presmartformsv1500/DOCU/OVIEW_EN.PDF
http://www.sap-img.com/smartforms/smart-006.htm
http://www.sap-img.com/smartforms/smartforms-faq-part-two.htm
Re: Need FAQ's
check most imp link
http://www.sapbrain.com/ARTICLES/TECHNICAL/SMARTFORMS/smartforms.html
step by step good ex link is....
http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Build_SMARTFORMS/How_To_Build_SMARTFORMS.html
SAPScripts
http://esnips.com/doc/1ff9f8e8-0a4c-42a7-8819-6e3ff9e7ab44/sapscripts.pdf
http://esnips.com/doc/1e487f0c-8009-4ae1-9f9c-c07bd953dbfa/script-command.pdf
http://esnips.com/doc/64d4eccb-e09b-48e1-9be9-e2818d73f074/faqss.pdf
http://esnips.com/doc/cb7e39b4-3161-437f-bfc6-21e6a50e1b39/sscript.pdf
http://esnips.com/doc/fced4d36-ba52-4df9-ab35-b3d194830bbf/symbols-in-scripts.pdf
http://esnips.com/doc/b57e8989-ccf0-40d0-8992-8183be831030/sapscript-how-to-calculate-totals-and-subtotals.htm
SAP SCRIPT FIELDS
http://help.sap.com/saphelp_erp2005vp/helpdata/en/d1/8033ea454211d189710000e8322d00/content.htm
scripts easy material
http://www.allsaplinks.com/sap_script_made_easy.html
Debugging Document.
http://www.cba.nau.edu/haney-j/CIS497/Assignments/Debugging.doc
http://help.sap.com/saphelp_47x200/helpdata/en/c6/617ca9e68c11d2b2ab080009b43351/content.htm
http://www.cba.nau.edu/haney-j/CIS497/Assignments/Debugging.doc
http://help.sap.com/saphelp_erp2005/helpdata/en/b3/d322540c3beb4ba53795784eebb680/frameset.htm
http://help.sap.com/saphelp_nw04/helpdata/en/84/1f624f4505144199e3d570cf7a9225/frameset.htm
http://help.sap.com/saphelp_bw30b/helpdata/en/c6/617ca9e68c11d2b2ab080009b43351/content.htm
http://help.sap.com/saphelp_erp2005/helpdata/en/b3/d322540c3beb4ba53795784eebb680/frameset.htm
BAPI
http://help.sap.com/saphelp_46c/helpdata/en/9b/417f07ee2211d1ad14080009b0fb56/frameset.htm
http://searchsap.techtarget.com/originalContent/0,289142,sid21_gci948835,00.html
Checkout !!
http://searchsap.techtarget.com/originalContent/0,289142,sid21_gci948835,00.html
http://techrepublic.com.com/5100-6329-1051160.html#
http://www.sap-img.com/bapi.htm
http://www.sap-img.com/abap/bapi-conventions.htm
http://www.sappoint.com/abap/bapiintro.pdf
http://www.sapgenie.com/abap/bapi/example.htm
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCMIDAPII/CABFAAPIINTRO.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/CABFABAPIREF/CABFABAPIPG.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCFESDE8/BCFESDE8.pdf
List of all BAPIs
http://www.planetsap.com/LIST_ALL_BAPIs.htm
http://www.sappoint.com/abap/bapiintro.pdf
http://www.sappoint.com/abap/bapiprg.pdf
http://www.sappoint.com/abap/bapiactx.pdf
http://www.sappoint.com/abap/bapilst.pdf
http://www.sappoint.com/abap/bapiexer.pdf
http://service.sap.com/ale
http://service.sap.com/bapi
http://www.geocities.com/mpioud/Abap_programs.html
http://www.sapdevelopment.co.uk/reporting/reportinghome.htm
Simple ALV report
http://www.sapgenie.com/abap/controls/alvgrid.htm
http://wiki.ittoolbox.com/index.php/Code:Ultimate_ALV_table_toolbox
ALV
1. Please give me general info on ALV.
http://www.sapfans.com/forums/viewtopic.php?t=58286
http://www.sapfans.com/forums/viewtopic.php?t=76490
http://www.sapfans.com/forums/viewtopic.php?t=20591
http://www.sapfans.com/forums/viewtopic.php?t=66305 - this one discusses which way should you use - ABAP Objects calls or simple function modules.
2. How do I program double click in ALV?
http://www.sapfans.com/forums/viewtopic.php?t=11601
http://www.sapfans.com/forums/viewtopic.php?t=23010
3. How do I add subtotals (I have problem to add them)...
http://www.sapfans.com/forums/viewtopic.php?t=20386
http://www.sapfans.com/forums/viewtopic.php?t=85191
http://www.sapfans.com/forums/viewtopic.php?t=88401
http://www.sapfans.com/forums/viewtopic.php?t=17335
4. How to add list heading like top-of-page in ABAP lists?
http://www.sapfans.com/forums/viewtopic.php?t=58775
http://www.sapfans.com/forums/viewtopic.php?t=60550
http://www.sapfans.com/forums/viewtopic.php?t=16629
5. How to print page number / total number of pages X/XX in ALV?
http://www.sapfans.com/forums/viewtopic.php?t=29597 (no direct solution)
6. ALV printing problems. The favourite is: The first page shows the number of records selected but I don't need this.
http://www.sapfans.com/forums/viewtopic.php?t=64320
http://www.sapfans.com/forums/viewtopic.php?t=44477
7. How can I set the cell color in ALV?
http://www.sapfans.com/forums/viewtopic.php?t=52107
8. How do I print a logo/graphics in ALV?
http://www.sapfans.com/forums/viewtopic.php?t=81149
http://www.sapfans.com/forums/viewtopic.php?t=35498
http://www.sapfans.com/forums/viewtopic.php?t=5013
9. How do I create and use input-enabled fields in ALV?
http://www.sapfans.com/forums/viewtopic.php?t=84933
http://www.sapfans.com/forums/viewtopic.php?t=69878
10. How can I use ALV for reports that are going to be run in background?
http://www.sapfans.com/forums/viewtopic.php?t=83243
http://www.sapfans.com/forums/viewtopic.php?t=19224
11. How can I display an icon in ALV? (Common requirement is traffic light icon).
http://www.sapfans.com/forums/viewtopic.php?t=79424
http://www.sapfans.com/forums/viewtopic.php?t=24512
12. How can I display a checkbox in ALV?
http://www.sapfans.com/forums/viewtopic.php?t=88376
http://www.sapfans.com/forums/viewtopic.php?t=40968
http://www.sapfans.com/forums/viewtopic.php?t=6919
Go thru these programs they may help u to try on some hands on
ALV Demo program
BCALV_DEMO_HTML
BCALV_FULLSCREEN_DEMO ALV Demo: Fullscreen Mode
BCALV_FULLSCREEN_DEMO_CLASSIC ALV demo: Fullscreen mode
BCALV_GRID_DEMO Simple ALV Control Call Demo Program
BCALV_TREE_DEMO Demo for ALV tree control
BCALV_TREE_SIMPLE_DEMO
BC_ALV_DEMO_HTML_D0100
Remote Function Call:
RFC is an SAP interface protocol. Based on CPI-C, it considerably simplifies the programming of communication processes between systems.
RFCs enable you to call and execute predefined functions in a remote system - or even in the same system.
RFCs manage the communication process, parameter transfer and error handling.
http://help.sap.com/saphelp_47x200/helpdata/en/22/042860488911d189490000e829fbbd/frameset.htm.
ALE/ IDOC
http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm
http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419
http://www.netweaverguru.com/EDI/HTML/IDocBook.htm
http://www.sapgenie.com/sapedi/index.htm
http://www.sappoint.com/abap/ale.pdf
http://www.sappoint.com/abap/ale2.pdf
http://www.sapgenie.com/sapedi/idoc_abap.htm
http://help.sap.com/saphelp_erp2005/helpdata/en/0b/2a60bb507d11d18ee90000e8366fc2/frameset.htm
http://help.sap.com/saphelp_erp2005/helpdata/en/78/217da751ce11d189570000e829fbbd/frameset.htm
http://www.allsaplinks.com/idoc_sample.html
http://www.sappoint.com/abap.html
http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm
http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419
http://www.netweaverguru.com/EDI/HTML/IDocBook.htm
http://www.sapgenie.com/sapedi/index.htm
http://www.allsaplinks.com/idoc_sample.html
Refer this
http://www.sapbrain.com/FAQs/TECHNICAL/SAP_ABAP_DATADICTIONARY_FAQ.html
http://www.****************/InterviewQ/interviewQ.htm
http://help.sap.com/saphelp_46c/helpdata/en/35/2cd77bd7705394e10000009b387c12/frameset.htm
http://www.techinterviews.com/?p=198
http://www.techinterviews.com/?p=326
http://www.sap-img.com/abap/answers-to-some-abap-interview-questions.htm
http://www.sap-img.com/abap/more-than-100-abap-interview-faqs.htm
http://www.geekinterview.com/Interview-Questions/SAP-R-3/ABAP
http://sap.ittoolbox.com/documents/popular-q-and-a/abap-sample-interview-questions-3240
http://www.sap-img.com/abap/abap-interview-question.htm
http://www.allinterview.com/Interview-Questions/ABAP.html
Thanks,
Sankar M -
Missing fields in the output while using SAP SCRIPT
Hi,
I am working on an issue where we are using F110 to print some checks, and for this we have created a custom sap script and we are using a std driver program RFFOUS_C, we have also maintianed a custom subroutine pool ZRFFOUS which will retrieve the missing data for the sap script which was not there in the std. program. Now we have applied a SP to our system and since then we are having a problem...when we are printing the chechks its missing some fields.
Surpisingly, it is happening for all scripts like Dunning, invoice......
These scripts are working good in production which is not applied patches.
I have tried in all ways, did debug, data is there in tables and scripts are exactly same as in production.
Could you please share any ideas regarding this? What would be the effect of patches?
Thanks
ShaHi ,
I think u r printing the Check through the Tr Code F110.
In that program u r using the Standard Driver Program RFFOUS_C and u create a New Sap script.
and also u also mantained the custom subroutine pool ZRFFOUS . when ru giving printing u are not able to print some field.
In this case when u using the Standard driver Program RFFOUS_C in that program there is a Include Progran * RFFORI01---- check ,
in this program it is calling the Standard Form (F110PRENUM_CHCK) i--e t042e-zforn .as shown in the below and it is calling the function module 'OPEN_FORM'._
Please copy the form asZF110_PRENUM_CHCK and and do the changes in that form . and we need to maintained the Form as Company code level -- and it will shown this Table T042E (Company Code-Specific Specifications for Payment Methods)
Please go to Transaction Code FBZP and U can maitained the New Sap Script Form Company Code Level.
one thing while u calling your new subroutine pool ZRFFOUS Please call this subroutine in your Sap Script form then only u can see all values in your Check. and Actvate the Sap script .
Like U can call your new subroutine ZRFFOUS in your New Sap script Program.
/E CHECK
/: PERFORM XXXXXXX IN PROGRAM XXXXXX''
/: PERFORM CHECK_NAME IN PROGRAM ZRFFOUS
/: USING &XXXXXXX&
/: CHANGING &XXXXXX&
/: ENDPERFORM
In the subroutine pool ZRFFOUS u have to call as
FORM CHECK_NAME TABLES t_data_in STRUCTURE itcsy
t_data_out STRUCTURE itcsy.
xxxxx
xxxxx
xxxxx
ENDFORM.
In this case when u using the Standard driver Program RFFOUS_C in that program there is a Include Progran * RFFORI01---- check ,
in this program it is calling the Standard Form (F110_PRENUM_CHCK) i--e t042e-zforn .
open check form
CALL FUNCTION 'OPEN_FORM'
EXPORTING
form = t042e-zforn
device = 'PRINTER'
language = t001-spras
options = itcpo
dialog = space
EXCEPTIONS
form = 1.
IF sy-subrc EQ 1. "abend:
IF sy-batch EQ space. "form is not active
MESSAGE a069 WITH t042e-zforn.
ELSE.
MESSAGE s069 WITH t042e-zforn.
MESSAGE s094.
STOP.
ENDIF.
ENDIF.
I thing it will help u to solve this issue.
Thanks.
Gagan -
Find line no in sap script page
In sap script there are five pages to be printed
I want to check in each page the first line exists or not.
as well as to identify the first line of each page.
How to get a line number for each page in Sap script
Please revert back asap
Thankshi ,
there is no specific field for this you have to put a counter for that check these links
Link for SAP Scripts (step by step procedure)
http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Create_A_SAPSCRIPT_Form/How_to_Create_SAPSCRIPT.html
SAPScripts
http://esnips.com/doc/1ff9f8e8-0a4c-42a7-8819-6e3ff9e7ab44/sapscripts.pdf
http://esnips.com/doc/1e487f0c-8009-4ae1-9f9c-c07bd953dbfa/script-command.pdf
http://esnips.com/doc/64d4eccb-e09b-48e1-9be9-e2818d73f074/faqss.pdf
http://esnips.com/doc/cb7e39b4-3161-437f-bfc6-21e6a50e1b39/sscript.pdf
http://esnips.com/doc/fced4d36-ba52-4df9-ab35-b3d194830bbf/symbols-in-scripts.pdf
http://esnips.com/doc/b57e8989-ccf0-40d0-8992-8183be831030/sapscript-how-to-calculate-totals-and-subtotals.htm
SAP SCRIPT FIELDS
http://help.sap.com/saphelp_erp2005vp/helpdata/en/d1/8033ea454211d189710000e8322d00/content.htm
scripts easy material
http://www.allsaplinks.com/sap_script_made_easy.html
regards,
venkat. -
Problem in Sap Script while printing
HI,
This report calling when I print billing document .this report getting data and call some sap script form but it prints 20 pages in place of only one page. Please
Guide me to finding the exact problem.the code is below..
REPORT zsd_excinv LINE-SIZE 110 LINE-COUNT 100 MESSAGE-ID vn.
TABLES: vbco3, "Keyfelder Vertriebsbeleg: Dokumentendruck
tvko, "Verkaufsorganisation
sadr, "Adressen
komk, "Communicationarea for conditions
komp, "Communicationarea for conditions
komvd, "Communicationarea for conditions
vbdkr, "Druck Rechnung: Kopfdaten
vbdpr, "Druck Rechnung: Positionsdaten
conf_out, "Configuration data
vbpla, "Druck Packliste : allgemeine Daten
vbplk, "Druck Packliste : Versandelementkopfdaten
vbplp, "Druck Packliste : Versandelementinhaltsdaten
vbpls. "Druck Packliste : Summendaten Verpackung
TABLES : j_1iexchdr, j_1iexcdtl, vbrk,eikp,j_1imocust,likp,
j_1iregset, itcpp,kna1, t001w.
*PARAMETER : p_grp LIKE j_1iexchdr-exgrp.
*SELECT-OPTIONS : so_num FOR j_1iexchdr-exnum.
*PARAMETERS : p_num LIKE j_1iexchdr-exnum.
DATA : wa_j_1iexchdr TYPE j_1iexchdr,
it_j_1iexchdr TYPE TABLE OF j_1iexchdr.
DATA : wa_j_1iexcdtl TYPE j_1iexcdtl,
it_j_1iexcdtl TYPE TABLE OF j_1iexcdtl.
DATA : wa_vbrk TYPE vbrk,
wa_vbrp TYPE vbrp,
wa_lips TYPE lips,
wa_j_1iregset TYPE j_1iregset,
wa_j_1iwrkcus TYPE j_1iwrkcus,
wa_j_cust TYPE j_1imocust,
it_vbrp TYPE TABLE OF vbrp.
DATA : BEGIN OF wa_header,
exnum TYPE j_1iexchdr-exnum ,
exdat TYPE j_1iexchdr-exdat ,
exccd TYPE j_1iregset-j_1iexccd,
excrg TYPE j_1iregset-j_1iexcrg,
excd1 TYPE j_1iregset-j_1iexcdi,
bstnk_vf TYPE vbrk-bstnk_vf,
zterm TYPE vbrk-zterm,
iever TYPE eikp-iever,
btgew TYPE likp-btgew,
chapid TYPE j_1iexcdtl-chapid,
traid TYPE likp-traid,
rdoc TYPE j_1iexchdr-rdoc,
maktx TYPE j_1iexcdtl-maktx,
meins TYPE likp-gewei,
END OF wa_header.
*DATA : BEGIN OF wa_header,
exnum TYPE j_1iexchdr-exnum ,
exdat TYPE j_1iexchdr-exdat ,
exccd TYPE j_1iregset-j_1iexccd,
excrg TYPE j_1iregset-j_1iexcrg,
excd1 TYPE j_1iregset-j_1iexcdi,
bstnk_vf TYPE vbrk-bstnk_vf,
zterm TYPE vbrk-zterm,
iever TYPE eikp-iever,
btgew TYPE likp-btgew,
ntgew TYPE likp-ntgew,
chapid TYPE j_1iexcdtl-chapid,
traid TYPE likp-traid,
rdoc TYPE j_1iexchdr-rdoc,
maktx TYPE j_1iexcdtl-maktx,
meins TYPE likp-gewei,
END OF wa_header.
*DATA : BEGIN OF wa_detail,
zeile TYPE j_1iexcdtl-zeile,
matnr TYPE j_1iexcdtl-matnr,
maktx TYPE j_1iexcdtl-maktx,
menge TYPE j_1iexcdtl-menge,
rate TYPE konv-kbetr,
amount TYPE konv-kwert,
fob TYPE konv-kwert,
meins TYPE j_1iexcdtl-meins,
*END OF wa_detail.
*DATA : BEGIN OF wa_duties,
zpr0 TYPE konv-kbetr,
jadc TYPE konv-kbetr,
st1 TYPE konv-kwert,
jexp TYPE konv-kbetr,
jecs TYPE konv-kbetr,
st2 TYPE konv-kwert,
jetc TYPE konv-kbetr,
st3 TYPE konv-kwert,
jsad TYPE konv-kbetr,
st4 TYPE konv-kwert,
st5 TYPE konv-kwert,
vat TYPE konv-kbetr,
st6 TYPE konv-kwert,
zint TYPE konv-kbetr,
jead TYPE konv-kbetr,
zect TYPE konv-kbetr,
zsad TYPE konv-kbetr,
vat_per TYPE konv-kbetr,
vat_val TYPE konv-kwert,
total TYPE konv-kwert,
remtime TYPE j_1iexchdr-remtime,
exdat TYPE j_1iexchdr-exdat,
*END OF wa_duties.
*DATA : wa_t618t TYPE t618t.
*DATA : in_words TYPE spell,
word TYPE spell-word,
decword TYPE spell-decword,
gv_plant_adrnr TYPE t001w-adrnr,
lv_iever TYPE eikp-iever,
lv_btgew TYPE likp-btgew,
lv_ntgew TYPE likp-ntgew,
lv_traid TYPE likp-traid,
lv_regid TYPE j_1iregset-j_1iregid,
gv_cust_adrnr TYPE kna1-adrnr,
gv_ecsduty TYPE konv-kbetr,
gv_tot_cen_amt TYPE konv-kwert,
gv_zterm TYPE tvzbt-vtext,
gv_tot_amt TYPE konv-kwert,
lv_ins TYPE konv-kbetr,
lv_fre TYPE konv-kbetr.
*CONSTANTS : c_ecs TYPE j_1iexcdtl-ecsrate VALUE '0.368'.
*SELECT-OPTIONS : so_num FOR j_1iexchdr-exnum.
DATA : BEGIN OF wa_detail,
zeile TYPE j_1iexcdtl-zeile,
matnr TYPE j_1iexcdtl-matnr,
maktx TYPE j_1iexcdtl-maktx,
menge TYPE j_1iexcdtl-menge,
rate TYPE konv-kbetr,
amount TYPE konv-kwert,
fob TYPE konv-kwert,
meins TYPE j_1iexcdtl-meins,
END OF wa_detail.
DATA : BEGIN OF wa_duties,
zpr0 TYPE konv-kwert,
jadc TYPE konv-kwert,
st1 TYPE konv-kwert,
jexp TYPE konv-kwert,
jecs TYPE konv-kwert,
st2 TYPE konv-kwert,
jetc TYPE konv-kwert,
st3 TYPE konv-kwert,
jsad TYPE konv-kwert,
st4 TYPE konv-kwert,
st5 TYPE konv-kwert,
vat TYPE konv-kwert,
st6 TYPE konv-kwert,
zint TYPE konv-kwert,
jead TYPE konv-kwert,
jeap TYPE konv-kwert,
jeap_per TYPE konv-kbetr,
zect TYPE konv-kwert,
zect_per TYPE konv-kbetr,
zecs TYPE konv-kwert,
zsad TYPE konv-kwert,
vat_per TYPE konv-kwert,
vat_val TYPE konv-kwert,
zlst_per TYPE konv-kwert,
zlst_val TYPE konv-kwert,
zcst_per TYPE konv-kwert,
zcst_val TYPE konv-kwert,
zeap TYPE konv-kwert,
zeap_per TYPE konv-kbetr,
total TYPE konv-kwert,
remtime TYPE j_1iexchdr-remtime,
exdat TYPE j_1iexchdr-exdat,
END OF wa_duties.
DATA : wa_t618t TYPE t618t.
DATA : temp TYPE konv-kwert VALUE 0,
cen_amt TYPE konv-kbetr VALUE 0.
DATA : in_words TYPE spell,
word TYPE spell-word,
decword TYPE spell-decword,
gv_plant_adrnr TYPE t001w-adrnr,
lv_iever TYPE eikp-iever,
lv_btgew TYPE likp-btgew,
lv_traid TYPE likp-traid,
lv_regid TYPE j_1iregset-j_1iregid,
gv_cust_adrnr TYPE kna1-adrnr,
gv_ecsduty TYPE konv-kbetr,
gv_tot_cen_amt TYPE konv-kwert,
gv_zterm TYPE tvzbt-vtext,
gv_tot_amt TYPE konv-kwert,
gv_amount TYPE konv-kwert,
lv_ins TYPE konv-kbetr,
lv_fre TYPE konv-kbetr.
CONSTANTS : c_ecs TYPE j_1iexcdtl-ecsrate VALUE '0.368',
rdocyr TYPE j_1iexchdr-docyr VALUE 2006.
DATA : wa_t685t TYPE t685t.
DATA : gv_zint TYPE t685t-vtext,
gv_vat TYPE t685t-vtext,
gv_zect TYPE t685t-vtext,
gv_jetc TYPE t685t-vtext,
gv_jeap TYPE t685t-vtext,
gv_jecs TYPE t685t-vtext,
gv_zlst TYPE t685t-vtext,
gv_zcst TYPE t685t-vtext,
gv_zeap TYPE t685t-vtext,
gv_jadc TYPE t685t-vtext.
INCLUDE rvadtabl.
DATA: BEGIN OF lvbplk OCCURS 0.
INCLUDE STRUCTURE vbplk. "Packlistenkopf
DATA: END OF lvbplk.
DATA: BEGIN OF lvbplp OCCURS 0.
INCLUDE STRUCTURE vbplp. "Packlistenposition
DATA: END OF lvbplp.
DATA: BEGIN OF lvbpls OCCURS 0.
INCLUDE STRUCTURE vbpls. "Packlistenstruktur
DATA: END OF lvbpls.
DATA: BEGIN OF tvbdpr OCCURS 0. "Rechnungspositionen
INCLUDE STRUCTURE vbdpr.
DATA: END OF tvbdpr.
DATA: BEGIN OF tvbplp OCCURS 10. "Packlistenposition
INCLUDE STRUCTURE vbplp.
DATA: END OF tvbplp.
DATA: BEGIN OF tkomv OCCURS 50.
INCLUDE STRUCTURE komv. "Kommunikation
DATA: END OF tkomv.
DATA: BEGIN OF tkomvd OCCURS 50.
INCLUDE STRUCTURE komvd. "Kommunikation
DATA: END OF tkomvd.
DATA: BEGIN OF *tkomvd OCCURS 50.
INCLUDE STRUCTURE komvd.
DATA: END OF *tkomvd.
DATA: BEGIN OF hkomvd OCCURS 50.
INCLUDE STRUCTURE komvd.
DATA: END OF hkomvd.
DATA: BEGIN OF tkomcon OCCURS 50.
INCLUDE STRUCTURE conf_out.
DATA: END OF tkomcon.
DATA: retcode LIKE sy-subrc. "Returncode
DATA: repeat(1) TYPE c.
DATA: xscreen(1) TYPE c. "Output on printer or screen
DATA: pr_kappl(01) TYPE c VALUE 'V'. "Application für Preisfindung
DATA: print_mwskz. "Mehrwertsteuer-Kz drucken
data for access to central address maintenance
INCLUDE sdzavdat.
FORM ENTRY *
Einstieg für Nachrichtensteuerung *
--> RETURN_CODE *
--> US_SCREEN *
FORM entry USING return_code us_screen.
CLEAR retcode.
xscreen = us_screen.
Formular öffnen, aufbereiten und schließen
PERFORM formular_invoice USING us_screen.
CASE retcode.
WHEN 0.
return_code = 0.
WHEN 3.
return_code = 3.
WHEN OTHERS.
return_code = 1.
ENDCASE.
ENDFORM. "ENTRY
FORM FORMULAR_INVOICE *
Formular abarbeiten *
FORM formular_invoice USING proc_screen.
Werte aufbauen
PERFORM get_data.
Beleg unvollständig
IF vbdkr-uvall NE space OR
vbdkr-uvals NE space OR
vbdkr-uvprs NE space.
IF proc_screen = space.
retcode = 3.
IF vbdkr-uvall NE space OR vbdkr-uvals NE space.
syst-msgno = '201'.
syst-msgid = 'VN'.
syst-msgty = 'I'.
PERFORM protocol_update.
ENDIF.
IF vbdkr-uvprs NE space.
syst-msgno = '200'.
syst-msgid = 'VN'.
syst-msgty = 'I'.
PERFORM protocol_update.
ENDIF.
ELSE.
IF vbdkr-uvall NE space OR vbdkr-uvals NE space.
MESSAGE i201.
ENDIF.
IF vbdkr-uvprs NE space.
MESSAGE i200.
ENDIF.
ENDIF.
ENDIF.
CHECK retcode = 0.
SAP-SCRIPT STEUERUNG festlegen
PERFORM form_open USING proc_screen vbdkr-land1.
CHECK retcode = 0.
Formular aufbereiten
PERFORM sd_invoice_suppl.
CHECK retcode = 0.
Formular schließen
PERFORM form_close.
CHECK retcode = 0.
ENDFORM. "FORMULAR_INVOICE
FORM GET_DATA *
Daten besorgen *
FORM get_data.
PERFORM vbdkr_data. "Rechnungskopf und -liste
PERFORM vbpla_data. "Packliste
ENDFORM. "GET_DATA
FORM FORM_OPEN *
Formular öffnen *
--> US_SCREEN Output on screen *
' ' = printer *
'X' = screen *
--> US_COUNTRY County for telecommunication and SET COUNTRY *
FORM form_open USING us_screen us_country.
DATA: xdevice(8) TYPE c.
SET LANGUAGE nast-spras.
CLEAR itcpo.
MOVE-CORRESPONDING nast TO itcpo.
itcpo-tdcover = nast-tdocover.
itcpo-tddest = nast-ldest.
itcpo-tddataset = nast-dsnam.
itcpo-tdsuffix1 = nast-dsuf1.
itcpo-tdsuffix2 = nast-dsuf2.
itcpo-tdimmed = nast-dimme.
itcpo-tddelete = nast-delet.
itcpo-tdcopies = nast-anzal.
itcpo-tdprogram = sy-repid.
itcpo-tdteleland = us_country.
itcpo-tdsenddate = nast-vsdat.
itcpo-tdsendtime = nast-vsura.
IF us_screen NE space.
itcpo-tdpreview = 'X'.
itcpo-tdnoprint = 'X'.
ENDIF.
IF sy-tcode EQ 'J1IP'.
itcpo-tdpreview = 'X'.
ENDIF.
CASE nast-nacha.
WHEN '1'.
xdevice = 'PRINTER'.
WHEN '2'.
xdevice = 'TELEFAX'.
itcpo-tdtelenum = nast-telfx.
IF nast-tland IS INITIAL.
itcpo-tdteleland = us_country.
ELSE.
itcpo-tdteleland = nast-tland.
ENDIF.
WHEN '3'.
xdevice = 'TELETEX'.
itcpo-tdtelenum = nast-teltx.
IF nast-tland IS INITIAL.
itcpo-tdteleland = us_country.
ELSE.
itcpo-tdteleland = nast-tland.
ENDIF.
WHEN '4'.
xdevice = 'TELEX'.
itcpo-tdtelenum = nast-telx1.
IF nast-tland IS INITIAL.
itcpo-tdteleland = us_country.
ELSE.
itcpo-tdteleland = nast-tland.
ENDIF.
WHEN OTHERS.
xdevice = 'PRINTER'.
ENDCASE.
CALL FUNCTION 'OPEN_FORM'
EXPORTING
form = tnapr-fonam
language = nast-spras
OPTIONS = itcpo
archive_index = toa_dara
archive_params = arc_params
device = xdevice
dialog = ' '
EXCEPTIONS
OTHERS = 1.
IF sy-subrc NE 0.
retcode = sy-subrc.
PERFORM protocol_update.
ENDIF.
SET COUNTRY us_country.
ENDFORM. "FORM_OPEN
FORM FORM_CLOSE *
Formular schließen *
FORM form_close.
CALL FUNCTION 'CLOSE_FORM' "...Ende Formulardruck
EXCEPTIONS OTHERS = 1.
IF sy-subrc NE 0.
retcode = 1.
PERFORM protocol_update.
ENDIF.
SET COUNTRY space.
SET LANGUAGE space.
ENDFORM. "FORM_CLOSE
FORM SD_INVOICE_SUPPL *
Rechnung aufbereiten *
FORM sd_invoice_suppl.
CLEAR : wa_j_1iexchdr, wa_j_1iexcdtl, wa_lips, wa_duties,
gv_tot_amt.
get data from excise header
SELECT * FROM j_1iexchdr INTO TABLE it_j_1iexchdr
WHERE exgrp = '31'
AND rdoc = nast-objky
AND trntyp = 'DLFC'
AND lifnr = space
AND docyr = rdocyr.
AND exdat IN so_dat.
SORT it_j_1iexchdr BY exdat exnum.
READ TABLE it_j_1iexchdr INTO wa_j_1iexchdr INDEX 1.
SELECT * FROM j_1iexcdtl INTO TABLE it_j_1iexcdtl
FOR ALL ENTRIES IN it_j_1iexchdr
WHERE exnum = it_j_1iexchdr-exnum
AND trntyp = 'DLFC'
AND docno = it_j_1iexchdr-docno.
SORT it_j_1iexcdtl BY exdat exnum.
LOOP AT it_j_1iexchdr INTO wa_j_1iexchdr.
*open form
PERFORM open_form USING 'ZSD_EXCINV' 1
'printer' 'X'.
MOVE : wa_j_1iexchdr-exnum TO wa_header-exnum,
wa_j_1iexchdr-exdat TO wa_header-exdat,
wa_j_1iexchdr-rdoc TO wa_header-rdoc.
get plant details
SELECT SINGLE * FROM j_1iwrkcus INTO wa_j_1iwrkcus
WHERE j_1iwerks = wa_j_1iexchdr-werks.
SELECT SINGLE * FROM j_1iregset INTO wa_j_1iregset
WHERE j_1iregid = wa_j_1iwrkcus-j_1iregid.
SELECT adrnr INTO gv_plant_adrnr FROM t001w
WHERE werks = wa_j_1iexchdr-werks.
ENDSELECT.
MOVE : wa_j_1iregset-j_1iexccd TO wa_header-exccd,
wa_j_1iregset-j_1iexcrg TO wa_header-excrg,
wa_j_1iregset-j_1iexcdi TO wa_header-excd1.
get order no. from vbrk
SELECT * INTO wa_vbrk FROM vbrk
WHERE vbeln = wa_j_1iexchdr-rdoc.
ENDSELECT .
MOVE : wa_vbrk-bstnk_vf TO wa_header-bstnk_vf,
wa_vbrk-zterm TO wa_header-zterm.
SELECT vtext FROM tvzbt INTO gv_zterm
WHERE zterm = wa_vbrk-zterm
AND spras = 'EN'.
ENDSELECT.
get nature of removal
SELECT iever INTO lv_iever FROM eikp
WHERE refnr = wa_vbrk-vbeln.
ENDSELECT.
SELECT SINGLE * FROM t618t INTO wa_t618t
WHERE expvz = lv_iever
AND spras = 'E'.
MOVE : lv_iever TO wa_header-iever.
*get consignment weight.
SELECT SINGLE * FROM vbrp INTO wa_vbrp
WHERE vbeln = wa_vbrk-vbeln.
READ TABLE it_j_1iexcdtl INDEX 1 INTO wa_j_1iexcdtl.
SELECT btgew traid gewei INTO (lv_btgew, lv_traid, wa_header-meins) FROM likp
WHERE vbeln = wa_j_1iexcdtl-rdoc1.
ENDSELECT.
MOVE : lv_btgew TO wa_header-btgew,
lv_traid TO wa_header-traid.
lv_weight to wa_header-meins.
*get chapter id
READ TABLE it_j_1iexcdtl INTO wa_j_1iexcdtl WITH KEY exnum = wa_j_1iexchdr-exnum .
IF sy-subrc = 0.
MOVE : wa_j_1iexcdtl-chapid TO wa_header-chapid,
wa_j_1iexcdtl-maktx TO wa_header-maktx.
ENDIF.
*get customer details.
SELECT adrnr FROM kna1 INTO gv_cust_adrnr
WHERE kunnr = wa_j_1iexchdr-kunag.
ENDSELECT.
SELECT SINGLE * FROM j_1imocust INTO wa_j_cust
WHERE kunnr = wa_j_1iexchdr-kunag.
*write invoice header details
PERFORM write_form USING '' 'APPEND' 'BODY' 'LOCCODE' .
*get data from excise details.
LOOP AT it_j_1iexcdtl INTO wa_j_1iexcdtl.
MOVE : wa_j_1iexcdtl-zeile TO wa_detail-zeile,
wa_j_1iexcdtl-matnr TO wa_detail-matnr,
wa_j_1iexcdtl-maktx TO wa_detail-maktx,
wa_j_1iexcdtl-menge TO wa_detail-menge,
wa_j_1iexcdtl-meins TO wa_detail-meins.
SELECT SINGLE * FROM vbrp INTO wa_vbrp
WHERE vbeln = wa_vbrk-vbeln
AND matnr = wa_j_1iexcdtl-matnr.
SELECT kbetr kwert FROM konv
INTO (wa_detail-rate, wa_detail-amount)
WHERE knumv = wa_vbrk-knumv
AND kposn = wa_vbrp-posnr
AND kschl = 'ZPR0'.
ENDSELECT.
SELECT kwert FROM konv
INTO lv_ins
WHERE knumv = wa_vbrk-knumv
AND kposn = wa_vbrp-posnr
AND kschl = 'ZINS'.
ENDSELECT.
SELECT kwert FROM konv
INTO lv_fre
WHERE knumv = wa_vbrk-knumv
AND kposn = wa_vbrp-posnr
AND kschl = 'ZFRE'.
ENDSELECT.
wa_detail-fob = wa_detail-amount + lv_ins + lv_fre.
gv_tot_amt = gv_tot_amt + wa_detail-amount.
gv_amount = gv_amount + wa_detail-amount.
write item details
PERFORM write_form USING 'LINE_ITEMS' 'SET' 'BODY' 'MAIN' .
ENDLOOP.
**get insurance .
SELECT kwert INTO lv_ins FROM konv
WHERE knumv = wa_vbrk-knumv
AND kschl = 'ZINS'.
ENDSELECT.
**get freight .
SELECT kwert INTO lv_fre FROM konv
WHERE knumv = wa_vbrk-knumv
AND kschl = 'ZFRE'.
ENDSELECT.
**get net value .
MOVE wa_vbrk-netwr TO wa_costs-grandtot.
**calculate netvalue(fobvalue)
wa_costs-fobval = wa_costs-grandtot + wa_costs-insurance + wa_costs-freight.
gv_tot_amt = gv_tot_amt + lv_ins + lv_fre.
*get values for different condition types.
SELECT kbetr INTO wa_duties-zpr0 FROM konv
WHERE knumv = wa_vbrk-knumv
AND kposn = wa_vbrp-posnr
AND kschl = 'ZPR0'.
ENDSELECT.
SELECT kwert INTO wa_duties-jadc FROM konv
WHERE knumv = wa_vbrk-knumv
AND kposn = wa_vbrp-posnr
AND kschl = 'JADC'.
temp = temp + wa_duties-jadc.
CLEAR : wa_duties-jadc.
ENDSELECT.
MOVE : temp TO wa_duties-jadc.
CLEAR : temp.
wa_duties-st1 = wa_duties-zpr0 + wa_duties-jadc.
SELECT kwert INTO wa_duties-jexp FROM konv
WHERE knumv = wa_vbrk-knumv
AND kposn = wa_vbrp-posnr
AND kschl = 'JEXP'.
temp = temp + wa_duties-jexp.
CLEAR : wa_duties-jexp.
ENDSELECT.
MOVE : temp TO wa_duties-jexp.
CLEAR : temp.
SELECT kwert INTO wa_duties-jecs FROM konv
WHERE knumv = wa_vbrk-knumv
AND kposn = wa_vbrp-posnr
AND kschl = 'JECS'.
temp = temp + wa_duties-jecs.
CLEAR : wa_duties-jecs.
ENDSELECT.
MOVE : temp TO wa_duties-jecs.
CLEAR : temp.
wa_duties-st3 = gv_tot_amt + wa_j_1iexchdr-exbed + wa_j_1iexchdr-ecs.
SELECT kwert INTO wa_duties-jetc FROM konv
WHERE knumv = wa_vbrk-knumv
AND kposn = wa_vbrp-posnr
AND kschl = 'JETC'.
temp = temp + wa_duties-jetc.
CLEAR : wa_duties-jetc.
ENDSELECT.
MOVE : temp TO wa_duties-jetc.
CLEAR : temp.
wa_duties-st3 = wa_duties-zpr0 + wa_duties-st2 + wa_duties-jetc.
SELECT kwert INTO wa_duties-jsad FROM konv
WHERE knumv = wa_vbrk-knumv
AND kposn = wa_vbrp-posnr
AND kschl = 'JSAD'.
temp = temp + wa_duties-jsad.
CLEAR : wa_duties-jsad.
ENDSELECT.
MOVE : temp TO wa_duties-jsad.
CLEAR : temp.
SELECT kbetr kwert INTO (wa_duties-jeap_per, wa_duties-jeap) FROM konv
WHERE knumv = wa_vbrk-knumv
AND kposn = wa_vbrp-posnr
AND kschl = 'JEAP'.
temp = temp + wa_duties-jeap.
CLEAR : wa_duties-jeap.
ENDSELECT.
MOVE : temp TO wa_duties-jeap.
CLEAR : temp.
wa_duties-jeap_per = wa_duties-jeap_per / 10.
SELECT kbetr kwert INTO (wa_duties-zeap_per, wa_duties-zeap) FROM konv
WHERE knumv = wa_vbrk-knumv
AND kposn = wa_vbrp-posnr
AND kschl = 'ZEAP'.
temp = temp + wa_duties-zeap.
CLEAR : wa_duties-zeap.
ENDSELECT.
MOVE : temp TO wa_duties-zeap.
CLEAR : temp.
wa_duties-zeap_per = wa_duties-zeap_per / 10.
(st2jetcjsad)
wa_duties-st4 = wa_duties-st2 + wa_duties-jetc + wa_duties-jsad.
(zpr0+st4)
wa_duties-st5 = wa_duties-zpr0 + wa_duties-st4 .
SELECT kbetr INTO wa_duties-vat FROM konv
WHERE knumv = wa_vbrk-knumv
AND kposn = wa_vbrp-posnr
AND kschl = 'VAT'.
ENDSELECT.
SELECT kbetr kwert INTO (wa_duties-vat_per, wa_duties-vat_val) FROM konv
WHERE knumv = wa_vbrk-knumv
AND kposn = wa_vbrp-posnr
AND kschl = 'ZVAT'.
temp = temp + wa_duties-vat_val.
CLEAR : wa_duties-vat_val.
ENDSELECT.
MOVE : temp TO wa_duties-vat_val.
CLEAR : temp.
wa_duties-vat_per = wa_duties-vat_per / 10.
SELECT kbetr kwert INTO (wa_duties-zcst_per, wa_duties-zcst_val) FROM konv
WHERE knumv = wa_vbrk-knumv
AND kposn = wa_vbrp-posnr
AND kschl = 'ZCST'.
temp = temp + wa_duties-zcst_val.
CLEAR : wa_duties-zcst_val.
ENDSELECT.
MOVE : temp TO wa_duties-zcst_val.
CLEAR : temp.
wa_duties-zcst_per = wa_duties-zcst_per / 10.
SELECT kbetr kwert INTO (wa_duties-zlst_per, wa_duties-zlst_val) FROM konv
WHERE knumv = wa_vbrk-knumv
AND kposn = wa_vbrp-posnr
AND kschl = 'ZLST'.
temp = temp + wa_duties-zlst_val.
CLEAR : wa_duties-zlst_val.
ENDSELECT.
MOVE : temp TO wa_duties-zlst_val.
CLEAR : temp.
wa_duties-zlst_per = wa_duties-zlst_per / 10.
(st5+vat)
wa_duties-st6 = wa_duties-vat_val + wa_duties-st5 .
SELECT kwert INTO wa_duties-zint FROM konv
WHERE knumv = wa_vbrk-knumv
AND kposn = wa_vbrp-posnr
AND kschl = 'ZINT'.
temp = temp + wa_duties-zint.
CLEAR : wa_duties-zint.
ENDSELECT.
MOVE : temp TO wa_duties-zint.
CLEAR : temp.
SELECT kwert INTO wa_duties-jead FROM konv
WHERE knumv = wa_vbrk-knumv
AND kposn = wa_vbrp-posnr
AND kschl = 'JEAD'.
temp = temp + wa_duties-jead.
CLEAR : wa_duties-jead.
ENDSELECT.
MOVE : temp TO wa_duties-jead.
CLEAR : temp.
SELECT kbetr kwert INTO (wa_duties-zect_per, wa_duties-zect) FROM konv
WHERE knumv = wa_vbrk-knumv
AND kposn = wa_vbrp-posnr
AND kschl = 'ZECT'.
temp = temp + wa_duties-zect.
CLEAR : wa_duties-zect.
ENDSELECT.
MOVE : temp TO wa_duties-zect.
CLEAR : temp.
wa_duties-zect_per = wa_duties-zect_per / 10.
SELECT kwert INTO wa_duties-zsad FROM konv
WHERE knumv = wa_vbrk-knumv
AND kposn = wa_vbrp-posnr
AND kschl = 'ZSAD'.
temp = temp + wa_duties-zsad.
CLEAR : wa_duties-zsad.
ENDSELECT.
MOVE : temp TO wa_duties-zsad.
CLEAR : temp.
IF wa_vbrk-kalsm = 'ZINSCR'.
wa_duties-total = gv_tot_amt
+ wa_duties-jexp
+ wa_duties-jecs
+ wa_duties-zlst_val
+ wa_duties-zint
+ wa_duties-jead
+ wa_duties-vat_val
+ wa_duties-zcst_val.
+ wa_duties-jecs
+ wa_duties-zeap
+ wa_duties-zecs
+ wa_duties-zsad
+ wa_duties-jadc.
ELSEIF wa_vbrk-kalsm = 'ZINFAC'.
wa_duties-total = gv_tot_amt
+ wa_duties-jexp
+ wa_duties-jecs
+ wa_duties-zlst_val
+ wa_duties-zint
+ wa_duties-jeap
+ wa_duties-vat_val
+ wa_duties-zcst_val
+ wa_duties-jecs
+ wa_duties-zeap
+ wa_duties-zect.
+ wa_duties-zsad
+ wa_duties-jadc.
ENDIF.
Get Condition descriptions.
SELECT SINGLE * FROM t685t INTO wa_t685t
WHERE kschl = 'ZVAT' AND spras = 'EN'.
MOVE wa_t685t-vtext TO gv_vat.
CLEAR wa_t685t.
SELECT SINGLE * FROM t685t INTO wa_t685t
WHERE kschl = 'ZVAT' AND spras = 'EN'.
MOVE wa_t685t-vtext TO gv_vat.
CLEAR wa_t685t.
SELECT SINGLE * FROM t685t INTO wa_t685t
WHERE kschl = 'ZLST' AND spras = 'EN'.
MOVE wa_t685t-vtext TO gv_zlst.
CLEAR wa_t685t.
SELECT SINGLE * FROM t685t INTO wa_t685t
WHERE kschl = 'ZCST' AND spras = 'EN'.
MOVE wa_t685t-vtext TO gv_zcst.
CLEAR wa_t685t.
SELECT SINGLE * FROM t685t INTO wa_t685t
WHERE kschl = 'ZECT' AND spras = 'EN'.
MOVE wa_t685t-vtext TO gv_zect.
CLEAR wa_t685t.
SELECT SINGLE * FROM t685t INTO wa_t685t
WHERE kschl = 'ZEAP' AND spras = 'EN'.
MOVE wa_t685t-vtext TO gv_zeap.
CLEAR wa_t685t.
SELECT SINGLE * FROM t685t INTO wa_t685t
WHERE kschl = 'JETC' AND spras = 'EN'.
MOVE wa_t685t-vtext TO gv_jetc.
CLEAR wa_t685t.
SELECT SINGLE * FROM t685t INTO wa_t685t
WHERE kschl = 'JEAP' AND spras = 'EN'.
MOVE wa_t685t-vtext TO gv_jeap.
CLEAR wa_t685t.
SELECT SINGLE * FROM t685t INTO wa_t685t
WHERE kschl = 'JECS' AND spras = 'EN'.
MOVE wa_t685t-vtext TO gv_jecs.
CLEAR wa_t685t.
SELECT SINGLE * FROM t685t INTO wa_t685t
WHERE kschl = 'JADC' AND spras = 'EN'.
MOVE wa_t685t-vtext TO gv_jadc.
CLEAR wa_t685t.
gv_ecsduty = wa_j_1iexchdr-exbed * ( c_ecs / 100 ).
cen_amt = wa_duties-jexp + wa_duties-jeap.
gv_tot_cen_amt = cen_amt + wa_duties-jecs.
MOVE wa_j_1iexchdr-remtime TO wa_duties-remtime.
MOVE wa_j_1iexchdr-exdat TO wa_duties-exdat.
Convert amount to words.
CALL FUNCTION 'SPELL_AMOUNT'
EXPORTING
amount = wa_duties-total
currency = 'INR '
filler = space
language = sy-langu
IMPORTING
in_words = in_words
EXCEPTIONS
not_found = 1
too_large = 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.
MOVE : in_words-word TO word,
in_words-decword TO decword.
write duty details
IF wa_vbrk-kalsm = 'ZINSCR'.
PERFORM write_form USING 'ZINSCR' 'APPEND' 'BODY' 'GRANDTOT' .
ELSEIF wa_vbrk-kalsm = 'ZINFAC'.
PERFORM write_form USING 'ZINFAC' 'APPEND' 'BODY' 'GRANDTOT' .
ENDIF.
*close form
PERFORM close_form.
ENDLOOP.
ENDFORM. "SD_INVOICE_SUPPL
FORM FORM_TITLE_PRINT *
Formulartitel entsprenchend des Feldes VBTYP drucken *
FORM form_title_print.
CASE vbdkr-vbtyp.
WHEN 'M'.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'TITLE_M'
window = 'HEADER'
EXCEPTIONS
element = 1
window = 2.
IF sy-subrc NE 0.
PERFORM protocol_update.
ENDIF.
WHEN 'N'.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'TITLE_N'
window = 'TITLE'
EXCEPTIONS
element = 1
window = 2.
IF sy-subrc NE 0.
PERFORM protocol_update.
ENDIF.
WHEN 'O'.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'TITLE_O'
window = 'TITLE'
EXCEPTIONS
element = 1
window = 2.
IF sy-subrc NE 0.
PERFORM protocol_update.
ENDIF.
WHEN 'P'.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'TITLE_P'
window = 'TITLE'
EXCEPTIONS
element = 1
window = 2.
IF sy-subrc NE 0.
PERFORM protocol_update.
ENDIF.
WHEN 'S'.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'TITLE_S'
window = 'TITLE'
EXCEPTIONS
element = 1
window = 2.
IF sy-subrc NE 0.
PERFORM protocol_update.
ENDIF.
WHEN 'U'.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'TITLE_U'
window = 'TITLE'
EXCEPTIONS
element = 1
window = 2.
IF sy-subrc NE 0.
PERFORM protocol_update.
ENDIF.
WHEN OTHERS.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'TITLE_M'
window = 'TITLE'
EXCEPTIONS
element = 1
window = 2.
IF sy-subrc NE 0.
PERFORM protocol_update.
ENDIF.
ENDCASE.
IF repeat NE space.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'REPEAT'
window = 'REPEAT'
EXCEPTIONS
element = 1
window = 2.
IF sy-subrc NE 0.
PERFORM protocol_update.
ENDIF.
ENDIF.
ENDFORM. "FORM_TITLE_PRINT
FORM REFERENCE_NUMBER *
Referenznummer ausgeben *
FORM reference_number.
CHECK vbdkr-vbtyp CA 'MUN'.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
window = 'INVOICE'
EXCEPTIONS
window = 2.
IF sy-subrc NE 0.
PERFORM protocol_update.
ENDIF.
ENDFORM. "REFERENCE_NUMBER
FORM HEADER_TEXT_PRINT *
Kopftexte ausgeben *
FORM header_text_print.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'HEADER_TEXT'
EXCEPTIONS
element = 1
window = 2.
IF sy-subrc NE 0.
PERFORM protocol_update.
ENDIF.
ENDFORM. "HEADER_TEXT_PRINT
FORM ITEM_PRINT *
Rechnungsposition ausgeben *
FORM item_print.
Kopieren LVBPLP für direkt Zugriff
LOOP AT lvbplp.
MOVE-CORRESPONDING lvbplp TO tvbplp.
APPEND tvbplp.
ENDLOOP.
LOOP AT tvbdpr.
vbdpr = tvbdpr.
IF tvbdpr-charg IS INITIAL.
PERFORM get_item_prices.
PERFORM get_item_characteristics.
CALL FUNCTION 'CONTROL_FORM'
EXPORTING
command = 'PROTECT'.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'ITEM_LINE'.
PERFORM item_price_print.
PERFORM item_characteristics_print.
CALL FUNCTION 'CONTROL_FORM'
EXPORTING
command = 'ENDPROTECT'.
PERFORM different_consignee.
PERFORM different_order_no.
PERFORM different_delivery_no.
PERFORM different_extern_no.
PERFORM different_purchase_order_no.
PERFORM item_packing_print.
ELSE.
IF NOT tvbdpr-fkimg IS INITIAL.
PERFORM get_item_prices.
PERFORM item_price_print.
ENDIF.
ENDIF.
ENDLOOP.
ENDFORM. "ITEM_PRINT
FORM ITEM_PACKING_PRINT *
Verpackung zu einer Position ausgeben *
FORM item_packing_print.
DATA: count LIKE sy-index.
DATA: BEGIN OF hvbplp OCCURS 0,
stufe TYPE i.
INCLUDE STRUCTURE vbplp.
DATA: END OF hvbplp.
DATA: vs_element LIKE vbplp-venum.
CLEAR hvbplp.
REFRESH hvbplp.
Aufbau Versandelementstruktur für Ausgabe
LOOP AT tvbplp WHERE vbeln = vbdkr-vbeln AND posnr = tvbdpr-posnr.
hvbplp-stufe = 1.
MOVE-CORRESPONDING tvbplp TO hvbplp.
APPEND hvbplp.
vs_element = tvbplp-venum.
IF vs_element EQ ' '. EXIT. ENDIF. "unverpackt
CLEAR lvbplk.
WHILE lvbplk-kzobe NE 'X'. "nicht oberstes VS-Ele
suchen übergeordnetes Versandelement
LOOP AT lvbplp WHERE unvel = vs_element.
hvbplp-stufe = hvbplp-stufe + 1.
MOVE-CORRESPONDING lvbplp TO hvbplp.
APPEND hvbplp.
EXIT.
ENDLOOP.
vs_element = lvbplp-venum.
lesen übergeordnetes Versandelement
READ TABLE lvbplk WITH KEY vs_element.
IF sy-subrc NE 0.
EXIT.
ENDIF.
ENDWHILE.
ENDLOOP.
SORT hvbplp BY stufe venum.
CLEAR vbplp.
LOOP AT hvbplp.
lesen Versandelement
CLEAR vbplk.
CLEAR vbpls.
IF hvbplp-venum EQ ' '.Hi,
SAPScript addresses are formated by postal standards...irrespective of the data populated....
In line
/: ADDRESS PARAGRAPH LZ
change to
/: ADDRESS DELIVERY PARAGRAPH LZ
that should bring the street into the address
Regards
Stu -
plz tell me any tutorials abt the sap scripts
HI,
Please follow the link given below to explore SAPSCRIPT.
SAPSCRIPT
SAPSCRIPT 2
http://www.sapbrain.com/TUTORIALS/TECHNICAL/SAPSCRIPTS_tutorial.html
http://www.sap-img.com/sapscripts.htm
Link for SAP Scripts (step by step procedure)
http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Create_A_SAPSCRIPT_Form/How_to_Create_SAPSCRIPT.html
http://esnips.com/doc/1ff9f8e8-0a4c-42a7-8819-6e3ff9e7ab44/sapscripts.pdf
http://esnips.com/doc/1e487f0c-8009-4ae1-9f9c-c07bd953dbfa/script-command.pdf
http://esnips.com/doc/64d4eccb-e09b-48e1-9be9-e2818d73f074/faqss.pdf
http://esnips.com/doc/cb7e39b4-3161-437f-bfc6-21e6a50e1b39/sscript.pdf
http://esnips.com/doc/fced4d36-ba52-4df9-ab35-b3d194830bbf/symbols-in-scripts.pdf
http://esnips.com/doc/b57e8989-ccf0-40d0-8992-8183be831030/sapscript-how-to-calculate-totals-and-subtotals.htm
SAP SCRIPT FIELDS
http://help.sap.com/saphelp_erp2005vp/helpdata/en/d1/8033ea454211d189710000e8322d00/content.htm
scripts easy material
http://www.allsaplinks.com/sap_script_made_easy.html
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
http://www.sappoint.com/abap/ssintro.pdf
http://www.sappoint.com/abap/sscript.pdf
http://www.sappoint.com/abap/sscript.pdf
http://www.sappoint.com/abap/lsetssap.pdf
http://www.sappoint.com/abap/sscrtpex1.pdf
http://www.sap-img.com/sapscripts.htm
http://www.thespot4sap.com/Articles/SAPscript_Introduction.asp
http://www.sapbrain.com/TUTORIALS/TECHNICAL/SAPSCRIPTS_tutorial.html
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVSCRPROG/BCSRVSCRPROG.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVSCRRDI/BCSRVSCRRDI.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVSCREDIT/BCSRVSCREDIT.pdf
http://www.sappoint.com/abap/sscrtpex1.pdf
http://www.sap-img.com/sapscripts.htm
http://www.esnips.com/doc/1ff9f8e8-0a4c-42a7-8819-6e3ff9e7ab44/sapscripts.pdf
Regards,
Padmam.
Maybe you are looking for
-
I'm not sure how to approach this problem. I require a big chunk of data records from the SQL server. This chunk is based on variables, so I don't know before what records I need. I need to do a large series of calculations and each calculation requi
-
Why do books sort correctly in iTunes but not in iBooks?
I've filled in all necessary info on the sorting tab and, while all my books sort perfectly in iTunes, on syncing my iPhone and iPad, iBooks does not display the books in the correct order no matter what selections are made. My intent is to have the
-
HT201318 Do I need enough storage to completely back up my entire hard drive?
I need to have a complete back up of my hard drive, but I also need to stream my videos and photos so they take up all my hard drive space and slow my machine. I want this to happen directly between my iphone and macbook.
-
How can we get profit center wise Trial balance P&L Balance sheet
-
I'm still the delighted owner of an X6! In the first month of using my device I've used the internet via my own wlan and a nearby access point (BTFon) so that when I go on holiday I'll know how to check emails etc at no cost to me. I've just got my O