SMARTFROMS
WHAT R THE POSSIBLE INTERVIEW QUESTIONS IN SMARTFORMS?
Smart forms Frequently Asked Questions
Forcing a page break within table loop
Create a loop around the table. Put a Command node before the table in the loop that forces a NEWPAGE on whatever condition you want. Then only loop through a subset of the internal table (based on the conditions in the Command node) of the elements in the Table node.
Font style and Font size
Goto Transaction SMARTSTYLES.
There you can create Paragraph formats etc just like in sapscript.
Then in your window under OUTPUT OPTIONS you include this SMARTSTYLE and use the Paragraph and character formats.
Line in Smartform
Either you can use a window that takes up the width of your page and only has a height of 1 mm.
Then you put a frame around it (in window output options).
Thus you have drawn a box but it looks like a line.
Or you can just draw "__" accross the page and play with the fonts so that it joins each UNDER_SCORE.
Difference between 'forminterface' and 'global definitions' in global settings of smart forms
The Difference is as follows.
To put it very simply:
Form Interface is where you declare what must be passed in and out of the smartform (in from the print program to the smartform and out from the smartform to the print program).
Global defs. is where you declare data to be used within the smartform on a global scope.
ie: anything you declare here can be used in any other node in the form.
Smartforms function module name
Once you have activated the smartform, go to the environment -> function module name. There you can get the name of funtion module name.
The key thing is the program that calls it. for instance, the invoice SMARTFORM LB_BIL_INVOICE is ran by the program RLB_INVOICE.
This program uses another FM to determine the name of the FM to use itself. The key thing is that when it calls this FM (using a variable to store the actual name), that the parameters match the paramters in your smartform.
Another thing to note is that the FM name will change wherever the SF is transported to.
So you need to use the FM to determine the name of the SF.
Here is the code that can be use to determine the internal name of the function module:
Code:
if sf_label(1) <> '/'. " need to resolve by name
move sf_label to externalname.
call function 'SSF_FUNCTION_MODULE_NAME'
exporting
formname = externalname
importing
fm_name = internalname
exceptions
no_form = 1
no_function_module = 2
others = 3.
if sy-subrc <> 0.
message 'e427'.
endif.
move internalname to sf_label.
endif.
It checks to see if the sf_label starts with a '/', which is how the internal names start. if it does, the name has already been converted. If not, it calls the FM and converts the name.
You would then CALL FUNCTION sf_label.
Smartforms FAQ Part Two
Smartforms output difference
Problem with Smartforms: in a certain form for two differently configured printers, there seem to be a difference in the output of characters per inch (the distance between characters which gives a layout problem - text in two lines instead of one.
It happens when the two printers having different Printer Controls' if you go to SPAD Menu (Spool Administrator Menu) you can see the difference in the Printer Control and if you make the Printer control setting for both the printers as same. then it will be ok. and also u have to check what is the device type used for both the output devices.
SmartForms Output to PDF
There is a way to download smartform in PDF format.
Please do the following:
1. Print the smartform to the spool.
2. Note the spool number.
3. Download a PDF file (Acrobat Reader) version of the spool by running Program RSTXPDFT4 and entering the
noted spool number.
SmartForm Doublesided printing question
Your customer wants your PO SmartForm to be able to print "Terms and Conditinos" on the back side of each page. They don't want to purchase pre-printed forms with the company's logo on the front and terms & conditions on the back. Now this presents an interesting problem.
Has anyone else ever had a request like this? If for example there was a 3 page PO to be printed, they want 3 pieces of paper, the front side of each to containe the PO information (page 1, 2, and 3) and the back side of each piece of paper to containg the static "Terms & Conditions" information.
Anyone have a clue how to force this out?
Easy - page FRONT lists page CONTACTS as next page and CONTACTS lists FRONT as next page. Since CONTACTS does not contain a MAIN window, it will print the contacts info and then continue on to FRONT for the rest of the main items. Additionally, set print mode on FRONT to D (duplex) and set CONTACTS to 'blank' (for both resource name and print mode - this is the only way to get to the back of the page).
Transport Smart Forms
How does one transport SMARTFORM? SE01?
How do you make sure that both, the SMARTFORM & it's function module gets transported? Or does the FM with same name gets generated automatically in the transported client?
A smartform is transported no differently than any other object. if it is assigned to a development class that is atteched to a transport layer, it will be transported.
The definition is transported, and when called, the function module is regenerated.
This leads to an interetsing situation. On the new machine, it is very likely the function module name will be different than the name on the source system. Make sure, before you call the function module, you resolve the external name to the internal name using the 'SSF_FUNCTION_MODULE_NAME' function module.
Typically, generate the SF, then use the pattern to being in the interface. Then change the call function to use the name you get back from the above function module.
Smartforms: protect lines in main window.
How to protect lines in the main window from splitting between pages?
It was easy with SAPscript, but how to do it with SF's. For 4.7 version if you are using tables, there are two options for protection against line break:
- You can protect a line type against page break.
- You can protect several table lines against page break for output in the main area.
Protection against page break for line types
- Double-click on your table node and choose the Table tab page.
- Switch to the detail view by choosing the Details pushbutton.
- Set the Protection against page break checkbox in the table for the relevant line type. Table lines that use this line type are output on one page.
Protection against page break for several table lines
- Expand the main area of your table node in the navigation tree.
- Insert a file node for the table lines to be protected in the main area.
- If you have already created table lines in the main area, you can put the lines that you want to protect again page break under the file using Drag&Drop. Otherwise, create the table lines as subnodes of the file.
- Choose the Output Options tab page of the file node and set the Page Protection option. All table lines that are in the file with the Page Protection option set are output on one page.
In 4.6, Alternatively in a paragraph format use the Page protection attribute to determine whether or not to display a paragraph completely on one page. Mark it if you want to avoid that a paragraph is split up by a page break. If on the current page (only in the main window) there is not enough space left for the paragraph, the entire paragraph appears on the next page.
also refer
http://searchsap.techtarget.com/general/0,295582,sid21_gci1110010,00.html
http://www.sapbrainsonline.com/ARTICLES/TECHNICAL/SMARTFORMS/smartforms.html
<a href="http://myweb.dal.ca/hchinni/sap/smartforms/SmartForms.doc">very good one</a>
regards,
srinivas
<b>*reward for useful answers*</b>
Similar Messages
-
hi all
i have requirement that i should print label like
ordno .............................. ordno...............
name .............................. name................
carton.............................. carton..............
description....................... description...............
ordno .............................. ordno...............
name .............................. name................
carton.............................. carton..............
description....................... description...............
how can i do this in smartfroms
regards
loekshHi Lokesh,
you can maintain 4 different sets of variables for ordno, name, carton and desc and in 1 Loop you should read the next 3 records also pass the values for the 4 sets of variables and print them in 1 loop pass. after that you will have to skip 3 loop passes as you have already printed them in previous pass and continue occordingly. this will be something like this
w_ordno1 .............................. w_ordno2...............
w_name1 .............................. w_name2................
w_carton.............................. w_carton2..............
w_description....................... w_description2...............
w_ordno3 .............................. w_ordno4...............
w_name3.............................. w_name4................
w_carton3.............................. w_carton4..............
w_description3....................... w_description4............... -
Hi experts,
From my report i have to genarate 3 smartfroms by clicking checkboxes in report.so 3 smartfroms are coming fine.when i press back for each smartfrom it should genarate pDF for that smartfrom.
in mycode i ma using 3 Convert_off FM's ...
if check1 = 'x'.
some code..
CALL FUNCTION GS_FMNAME
EXPORTING
ARCHIVE_INDEX = toa_dara
ARCHIVE_PARAMETERS = arc_params
CONTROL_PARAMETERS = ls_control_param
GV_BSTNK = GV_BSTNK
GV_BSTDK = GV_BSTDK
GV_VBELN = GV_VBELN
GV_NAME1 = GV_NAME1
IMPORTING
document_output_info = lt_ssfcrespd
job_output_info = lt_job_output_info
job_output_options = lt_ssfcresop
lt_otf = lt_job_output_info-otfdata
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
format = 'PDF'
max_linewidth = 132
IMPORTING
bin_filesize = lv_bin_filesize
TABLES
otf = lt_job_output_info-otfdata"lt_otf
lines = lt_pdf_tab
EXCEPTIONS
err_max_linewidth = 1
err_format = 2
err_conv_not_possible = 3
err_bad_otf = 4
if check2 = 'x'.
some code..
CALL FUNCTION GS_FMNAME
EXPORTING
ARCHIVE_INDEX = toa_dara
ARCHIVE_PARAMETERS = arc_params
CONTROL_PARAMETERS = ls_control_param
GV_BSTNK = GV_BSTNK
GV_BSTDK = GV_BSTDK
GV_VBELN = GV_VBELN
GV_NAME1 = GV_NAME1
IMPORTING
document_output_info = lt_ssfcrespd
job_output_info = lt_job_output_info
job_output_options = lt_ssfcresop
lt_otf = lt_job_output_info-otfdata
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
format = 'PDF'
max_linewidth = 132
IMPORTING
bin_filesize = lv_bin_filesize
TABLES
otf = lt_otf
lines = lt_pdf_tab
EXCEPTIONS
err_max_linewidth = 1
err_format = 2
err_conv_not_possible = 3
err_bad_otf = 4
OTHERS = 5.
if check3 = 'x'.
CALL FUNCTION GS_FMNAME
EXPORTING
ARCHIVE_INDEX = toa_dara
ARCHIVE_PARAMETERS = arc_params
CONTROL_PARAMETERS = ls_control_param
GV_BSTNK = GV_BSTNK
GV_BSTDK = GV_BSTDK
GV_VBELN = GV_VBELN
GV_NAME1 = GV_NAME1
IMPORTING
document_output_info = lt_ssfcrespd
job_output_info = lt_job_output_info
job_output_options = lt_ssfcresop
lt_otf = lt_job_output_info-otfdata
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
format = 'PDF'
max_linewidth = 132
IMPORTING
bin_filesize = lv_bin_filesize
TABLES
otf = lt_otf
lines = lt_pdf_tab
EXCEPTIONS
err_max_linewidth = 1
err_format = 2
err_conv_not_possible = 3
err_bad_otf = 4
OTHERS = 5.
Problem is for firstsmart form if i pass lt_job_output_info-otfdata directly to convert off fm pdf is generating...but for others ieven i pass lt_otf is working..HOW COME it is..
Can anybody plz check this...Yes Madhu .
I want all Invoices in single PDF file after VF31.
Im running BDC for VF31
Calling the spool request from tsp01 table for the delivery invoice number then using
call function 'CONVERT_OTFSPOOLJOB_2_PDF'
exporting
src_spoolid = wa_tsp01-rqident
no_dialog = 'X'
pdf_destination = 'X'
no_background = sy-batch
importing
bin_file = pdf_xstring
tables
pdf = it_tline
exceptions
err_no_otf_spooljob = 1
err_no_spooljob = 2
err_no_permission = 3
err_conv_not_possible = 4
err_bad_dstdevice = 5
user_cancelled = 6
err_spoolerror = 7
err_temseerror = 8
err_btcjob_open_failed = 9
err_btcjob_submit_failed = 10
err_btcjob_close_failed = 11
others = 12.
After this Im attaching in in the mail.
Regards
Severina -
THIS IS URGENT
when iam giving print preview iam able to get it but when iam giving the print iam getting error called 'ERROR IN GENERATING SMARTFORM' this program is already exsisting . i made some changes in the smartfrom in positioning for some of the windows. and after that iam not able get the print out
please help me, hope i will be getting the solution.
PRINT PROG.
DATA g_fmname TYPE rs38l_fnam.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
PARAMETERS: p_vbeln TYPE vbrk-vbeln.
SELECTION-SCREEN END OF BLOCK b1.
START-OF-SELECTION.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = 'ZSD_SMRTSALEINVOICE1'
IMPORTING
fm_name = g_fmname
EXCEPTIONS
no_form = 1
no_function_module = 2
OTHERS = 3.
IF sy-subrc <> 0.
MESSAGE 'Error in opening the smartform'
TYPE 'I'.
LEAVE LIST-PROCESSING.
ENDIF.
CALL FUNCTION g_fmname
EXPORTING
s_vbeln = p_vbeln
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5.
IF sy-subrc <> 0.
MESSAGE 'Error in generating the smartform'
TYPE 'I'.
LEAVE LIST-PROCESSING.
ENDIF.
*these are the warnings iam getting inthe when i activate the smartform.*
@8R@ TOTAMT Field g_totinv has no defined value
@8R@ ROUNDEDVAL Field G_DIFFV has no defined value
@8R@ TCSAMT Field G_SCRAP has no defined value
@8R@ INSURANCEAMT Field G_INS has no defined value
@8R@ FREIGHTAMT Field G_FREIGHT has no defined value
@8R@ OCTAMT Field G_OCTRAI has no defined value
@8R@ VATAMT Field G_VAT has no defined value
@8R@ SALESTAXAMOUNT Field G_SALESTAX has no defined value
@8R@ SUBTOTAL_V Field G_SUBTOT has no defined value
@8R@ DEVOLOPMENTCHARGES_V Field G_DEVCHG has no defined value
@8R@ PACANDFARWORDINGAMT Field G_PAC has no defined value
@8R@ DISCOUNTSVAL Field g_disc has no defined value
@8R@ HRECSAMT Field G_HRECESS has no defined value
@8R@ CESAMT Field G_CES has no defined value
@8R@ CEDAMT Field G_CED has no defined value
@8R@ AMOUNT Field G_TOT has no defined valueThanks for solution.
I actually commented the sy-subrc <> 0. line and again uncommented the line and tried it and I got it. Well that answer is solved and iam getting the print out . but now the another big problem has arisen. The form has many fields some fields are coming into as per the bill document number but some fields are remaining same, for any bill document number these fields details coming same.
Please help me. -
Is it possible to call a smartfrom within a smartform? if yes how ?
Is it possible to call a smartfrom within a smartform? if yes how ?
Calling or embedding?
It is not possible to embed a smartform into another one (like subscreens within dynpros)
For calling, I don't know, but I wouldn't try -
How to read two more tables in smartfroms
Hi experts,
I am working in smartforms, i am having sales order no, using this sales order i have get customer name.
I am not familar with smart forms.
How to put this logic in smartfroms .
already i am having vbeln.
using vbeln I have go to vbpa and get vbpa-kunnr
using kunnr I have go to kna1 and get kna1-name1
where I should define and how to define, (form interface or global defination)
where should write select stmt.
please advice.
Thanks,
Mahame.Hi,
To start with you can test this on a single window eg Main window.
Under main window you can add a program line
ie Right click Create -> Flow logic -> Program line.
Now in this program line you can use a join query as per your condition.
Then create a loop under main window
ie Right click Create -> Flow logic -> Loop
In this mention the input and output parameters
Eg input para as v_matnr
output para as w_mara, t_mara.
Then create a text component under loop.
ie Right click Create -> Text
and in this you can display your fields
Note : you need to declare the input parameters in the form interface
and outparameters under global definition.
Hope this would hep you.
Regards,
Ranjith N -
How to check versions of a smartfroms
Hi Experts,
Can you tell me how to check different versions of smartfroms.
Regards,
Kali Pramodi think u cannot maintain versions for smartforms.
-
Change the value of parameter in smartfrom by program lines...!
Hi experts.........!
i want to change the value of parameter 'x1' which i import from program has a value 'ECNC' and want to display in output of smartfrom as 'ECNEC'. how i change it from program lines.
I use program lines to change its value....... use input parameter 'x1' and output paramter 'x1'
and program lines are
IF x1 = 'ECNC'.
x1 = 'ECNEC'.
ENDIF.
and in condition i use
x1 = 'ECNC'
but it doesn't effect output is same as it show the value of x1 = 'ECNC' when i execute the program.
How i change the value of x1 to 'ECNEC'
Plz help me.......!
Thanx in advance....!Hi ,
Have you declared the Variable X1 under Global Definitions ?
please debug the Smartform by the following way.
Goto the generated Function module - > Search for your Variable X1 ( Choose Main program )- > Set Break point
Debugger will be called after giving printing parameter automatically. Check it whether value get changed ( Your Code is working or not ). -
How can i send the data from WD to SMARTFROMS to fill it?
Hi All,
how can i send the data from WD to SMARTFROMS to fill it?
Best RegardsHello
After conferring with a colleague, the following response may help:
The Smart Form doesn't have any special integration in WebDynpro.
Therefore the application should implement it especially.
Steps:
1) Call of Smart Forms in mode GET_OTF
2) Convert OTF to PDF
3) Show the PDF in WD Context Node
Similar topic was discussed here:
Re: Displaying Smartforms in Webdynpro ABAP
Thanks
Kind Regards
Toros Aledjian
Edited by: Toros Aledjian on Nov 29, 2010 8:43 AM -
Dear Friends,
I developed a code for SD module for RAS GAS invoice. It it I m accessing it through VF02. on output there will be a smartform appered for invoice.
I tested the driver code and smartform individually and had no errors.
I attached the driver code and form through NACE for run time.
Now when I m executing it through VF02 , when I clicked on print preview it throws a error as show.
Plz help me to remove it. Error analysis and piece of code is attached.
Thanx and regards,
Error analysis
An exception occurred. This exception is dealt with in more detail below
. The exception, which is assigned to the class 'CX_SY_DYN_CALL_ILLEGAL_TYPE',
was neither
caught nor passed along using a RAISING clause, in the procedure "PROCESSING"
"(FORM)"
Since the caller of the procedure could not have expected this exception
to occur, the running program was terminated.
The reason for the exception is:
The call to the function module "/1BCDWB/SF00000193" is incorrect:
In the function module interface, you can specify only
fields of a specific type and length under "ITVBRK".
Although the currently specified field
"ITVBRK" is the correct type, its length is incorrect.
Information on where terminated
The termination occurred in the ABAP program "ZV_RASGAS " in "PROCESSING".
The main program was "SAPMV60A ".
The termination occurred in line 633 of the source code of the (Include)
program "ZV_RASGAS "
of the source code of program "ZV_RASGAS " (when calling the editor 6330).
Processing was terminated because the exception "CX_SY_DYN_CALL_ILLEGAL_TYPE"
occurred in the
procedure "PROCESSING" "(FORM)" but was not handled locally, not declared in
the
RAISING clause of the procedure.
The procedure is in the program "ZV_RASGAS ". Its source code starts in line 58
of the (Include) program "ZV_RASGAS ".
Source code extract
006030 no_function_module = 2
006040 OTHERS = 3.
006050 IF sy-subrc <> 0.
006060 * error handling
006070 cf_retcode = sy-subrc.
006080 PERFORM protocol_update.
006090 ENDIF.
006100 ENDIF.
006110
006120 IF cf_retcode = 0.
006130 PERFORM check_repeat.
006140 IF ls_composer_param-tdcopies EQ 0.
006150 nast_anzal = 1.
006160 ELSE.
006170 nast_anzal = ls_composer_param-tdcopies.
006180 ENDIF.
006190 ls_composer_param-tdcopies = 1.
006200 DO nast_anzal TIMES.
006210 * In case of repetition only one time archiving
006220 IF sy-index > 1 AND nast-tdarmod = 3.
006230 nast_tdarmod = nast-tdarmod.
006240 nast-tdarmod = 1.
006250 ls_composer_param-tdarmod = 1.
006260 ENDIF.
006270 IF sy-index NE 1 AND repeat IS INITIAL.
006280 repeat = 'X'.
006290 ENDIF.
006300 * call smartform invoice
006310 append itvbrp.
006320
> CALL FUNCTION lf_fm_name2
006340 EXPORTING
006350 RDT = rdt
006360 BILSDT = min
006370 BILEDT = max
006380 CUMMMSCM = cummmscm
006390 TPCUMMMBTU = tpcummmbtu
006400 TPCUMSCM = tpcumscm
006410 WS_IVBEL = WS_IVBEL
006420 WS_GVBEL = WS_GVBEL
006430 WS_BVBEL = WS_BVBEL
006440 WS_BILDT = WS_BILDT
006450 TPCUMMMBTUX = TPCUMMMBTUX
006460 GINVNO = inv
006470 BILDOC = BILDOC
006480 ZKBETR = ZKBETR
006490 zlng = zlng
006500 zrc = zrc
006510 zkb = zkb
006520 * VOLUM = VOLUM
thanx and regards,
sitendraHi Sitendra,
This exception normally occurs when there is a type mismatch.
Kindly check the length of all fields in the structure/table ITVBRK both in your print program and smartforms. There is a mismatch in the field length of 1 or more of the fields.
Reward points if helpful.
Regards,
Senthil G. -
In smartfrom create multiple page format
Hi expart..
In selection screen using select-options . i m puting the debit no 1100019222 to 1100019224 . the output shows only 1 page . n't showing 3 page .in smartform .Pls tell me how to print multiple page . i m using
data : l_sform type tdsfname,
l_fm_name type rs38l_fnam.
data : control_param like ssfctrlop.
clear control_param-no_dialog .
SELECTION-SCREEN : BEGIN OF BLOCK b1 WITH FRAME TITLE TEXT-001.
SELECT-OPTIONS : s_budat for bsid-budat ,
s_belnr for bsid-belnr .
SELECTION-SCREEN : END OF block b1 .
move 'ZS_FI_CREDITNOTE' to l_sform.
call function 'SSF_FUNCTION_MODULE_NAME'
exporting
formname = l_sform
VARIANT = ' '
DIRECT_CALL = ' '
importing
fm_name = l_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.
loop at itab_debit.
if sy-tabix = 1.
clear control_param-no_dialog .
else.
control_param-no_dialog = 'X'.
endif.
read table itab_basic with key belnr = itab_debit-belnr .
CALL FUNCTION l_fm_name
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
CONTROL_PARAMETERS = control_param
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
OUTPUT_OPTIONS =
USER_SETTINGS = 'X'
IMPORTING
DOCUMENT_OUTPUT_INFO =
JOB_OUTPUT_INFO =
JOB_OUTPUT_OPTIONS =
TABLES
itab_debit = itab_debit
itab_basic_value = itab_basic
itab_t030k = itab_t030k
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 4
OTHERS = 5
new-page.
endloop.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
but n't working...
i ll give points...
regards
bhabaniHi,
I have Corrected the code.Check and reply.
data : l_sform type tdsfname,
l_fm_name type rs38l_fnam.
data : control_param like ssfctrlop.
clear control_param-no_dialog .
SELECTION-SCREEN : BEGIN OF BLOCK b1 WITH FRAME TITLE TEXT-001.
SELECT-OPTIONS : s_budat for bsid-budat ,
s_belnr for bsid-belnr .
SELECTION-SCREEN : END OF block b1 .
move 'ZS_FI_CREDITNOTE' to l_sform.
control_param-no_open = 'X'.
control_param-no_close = 'X'.
call function 'SSF_FUNCTION_MODULE_NAME'
exporting
formname = l_sform
VARIANT = ' '
DIRECT_CALL = ' '
importing
fm_name = l_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 FUNCTION 'SSF_OPEN'
EXPORTING
ARCHIVE_PARAMETERS =
user_settings = ' '
MAIL_SENDER =
MAIL_RECIPIENT =
MAIL_APPL_OBJ =
output_options =
control_parameters = control_param
IMPORTING
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.
loop at itab_debit.
if sy-tabix = 1.
clear control_param-no_dialog .
else.
control_param-no_dialog = 'X'.
endif.
read table itab_basic with key belnr = itab_debit-belnr .
CALL FUNCTION l_fm_name
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
CONTROL_PARAMETERS = control_param
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
OUTPUT_OPTIONS =
USER_SETTINGS = 'X'
IMPORTING
DOCUMENT_OUTPUT_INFO =
JOB_OUTPUT_INFO =
JOB_OUTPUT_OPTIONS =
TABLES
itab_debit = itab_debit
itab_basic_value = itab_basic
itab_t030k = itab_t030k
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 4
OTHERS = 5
new-page.
endloop.
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 'SSF_CLOSE'
IMPORTING
JOB_OUTPUT_INFO =
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
OTHERS = 4.
IF sy-subrc <> 0.
error handling
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
analyse internal error table of Smart Forms
CALL FUNCTION 'SSF_READ_ERRORS'
IMPORTING
errortab = errtab.
IF NOT errtab IS INITIAL.
add your handling
ENDIF.
Regards,
Morris Bond.
Reward Points if helpful. -
Printing Problem with SmartFrom
Hello,
I'm using smartform to print a certificate .. I have correctly populatedthe data and transferred it to smartform ..
For a single print, the alignment of the data comes proper ..
But when I give 10 to 20 prints, for first 3-4 pages alignment of text remains proper but then the alignment starts going downwards and hence data loss occurs as there is no place to print some texts ..
So just wanted to know what can be the problem or what can be the solution ?? .. I have fixed rthe places of tex still they are going downwards after 3-4 continuous prints !!
ThanksHi Sohamshah,
be careful with your title. "smart form", "sapscript", etc. are not good titles. Abuse reported.
You should have titled "printing of smart form top margin is changing" or "starting at 4th page, printing of smart form is lower and lower on page" or something like that.
Did you test by printing 10 copies of the same form. Does it occur too? -
Header text in smartfroms?
Hi all,
In a billing document having standard text in the following format.
TEXT1.
TEXT2.
TEXT3.
How can i display these three text messages ONE-BY-ONE in smrtform window?
Sachin.Hi,
U can use either a table or a template in smartforms.
In template:
Create a template and Create
1 2
%C1 0,50 5
%C2 0,50 5
%C3 0,50 5
Create 3 text elements within the template and give the text u want it.
For first text : in output options give 1 and 1
2nd : 1 and 2
3rd " 1 and 3. -
Regarding checkbox in smartfrom
Hi Folks,
How to create a check box beside to the text elemet in the smartform? Please respond, its very urgent.
Thanks in advance.Hi,
Create a text element in your window. Click on the the text editor next to that. In the toolbad click on insert -> characters -> SAP Symbols -> SYM_LARGE_SQUARE
Thanks
Nayan -
[Smartfroms] Problems in fetching text edit control text
Hi gurus,
I made an application using Screen programming (or dialog programming you must say). I used 3 tab strips. In last tab strip I used a text edit control to write remarks in multiple lines.
I save those remarks (data element: TEXT255) in a custom table as they are saved as "sdfsdfsdf##df##sd##fsd##fsd##fsd##f##sd##f". Fine enough as "ENTER KEY" is interpreted as "##".
I fetched them easily in a display mode using get_stream method. All good.
But the problem arose when I needed to fetch those saved remarks in a smartform.
When I fetched those remarks they came as "sdfsdfsdf##df##sd##fsd##fsd##fsd##f##sd##f" in samrtform's text_box.
I tried a Find and replace command but ## couldn't process, it's because ## is just the interpretation of ENTER KEY.
I need them as
sdfsdfsdf
df
sd
fsd
fsd
fsd
f
sd
f
Is there anyways to get multiple lines text box in smartforms or can I remove those "##" from the text?
Regards,
Mansoor Ahmed.I am saving it as a text in TEXT255 data element.
But in text edit control when i press enter it adds ## to the text. And ## could not be processed via FIND and REPLACE commands. -
How to read header text from VF03 into smartfrom
Hi all,
i want to print header text from vf03 in smartforms
byeHi,
Tcode VF03 enter Billing Doc no -
>goto header-----> select header texts
When you get the values Textname, text id, textobject to the smartform.
call the FM read_text in the programing lines to get the long text in the internal table. Another way to retrieve the long text is to use INCLUDE but for your requirement is better to uses READ_TEXT function module.
Once you get the data in the internal table.
Create table and loop the long text internal table. Now in the table when create a text node, keep a condition on the text node in the conditions column that when sy-tabix = 3. Which means you are skipping two lines (Administrative data).
Procedure:
1. Right click > create-> programming lines.
2. In the Input parameters pass TEXT NAME, TEXT ID, Text Object and Interanal table(itab) and In output paramaeters the Internal table (itab).
3. call function Read_text and pass the values.
4. create a table for Itab.
5. create a text node.
6. Keep a condition on the text node sy-tabix = 3 in the condition tab of the text node.
7. &itab-line&
<b>Check this link for sample program</b>
long text in smartform
Regards,
Maha
Maybe you are looking for
-
Socket.close doesn't work in Windows browsers?
I've been trying to figure this out for days and I can't seem to find anything on why this is happening or how to fix it. I have an FTP program written that uploads ByteArrays through sockets. It works great on my Mac! I open a command connection,
-
I bought an ipod touch gb, without knowing i would probably need more storage is there anything i can do to add more storage. Leave a detailed answer please!
-
Regarding decimal points in QATR
Hi , I am having an issue regarding the decimal points descrepancy in QATR (Quality Assurance test report). The settings for decimal points for some of the inspection characteristics are not matching with the QATR report. Please help me in sorting ou
-
I recently upgraded my camera from Nikon D700 to D800. For two weeks tethering to LR 5.3 worked impeccably. The day before a major shoot I upgraded to newly released 5.4 which promised tether support for my backup camera, Nikon D 610, although 5.4 s
-
Hi All How much development work is required in typical SAP XI projects where integration is limited to SAP products only (e.g BW, ECC, SRM). Is XI development means actually writing Code in Java or just configuration using SAP provided tools. Thank