SAP Smart Forms
How can use multiple tables in SAMART FORM
Hi,
Check the following link:
http://sap-img.com/smartforms/internal-table-in-smartform.htm
Regards,
Bhaskar
Similar Messages
-
Use of SAP Smart Forms - Text Modules
Hi!
One or two questions regarding the SAP Smart Forms text modules.
First: In which table the text name is saved? Is there something like the STXH table for SapScript Objects?
Second: Is it possible to use SmartForm text modules in the text determination for SD (Invoice e.g.)?
I´m looking forward for many answers
Greetings
MarkHi,
From STXL table u can get the text object, id n name pertaining to a text .These things put in FM 'READ_TEXT'. u get the long text...
Instead in smartforms, u can directly include texts using Create-Text, Type Include text...enter the id, name ,lang and object....
Also, for text names, objects and ID..u go to the place where long text has been entered, enter the sapscript editor from there, goto Header...u ll get all the detaails..
hope it helps,
Regards,
Bikash -
SAP Interactive Forms and SAP Smart Forms for Human Capital Management
Hi gurus,
pls help me understand what are SAP Interactive Forms by Adobe and SAP Smart Forms for Human Capital Management (HCM)?
regds
jackread here
http://wiki.sdn.sap.com/wiki/display/ABAP/SAPInteractiveFormsbyAdobe#SAPInteractiveFormsbyAdobe-WhatarethedifferencesbetweenSmartFormsandAdobeForms%3F
What are the differences between Smart Forms and Adobe Forms?
For both of them, SAP dynamically creates a function module that must be called from an ABAP program to generate the form
In Smart Forms, it is possible to add ABAP code during generation of the form, that is not possible with Adobe Forms
It is possible to add javascript or FormCalc code in Adobe Forms, which is executed during the generation of the form
Other differences are indicated in Note 1009567 Functional differences SAP Interactive Forms/Smart Forms
Smart forms Vs PDF print forms - pros and cons, by Francois Gendebien, 2007/04/30
Use smartforms compatible interfaces with PDF forms, by Francois Gendebien, 2007/03/16 -
Hi Frendz,
Can you pls give me any exercise on Smart forms ? i am learning sap smart forms.
Points for sure
VijayaCheck This...
www.sap-press.com/downloads/h955_preview.pdf
help.sap.com/bp_presmartformsv1500/html/EXAMP.HTM
SAP Smartforms can be used for creating and maintaining forms for mass printing in SAP Systems. The output medium for Smartforms support printer, fax, e-mail, or the Internet (by using the generated XML output).
According to SAP, you need neither have any programming knowledge nor use a Script language to adapt standard forms. However, basic ABAP programming skills are required only in special cases (for example, to call a function module you created or for complex and extensive conditions).
1. Create a new smartforms
Transaction code SMARTFORMS
Create new smartforms call ZSMART
2. Define looping process for internal table
Pages and windows
First Page -> Header Window (Cursor at First Page then click Edit -> Node -> Create)
Here, you can specify your title and page numbering
&SFSY-PAGE& (Page 1) of &SFSY-FORMPAGES(Z4.0)& (Total Page)
Main windows -> TABLE -> DATA
In the Loop section, tick Internal table and fill in
ITAB1 (table in ABAP SMARTFORM calling function) INTO ITAB2
3. Define table in smartforms
Global settings :
Form interface
Variable name Type assignment Reference type
ITAB1 TYPE Table Structure
Global definitions
Variable name Type assignment Reference type
ITAB2 TYPE Table Structure
4. To display the data in the form
Make used of the Table Painter and declare the Line Type in Tabstrips Table
e.g. HD_GEN for printing header details,
IT_GEN for printing data details.
You have to specify the Line Type in your Text elements in the Tabstrips Output options.
Tick the New Line and specify the Line Type for outputting the data.
Declare your output fields in Text elements
Tabstrips - Output Options
For different fonts use this Style : IDWTCERTSTYLE
For Quantity or Amout you can used this variable &GS_ITAB-AMOUNT(12.2)&
5. Calling SMARTFORMS from your ABAP program
REPORT ZSMARTFORM.
Calling SMARTFORMS from your ABAP program.
Collecting all the table data in your program, and pass once to SMARTFORMS
SMARTFORMS
Declare your table type in :-
Global Settings -> Form Interface
Global Definintions -> Global Data
Main Window -> Table -> DATA
Written by : SAP Hints and Tips on Configuration and ABAP/4 Programming
http://sapr3.tripod.com
TABLES: MKPF.
DATA: FM_NAME TYPE RS38L_FNAM.
DATA: BEGIN OF INT_MKPF OCCURS 0.
INCLUDE STRUCTURE MKPF.
DATA: END OF INT_MKPF.
SELECT-OPTIONS S_MBLNR FOR MKPF-MBLNR MEMORY ID 001.
SELECT * FROM MKPF WHERE MBLNR IN S_MBLNR.
MOVE-CORRESPONDING MKPF TO INT_MKPF.
APPEND INT_MKPF.
ENDSELECT.
At the end of your program.
Passing data to SMARTFORMS
call function 'SSF_FUNCTION_MODULE_NAME'
exporting
formname = 'ZSMARTFORM'
VARIANT = ' '
DIRECT_CALL = ' '
IMPORTING
FM_NAME = FM_NAME
EXCEPTIONS
NO_FORM = 1
NO_FUNCTION_MODULE = 2
OTHERS = 3.
if sy-subrc <> 0.
WRITE: / 'ERROR 1'.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
call function FM_NAME
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
CONTROL_PARAMETERS =
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
OUTPUT_OPTIONS =
USER_SETTINGS = 'X'
IMPORTING
DOCUMENT_OUTPUT_INFO =
JOB_OUTPUT_INFO =
JOB_OUTPUT_OPTIONS =
TABLES
GS_MKPF = INT_MKPF
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.
Additional Fonts for your SMARTFORMS
You can create additional fonts and style with transaction SMARTSTYLES
This can then be define in the paragraph and character formats, which you can then be assign to texts and fields in the Smart Form.
The character formats includes effects such as superscript, subscript, barcode and font attributes. -
How to print BAR CODE in SAP SMART FORMS
Hi,
I want to print inspection lot's BAR CODE in the smart form, but i dont know the way how to print this into the smartform.
if anyone have any idea, please suggest me how to print this as it is urgent for me to complete the object.
Thanks in advance.
Best Regards,
Abnish JainHello Abnish,
Welcome to SDN.
We are able to print barcodes from smartforms. Doing this way, we print barcodes on laser printers.
We are also printing from sap to zebra printers using two ways:
1. Download the data to an excel sheet, then creating a macro that opens the printer port and sending the commands to the printer through this "file". All this is done via vb script provided with excel)..
2. The second way is creating a vbscript (an ascii file from sap) with the printer commands and then runing it using ws_execute.
You need a barcode reader to read the barcodes, and this scanner acts like a keyboard, it sends the data scanned to the active field on screen. (which might be a notepad, word, excel or an input field or ... ).
From 4.6c on, you can use smartforms to print barcodes without buying any barcode.dll software nor hardware extention like Bardimm on any laser/inkjet printer (Please Note that I haven't mentioned Zebra printers here!). To do this, you have to create a smartstyle -> character format with the desired barcode font (defined within sap). Then in the smartform, create a window, put the field and associate it the character format. That's all (I mean, that's all we do at least :-). I think, you have to consider the barcode specifications before sending the barcode value to the smartform (Just an example, if you're using 3 of 9, the code should start and end with an asterisk - '*' -) We're printing an interleaved 2 out of 5 barcode in our invoices due to a legal requirement, and we did it this way.
3. If you have a barcode scanner, then you should not need reading the barcode into an ascii file to get the data read in an standard or custom screen field. You can read it directly to the field you want. (unless... you have complex data coded in the barcode - for example if you're using an ean-ucc 128 compliant code and you're sending several fields in a single code ... In this case, an interface is almost mandatory because you must interpret the data fields according to the ucc standard, split the code into several fields .... and .... pure programming logic ).
To put it clear: if you have to read, for example, a barcode that holds the legal number of an invoice using a barcode scanner and this number should be sent to migo-> bktxt then you don't need an interface. The scanner itself acts like a fast operator entering the characters using a keyboard and filling in the field.
We're reading barcodes in several places (when we finish each pallet, when we receive an invoice, and so on. Each case is a different screen. We arent using an ascii file to read these barcodes. Furthermore, we read the invoice legal number into migo bktxt field (Head Text).
http://www.sap-img.com/abap/questions-about-bar-code-printing-in-sap.htm
Regards
Naren -
How to Print form using SAP Smart Forms which is migrated from SAP Script?
Hello every one,
i have a problem in printing form using smart form which is migrate from the SAP Script...so what method i have to use...if any one know the solution for this than plz reply me as soon as possible...hi
when ever u want to migrate the script to smartform u have to chage the driver program also..
refere this link to convert script to smartform
convert sapscript to smartform
c_formname = u r smartform name...
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = c_formname
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.
endif. -
hi,
i have one logo and i want to insert that logo into the smart forms
so can u suggest me the steps to insert that logo in smart forms.
regards,
kamalHi
SAP SCRIPT
To create a logo in SAP printouts just do the following
1. Save a Logo using Imaging, Paint shop Pro or Corel Draw as Tiff file.
2. Run program RSTXLDMC and enter the following parameters
Enter file name C:\COMPLOGO.TIF
UOM CM
Line width for text 132
Text name ZHEX-MACRO-COMPLOGO
Text ID ST
Text language = E
Number of Tiff gray levels (2,4,9) 2
3. Then Create a new window 'COMP' with attributes;
Window COMP description Company Logo
Left margin 7.00 CH window width 10.00 CH
Upper margin LN window height 8.00 LN
Finally in the text element, mention
/: INCLUDE 'ZHEX-MACRO-COMPLOGO' OBJECT TEXT ID ST LANGUAGE 'E'.
Please note that if object name is not indicated as 'ZHEX... the logo may not be printed!
You will not be able to see the logo in a test print. The same will be printed in actual printout.
SMARTFORM
1) In Smart Forms Editor, In left pane, right Click any Page (say Page1) and select Create -> Window, Give it a name and Description (Say Window1)
2) Right Click on Window (Window 1) and select Create -> Graphics, Give it a name and description
3) In general Attributes, Select Name, get search help (F4) , you will find a list of pictures
4) Select any picture and set its Resolution in DPI
5) Press F9 to open Smart Forms Builder, Select window (Window1) and In Output options window set, size and position of the Logo
6) Set any other parameters if required, save and activate.
7) If there is only 1 Window in the forms, set it as Main Window in general attributes.
8) Use TCode SE78 to upload new pictures and logos.
look at Thread Dynamic Graph in smartforms
Refer the links also -
Re: Dinamic Graph in smartforms
How to get file perperties in Unix server
Regards
Anji -
Problem while sending fax through a SAP Smart Form
Hi,
I am trying to send fax through a smartform but it is not working, please see the details below.
I am calling the Function Module "SSF_FUNCTION_MODULE_NAME" in a PAI event. After storing the FM name "/1BCDWB/SF00000029"in a local variable "ls_frm_name", I am using that for printing the Form and at the same time to fax out the same by passing the following export parameters.
control_parameters type ssfctrlop with values
la_ssfctrlop_struc-device = 'TELEFAX'.
la_ssfctrlop_struc-no_dialog = 'X'.
la_ssfctrlop_struc-langu = ls_supplier_info-spras.
output_options type ssfcompop with values
ls_ssffaxop_struc-tdteleland = ls_supplier_info-land1.
ls_ssffaxop_struc-tdtelenum = lfa1-telfx.
ls_ssffaxop_struc-tdfaxuser = syst-uname.
ls_ssffaxop_struc-tdnoprint = 'X'.
along with "fax_details = ls_zap1_fax_details" declared as interface parameters to the Smart Form.
But the Function Module is throwing following exception and not sending any Fax.
SY-MSGID-->OL
SY-MSGNO-->356
SY-MSGV1-->NOAUTHORITYCHECK
Do I need to pass any other values to the FM, I felt that this is not an authorization problem after debugging.
Can any one please help me in handling this exception and send the fax,
Thanks,
Srinivas.
Edited by: Venkata Srinivas Inavilli on May 20, 2008 2:40 PMmay it be that in those cases where it doesnt work, that you got no fax number?
Since it works soemtimes, it seems there are no errors, but rather in some cases some important info is missing, fax number may be one of thsoe important info in a FAX scenario. -
hi!
I am trying to print one smart from through print program.
the name of smart form is ztestform.
and the name of the function module is /1BCDWB/SF00000099
I am writing following print program.
REPORT ZSMARTFORM.
data fname(30).
CALL FUNCTION '/1BCDWB/SF00000099'
EXPORTING
formname = 'ztestform'
IMPORTING
fm_name = fname.
call function fname.
and it returns with the error " function parameter form name is unknown"
so what should i do?
points will be awarded.
Cheers
Troy.Hi Troy,
Use FM SSF_FUNCTION_MODULE_NAME.
pass smartform name . it will give u SF function name. u call that fm.
Please refer this code :
data : p_form type TDSFNAME.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
FORMNAME = P_FORM
VARIANT = ' '
DIRECT_CALL = ' '
IMPORTING
FM_NAME = P_FUNCTION
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 P_FUNCTION
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
CONTROL_PARAMETERS =
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
OUTPUT_OPTIONS =
USER_SETTINGS = 'X'
IMPORTING
DOCUMENT_OUTPUT_INFO =
JOB_OUTPUT_INFO =
JOB_OUTPUT_OPTIONS =
TABLES
D_VBRK = IT_VBRK
D_VBRP = IT_VBRP
D_LIKP = IT_LIKP
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.
Reward points if helpful.
Regards,
Hemant -
Not allow anybody change SAP Smart Forms
Hi expert,
I design some Smart Forms and now i want to protect it and only me allow change that.( I don't allow anybody change my own smart form)
please guide me the way to do that.
Thanks & best regards,
Dungnv.Thanks,
if put it in transport request then not change on another client.
i have aready know the way other lock SF.
Thanks so much,
Dungnv -
The body in SAP Smart Forms email message
Hi Experts,
i have a requirement, in smart forms, we did the form to be sent to the email as pdf. we want to add some text in the body of the emil message. can we do this?the following is the code for send the mail with both subject and body .plz go thru. hope it will be helpful.
Creating the document to be sent with success message.
IF gt_error IS INITIAL.
gs_doc_chng-obj_name = 'Standard Price'(010).
gs_doc_chng-obj_descr = 'Material Standard Price update Successful'(011)
gs_objtxt = 'Materials updated Sucessfully with new Standard Price'(012)
APPEND gs_objtxt TO gt_objtxt.
LOOP AT gt_success INTO gs_success.
gs_objtxt = gs_success.
APPEND gs_objtxt TO gt_objtxt.
ENDLOOP.
ELSE.
Creating the document to be sent with error message.
gs_doc_chng-obj_name = 'Error Price'(002).
gs_doc_chng-obj_descr = 'Material Standard Price Updation Errors'(003)
gs_objtxt = 'The following Material Numbers failed to update'(004).
APPEND gs_objtxt TO gt_objtxt.
LOOP AT gt_error INTO gs_error.
gs_objtxt = gs_error.
APPEND gs_objtxt TO gt_objtxt.
ENDLOOP.
IF gt_success IS NOT INITIAL.
gs_objtxt = 'Materials updated Sucessfully with New Standard Price'(012)
APPEND gs_objtxt TO gt_objtxt.
LOOP AT gt_success INTO gs_success.
gs_objtxt = gs_success.
APPEND gs_objtxt TO gt_objtxt.
ENDLOOP.
ENDIF.
ENDIF.
DESCRIBE TABLE gt_objtxt LINES gv_tab_lines.
READ TABLE gt_objtxt INTO gs_objtxt INDEX gv_tab_lines.
gs_doc_chng-doc_size = ( gv_tab_lines - 1 ) * 255 + STRLEN( gs_objtxt )
Creating the entry for the compressed document
CLEAR gs_objpack-transf_bin.
gs_objpack-head_start = 1.
gs_objpack-head_num = 0.
gs_objpack-body_start = 1.
gs_objpack-body_num = gv_tab_lines.
gs_objpack-doc_type = 'RAW'.
APPEND gs_objpack TO gt_objpack.
Entering names in the distribution list
IF p_plist IS NOT INITIAL.
gs_reclist-receiver = p_plist.
gs_reclist-rec_type = gc_c.
APPEND gs_reclist TO gt_reclist.
CLEAR gs_reclist.
ENDIF.
Populating the reciever list
gs_reclist-receiver = p_plist.
gs_reclist-rec_type = gc_u.
APPEND gs_reclist TO gt_reclist.
Sending the document
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = gs_doc_chng
put_in_outbox = gc_x
commit_work = gc_x
TABLES
packing_list = gt_objpack
object_header = gt_objhead
contents_bin = gt_objbin
contents_txt = gt_objtxt
receivers = gt_reclist
EXCEPTIONS
too_many_receivers = 1
document_not_sent = 2
operation_no_authorization = 4
OTHERS = 99.
CASE sy-subrc.
WHEN 0.
WRITE: 'eMail sent successfully'(005).
WHEN OTHERS.
WRITE: / 'eMail could not be sent'(008).
ENDCASE.
ENDFORM. " send_log_mail -
Hi,
I am working on Smart forms. I have developed a form(on 4.6c R/3 system) that creates a XML file. I need this Smart form to be available on EP6.
Please forward me the document that explains, how to do this.
Please see, we are using EP 6.0 on web server 6.20 but our R/3 systems are not on the Web Servers.
Please help..
Regards
Message was edited by: Fatima ShahpurwalaA sapscript or smartform can be used within any print program without any configuration.
So no table will give you exact information about the print program of sapscript or smartform.
You can find print program associated with a form (read sapscript smartform) if that form is configured with some output type. But this list will not be exhaustive. In other words there still can be other print program using the form but not listed in TNAPR table. -
SAP Smart Forms: Drag & Drop of fields into editor not possible
Hi Guys,
In the SAP Form Builder I can't move elements out of the field list into my editor by using drag & drop. Or I'm doing something wrong, no idea.
It seems like to drag them is possible, but it's not possible to drop them. I can edit them manually, but that's a little circular.
I know that's not a big problem, but I think the solution is very complex (I hope so).
Hope you can help,
best regards,
tannatThank you for this hint.
Any idea which SP Level I have to reach?
Currently there's SAP Basis Release 700, Level 16 installed.
Regards,
Tannat -
SAP Smart Forms: General Indicator(Already sort)check box
If in the form interface a tables was passed that was sorted before by the application, and it is now processed in the loop of a data node, we must again list the sort fields explicitly and, in addition, mark the checkbox "already sorted".
I have given the fields name and trying to sort again with other fields but it seems that the sorting is not done.
Is it some thing which I am missing..
let me know.
Thanks,Hi Krishna,
I am sorting the material for pick and pack for delivery.
I have five field in the form
Material
Material description.
size
color
quant
The internal table is sorted table and if I just gave the material field(checked the Event on Sort field)..It gives an error as internal table is a table of sorted,you cannot use the use sort command as an error
If I check the already sorted I am able to activated without any error but in the form output the material is not sorted.
As you mentioned If I try to create the table line in the event for material and there are about 5 table lines created and how/what fields should I map there.
Thanks for suggestion and please suggest what field should I map in the field.
Please let me know.
Thanks,
Edited by: mark_yellow mark on Jul 3, 2008 5:56 PM -
How to adjust data in first and next pages in sap smart forms ?
Hello,
i am creating a purchase order and displaying it in a smartform. I have a main window in which i have a table listing the material details nested with item asscoiated with it. Underneath this table/main window, i have another window containing some 'special instructions'. And underneath this window i have another window which acts as a footer(signatures).
Now what happens is that when i increase the no of items against a material in purchase order or input too many materials , my table gets cut and goes on to the next page ( which looks bad ).
according to you what should i do ? or can i calculate or check the number of entries in the table and if they exceed the height of the main window, take the main window or the table to the next page(so that it doesnt get cut) ??
help needed ,, thanks....Hi,
If the no. of line items are more then the data has to overflow into the next page. However, if the data is getting cut at the row level, meaning half of the data that belongs to the row is being split into two pages, then you can switch in the PAGE PROTECT mode at the line level.
This will make sure that row is either completely displayed in the same page or the next page.
Regards,
Ravi
Note : You have quite a few threads open, please mark all the helpful answers and close the threads if the questions are answered
Maybe you are looking for
-
ITunes 10.5 breaks automator folder action
Just like itunes10 did osx 10.6.8 itunes 10.5 automator folder action with itunes tasks no longer works after 10.5 update. Is it the version check again?
-
Can we edit simultaneously in Pages for iCloud and Pages for OS X?
I know that it's possible for multiple users to edit a document in Pages for iCloud (beta). But what happens if one user is using Pages for iCloud, and another person is editing the same document in Pages for OS X? Will the changes be updated in real
-
my magsafe keeps sucking my usb key drives or adapters for SD cards. when i try to plug into the left port naturally, somtimes accidentally the usb port gets sucked by the magsafe port and the usb plug attaches to the magsafe port. not sure what the
-
Iphoto has stopped sharing my photos to facebook
My iphoto 09 has stopped exporting/sharing my photos to facebook. I always uploaded in this manner earlier, but for some strange reason, it doesnt work with a click of a button anymore. If I click on the FB icon, after selecting the respective album,
-
the screen of my iphone 3GS has permanently zoomed in.. i tried tapping it twice but it didnt work. any one knows how to zoom it out?