Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

smartform problems

Former Member
0 Likes
1,165

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

9 REPLIES 9
Read only

Former Member
0 Likes
1,004

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

Read only

former_member188827
Active Contributor
0 Likes
1,004

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

Read only

alpesh_saparia3
Active Contributor
0 Likes
1,004

<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.

Read only

0 Likes
1,004

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

Read only

0 Likes
1,004

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

Read only

0 Likes
1,004

Is there any existing smart style which I can use for the same??

Read only

0 Likes
1,004

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

Read only

Former Member
0 Likes
1,004

SORY IT IS LIKE THIS

QTY

XXXXXXXXXXXXX20

WHERE X IS BLANK SPACE