on 05-28-2008 6:53 AM
I have two field values populated in the internal table mara which i want to use in smart forms.
wat are all the settings to be done in the smartforms for these two fields to be displayed from the internal table.
kindly help me with the sample codes
Follow this code and steps ull understand how to proceed.
this is a example code.
select mandt
carrid
connid
fldate
price
into table i_sflight
from sflight.
data: V_FUNCTION type TDSFNAME,
wa_param type ssfctrlop,
wa_otf type ssfcrescl,
i_otfdata type table of itcoo,
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
FORMNAME = 'Zpractice'
VARIANT = ' '
DIRECT_CALL = ' '
IMPORTING
FM_NAME = v_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.
·
o
managing print parameters for the PDF output
wa_param-langu = sy-langu.
wa_param-no_dialog = 'X'.
wa_param-getotf = 'X'.
call generated function module.
CALL FUNCTION C_FUNCTION
EXPORTING
sflight = i_sflight
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.
refresh i_otfdata.
i_otfdata] = wa_otf-otfdata[.
*To get PDF Output
call function 'SSFCOMP_PDF_PREVIEW'
EXPORTING
i_otf = i_otfdata
EXCEPTIONS
CONVERT_OTF_TO_PDF_ERROR = 1
CNTL_ERROR = 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.
Now in your program jus change field names that must be displayed.
In smartforms
1)goto form attributes and set your output options
page format usually DINA4
2)goto form interface and set
parameter name:sflight
type: type
associated type: filghttab
3)in global data set wa_fight type sfilght.
4)Create a page
5) create a template and pass those fields in respective cells
thanks
Reward oints if useful
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Just refer this :
You can understood the smartform.
http://www.saptechnical.com/Tutorials/Smartforms/PO/page1.htm
Regards,
Shiva Kumar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hai,
Create a Z structure with two fields u used in ur Internal table.
Then in Smartforms->forminterface ->tables->declare a internal of type zstructure.
Loop through the internal table and display the contents.
Swetha Singh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Preet
You can use select statement to extract these two fields to your mara internal table. Do this either in your abap interface program else in your forms.
If u are doing this in forms, u need to simply give your internal table name and its type in form interface -> import parameters and in global definitions specify your work areas.
and right click on your main window ->flow logic -> program lines
inside this you need to give your input and output parameters.
After this just insert a table/template to pass your work areas in which the two fields which you have extracted will be present.
save and activate your form to see the output.
Regards
Swetha
Edited by: Swetha on May 28, 2008 8:02 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
101 | |
13 | |
13 | |
11 | |
11 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.