on 02-16-2007 1:30 PM
I have already converted the form to a SmartForm but I am having trouble understanding the print program for the SAPScript (I am quite new to ABAP/SAP). Can anybody tell me if the code below is where the SAPScript is being called from? The T-code is VL70 and the code is as follows:
ZRVADEK01-> (A copy of RVADEK01)
form form_open using us_screen us_country.
include rvadopfo.
endform.
RVADOPFO->
call function 'OPEN_FORM'
exporting
* APPLICATION = 'TX'
archive_index = toa_dara
archive_params = arc_params
device = lvf_device
dialog = ' '
form = tnapr-fonam
language = nast-spras
options = lvs_itcpo
mail_sender = lvs_sender
mail_recipient = lvs_recipient
* MAIL_APPL_OBJECT = ' '
* RAW_DATA_INTERFACE = '*'
* IMPORTING
* LANGUAGE =
* NEW_ARCHIVE_PARAMS =
* RESULT =
exceptions
canceled = 1
device = 2
form = 3
options = 4
unclosed = 5
mail_options = 6
archive_error = 7
others = 8.
if sy-subrc ne 0.
case sy-subrc.
when 7.
retcode = sy-subrc.
syst-msgid = 'VN'.
syst-msgno = '096'.
syst-msgty = 'E'.
syst-msgv1 = nast-kschl.
syst-msgv2 = nast-kappl.
perform protocol_update.
when others.
retcode = sy-subrc.
perform protocol_update.
endcase.
endif.
set country us_country.
Regards,
Davis
Message was edited by:
Davis
hi Davis,
If i have understood your question correctly you are looking for a form that is calling this print program ... it is taking the form name from tnapr table i.e,
form = tnapr-fonam
where this table has all the form and print program names
Regards,
Santosh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
No, I'm looking for the part of the print program that is calling the form (SAPScript) so I can convert the program to call the new SmartForm. I know nothing about SAPScript (I have only changed one or two, minor changes) and I know nothing about SmartForms (except for what is in the SAP Press book) so I'm having difficult time with this. I am taking the SmartForms class in Chicago in two weeks but that is a long way off. Basically I need to get this print program to call the SmartForm.
Thanks for the reply though! Your tip on the table will come in handy. I only wish I knew that earlier!
Regards,
Davis
Message was edited by:
Davis
Hi Davis,
I think your starting point is wrong :
don't try at once to copy a SAPscript to Smartform and then think the related print program can be adjusted easily (because it is not).
The essential difference between a SAPscript form and Smartform is this :
A SAPscript form only reacts to a print program and doesn't have any logic in it. So the moment of printing certain text lines are totally depending of the print program and hence all the print events (e.g. print address, print main window etc.) are literally programmed in the print program.
However, a Smartform has its own logic and the only thing for the print program has to do is collect all data in structures and tables and call the smartform and in the "call" passes through all these data.
So you will have to TOTALLY rewrite the print program (so it is not only removing the function module OPEN_WINDOW, but also START_FORM, WRITE_FORM, END_FORM and then determine at ANOTHER place in the program to be sure where you have collected all necessary data)
Try this first :
Just like Santosh said, table TNAPR is of interest for printing sales document (this is actually the customizing for sales document output types).
Check for example SAP standard output type LD00 (delivery note, is quite close to picking list). It shows the print program and smartform .
Otherwise look for more related shipping documents by only entering 'V2' in the field [Application].
If the output seems to be close to what is needed (discuss with customer), then copy this to a new Z* output type in Customizing (so you still have the information about this SAP standard output type) and copy the print program & smartform .
I hope this gives you a refreshed view on your problem.
Another question you may ask yourself (and the requester) is :
why do you want to have a smartform instead of a SAPscript form ?
Yes, a smartform is nice to work with and certain program logic are available in the smartform so you don't have to program this.
However, if it is just to have a smartform because it is 'neat', I don't think it is a good argument .
In other words : If it is not broken, don't fix it. Just wait with the fix until it is almost broken
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.