on 09-04-2007 1:51 PM
Hello,
I have a smartform that has a FAX_PAGE, i want to be able only pull this page out of the smartform.
So i put the startpage to FAX_PAGE but the FM produces an error and the page does not come out.
I debugged my way through and found that at some point its checks a table for the word FAX_PAGE but finds nothing. I looked to see what was in this table and the only entrys were FIRST_PAGE 4 times.
What am i doing wrong? Or does someone have the code i should use to pull this out?
Best Regards
Hi Lisa,
If you know at which page numbr it is printed.
why dont you use
tdpageslct = '1' in output_options in ur smartform fm
where 1 is the fax_page number
if it runs into many pages u can use '1-'.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
It does not have a main window, and it is one page only. When we print out the smartform normally only firstpage and nextpage is printed.
I only want the faxpage to be added if it is a fax that is beeing sent. so i call the smartform FM once to get the fax page then call it again to get the normal pages and put these in a PDF file. But only the call to the FM works and the fax page is not included. I also tried to try to only get the fax page out but was unable to do so.
The Faxpage is at the bottom of the list on the left, I do not know how to see what page number it is on
Lisa,
Here is what you can do.
Whether or not u require ur fax page we will call the smartofrm only once.
Since you require the fax page, only when sending faxes.
Make the fax page the first page in the list.
Set the next page of the fax page to the remaining page(s).
Now in your abap program.
Set the following logic.
if print_fax_page = yes.
tdpagesselect = '1-'.
else.
tdpagesselect = '2-'.
endif.
This way the fax page will print only when u need it.
i dont remember the exact spelling of tdpagesselect variable.
remember that fax page must be the first page in ur smartform list
This will solve the issue.
data my_output_options like is_output_options.
my_output_options = is_output_options.
IF fax = 'X'.
my_output_options-tdpageslct = '1-'.
else.
my_output_options-tdpageslct = '2-'.
ENDIF.
CALL FUNCTION lv_function_mail
EXPORTING
control_parameters = ls_control_param
mail_appl_obj = is_mail_appl_obj
mail_recipient = is_mail_recipient
mail_sender = is_mail_sender
output_options = my_output_options "is_output_options
iv_bus = bbppd_po
iv_po_header = ls_sf_po-header
it_longtext = ls_sf_po-it_longtext
is_partner = ls_sf_po-vendor
IMPORTING
document_output_info = ls_document_output_info2
job_output_info = ls_job_output_info2
job_output_options = ls_job_output_options2
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5.
This enoght?
Ok Lisa,
This was the easiest way this could be done so I preferred it.
Also im sure the fax page probably is a fax cover page and should be the first page in the print. There is obviously some disconnect .
However, another way to do this is....
Rturn the fax page to the last in the list in your smartform.
In your main window, as the last node, add a COMMAND node.
set Go To Page as fax_page
and put your FAX variable value as a condtion in the command.
This is so that the command be executed only for fax pages.
Dont change the next page of your first or next page .Do this only in the COMMAND node
Also this will work only if u have only a first and next page in ur smartform(besides ur fax page) and both these have the main window.
The Fax_page can have the next page as itself.
Message was edited by:
Nehal Fonseca
hi again,
I havent tried this yet but wont that result in the fax page at the back, we want the fax page to be the first page the see when the reciever recieve the fax.
We have other solutions in our R/3 system that use the first method i used where we open the smartform and pull out the fax page then call the smartform again for the normal page and this works fine. But in this new SRM system it does not work and im lost for words why not, but then again not alot works on this system >.<
Ill try this but the order the pages are to come in are very important im afraid...
Best regards
As the program i was editing sends the smartform as at email i found A FM that looked like the one that made the smartform.
What i dident know was that the FM i was changing was the Smartform for the email and not the invoice.
i found out that the FM just above the one i was changing was the one that made the invoice so i did as you said and it work as it should.
So thank you for that.
Thank you for your help this worked when i finally found the right FM 😜
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
9 | |
8 | |
6 | |
6 | |
6 | |
5 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.