Problem with Smartform
Hi experts,
I would like to have, on the same output of a program, two different smartform; the 1st, is the coversheet, always the same, and the 2nd ( and, maybe, the following pages ) have the data ( Main window and so on..); there is anywhere a parameter for doing this ? Or something else I have to do ?
Thanks a lot in advance !
Best regards.
Marco
Hello Marco,
Just make bit Simple Copy the Cover page to your 2nd Smartform.
At the end of Cover Page call the Second page that contains the main page.
At the end of cover page right Click and create->flow logic->COMMAND line
in command line give your next page as SECOND (That contains the main window).
OR if you want to do it your way
need to pass the control parameter
WA_CONTROL_PARAMETERS-LANGU = 'E'.
Language of smartform
WA_CONTROL_PARAMETERS-DEVICE = 'PRINTER'.
*default o/p device
WA_CONTROL_PARAMETERS-NO_DIALOG = 'X'.
if you dont want the pop up screen , that asks you for printing make the value as 'X' .
other wise make it as space or clear it.
WA_CONTROL_PARAMETERS-PREVIEW = SPACE.
if u want the print preview , make it as 'X' , otherwise SPACE'.
Hope the above discussion was helpful.
Cheers,
Suvendu
Similar Messages
-
Fonts problem with Smartforms...
Hi Gurus,
I have a problem with fonts in smartforms.
My smartforms fonts are working fine in testing server but not working fine in development server. We work like after development we transport the object to stage (Testing) & then to production. I see the last modifications done were 1 st may 2008 but in development the last changes are shown 7th July 2008. So what I think is the object is not completely transported to testing server? What could be the other reason please let me know ASAP.
Thanks,
HemalHi Hema,
May be the reason that your smartsyle is not activated .Jus check whether the smartstyle is activated and transported properly.
Regards,
Sravanthi -
Problem with smartform print preview.
Hi Experts,
i have an rare problem i have requirement of sending PO smartform mail as pdf ,and the smartform is configued to nace, and the tcode is me23n.
we checked it in development server everything went on well,and mail was sent without any error, after moving object to quality,
we tested in the same process as in development, instead of mail 'Print preview' button was popped up.
is it something to do with NACE config or to do with my code ?Hi Prakash,
As Mohit said default printer is not yet set for your user in QAL and on print preview screen output device field is mandatory that is why the pop up for print preview is coming.
follow path given by Mohit and I think the pop up will not come again.
Regards,
Siddhesh Satghare. -
Hi all,
I created a smartform for barcode labels printing. The form has its own style and characters and paragraphs use a
custom font (it's a Windows font I uploaded in the system).
My smartform worked well, but when I newly tested it yesterday, only the barcode and a field were displayed.
The only difference I noticed is the fact I deleted some custom fonts of mine and, after the deletion, I don't
tested anymore the smartform until yesterday. In fact if i try to print the fields without any custom style, they
are displayed in the preview.
Thanks in advance,
FrancescoProblem solved (in a strange way): I had to modify my style by setting the black color for all the paragraphs and characters.
Usually the color should be black by default, don't you think?
I have to clarify that in my style there's a paragraph with the white color to give a light and shade effect: I don't know if this could be the cause of my problem.
Edited by: Francesco Negri on Feb 10, 2011 10:05 AM -
Problem with Smartform printing
Hi all,
I developed Dunning form . its working fine in development system.
We have problem in production .
For example , we need to print dunning form for 10 customers means 10 forms need to be print at a time usinf F150.
Some forms printing fine with all text modules and some forms are not printing text modules.
i did debug for Fm of smartform .
In side this Fm , it is calling SSFRT_SYMBOL_VALUE function module , for printing all text modules.
Inside FM SSFRT_SYMBOL_VALUE ,
we have issue with assign (l_programsymbol) to <l_symbol> statement (Line number 86) .
Here if <l_symbol> will populate with text module, it is printing text.
If not , it is not printing .
Is there any point to know solution
Thanks & regards,
JBRThanks
-
Problem with smartforms barcode printing
Hi,
In my smartforms i use a simply standard barcode (CD39__00)
for delivery number; but when i print there is no barcode, there is the dlivery number as number.
I'm in SAP ECC 6.0 so with the new barcode printing.
Where is the problem?
Thanks a lot.
MatteoHi - Sometimes if the height of bar code is small, then it prints the number instead of barcode. So please try to copy tht barcode into "Z" from se73 transaction and increase the height and then assign the new barcode to ur smartform. Doing this you will be getting the barcode printed on it.
Thanks
Arun Kumar
Ok, i create a new bar code bigger than the first one and now it's printed.
Thanks lot.
Matteo Vernile. -
Problem with SmartForms driver program
Hello,
I have the following problem:
I have created a Smarform that uses a standard text element. In my program, the text in this element is changed depending on the language the user has selected.
The form is then created and converted to PDF and displayed to the user. The problem I have is that the first time, the PDF is displayed in the correct language. However, when another language is selected the second time, the displayed PDF will still show the first language. After some testing, I found out that the problem most likely lies with the Smartforms function module. It seems that a certain variable is not being reset when it is called the second time, resulting in the same language being shown. Perhaps there's some variable in the control_parameters that I didn't set?
In any case, this is the code of the driver program:
DATA: fm_name TYPE rs38l_fnam.
DATA: output_options TYPE ssfcompop,
control_parameters TYPE ssfctrlop,
job_output_info TYPE ssfcrescl.
* Get function module name for SmartForm
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = 'ZHR_ADVERTISEMENT'
IMPORTING
fm_name = fm_name.
* SmartForm settings
control_parameters-getotf = 'X'.
control_parameters-no_dialog = 'X'.
output_options-tdnoprev = 'X'.
* Execute SmartForm
CALL FUNCTION fm_name
EXPORTING
control_parameters = control_parameters
output_options = output_options
IMPORTING
job_output_info = job_output_info
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5.
* Display PDF
CALL FUNCTION 'HR_EFI_SHOW_PDF_FORM'
TABLES
otf_table = job_output_info-otfdata.
Thanks in advance!
DaveHi,
Check the below code and see if ur missing something
DATA: form_name TYPE rs38l_fnam, " Used to get the function module of Smartform
wa_ctrlop TYPE ssfctrlop, " Smart Forms: Control structure
wa_outopt TYPE ssfcompop, " SAP Smart Forms: Smart Composer (transfer) options
t_otfdata TYPE ssfcrescl. " Smart Forms: Return value at end of form printing
Data: t_pdf_tab type table of tline, " SAPscript: Text Lines
t_otf TYPE table of itcoo. " OTF Structure
Variables used to pass to GUI_DOWNLOAD
DATA: w_filesize TYPE i,
w_bin_filesize TYPE i.
Variables used for Save Dialog Box
DATA : file_name TYPE string,
file_path TYPE string,
full_path TYPE string.
START-OF-SELECTION.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = 'ZPDF_G' "p_name
IMPORTING
fm_name = form_name
EXCEPTIONS
no_form = 1
no_function_module = 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.
wa_ctrlop-getotf = 'X'.
wa_ctrlop-no_dialog = 'X'.
wa_outopt-tdnoprev = 'X'.
CALL FUNCTION form_name
EXPORTING
control_parameters = wa_ctrlop
output_options = wa_outopt
user_settings = 'X'
IMPORTING
job_output_info = t_otfdata
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
END-OF-SELECTION.
t_otf[] = t_otfdata-otfdata[].
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
format = 'PDF'
max_linewidth = 132
IMPORTING
bin_filesize = w_bin_filesize
TABLES
otf = t_otf
lines = t_pdf_tab
EXCEPTIONS
err_max_linewidth = 1
err_format = 2
err_conv_not_possible = 3
OTHERS = 4.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
----TAKING THE DOWNLOAD FILE PATH AS USER INPUT*
CALL METHOD cl_gui_frontend_services=>file_save_dialog
CHANGING
filename = file_name
path = file_path
fullpath = full_path
EXCEPTIONS
cntl_error = 1
error_no_gui = 2
not_supported_by_gui = 3
OTHERS = 4.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
Download the file to the selected path
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
bin_filesize = w_bin_filesize
filename = full_path "fname1
filetype = 'BIN'
IMPORTING
filelength = w_filesize
TABLES
data_tab = t_pdf_tab
EXCEPTIONS
file_write_error = 1
no_batch = 2
gui_refuse_filetransfer = 3
invalid_type = 4
no_authority = 5
unknown_error = 6
header_not_allowed = 7
separator_not_allowed = 8
filesize_not_allowed = 9
header_too_long = 10
dp_error_create = 11
dp_error_send = 12
dp_error_write = 13
unknown_dp_error = 14
access_denied = 15
dp_out_of_memory = 16
disk_full = 17
dp_timeout = 18
file_not_found = 19
dataprovider_exception = 20
control_flush_error = 21
OTHERS = 22.
IF sy-subrc <> 0.
MESSAGE i000(zpdf). "File not downloaded
ELSE.
MESSAGE i001(zpdf). "File downloaded
ENDIF. -
Problem With Smartform Main window
Dear All,
I have a requirement in which I need to print a PO using Smartforms.
In this requirement we need to check a flag, and based on the flag we need to call the subsequent pages.
if the Flag is set then I need to print the first page 2 times and after these two pages Terms and conditions page would come.
In the main window of first page i have put a contition check for this flag.If the condition is true I am calling the First page as Next page and if the condition is not true the Last page(T&C) is called.
now, the issue is when the condition is true means when I need to call the first page twice then the very first page of the output is coming fine but when the same page is printed again the item details are not getting printed also the last page is not coming in this case.
please help.
Thanks in advance.
regards,
ShwetaWhen you are calling first page again (as Second page) based on your flag, it will copy the only the content of all windows except main widow.
To solve your issue, Put the same loop again in the mainwindow with condition which is used for trigerring second page.(Repeat page).
Regards
Afsal -
PRinting problem with Smartform
Hai all,
I have created a smartform and transported to Prod. Its working fine foe One Department . and another depart people could not be able to print . Can anybody give me Some wht would be the Problem...
Thnx in advance.
BEst Regards,
Rajesh SHEy ,
Thanx for Ur reply,
They can see the dialogue box but when they click on Print, neither its generating spool request Nor its printing.
BEst Regards,
Rajesh S -
Output Problem with Smartform Lines
Hai i have done an HR payslip by using smartform.All the form output has gone perfectly, but the lines given to template are not reflecting in the hardcopy of the printout but we can see these lines in output properly.
My client is using Epson Line Printer . while i have taken a print out some lines are reflecting and some or not.
I have tested the same SF form in HP laserjet Printer ,
where iam getting the output with proper results.
Pls let me know the solution whether i have done any mistake while designing the template.hi,
whats the page format that u have used for ur smartform? Pls check that u using the same settings in the printer as well.
Nayan -
Additional Problem with Smartform Chinese Character Output
Hi all!
This is a follow-up to my earlier question about output of Chinese Characters in Smartforms.
As a recap, my problem is to correctly output Chinese characters in my Smartform using English logon. Using the OSS Note: 776507 that Anji sent, I managed to output in my Smartform preview the Chinese characters. However, when I print a hardcopy, I still get the # characters.
I tried uploading the font that outputs the chinese characters on MS Office, specifically Arial Unicode MS. It was automatically assigned to the printer driver (I think).
Is there anything I am doing or did wrong?
Thanks in advance for the help. Points for any useful answer.Hi Pat,
I have installed the lastest version of Adobe Reader (10.0.1) and Adobe Reader Font Pack (Asian Font Pack) and the results are as below:
tested that the file (.pdf) cannot be displayed correctly
It is appreciate if you have any idea for the issue. Thanks.
Just let you know that the simplified chinese characters may inserted by the software (Free PDF Reader and Writer - Nitro Reader 3.1.1.3). -
Problem with smartform conversion
Hello i am trying to convert PO into SMARTFORM using this code..
https://www.sdn.sap.com/irj/sdn/wiki?path=/display/snippets/convertSmartformtoPDFformat&
but it is taking me to dump error and when i analyzed the source code where i am going wrong it is showing error with this line CALL FUNCTION "v_fm_name" . PLease suggest me the necessary to rectify my error.
ThksHello Amit,
Thanks a lot for your reply please just check my code...
DATA: it_otf TYPE STANDARD TABLE OF itcoo,
it_docs TYPE STANDARD TABLE OF docs,
it_lines TYPE STANDARD TABLE OF tline,
st_job_output_info TYPE ssfcrescl,
st_document_output_info TYPE ssfcrespd,
st_job_output_options TYPE ssfcresop,
st_output_options TYPE ssfcompop,
st_control_parameters TYPE ssfctrlop,
v_len_in TYPE so_obj_len,
v_language TYPE sflangu VALUE 'E',
v_e_devtype TYPE rspoptype,
v_bin_filesize TYPE i,
v_name TYPE string,
v_path TYPE string,
v_fullpath TYPE string,
v_filter TYPE string,
v_uact TYPE i,
v_guiobj TYPE REF TO cl_gui_frontend_services,
v_filename TYPE string,
v_fm_name TYPE rs38l_fnam.
*CONSTANTS c_formname TYPE tdsfname VALUE 'ZREDDY'.
CALL FUNCTION 'SSF_GET_DEVICE_TYPE'
EXPORTING
i_language = v_language
i_application = 'SAPDEFAULT'
IMPORTING
e_devtype = v_e_devtype.
st_output_options-tdprinter = v_e_devtype.
st_output_options-tdprinter = 'locl'.
st_control_parameters-no_dialog = 'X'.
st_control_parameters-getotf = 'X'.
.................GET SMARTFORM FUNCTION MODULE NAME.................
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = 'ZSMART'
IMPORTING
fm_name = v_fm_name
EXCEPTIONS
no_form = 1
no_function_module = 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.
...........................CALL SMARTFORM............................
CALL FUNCTION v_fm_name
EXPORTING
control_parameters = st_control_parameters
output_options = st_output_options
IMPORTING
document_output_info = st_document_output_info
job_output_info = st_job_output_info
job_output_options = st_job_output_options
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ELSE.
.........................CONVERT TO OTF TO PDF.......................
CALL FUNCTION 'CONVERT_OTF_2_PDF'
IMPORTING
bin_filesize = v_bin_filesize
TABLES
otf = st_job_output_info-otfdata
doctab_archive = it_docs
lines = it_lines
EXCEPTIONS
err_conv_not_possible = 1
err_otf_mc_noendmarker = 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.
........................GET THE FILE NAME TO STORE....................
CONCATENATE 'smrt' '.pdf' INTO v_name.
CREATE OBJECT v_guiobj.
CALL METHOD v_guiobj->file_save_dialog
EXPORTING
default_extension = 'pdf'
default_file_name = v_name
file_filter = v_filter
CHANGING
filename = v_name
path = v_path
fullpath = v_fullpath
user_action = v_uact.
IF v_uact = v_guiobj->action_cancel.
EXIT.
ENDIF.
..................................DOWNLOAD AS FILE....................
MOVE v_fullpath TO v_filename.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
bin_filesize = v_bin_filesize
filename = v_filename
filetype = 'BIN'
TABLES
data_tab = it_lines
EXCEPTIONS
file_write_error = 1
no_batch = 2
gui_refuse_filetransfer = 3
invalid_type = 4
no_authority = 5
unknown_error = 6
header_not_allowed = 7
separator_not_allowed = 8
filesize_not_allowed = 9
header_too_long = 10
dp_error_create = 11
dp_error_send = 12
dp_error_write = 13
unknown_dp_error = 14
access_denied = 15
dp_out_of_memory = 16
disk_full = 17
dp_timeout = 18
file_not_found = 19
dataprovider_exception = 20
control_flush_error = 21
OTHERS = 22.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
In this code it is showing dumperror with the call function v_fm_name....in the dump it is showing error like one parameter is missing...iam unable to recognize that parameter. Please if you can able to find help me to achieve this.
Thks -
Problem with smartform table node
hi i am working on smartform,
requirement is to put lot of barcodes , with a horizontal line separating them,
so i felt, displaying a table pattern inside a loop was the way to go,
but when i am setting table parameters in the details part,
i was giving the following and it was giving error saying
the width of matnr and barcode doesnopt correspond to the total width of the table
the total table width is 16 CM,
MATNR 15.50 MM 30.50 MM
BARCODE 15.50 MM 30.50 MM
what ever value i am giving in these columns, it continuosly giving errors,
if some budy has a sample parameters which worked with them, please give me,
i shal;l make necessary changes.
when i increase the table width it says doesnt fit in the page, page is DINA4 with portrait format.
please help.
rgds.hi check this for bar codes in smartforms..
http://www.sap-img.com/abap/details-information-about-sap-barcodes.htm
http://www.sap-img.com/abap/details-information-about-sap-barcodes.htm
http://help.sap.com/saphelp_nw04/helpdata/en/d9/4a94c851ea11d189570000e829fbbd/content.htm
http://help.sap.com/saphelp_nw04/helpdata/en/66/1b45c136639542a83663072a74a21c/content.htm
regards,
venkat -
Hi All,
I am sending smartform output through mail to user. I am passing recipient to function module generated at run time.and mail will be send to this recipient. Now if we see the outgoing mail in SOST there document title is appearing like saplstxbe/senddate/sendtime. I want to change this to
document number /senddate/sendtime.where document number will be of Sales Order or Purchase Order or Invoice. Can you please let me know how to achieve this.
Also in one case the smartform output is getting blank in attached pdf generated.
what will be problem for this.
This is very urgent, points will be rewarded accordingly.
Regards
AshutoshHi,
Please use below code.
TABLES: spell, "Transfer structure for amounts rendered in words
*spell.
DATA : v_word like *spell-word,
v_dec like *spell-decword,
dec(2).
Form AMT_IN_THAI.
move : ' ' to v_word,
' ' to v_dec.
*spell = spell.
call function 'SPELL_AMOUNT'.
exporting.
amount = it_wt-tax.
currency = 'THB'.
* Filler = int_filler +1.
language ='2 '.
importing.
in_words = spell.
in_deci = spell.
exceptions.
not_found = 4.
* spell-word = spell-word.
* spell-decword = spell-decword.
* spell-decimal = spell-decimal.
v_word = * spell-word.
v_dec = * spell-decword.
dec = * spell-decimal.
spell = * spell.
if dec eq'00 '.
concatenate v_word '$ ' into v_word.
else.
concatenate v_word '$' v_dec into v_word.
concatenate v_word 'money' into v_word.
endif. endif.
endform. "AMT_IN_THAI.
But must include information on unit tical Table: T015Z. -
Problem with SMARTFORM - PDF.
The problem is, i've done a SMARTFORM and a report that transfer it on pdf. I need a sort of return code that advise me in abap code that a user have print the pdf document (when he click on the print button of acrobat reader window). It's possible? Thanks for answers.
Hi Avatar,
If my guess is correct , you are asking if a user triggers Print from the PDF Document ( which was generated from SAP)..u need to capture the Acrobat reader event in ABAP.Is it ?
I hope it's a feature of Acrobat.If u come across any facts, pl let me know.
Rgds,Jothi
Maybe you are looking for
-
Broken Camera? Pics get taken, but do not show up in Photos
I have an ongoing problem with my iPhone 3G camera: - I take a bunch of pictures (more than 100 or 200) - I also take screen captures amongst the pictures - I look at the camera roll and it says all the pics are there (151, 217, etc..) - but when I o
-
Hello , I was wondering if anybody had built a custom data source for reading the financial statement items .I do know that there is a DS called 0GLACCEXT_T011_HIER which is provided by SAP however this is already used and there is a situation where
-
Cracking strange sound when comming from sleep
When comming from a sleep (not always, but when beeing longer in sleep) I hear (next to the superdrive sound that is normal) a sort of cracking 'strange' sound out of my left/center area just around where the fan is. It's a sound like you plugin a ra
-
Why can't I add or edit an entry on myiPhone Cal?
Why Can't I add ,or edit an entry on my iPhone Cal?
-
I have just had an email telling me how wonderful BT Wi-Fi is. Nothing has changed since my previous correspondence with them on this - it is absolute rubbish and is not of any use when out and about. Standing next new green BT Infinity cabinets I ca