‎2007 Aug 28 11:31 AM
hi i have some problems related to smartforms:
problem 1
i m showing a field in the table of smart from which is referred to mseg-meing
ITEM DESC QTY UOM
100010 ABCDE 20 TON
I want 20 to b print under the qty
problem 2.
how can we pass internal tables to the smartforms
is there need of creating structures if we pass internal tables to the smart form
problem 3.
how can i create a structure from the fields related to the different tables
as i got no option for creating structures in se11
problem 4.
can somebody tell me some material related to smartform to read....
THANX
‎2007 Aug 28 11:37 AM
hi,
1. is an allignment problem.if u are using tempelate just adjust it be moving lines.
2.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.
also check this link:
http://www.esnips.com/doc/77a981b9-8fe3-4fbb-8101-67745c1fe60c/SMART-FORMS_shail
reward points if it helps
rgds
‎2007 Aug 28 11:37 AM
Hi,
Check the following materials,
http://www.sap-basis-abap.com/sapsf001.htm
http://www.sap-press.com/downloads/h955_preview.pdf
http://www.ossincorp.com/Black_Box/Black_Box_2.htm
http://www.sap-img.com/smartforms/sap-smart-forms.htm
http://www.sap-img.com/smartforms/smartform-tutorial.htm
http://www.sapgenie.com/abap/smartforms.htm
http://www.sap-img.com/smartforms/smart-006.htm
http://www.sap-img.com/smartforms/smartforms-faq-part-two.htm
http://www.sapbrain.com/ARTICLES/TECHNICAL/SMARTFORMS/smartforms.html
step by step guide
1. Use table to display data in tabular format.
2. In smartform function module you have to pass the internal table.
3. Go to se11- Select data type - select structure and give the fields and activate it.
<b>Reward if helpful.</b>
‎2007 Aug 28 11:38 AM
1.if te line type for table header is same as that of table items 20 will be printed under qty provided da cell in which u r writing qty is in same position as da cell in which u r displaying quantity value..i.e 20.
2.u can pass the internal table to smartform by declaring it in tables tab of form interface of smartform.
parameter name type associated type
itab like zabc.
3.declare in global definitions under the types tab
4.u can find alot of material on this forum as well as on form printing forum
plz reward points if it helps
‎2007 Aug 28 11:46 AM
<u>Problem 1</u>: Create table and define a row type with columns required e.g. ITEM, DESC, QTY, UOM. Create Line and assign line type in Header for Heading and Line in Main area and assign line type for rows of internal table. Put your field name in corresponding column
<u>Problem 2.</u> You can pass internal table to Smartform in Form Interface->Tables option. You require to create Table type of the structure of internal table.
<u>Problem 3.</u> You can define custom structure in Global Definitions-> Types tab.
‎2007 Aug 28 11:54 AM
problem 1
i hav used a table for displaying data
but the qty field is not shwing right output as it is left aligned
it is showing like this
QTY
20
20
‎2007 Aug 28 12:07 PM
in dat case, create smartstyles using transaction smartstyles.
right click on paragraph format..>create node.
in dat use right-alligned and activate.
assign this style to ur text element under output options tab in the form...
plz reward points if it helps
Message was edited by:
abapuser
‎2007 Aug 28 12:11 PM
Is there any existing smart style which I can use for the same??
‎2007 Aug 28 12:15 PM
go to transaction smartstyles and take f4 against style..dere are alot of styles avaiable but i guess its better to create ur own styles rather than searching the style which 'll fit ur requirement
‎2007 Aug 28 11:55 AM
SORY IT IS LIKE THIS
QTY
XXXXXXXXXXXXX20
WHERE X IS BLANK SPACE