‎2008 Nov 07 8:04 PM
hi,
i want to display data from smartform using report.
i have a preview buttons in report when i select preview buttons displays in smarts
regards
amit
‎2008 Nov 08 5:51 AM
form user_command using r_ucomm like sy-ucomm
rs_selfield type slis_selfield.
data: ord_prod type crmt_ordered_prod_db,
qty type crmt_schedlin_quan,
count type i.
clear: itab, wa_itab.
refresh: itab1.
case r_ucomm.
when 'PREVIEW'.
perform get_smartform.
endcase.
endform. "User_command
form get_smartform .
if itab[] is not initial.
DATA : l_fmname TYPE rs38l_fnam.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
FORMNAME = 'ZSFNAME'
IMPORTING
FM_NAME = l_fmNAME .
CALL FUNCTION l_fmname
TABLES
itab = itab
endif.
endform. " get_smartform
‎2008 Nov 08 4:01 AM
design the smartform as per ur need and get the function module generated by smartform and pass it to ur report programas below..
case sy-ucomm.
when 'smartform'.
pass the f.m that is generated by system in smartforms
CALL FUNCTION '/1BCDWB/SF00000265'
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
CONTROL_PARAMETERS =
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
OUTPUT_OPTIONS =
USER_SETTINGS = 'X'
DATE_L = s_fkdat-low
DATE_H = s_fkdat-high
PLANT_L = s_werks-low
PLANT_H = s_werks-high
IMPORTING
DOCUMENT_OUTPUT_INFO =
JOB_OUTPUT_INFO =
JOB_OUTPUT_OPTIONS =
TABLES
IFINAL = ifinal1[]
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.
endcase.
‎2008 Nov 08 5:10 AM
Hi,
Search the Forum with SSF_FUNCTION_MODULE_NAME and you will get a lot of code examples. Start coding using that and revert back when you get struck somewhere.
Regards
Karthik D
‎2008 Nov 08 5:51 AM
form user_command using r_ucomm like sy-ucomm
rs_selfield type slis_selfield.
data: ord_prod type crmt_ordered_prod_db,
qty type crmt_schedlin_quan,
count type i.
clear: itab, wa_itab.
refresh: itab1.
case r_ucomm.
when 'PREVIEW'.
perform get_smartform.
endcase.
endform. "User_command
form get_smartform .
if itab[] is not initial.
DATA : l_fmname TYPE rs38l_fnam.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
FORMNAME = 'ZSFNAME'
IMPORTING
FM_NAME = l_fmNAME .
CALL FUNCTION l_fmname
TABLES
itab = itab
endif.
endform. " get_smartform