Reg:Smart Form o/p options
hi friends
i need to design a smart form for which 2 pages of output is mandatory. it mean one page shows the taxable items and the other shows non-taxable items. so i need to print the 2 pages as common everytime . where i can set the option so that it displays the two pages everytime based on the conditions
Hi
After running the taxable items loop in the first page of the table, Create a command node..there go to the next page as second page and in the conditions tab, check the check box "End Of Main Window". So, everytime after first page is printed, it will go to second page.
Regards,
Vishwa.
Similar Messages
-
Hi Experts,
We are developing smart forms, in the driver program while executing the user selects authorized signatory number we need to get populated the signature 3 diffrent locations in the Smart Forms.For that i created 3 diffrent windows and i uploaded. Am able to do for 10 signatures.
if there are 100 signature are there how to do it?
How to go about it.
We have converted all the signature into .tiff files.
Thanks in Advance.
Regards,
Rahul.
<thread moved, please choose your forums more carefully in future>
Edited by: Mike Pokraka on Aug 5, 2008 2:02 PMHi,
goto se78
click on GRAPHICS general graphics
you get bitmap images.
double click on it.
give the name there and select color bitmap image.
press f5(import)
in the field file name press f4
you can upload pictures from your pc. -
Reg: Smart forms and print programs
Hi
I would like to locate the print programs and the corresponding smart forms. say for invoice we have a smart form available and how to track the print program for it. pls advise.
thkx
PrabhuHi Prabhu,
You can track the Program through mainintaing table TNAPR. TNAPR is the table which is having entries for "Processing Programs for output".
Here you have fields like
pgnam - Program Name
sform - Smartform Name
fonam - Script Name
kschl - Output type
Here,You can maintain form against a program name.
Hope you are clear.
Regards,
Siddhesh Sanghvi. -
Hello All ,
I have created one smart form and provided option to download the same in PDF. My Problem is that is downloaded in PDF but at the same time my end user want to see the print preview and take the print from there itself also.
I am using the following code can some one suggest me the what need to do the change after both option will work at the same time.
Please Note I have also made the use of property
SSFCOMPOP-TDNOPREV
But after this also issue not resolve. Some one Please suggest me the how to resolve the issue.
DATA :
WA_FMNM TYPE TDSFNAME, " Smart Forms: Form Name
WA_CNTL TYPE SSFCTRLOP, " FOR PDF PRINT
WA_POP TYPE SSFCOMPOP, " printer name
T_OTF_FROM_FM TYPE SSFCRESCL,
T_PDF_TAB LIKE TLINE OCCURS 0 WITH HEADER LINE,
T_OTF TYPE SSFCRESCL-OTFDATA,
W_BIN_FILESIZE TYPE I, " BINARY FILE SIZE
W_FILE_NAME TYPE STRING,
WA_FNMD TYPE RS38L_FNAM. " Name of Function Module
DATA:
W_FORM_NAME TYPE TDSFNAME,
W_FMODULE TYPE RS38L_FNAM,
W_CPARAM TYPE SSFCTRLOP,
W_OUTOPTIONS TYPE SSFCOMPOP,
W_FILE_PATH TYPE STRING,
W_FULL_PATH TYPE STRING.
SMART FORM FUNCTION MODULE
WA_FMNM = TEXT-113.
W_FORM_NAME = TEXT-113.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
FORMNAME = WA_FMNM
IMPORTING
FM_NAME = WA_FNMD
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.
END FORM
WA_CNTL-GETOTF = 'X'.
WA_CNTL-NO_DIALOG = 'X'.
WA_CNTL-PREVIEW = SPACE .
WA_POP-TDDEST = 'LP01'.
CALL FUNCTION WA_FNMD
EXPORTING
CONTROL_PARAMETERS = WA_CNTL
OUTPUT_OPTIONS = WA_POP
V_APPLN_OB = V_APPLN_OB
V_KUNNR_OB = V_KUNNR_OB
V_EBELN = V_EBELN
V_CAT_NAME = V_CAT_NAME
V_VAR_NAME = V_VAR_NAME
IMPORTING
JOB_OUTPUT_INFO = T_OTF_FROM_FM
TABLES
T_ZCNC18 = T_ZCNC18
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.
T_OTF[] = T_OTF_FROM_FM-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
ERR_BAD_OTF = 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.
CALL METHOD CL_GUI_FRONTEND_SERVICES=>FILE_SAVE_DIALOG
EXPORTING
PROMPT_ON_OVERWRITE = 'X'
CHANGING
FILENAME = W_FILE_NAME
PATH = W_FILE_PATH
FULLPATH = W_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.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
BIN_FILESIZE = W_BIN_FILESIZE
FILENAME = W_FULL_PATH
FILETYPE = 'BIN'
APPEND = ' '
WRITE_FIELD_SEPARATOR = ''
HEADER = '00'
TRUNC_TRAILING_BLANKS = ''
WRITE_LF = 'X'
COL_SELECT = ''
COL_SELECT_MASK = ''
DAT_MODE = ''
CONFIRM_OVERWRITE = ''
NO_AUTH_CHECK = ''
CODEPAGE = ''
IGNORE_CERR = ABAP_TRUE
REPLACEMENT = '#'
WRITE_BOM = ''
TRUNC_TRAILING_BLANKS_EOL = 'X'
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 ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Regards
Swati NamdevHi Swati,
Pls refer the below code:
TABLES: ekko.
DATA: int_itab TYPE TABLE OF ekko WITH HEADER LINE.
DATA: wf_name TYPE rs38l_fnam.
DATA: wf_so1.
*For PDf Conversions
DATA: int_tab_otf_data TYPE ssfcrescl,
int_pdf_tab LIKE tline OCCURS 0 WITH HEADER LINE,
int_tab_otf_final TYPE itcoo OCCURS 0 WITH HEADER LINE,
file_size TYPE i,
bin_filesize TYPE i,
file_name TYPE string,
file_path TYPE string,
full_path TYPE string,
cparam TYPE ssfctrlop,
outop TYPE ssfcompop.
**Preview not allowed.
outop-tddest = 'LP01'.
cparam-no_dialog = 'X'.
cparam-preview = ' '.
cparam-getotf = 'X'.
GET PARAMETER ID 'EBLEN' FIELD wf_so1.
SELECT mandt ebeln bukrs bsart ernam ekorg bedat FROM ekko INTO TABLE
int_itab WHERE ebeln = wf_so1.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = 'Z_SMARTFORM_FINAL2'
IMPORTING
fm_name = wf_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 FUNCTION wf_name
EXPORTING
control_parameters = cparam
output_options = outop
user_settings = space
IMPORTING
job_output_info = int_tab_otf_data
TABLES
int_itab = int_itab.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
int_tab_otf_final[] = int_tab_otf_data-otfdata[].
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
format = 'PDF'
max_linewidth = 132
IMPORTING
bin_filesize = bin_filesize
TABLES
otf = int_tab_otf_final
lines = int_pdf_tab.
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 METHOD cl_gui_frontend_services=>file_save_dialog
CHANGING
filename = file_name
path = file_path
fullpath = full_path.
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 FUNCTION 'GUI_DOWNLOAD'
EXPORTING
bin_filesize = bin_filesize
filename = full_path
filetype = 'BIN'
IMPORTING
filelength = file_size
TABLES
data_tab = int_pdf_tab.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Regards,
Ramneet Ahuja -
Selecting user input from Select option into smart form
Hi,
when i use parameter then i wil show company code in smart-form output
but when i use select option then its throwing error parameter specified here is different
what should i do in this case i want to design a big select option screen for taking user input
REPORT ZMM.
TABLES BSEG.
DATA : V_FORMNAME TYPE TDSFNAME VALUE 'ZPUR_REG',
V_FMNAME TYPE RS38L_FNAM.
*PARAMETERS SO_BUKRS TYPE BUKRS.
SELECT-OPTIONS : SO_BUKRS FOR BSEG-BUKRS.
DATA : Z_CONTROL TYPE SSFCTRLOP, "Smart Forms: Control structure
Z_OPTIONS TYPE SSFCOMPOP. "SAP Smart Forms: Smart Composer (transfer) options.
MOVE 'X' TO : Z_control-no_dialog, "SAP Smart Forms: General Indicator
Z_options-tdnewid, "New Spool Request (Print Parameters)
z_control-PREVIEW. "Print preview
MOVE 'LP01' TO Z_options-tddest. "Spool: Output device
MOVE space TO Z_options-tdimmed. "Print Immediately (Print Parameters).
MOVE 'PRINTER' TO Z_control-device. "Output device
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
FORMNAME = V_FORMNAME
IMPORTING
FM_NAME = V_FMNAME.
CALL FUNCTION V_FMNAME
EXPORTING
CONTROL_PARAMETERS = Z_CONTROL
OUTPUT_OPTIONS = Z_OPTIONS
USER_SETTINGS = ''
BUKRS = SO_BUKRS.
pls help me in this regards.
ketan..hi
thnx for your reply
can u pls elaborate in my code
now i changed code BUKRS = SO_BUKRS-low.
either i can give low or high but how to select from range
REPORT ZMM.
TABLES BSEG.
DATA : V_FORMNAME TYPE TDSFNAME VALUE 'ZPUR_REG',
V_FMNAME TYPE RS38L_FNAM.
*PARAMETERS SO_BUKRS TYPE BUKRS.
SELECT-OPTIONS : SO_BUKRS FOR BSEG-BUKRS.
DATA : Z_CONTROL TYPE SSFCTRLOP, "Smart Forms: Control structure
Z_OPTIONS TYPE SSFCOMPOP. "SAP Smart Forms: Smart Composer (transfer) options.
MOVE 'X' TO : Z_control-no_dialog, "SAP Smart Forms: General Indicator
Z_options-tdnewid, "New Spool Request (Print Parameters)
z_control-PREVIEW. "Print preview
MOVE 'LP01' TO Z_options-tddest. "Spool: Output device
MOVE space TO Z_options-tdimmed. "Print Immediately (Print Parameters).
MOVE 'PRINTER' TO Z_control-device. "Output device
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
FORMNAME = V_FORMNAME
IMPORTING
FM_NAME = V_FMNAME.
CALL FUNCTION V_FMNAME
EXPORTING
CONTROL_PARAMETERS = Z_CONTROL
OUTPUT_OPTIONS = Z_OPTIONS
USER_SETTINGS = ''
BUKRS = SO_BUKRS-low.
ketan.. -
Passing SELECT-OPTIONS to smart forms
hi ,
how can we pass select options from a program to a smart form.
Regards
ArunHi,
Just try to append the valid values in select options to internal table from report.
Then pass that internal table(ofcourse, you need to create user-defined struture if needed in SE11) from report to smart forms.
Rgds,
J.Jayanthi -
What is the diff b/w Sap Scripts and Smart Forms
Hi,
Whats the diff b/w SAP Scripts and Smart Forms..
I need the internal explanation for both Smart Forms and SAP Scripts mean when we execute what happens whether Print Program r Forms starts execution 1st and SIMILARLY FOR SMARTFORMS WHETHER FM'S R FORMS.
Thanks & Regards,
Gopi.Hi
Difference with SMARTFORMS vs. SapScript(SE71)
The Following are the differences :-
a) Multiple page formats are possible in smartforms which is not the case in SAPScripts
b) It is possible to have a smartform without a main window .
c) Labels cannot be created in smartforms.
d) Routines can be written in smartforms tool.
e) Smartforms generates a function module when activated.
f) Unlike sapscripts (RSTXSCRP), you cannot upload/download Smartform to your local harddisk.
It was said that it was provided in CRM 3.0 version, but not available in R/3. You can download smartforms into Local PC in a XML format. In the same way you can upload this XML format into Smartform. From the smartform editor itself you can call download option, if you are working in CRM 3.0 environment.
In R3 also, you can download into XML format. However, it's not sure about uploading. Refer to the program 'SF_XSF_DEMO'.
In 4.7 Enterprise, other have seen this utlity which is completey missing in 4.6c. There is functionality to downlaod a complete form or only a particular node. (Utilities -> Download form). It will create a XML file and save it in the hard disk.
For others, if you want to download/upload the Smartforms source, you will need the help from the Basis people. What you can do is to create a Transport and then FTP down to your local harddisk. When you need the Smartform source in another system, you have FTP up the Smartforms file back to the SAP server. Finally, the Basis team, will tp it into your system.
g) The protect and endprotect command in sapscript doesn't work with smartforms. For example on a invoice: First data of position no 80. is printed on page one, other data of position no 80 is printed on page 2. And there's nothing you can do about it. Actually, there is something you can do about it. By using a folder node and checking the 'protect' checkbox, everything in that folder will be page protected.
check out this link:
http://www.sap-img.com/smartforms/sap-smart-forms.htm
Reward points if helpful.
Regards,
Swathi. -
Text element not gettin refreshed in smart form
Hi
Text element does not get refreshed in the smart form preview.
I have a selection screen on which i have a few selection parameters and three application
toolbar buttons. "Save" , "Preview" and "Print". At the end of selection screen I have a
button "text" which when clicked takes me to the text element editor(FM 'TEXT_EDIT' )
I have to enter a project number on the selection screen, enter all other details and
then click on the "Text" button. I would then change /edit some text etc and come back
to sel screen. Now i click on preview , the smart form shows up and the text gets dispalyed
with the modified text.
I am passing the text name by appending "sometext" + project number to the TEXT_EDIT
and while eiditing and as a parameter to the smart form. In the smart form i have given the variable in the "include text".
Now Herez the problem.
I am still in selection screen and clik on the "text" button and it takes me to the
text editor. Now i add more lines, save and come back. Now i clik on preview
button and it displays the old text data.
When i come out of the transaction and renter , clik on the preview it displays data
correctly. Now if i repeat the steps
1.edit text button , add a few lines
2.preview button, shows data as entered in step 1.
3.edit text button, add few more lines
4.preview button .. the text displays is from step 1 and not 3.
I am not sure if this is lot of info for anybody to write an answer straight away but
if u need more info i can provide. I can do a read_text in the smart form but its toooooo
much of a pain for the data i need to display. million adjustments to be taken care of.
What could be the problem ? I have given all the basic settings like save parameter
in edit_text fm , checked all the print preview options in sdn.
Here are my questions
1. Why is the text element not getting refreshed.
2. After a form is displayed for preview , will it store anywhere in the buffer ? if yes
is there any method to clear it ?Hi,
The problem is not with text elements, it might be your size of window which you are using to display the text elements. Check your window size and modify that accordingly.
Cheers,
Bujji -
Email PDF smart form Support Desk
Hi SDN,
I'm working on support desk - solution manager, and i need to send the solution of the support message by email to the final user.
There is an standard action (SLF1 -SMSD_SERVICE_ORDER_DNO_OUTPUT) that sends the solution in pdf format by email, but we couldn't set the receivers online.
So, I'm using an "z" action that executes an smart form, and i would like to send the smart form in pdf format by the internet.
I'd like to use fm SO_DYNP_OBJECT_SEND, because the user must fill the receivers on-line
So far i have de OTF, and i know that i can make a conversion to pdf format, but i've the following problem
- the pdf in attach is empty, it may be because of the format, or may be i'm not using correctly this function.
Thanks in advance,
Maria João Rocha
call function 'CONVERT_OTF'
exporting
format = 'PDF'
importing
bin_filesize = w_pdf_size
tables
otf = es_job_output_info-otfdata[]
lines = t_pdf[]
exceptions
err_max_linewidth = 1
err_format = 2
err_conv_not_possible = 3
err_bad_otf = 4
others = 5.
* header
wa_head-objnam = 'EMAIL'.
wa_head-objdes = ls_output_options-tdtitle.
wa_head-objnam = ls_output_options-tdtitle.
wa_head-objla = sy-langu.
wa_head-objsns = 'O'.
wa_head-file_ext = 'TXT'.
append wa_head to t_head.
wa_packing_list-transf_bin = 'X'.
wa_packing_list-head_start = 1.
wa_packing_list-head_num = 0.
wa_packing_list-body_start = 1.
wa_packing_list-objtp = 'RAW'.
* wa_packing_list-objtp = 'EXT'.
wa_packing_list-objdes = ls_output_options-tdtitle.
wa_packing_list-objla = sy-langu.
wa_packing_list-objlen = w_pdf_size.
wa_packing_list-file_ext = 'PDF'.
append wa_packing_list to t_packing_list.
*---------- enviar o mail
call function 'SO_DYNP_OBJECT_SEND'
exporting
* object_hd_change = ls_output_options-tdtitle
object_type = 'RAW'
* originator_type = 'B'
* originator = sy-uname
outbox_flag = 'S'
tables
* objcont = t_text
* receivers = t_receivers
packing_list = t_packing_list
att_cont = t_cont
att_head = t_head
exceptions
active_user_not_exist = 1
communication_failure = 2
component_not_available = 3
folder_not_exist = 4
folder_no_authorization = 5
forwarder_not_exist = 6
note_not_exist = 7
object_not_exist = 8
object_not_sent = 9
object_no_authorization = 10
object_type_not_exist = 11
operation_no_authorization = 12
owner_not_exist = 13
parameter_error = 14
substitute_not_active = 15
substitute_not_defined = 16
system_failure = 17
too_much_receivers = 18
user_not_exist = 19
x_error = 20
others = 21.
endif.Thanks for your reply.
I'm working on it, and Ive seen the SCOT documentation, so I've change my strategy.
Right now I'm using some of the methods of the BOR.
I think I've to code because I want a popup to introduce the list of the receivers and the mail body, and of course I want to attach a smart form on pdf format.
But I cant send the mail because of the error: Erro interno: SO_OBJECT_MIME_GET Exceção: 2
Can you help me on this? What Im doing wrong? What document class I need to use on the AttachmentType?
Thanks in advance.
Best regards,
Maria João Rocha
FUNCTION Z_MAIL_DIALOGO.
*"*"Interface local:
*" IMPORTING
*" REFERENCE(TITULO) TYPE SOOD1-OBJDES OPTIONAL
*" REFERENCE(FILE_SIZE) TYPE SOOD1-OBJLEN OPTIONAL
*" TABLES
*" OTF TYPE TSFOTF OPTIONAL
*" PDF STRUCTURE TLINE OPTIONAL
*" CONTEXT TYPE SOLI_TAB OPTIONAL
* Makros für Zugriff aufs BOR
include <cntn01>.
*parameters: dialog like sonv-flag.
data: dialog like sonv-flag.
* Datendeklaration
data: message type swc_object.
data: recipient type swc_object.
data: recip_tab type swc_object occurs 1 with header line.
data: objkey like swotobjid-objkey.
data: content like soli-line occurs 0 with header line.
data: title(80).
data: persnumber like adcp-persnumber.
data: sent_to_all like sonv-flag,
object_list like sosndinf occurs 1 with header line.
data: t_otf type standard table of ITCOO.
data: itab like soli occurs 0.
* Deklaration eines Containers
swc_container container.
* Message-Objekt anlegen
* * Neues Message-Objekt generieren
swc_create_object message 'Message' space.
swc_clear_container container.
if dialog = space.
* * Create w/o dialog
concatenate 'Mensagem Support Desk' sy-datum sy-uzeit into title
separated by '/'.
swc_set_element container 'DOCUMENTTITLE' title.
swc_set_element container 'DOCUMENTNAME' 'Support Desk'.
* swc_set_element container 'DOCUMENTTYPE' 'INT'.
* swc_set_element container 'DOCUMENTTYPE' 'SCR'.
swc_set_element container 'DOCUMENTTYPE' 'OTF'.
swc_set_element container 'NO_DIALOG' 'X'.
else.
* * Create with dialog
swc_set_element container 'NO_DIALOG' ' '.
endif.
swc_call_method message 'Create' container.
perform error_handling(rssobcitest11).
* Create attachment (RAW document from internal table)
SWC_CLEAR_CONTAINER CONTAINER.
*att_bor_obj-objtype = 'MESSAGE'.
*swc_set_element container 'ATTACHMENT' pdf.
*swc_set_element container 'ATTACHMENT' otf.
swc_set_element container 'ATTACHMENT' context.
swc_set_element container 'ATTACHMENTTITLE' 'Anexo'.
swc_set_element container 'AttachmentType' 'OTF'.
*swc_set_element container 'DocumentSize' 0.
swc_set_element container 'DocumentSize' file_size.
*swc_set_table container 'DocumentContent' itab.
SWC_CALL_METHOD MESSAGE 'Attach' CONTAINER.
PERFORM ERROR_HANDLING(RSSOBCITEST11).
*SWC_CLEAR_CONTAINER CONTAINER.
*SWC_SET_ELEMENT CONTAINER 'EditorSettings' 'D'.
*SWC_SET_ELEMENT CONTAINER 'STARTING_AT_X' '5'.
*SWC_SET_ELEMENT CONTAINER 'STARTING_AT_Y' '5'.
*SWC_SET_ELEMENT CONTAINER 'EnableApplObjAttachments' 'X'.
*SWC_CALL_METHOD MESSAGE 'EditRecipientList' CONTAINER.
*PERFORM ERROR_HANDLING(RSSOBCITEST11).
* Einen Empfänger (interner Benutzer) automatisch hinzufügen
* Recipient-Objekt anlegen
swc_clear_container container.
swc_create_object recipient 'Recipient' space.
swc_set_element container 'AddressString' sy-uname.
swc_set_element container 'TypeId' 'B'.
swc_call_method recipient 'CreateAddress' container.
perform error_handling(rssobcitest11).
* Kopie des Recipient-Objekts anfügen
swc_clear_container container.
swc_set_element container 'NewRecipient' recipient.
swc_call_method message 'AddCopyOfRecipient' container.
perform error_handling(rssobcitest11).
* Outbox-Flag setzen
swc_clear_container container.
swc_set_element container 'OutboxFlag' 'X'.
swc_call_method message 'SetOutboxFlag' container.
perform error_handling(rssobcitest11).
* Empfängerliste editieren
swc_clear_container container.
swc_call_method message 'EditRecipientList' container.
perform error_handling(rssobcitest11).
swc_get_table container 'RecipientsInfo' object_list.
if sy-subrc = 8.
* Kopiertes Message-Objekt versenden
swc_clear_container container.
swc_call_method message 'Submit' container.
perform error_handling(rssobcitest11).
swc_get_table container 'RecipientsInfo' object_list.
endif.
swc_get_element container 'SentToAll' sent_to_all.
* Kopiertes Message-Objekt sichern
swc_clear_container container.
swc_call_method message 'Save' container.
perform error_handling(rssobcitest11).
* Protokollausgabe:
* Key des Message-Objekts ermitteln
*SWC_GET_OBJECT_KEY MESSAGE OBJKEY.
*WRITE: / 'Key des Messageobjekts', OBJKEY.
* Protokollausgabe:
perform write_recipient_info(rssobcitest11) tables object_list
using sent_to_all.
* Freigeben der Referenzen
* MESSAGE-Objekt
swc_free_object message.
* RECIPIENT-Objekt
swc_free_object recipient.
commit work.
ENDFUNCTION. -
Print Terms and conditions on Back side in Smart Forms
Hi All,
How can we print Terms and conditions on back side of last page. we are using SAP Smart Forms to print Packing Slips now we need to print the terms and conditions on back side of last page. who can we do this ... ?
I have created 2 pages first page and Last page i have selected last page as next page for First page and vice vis and selected duplex printing for first page print option.
Now the problem is the terms and conditions are printed on all the pages but not on the last page. for example if i have 5 pages then all the 4 pages are printed on front and back but the last page(5) is printed only on the front side but not on the back and if we print only 1 page then only front page is printed and no back side is printed.
please let me know what else need to be done in order to print the terms and conditions on the back side of last page.
Thanks,
Praveen Chindam.Hi,
There is quite a simple solution. We have exactly the same requirements for our invoices.
Create 3 pages in the Smartforms, e.g. FRONT, BACK and LAST.
FRONT has print mode "D" (duplex) and next page "BACK"
BACK has print mode " " (unchanged) and next page "FRONT"
LAST has print mode " " (unchanged) and next page " " (blank)
BACK and LAST are identical apart from that, and do not have a MAIN window - they just contain the T&C in a secondary window.
At the very end of the MAIN window on the page FRONT, insert the command NEW PAGE <LAST>.
This will give you a print out that is
FRONT, BACK, FRONT, BACK,....FRONT, BACK, FRONT, LAST. -
Print Charts/Graphs on Smart Forms
Hi Seniors,
Here is a requirement on Smart Forms:
I need to print Charts on Smart Forms. I have been through many answers on SDN but unfortunately, there are not many appropriate solutions. I executed some standard reports and got Charts and graphs as output but am not able to use it to display the same on Smart Forms. I have even tried using classes for charts / graphs, business graphics(may be there would have been some sequential procedure for that).
In the Smart Form, I have tried Form Attributes>Output Options>Output Format--> XSF output
with output mode: 'Spool' and Output Device: 'XSFOUTDEV' from help.sap(I couldn't get what output device that was and was unable to execute).
I have tried executing transaction GRAL(demo reports for SAP graphics) too.
I found a report that would produce graph in Excel, I executed it, saved the graph from excel in '.bmp' format in SE78 and then printed it on Smart Form. But all I want is to have it done dynamically.
I saw answers that we can save the graph chart/graph onto the desktop, upload it and then display it on the Smart Forms. But, when i tried it, I saw that it could be saved only in '.dat' format. I have to save it dynamically in a supported format like '.bmp' and print it on the Smart Forms(the graph would change depending upon the input values). Please help me resolve this.
Thanks in Advance,
Chaitanya.Dear Bouman,
Thank you for the reply. I can write a report if would helps me to upload images dynamically. I saw your program but, here we cant give the name of the chart that comes as output. I tried to save the chart but it comes in '.dat' format but not in '.bmp' format. We may be having some classes or function modules that we need to call in a particular sequence. What other options do we have. Please help me resolve this.
Regards,
Chaitanya.C.N -
Is it possible to get direct print without preview of the Smart Form?
Hi,
I developed a custom report where line items are coming with a check-box in front of each item. User can select single/multiple line-items by checking those check-boxes. The report also has a PRINT button in application tool bar by clicking which a Smart Form will be printing for each item. Thats mean, for 10 selected line items, 10 forms will be printed.
But, after clicking the PRINT button, print preview of the form is coming and from there I can go for a print/printer. I do not need the print preview and want to have the direct print option while clicking the PRINT button. How can I have this functionality?
Thanks in Advance
RoyHi,
Initially I get the Form Name by calling FM: SSF_FUNCTION_MODULE_NAME and I store it in l_fm_name. now calling the FM: l_fm_name like below:
LOOP AT i_item INTO wa_item.
CALL FUNCTION l_fm_name
EXPORTING
wa_item = wa_item
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.
ENDLOOP.
As I have multiple form need to print, I am calling the smartform in loop. -
Function module of smart form delivered an error
Hi All,
I am getting an error like this
"Function module /1BCDWB/SF00000007 of smart form delivered an error"
FUNCTION /1BCDWB/SF00000007.
""Global interface:
*" IMPORTING
*" VALUE(ARCHIVE_INDEX) TYPE TOA_DARA OPTIONAL
*" VALUE(ARCHIVE_PARAMETERS) TYPE ARC_PARAMS OPTIONAL
*" VALUE(CONTROL_PARAMETERS) TYPE SSFCTRLOP OPTIONAL
*" VALUE(MAIL_APPL_OBJ) TYPE SWOTOBJID OPTIONAL
*" VALUE(MAIL_RECIPIENT) TYPE SWOTOBJID OPTIONAL
*" VALUE(MAIL_SENDER) TYPE SWOTOBJID OPTIONAL
*" VALUE(OUTPUT_OPTIONS) TYPE SSFCOMPOP OPTIONAL
*" VALUE(USER_SETTINGS) TYPE TDBOOL DEFAULT 'X'
*" VALUE(ARCHIVE_INDEX_TAB) TYPE TSFDARA OPTIONAL
*" REFERENCE(ORDERADM_H) TYPE CRMT_OUTPUT_ORDERADM_H_COM
*" REFERENCE(ACTIVITY_H) TYPE CRMT_OUTPUT_ACTIVITY_H_COM
*" REFERENCE(OPPORT_H) TYPE CRMT_OUTPUT_OPPORT_H_COM
*" REFERENCE(ORGMAN_H) TYPE CRMT_OUTPUT_ORGMAN_H_COM
*" REFERENCE(PARTNER_H) TYPE CRMT_OUTPUT_PARTNER_H_COMT
*" REFERENCE(PRICINGDATA_H) TYPE
*" CRMT_OUTPUT_PRICINGDATA_H_COM
*" REFERENCE(SALES_H) TYPE CRMT_OUTPUT_SALES_H_COM
*" REFERENCE(SHIPPING_H) TYPE CRMT_OUTPUT_SHIPPING_H_COM
*" REFERENCE(PAYPLAN_D_H) TYPE
*" CRMT_OUTPUT_PAYPLAN_D_H_COMT
*" REFERENCE(CUMULAT_H) TYPE CRMT_OUTPUT_CUMULAT_H_COM
*" REFERENCE(CUSTOMER_H) TYPE CRMT_OUTPUT_CUSTOMER_H_COM
*" REFERENCE(ACS_H) TYPE CRMT_ACS_H_COM
*" REFERENCE(BILLING_H) TYPE CRMT_OUTPUT_BILLING_H_COMT
*" REFERENCE(CANCEL_H) TYPE CRMT_OUTPUT_CANCEL_H_COMT
*" REFERENCE(APPOINTMENT_H) TYPE
*" CRMT_OUTPUT_APPOINTMENT_H_COMT
*" REFERENCE(BILLPLAN_D_H) TYPE
*" CRMT_OUTPUT_BILLPLAN_D_H_COMT
*" REFERENCE(BILLPLAN_H) TYPE CRMT_OUTPUT_BILLPLAN_H_COMT
*" REFERENCE(STATUS_D_H) TYPE CRMT_OUTPUT_STATUS_D_H_COMT
*" REFERENCE(STATUS_H) TYPE CRMT_OUTPUT_STATUS_H_COMT
*" REFERENCE(SRV_SUBJECT_H) TYPE
*" CRMT_OUTPUT_SRV_SUBJECT_H_COMT
*" REFERENCE(SRV_SUBJECT_I) TYPE
*" CRMT_OUTPUT_SRV_SUBJECT_H_COMT
*" REFERENCE(SRV_REASON_H) TYPE
*" CRMT_OUTPUT_SRV_REASON_H_COMT
*" REFERENCE(SRV_RESULT_H) TYPE
*" CRMT_OUTPUT_SRV_RESULT_H_COMT
*" REFERENCE(SRV_REFOBJ_H) TYPE
*" CRMT_OUTPUT_SRV_REFOBJ_H_COMT
*" REFERENCE(SRV_REFOBJ_I) TYPE
*" CRMT_OUTPUT_SRV_REFOBJ_H_COMT
*" REFERENCE(ORDERADM_I) TYPE CRMT_OUTPUT_ORDERADM_I_COMT
*" REFERENCE(ORDERADM_I_IN) TYPE
*" CRMT_OUTPUT_ORDERADM_I_IN_COMT
*" REFERENCE(ORDERADM_I_QT) TYPE
*" CRMT_OUTPUT_ORDERADM_I_QT_COMT
*" REFERENCE(ORGMAN_I) TYPE CRMT_OUTPUT_ORGMAN_I_COMT
*" REFERENCE(PRICINGDATA_I) TYPE
*" CRMT_OUTPUT_PRICINGDATA_I_COMT
*" REFERENCE(PRICING_I) TYPE CRMT_OUTPUT_PRICING_I_COMT
*" REFERENCE(PRODUCT_I) TYPE CRMT_OUTPUT_PRODUCT_I_COMT
*" REFERENCE(SALES_I) TYPE CRMT_OUTPUT_SALES_I_COMT
*" REFERENCE(SERVICE_I) TYPE CRMT_OUTPUT_SERVICE_I_COMT
*" REFERENCE(SCHEDLIN_I) TYPE CRMT_OUTPUT_SCHEDLIN_I_COMT
*" REFERENCE(SCHEDLIN_I_CF) TYPE
*" CRMT_OUTPUT_SCHEDLIN_I_CF_COMT
*" REFERENCE(SHIPPING_I) TYPE CRMT_OUTPUT_SHIPPING_I_COMT
*" REFERENCE(PARTNER_I) TYPE CRMT_OUTPUT_PARTNER_I_COMT
*" REFERENCE(ITEM_CSTICS_I) TYPE CRMT_ITEM_CSTICS_TAB
*" REFERENCE(CUSTOMER_I) TYPE CRMT_OUTPUT_CUSTOMER_I_COMT
*" REFERENCE(BILLING_I) TYPE CRMT_OUTPUT_BILLING_I_COMT
*" REFERENCE(CANCEL_I) TYPE CRMT_OUTPUT_CANCEL_I_COMT
*" REFERENCE(FINPROD_I) TYPE CRMT_OUTPUT_FINPROD_I_COMT
*" REFERENCE(ORDPRP_I) TYPE CRMT_OUTPUT_ORDPRP_I_COMT
*" REFERENCE(APPOINTMENT_I) TYPE
*" CRMT_OUTPUT_APPOINTMENT_I_COMT
*" REFERENCE(BILLPLAN_D_I) TYPE
*" CRMT_OUTPUT_BILLPLAN_D_I_COMT
*" REFERENCE(BILLPLAN_I) TYPE CRMT_OUTPUT_BILLPLAN_I_COMT
*" REFERENCE(STATUS_I) TYPE CRMT_OUTPUT_STATUS_I_COMT
*" REFERENCE(WORKING_SET_E_S_BBP) TYPE
*" /1CN/WORKING_SET_E_S_BBP_T
*" REFERENCE(LANGUAGE) TYPE SY-LANGU
*" REFERENCE(SERVICE_I_ASSI) TYPE
*" CRMT_OUTPUT_SERVICE_I_***_COMT
*" VALUE(FORM_TYPE) TYPE C OPTIONAL
*" REFERENCE(Y_V_PARTNER_FLAG) TYPE C OPTIONAL
*" EXPORTING
*" VALUE(DOCUMENT_OUTPUT_INFO) TYPE SSFCRESPD
*" VALUE(JOB_OUTPUT_INFO) TYPE SSFCRESCL
*" VALUE(JOB_OUTPUT_OPTIONS) TYPE SSFCRESOP
*" EXCEPTIONS
*" FORMATTING_ERROR
*" INTERNAL_ERROR
*" SEND_ERROR
*" USER_CANCELED
DATA: %INPUT TYPE SSFCOMPIN,
%RESULT_OP TYPE SSFCRESOP,
%RESULT_PD TYPE SSFCRESPD,
%RESULT_CL TYPE SSFCRESCL,
%TABDEF LIKE LINE OF %TABDEFS,
%ARCTAB TYPE TSFDARA,
BEGIN OF %FULLNAME,
FORM TYPE TDSFNAME VALUE 'YCRM_ORDER_SERVICE_RMA',
VARI TYPE TDVARIANT,
ACTV TYPE TDBOOL VALUE 'X',
END OF %FULLNAME.
TYPES: T_XDF_ELEM(255) TYPE C,
T_XDF_ATTR(255) TYPE C.
DATA: IMPORT_PARAMETER TYPE TABLE OF RSIMP WITH HEADER LINE,
CHANGING_PARAMETER TYPE TABLE OF RSCHA WITH HEADER LINE,
TABLES_PARAMETER TYPE TABLE OF RSTBL WITH HEADER LINE,
EXPORT_PARAMETER TYPE TABLE OF RSEXP WITH HEADER LINE,
EXCEPTION_LIST TYPE TABLE OF RSEXC WITH HEADER LINE.
DATA: XDF_TABLE TYPE TSFIXML,
XDF_LENGTH TYPE I.
DATA: XDF_DOCUMENT TYPE REF TO IF_IXML_DOCUMENT,
XDF_PARAMETER TYPE REF TO IF_IXML_ELEMENT,
L_NAME TYPE STRING,
L_VALUE TYPE STRING,
L_OBJECT TYPE STRING,
L_DATE TYPE STRING,
L_TIME TYPE STRING,
RC TYPE SY-SUBRC.
FIELD-SYMBOLS: <DATA_OBJECT> TYPE ANY.
CLASS CL_IXML DEFINITION LOAD.
CONSTANTS: C_XDF_ROOT_ELEMENT TYPE T_XDF_ELEM VALUE 'XDF',
C_XDF_ATTR_TYPE TYPE T_XDF_ATTR VALUE 'TYPE',
C_XDF_ATTR_TIMESTAMP TYPE T_XDF_ATTR VALUE 'TIMESTAMP',
C_XDF_ATTR_OBJ TYPE T_XDF_ATTR VALUE 'OBJECT'.
DATA: XDF_FACTORY TYPE REF TO IF_IXML,
XDF_ROOT_ELEMENT TYPE REF TO IF_IXML_ELEMENT.
DATA: L_GETSTATE TYPE DDTYPEGET,
L_TYPE TYPE DDTYPEKIND,
L_TYPE_NAME TYPE TYPENAME,
L_DDIC_OBJ TYPE DDTYPES OCCURS 0 WITH HEADER LINE,
L_DD02L_STATE TYPE DD02L OCCURS 0 WITH HEADER LINE,
L_DD04L_STATE TYPE DD04L OCCURS 0 WITH HEADER LINE,
L_DD40L_STATE TYPE DD40L OCCURS 0 WITH HEADER LINE,
L_XMLOUTPUT TYPE SSFXMLOUT,
L_SFSY TYPE SFSY.
TYPE-POOLS: ABAP.
DATA: XDF2_IXML TYPE REF TO IF_IXML,
XDF2_DOCUMENT TYPE REF TO IF_IXML_DOCUMENT,
XDF2_SRC_OBJECTS TYPE ABAP_TRANS_SRCBIND_TAB,
XDF2_SRC_OBJECT LIKE LINE OF XDF2_SRC_OBJECTS.
DEFINE XDF2_APPEND_SRC_OBJECT.
XDF2_SRC_OBJECT-NAME = '&1'.
TRANSLATE XDF2_SRC_OBJECT-NAME TO UPPER CASE.
GET REFERENCE OF &2 INTO XDF2_SRC_OBJECT-VALUE.
APPEND XDF2_SRC_OBJECT TO XDF2_SRC_OBJECTS.
END-OF-DEFINITION.
DEFINE XDF_GET_DDIC_INFO.
CLEAR L_DDIC_OBJ.
IF NOT &2 IS INITIAL.
L_TYPE_NAME = &2.
ELSEIF NOT &1-TYP IS INITIAL.
L_TYPE_NAME = &1-TYP.
ELSEIF NOT &1-LINE_OF IS INITIAL.
L_TYPE_NAME = &1-LINE_OF.
ELSEIF NOT &1-TABLE_OF IS INITIAL.
L_TYPE_NAME = &1-TABLE_OF.
ELSE.
CLEAR L_TYPE_NAME.
ENDIF.
CALL FUNCTION 'DDIF_TYPEINFO_GET'
EXPORTING TYPENAME = L_TYPE_NAME
IMPORTING TYPEKIND = L_TYPE.
L_DDIC_OBJ-TYPENAME = L_TYPE_NAME.
L_DDIC_OBJ-TYPEKIND = L_TYPE.
IF NOT L_DDIC_OBJ IS INITIAL.
COLLECT L_DDIC_OBJ.
ENDIF.
END-OF-DEFINITION.
DEFINE XDF_CREATE_DATA_STREAM.
CLEAR: L_OBJECT, L_DATE, L_TIME, L_NAME, L_TYPE_NAME, L_VALUE.
IF &3 = 'T'.
CONCATENATE &1-PARAMETER '[]' INTO L_NAME.
ELSE.
L_NAME = &1-PARAMETER.
ENDIF.
IF NOT &2 IS INITIAL.
ASSIGN (L_NAME) TO <DATA_OBJECT>
CASTING TYPE (&2).
L_TYPE_NAME = &2.
ELSEIF NOT &1-TYP IS INITIAL.
ASSIGN (L_NAME) TO <DATA_OBJECT>
CASTING TYPE (&1-TYP).
L_TYPE_NAME = &1-TYP.
ELSEIF NOT &1-LINE_OF IS INITIAL.
ASSIGN (L_NAME) TO <DATA_OBJECT>.
L_TYPE_NAME = &1-LINE_OF.
ELSEIF NOT &1-TABLE_OF IS INITIAL.
ASSIGN (L_NAME) TO <DATA_OBJECT>.
L_TYPE_NAME = &1-TABLE_OF.
ELSE.
ASSIGN (L_NAME) TO <DATA_OBJECT>.
CLEAR L_TYPE_NAME.
ENDIF.
CALL FUNCTION 'SDIXML_DATA_TO_DOM'
EXPORTING
NAME = L_NAME
DATAOBJECT = <DATA_OBJECT>
IMPORTING
DATA_AS_DOM = XDF_PARAMETER
CHANGING
DOCUMENT = XDF_DOCUMENT
EXCEPTIONS
OTHERS = 1.
L_NAME = C_XDF_ATTR_TYPE.
L_VALUE = L_TYPE_NAME.
CALL METHOD XDF_PARAMETER->SET_ATTRIBUTE
EXPORTING NAME = L_NAME
VALUE = L_VALUE
RECEIVING RVAL = RC.
CLEAR L_DDIC_OBJ.
READ TABLE L_DDIC_OBJ WITH KEY TYPENAME = L_TYPE_NAME.
CASE L_DDIC_OBJ-TYPEKIND.
WHEN 'S'.
READ TABLE L_DD02L_STATE WITH KEY TABNAME = &1-TYP.
L_DATE = L_DD02L_STATE-AS4DATE.
L_TIME = L_DD02L_STATE-AS4TIME.
L_OBJECT = 'TABL'.
WHEN 'E'. " data elements
READ TABLE L_DD04L_STATE WITH KEY ROLLNAME = &1-TYP.
L_DATE = L_DD04L_STATE-AS4DATE.
L_TIME = L_DD04L_STATE-AS4TIME.
L_OBJECT = 'DTEL'.
WHEN 'L'. " table types
READ TABLE L_DD40L_STATE WITH KEY TYPENAME = &1-TYP.
L_DATE = L_DD40L_STATE-AS4DATE.
L_TIME = L_DD40L_STATE-AS4TIME.
L_OBJECT = 'TTYP'.
WHEN OTHERS.
CLEAR: L_DATE, L_TIME, L_OBJECT.
ENDCASE.
L_NAME = C_XDF_ATTR_OBJ.
CALL METHOD XDF_PARAMETER->SET_ATTRIBUTE
EXPORTING NAME = L_NAME
VALUE = L_OBJECT
RECEIVING RVAL = RC.
L_NAME = C_XDF_ATTR_TIMESTAMP.
CONCATENATE L_DATE L_TIME INTO L_VALUE.
CALL METHOD XDF_PARAMETER->SET_ATTRIBUTE
EXPORTING NAME = L_NAME
VALUE = L_VALUE
RECEIVING RVAL = RC.
CALL METHOD XDF_ROOT_ELEMENT->APPEND_CHILD
EXPORTING NEW_CHILD = XDF_PARAMETER
RECEIVING RVAL = RC.
CHECK RC = 0.
END-OF-DEFINITION.
CLEAR DOCUMENT_OUTPUT_INFO.
CLEAR JOB_OUTPUT_INFO.
CLEAR JOB_OUTPUT_OPTIONS.
L_SFSY = SFSY.
CLEAR SFSY.
SFSY-PAGE = L_SFSY-PAGE.
SFSY-FORMPAGES = L_SFSY-FORMPAGES.
SFSY-JOBPAGES = L_SFSY-JOBPAGES.
SFSY-XDF = L_SFSY-XDF.
SFSY-XDF2 = L_SFSY-XDF2.
CLEAR INTSFSY.
IF CONTROL_PARAMETERS-NO_OPEN = SPACE.
CALL FUNCTION 'SSF_CREATE_COMPOSER_INPUT'
EXPORTING
ARCHIVE_PARAMETERS = ARCHIVE_PARAMETERS
USER_SETTINGS = USER_SETTINGS
MAIL_SENDER = MAIL_SENDER
MAIL_RECIPIENT = MAIL_RECIPIENT
MAIL_APPL_OBJ = MAIL_APPL_OBJ
OUTPUT_OPTIONS = OUTPUT_OPTIONS
CONTROL_PARAMETERS = CONTROL_PARAMETERS
IMPORTING
INPUT = %INPUT.
IF OUTPUT_OPTIONS-XSFCMODE = SPACE.
%INPUT-XSF = ' '.
%INPUT-XSFOUTMODE = ' '.
%INPUT-XSFOUTDEV = ' '.
%INPUT-XSFACTION = ' '.
%INPUT-XSFFORMAT = ' '.
ENDIF.
CALL FUNCTION 'SSFCOMP_OPEN'
EXPORTING INPUT = %INPUT
IMPORTING RESULT = %RESULT_OP
EXCEPTIONS OTHERS = 1.
IF SY-SUBRC <> 0.
%VARIANT = SPACE.
PERFORM %RAISE.
ENDIF.
JOB_OUTPUT_OPTIONS = %RESULT_OP.
ENDIF.
IF SFSY-XDF = 'X'.
CALL FUNCTION 'FUNCTION_IMPORT_INTERFACE'
EXPORTING
FUNCNAME = '/1BCDWB/SF00000007'
INACTIVE_VERSION = SPACE
TABLES
IMPORT_PARAMETER = IMPORT_PARAMETER
CHANGING_PARAMETER = CHANGING_PARAMETER
TABLES_PARAMETER = TABLES_PARAMETER
EXPORT_PARAMETER = EXPORT_PARAMETER
EXCEPTION_LIST = EXCEPTION_LIST
EXCEPTIONS
OTHERS = 1.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
L_GETSTATE-TBHD = L_GETSTATE-TBFD = L_GETSTATE-DTEL = 'X'.
L_GETSTATE-TTHD = L_GETSTATE-TTFD = 'X'.
LOOP AT IMPORT_PARAMETER.
XDF_GET_DDIC_INFO IMPORT_PARAMETER IMPORT_PARAMETER-DBFIELD.
ENDLOOP.
LOOP AT CHANGING_PARAMETER.
XDF_GET_DDIC_INFO CHANGING_PARAMETER
CHANGING_PARAMETER-DBFIELD.
ENDLOOP.
LOOP AT TABLES_PARAMETER.
XDF_GET_DDIC_INFO TABLES_PARAMETER TABLES_PARAMETER-DBSTRUCT.
ENDLOOP.
CALL FUNCTION 'DD_TYPEINFO_GET'
EXPORTING GETSTATE = L_GETSTATE
TABLES DDTYPES_TAB = L_DDIC_OBJ[]
DD02L_TAB = L_DD02L_STATE[]
DD04L_TAB = L_DD04L_STATE[]
DD40L_TAB = L_DD40L_STATE[].
XDF_FACTORY = CL_IXML=>CREATE( ).
XDF_DOCUMENT = XDF_FACTORY->CREATE_DOCUMENT( ).
L_NAME = C_XDF_ROOT_ELEMENT.
XDF_ROOT_ELEMENT
= XDF_DOCUMENT->CREATE_ELEMENT( NAME = L_NAME ).
CALL METHOD XDF_DOCUMENT->APPEND_CHILD
EXPORTING NEW_CHILD = XDF_ROOT_ELEMENT
RECEIVING RVAL = RC.
CHECK RC = 0.
LOOP AT IMPORT_PARAMETER.
XDF_CREATE_DATA_STREAM IMPORT_PARAMETER
IMPORT_PARAMETER-DBFIELD 'I'.
ENDLOOP.
LOOP AT CHANGING_PARAMETER.
XDF_CREATE_DATA_STREAM CHANGING_PARAMETER
CHANGING_PARAMETER-DBFIELD 'C'.
ENDLOOP.
LOOP AT TABLES_PARAMETER.
XDF_CREATE_DATA_STREAM TABLES_PARAMETER
TABLES_PARAMETER-DBSTRUCT 'T'.
ENDLOOP.
CALL FUNCTION 'SSFCOMP_XDF_OUTPUT'
EXPORTING DOCUMENT = XDF_DOCUMENT
EXCEPTIONS OTHERS = 1.
ELSEIF SFSY-XDF2 = 'X'.
XDF2_IXML = CL_IXML=>CREATE( ).
XDF2_DOCUMENT = XDF2_IXML->CREATE_DOCUMENT( ).
XDF2_APPEND_SRC_OBJECT ARCHIVE_INDEX ARCHIVE_INDEX.
XDF2_APPEND_SRC_OBJECT ARCHIVE_PARAMETERS ARCHIVE_PARAMETERS.
XDF2_APPEND_SRC_OBJECT CONTROL_PARAMETERS CONTROL_PARAMETERS.
XDF2_APPEND_SRC_OBJECT MAIL_APPL_OBJ MAIL_APPL_OBJ.
XDF2_APPEND_SRC_OBJECT MAIL_RECIPIENT MAIL_RECIPIENT.
XDF2_APPEND_SRC_OBJECT MAIL_SENDER MAIL_SENDER.
XDF2_APPEND_SRC_OBJECT OUTPUT_OPTIONS OUTPUT_OPTIONS.
XDF2_APPEND_SRC_OBJECT USER_SETTINGS USER_SETTINGS.
XDF2_APPEND_SRC_OBJECT ARCHIVE_INDEX_TAB ARCHIVE_INDEX_TAB.
XDF2_APPEND_SRC_OBJECT ORDERADM_H ORDERADM_H.
XDF2_APPEND_SRC_OBJECT ACTIVITY_H ACTIVITY_H.
XDF2_APPEND_SRC_OBJECT OPPORT_H OPPORT_H.
XDF2_APPEND_SRC_OBJECT ORGMAN_H ORGMAN_H.
XDF2_APPEND_SRC_OBJECT PARTNER_H PARTNER_H.
XDF2_APPEND_SRC_OBJECT PRICINGDATA_H PRICINGDATA_H.
XDF2_APPEND_SRC_OBJECT SALES_H SALES_H.
XDF2_APPEND_SRC_OBJECT SHIPPING_H SHIPPING_H.
XDF2_APPEND_SRC_OBJECT PAYPLAN_D_H PAYPLAN_D_H.
XDF2_APPEND_SRC_OBJECT CUMULAT_H CUMULAT_H.
XDF2_APPEND_SRC_OBJECT CUSTOMER_H CUSTOMER_H.
XDF2_APPEND_SRC_OBJECT ACS_H ACS_H.
XDF2_APPEND_SRC_OBJECT BILLING_H BILLING_H.
XDF2_APPEND_SRC_OBJECT CANCEL_H CANCEL_H.
XDF2_APPEND_SRC_OBJECT APPOINTMENT_H APPOINTMENT_H.
XDF2_APPEND_SRC_OBJECT BILLPLAN_D_H BILLPLAN_D_H.
XDF2_APPEND_SRC_OBJECT BILLPLAN_H BILLPLAN_H.
XDF2_APPEND_SRC_OBJECT STATUS_D_H STATUS_D_H.
XDF2_APPEND_SRC_OBJECT STATUS_H STATUS_H.
XDF2_APPEND_SRC_OBJECT SRV_SUBJECT_H SRV_SUBJECT_H.
XDF2_APPEND_SRC_OBJECT SRV_SUBJECT_I SRV_SUBJECT_I.
XDF2_APPEND_SRC_OBJECT SRV_REASON_H SRV_REASON_H.
XDF2_APPEND_SRC_OBJECT SRV_RESULT_H SRV_RESULT_H.
XDF2_APPEND_SRC_OBJECT SRV_REFOBJ_H SRV_REFOBJ_H.
XDF2_APPEND_SRC_OBJECT SRV_REFOBJ_I SRV_REFOBJ_I.
XDF2_APPEND_SRC_OBJECT ORDERADM_I ORDERADM_I.
XDF2_APPEND_SRC_OBJECT ORDERADM_I_IN ORDERADM_I_IN.
XDF2_APPEND_SRC_OBJECT ORDERADM_I_QT ORDERADM_I_QT.
XDF2_APPEND_SRC_OBJECT ORGMAN_I ORGMAN_I.
XDF2_APPEND_SRC_OBJECT PRICINGDATA_I PRICINGDATA_I.
XDF2_APPEND_SRC_OBJECT PRICING_I PRICING_I.
XDF2_APPEND_SRC_OBJECT PRODUCT_I PRODUCT_I.
XDF2_APPEND_SRC_OBJECT SALES_I SALES_I.
XDF2_APPEND_SRC_OBJECT SERVICE_I SERVICE_I.
XDF2_APPEND_SRC_OBJECT SCHEDLIN_I SCHEDLIN_I.
XDF2_APPEND_SRC_OBJECT SCHEDLIN_I_CF SCHEDLIN_I_CF.
XDF2_APPEND_SRC_OBJECT SHIPPING_I SHIPPING_I.
XDF2_APPEND_SRC_OBJECT PARTNER_I PARTNER_I.
XDF2_APPEND_SRC_OBJECT ITEM_CSTICS_I ITEM_CSTICS_I.
XDF2_APPEND_SRC_OBJECT CUSTOMER_I CUSTOMER_I.
XDF2_APPEND_SRC_OBJECT BILLING_I BILLING_I.
XDF2_APPEND_SRC_OBJECT CANCEL_I CANCEL_I.
XDF2_APPEND_SRC_OBJECT FINPROD_I FINPROD_I.
XDF2_APPEND_SRC_OBJECT ORDPRP_I ORDPRP_I.
XDF2_APPEND_SRC_OBJECT APPOINTMENT_I APPOINTMENT_I.
XDF2_APPEND_SRC_OBJECT BILLPLAN_D_I BILLPLAN_D_I.
XDF2_APPEND_SRC_OBJECT BILLPLAN_I BILLPLAN_I.
XDF2_APPEND_SRC_OBJECT STATUS_I STATUS_I.
XDF2_APPEND_SRC_OBJECT WORKING_SET_E_S_BBP WORKING_SET_E_S_BBP.
XDF2_APPEND_SRC_OBJECT LANGUAGE LANGUAGE.
XDF2_APPEND_SRC_OBJECT SERVICE_I_ASSI SERVICE_I_ASSI.
XDF2_APPEND_SRC_OBJECT FORM_TYPE FORM_TYPE.
XDF2_APPEND_SRC_OBJECT Y_V_PARTNER_FLAG Y_V_PARTNER_FLAG.
XDF2_APPEND_SRC_OBJECT JOB_OUTPUT_INFO JOB_OUTPUT_INFO.
CALL TRANSFORMATION ID
SOURCE (XDF2_SRC_OBJECTS)
RESULT XML XDF2_DOCUMENT.
CALL FUNCTION 'SSFCOMP_XDF2_OUTPUT'
EXPORTING
DOCUMENT = XDF2_DOCUMENT
EXCEPTIONS
OTHERS = 1.
IF SY-SUBRC <> 0. RAISE ERROR. ENDIF.
ELSE.
%FULLNAME-VARI = %VARIANT.
%VARIANT = SPACE.
IF %HEADER IS INITIAL.
IMPORT HEADER TO %HEADER
REFTAB TO %REFTAB
DOCSTRUC TO %DOCSTRUC
TABDEF TO %TABDEFS
FROM DATABASE STXFCONTR(SF) ID %FULLNAME.
IF SY-SUBRC <> 0.
CALL FUNCTION 'SSFRT_SET_ERROR_PARAMETERS'
EXPORTING I_FORM = 'YCRM_ORDER_SERVICE_RMA'.
CALL FUNCTION 'SSFRT_WRITE_ERROR'
EXPORTING I_ERRNUMBER = SSF_ERR_NO_RUNTIME_OBJECT
I_MSGID = 'SSFCOMPOSER'
I_MSGNO = '002'
I_MSGV1 = 'YCRM_ORDER_SERVICE_RMA'.
PERFORM %RAISE.
ENDIF.
SELECT SINGLE SDATE STIME FROM D010SINF
INTO (%HEADER-SDATE, %HEADER-STIME)
WHERE PROG = '/1BCDWB/SAPLSF00000007'
AND R3STATE = 'A'.
IF SY-SUBRC <> 0.
CLEAR: %HEADER-SDATE,
%HEADER-STIME.
ENDIF.
ENDIF.
LOOP AT %TABDEFS INTO %TABDEF.
CALL FUNCTION 'SSFCOMP_TABLE_DEFINITION'
EXPORTING CPI = %HEADER-CPI
LPI = %HEADER-LPI
CHANGING TABDEF = %TABDEF
EXCEPTIONS OTHERS = 1.
IF SY-SUBRC <> 0. PERFORM %RAISE. ENDIF.
ENDLOOP.
CALL FUNCTION 'SSFRT_SET_REFERENCES'
EXPORTING I_REFTAB = %REFTAB .
CALL FUNCTION 'SSFRT_SET_LANGUAGES'
EXPORTING I_CONTROL_PARAMETERS = CONTROL_PARAMETERS
I_MASTERLANGUAGE = 'E'
I_THRULANG = ' '
I_INSTALL_LANG = ' '
IMPORTING O_LANGUAGES = %LANGUAGES.
%HEADER-LANGU = %LANGUAGES-LANGU1.
%WEXIT = SPACE.
PERFORM %GLOBAL_CLEAR.
PERFORM %GLOBAL_INIT.
CLEAR %ARCTAB.
IF ARCHIVE_INDEX_TAB[] IS INITIAL.
APPEND ARCHIVE_INDEX TO %ARCTAB.
ELSE.
%ARCTAB = ARCHIVE_INDEX_TAB.
ENDIF.
> CALL FUNCTION 'SSFCOMP_PROCESS_DOCUMENT'
EXPORTING HEADER = %HEADER
DOCSTRUC = %DOCSTRUC
STARTPAGE = CONTROL_PARAMETERS-STARTPAGE
ARCHIV_INDEX_TAB = %ARCTAB
MAIL_APPL_OBJECT = MAIL_APPL_OBJ
IMPORTING RESULT = %RESULT_PD
EXCEPTIONS OTHERS = 1.
IF SY-SUBRC <> 0. PERFORM %RAISE. ENDIF.
DOCUMENT_OUTPUT_INFO = %RESULT_PD.
ENDIF.
The function module 'SSFCOMP_PROCESS_DOCUMENT' is returning sy-subrc value 1.
Could you please tell me how to rectify this error
Thanks and Regards,
Soumya.The error I am getting is a formatting error as shown below:
L_ERROR-MSGTY E
L_ERROR-MSGID SSFCOMPOSER
L_ERROR-MSGV1 YTI_FCR004_RETREP_TYPE -
How to delete a line in smart forms
Hi all
i have data in my itab in following format
Month 1 2 3 4 5 6 7 total
nov a a a a a a a 7a
dec P A P P A p A 4p
3a
i have to print data from col month to 7 in main area of the table in smart forms but it shows the 3rd line as well(an empty extra line) . is there any way that i may be able to delete or truncate third line ? as i have to print total below some where.
Regards
AmmadHi Ammad
i have a solution to ur question.
well u only want to print a line in the smartform Main window table if u have data in the first field of ur internal table lets take name as T_FINAL.
So u want to print lines in Smartform if T_Final-Field1 (which for month) is not empty.
For this go to the Condition tab of the Line (ROW) inside ur MAIN AREA In TABLE which must be there in any window probably in the Main window.
Double click on the Line (ROW) in MAIN AREA, It will contain 2 tabs Output option and Condition.
Click On condition and write under FIELD NAME the field of ur internal table WA u r using in TABLE for eg T_Final-Field1 if its Internal table with header line or if u r using a separate Work area use the work area like WA_Final-FIELD1, then click on the Square button just in front of it to select an RELATIONAL OPERATOR , put there the RELATIONAL OPERATOR as "Not Equal to" and in the comparison value column write a space quoted with single quotation as ' '.
After u do this any line encountered with its first field of WA_FINAL i.e wa_final-field1as empty wont be printed.
This Reloves ur issue.
Regards,
Akash Rana -
How to draw vertical lines in SMART FORMS
Hi Guys,
Can anyone please let me know how to draw vertical and horizontal lines in smart forms, i have to do this in the secondary window.
thanks,
RameshHi Ramesh,
In the window output options you have option of check box to get lines.
Then you need to give the spacing for vertical and horizontal.
Another option is putting a template on window and getting the boxes, but it is quite little bit complex.
Put the cursor on the WINDOW in which the lines you want.
Right click on it>create>complex section.
In that select the TEMPLATE radio button.
Goto TAB TEMPLATE.
Name: give some name of line.
From: From coloumn.
To: To coloumn
Height: specify the height of the line.
Next give the coloumn widths.
Like this you can draw the vertical and horzontal lines.
If the above option doesnot workout then u can try the below option also
any how you can draw vertical and horizontal lines using Template and Table.
for Template First define the Line and divide that into coloumns and goto select patterns and select the required pattern to get the vertical and horizontal lines.
For table, you have to divide the total width of the table into required no.of columns and assign the select pattern to get the vertical and horizontal lines.
if this helps, reward with points.
Regards,
Naveen
Maybe you are looking for
-
My camera does not work? On my new ipad3 any come across this?
It starts to take them and freezes
-
im using ole db provider 9.0.1 with mdac 2.7 on a win 2k system db ver: 8.1.7 anyway, i have a simple view, no lob fields, all number and varchar2 and it has an instead of update, that for this example ill say it does nothing, print a message to the
-
How we can restrict record in CTL file on the basis of other table ?
Hello all, How we can restrict record in CTL file on the basis of other table ? Eg. I have following control file to load the records in the table through the sql loader. LOAD DATA INTO TABLE THIST APPEND FIELDS TERMINATED BY "|" TRAILING NULLCOLS LN
-
Quality of exported slideshow is terrible
Hi all, Using Lightroom 2.0, windows XP (not sure which version of acrobat, sorry). I saw this posted way back in the forums but there never was a solid workaround, conclusion. When I create a slideshow to pdf, the quality of my photos look way too s
-
My Ipad was lost and I used Find my Ipad Application App; I found it But a masaage appears "Looking my Ipad Applicattion Alert" and it is blocked. How can I un block my Ipad?