on 09-05-2010 6:20 PM
Hi,
I am trying to show personels information on smartform. So I have created smartforms and followed these steps.
-Created Copy window to paste personel's photo.
-Created text on main window to put personel's information.
The problem is how i can loop photos with different personels information.I mean each page should show me different personel's information.I hope i will find the answer here.
Regards.
Moderator message: please use a more descriptive subject line next time.
Edited by: Thomas Zloch on Sep 5, 2010 8:44 PM
Hi Mas,
I think you should use technique 'SSF_OPEN' and 'SSF_CLOSE' for this request, I will describe below:
1/ You need 2 tables: 1 table for personnel ID, picture.. we assume it's header. 1 table for item as your personnel information.
2/ You write code in your driver program before getting display in form:
data: fm_name type rs38l_fnam,
control type ssfctrlop,
errtab type tsferror.
* get the name of the generated function module using the logical
* Smart Forms name
call function 'SSF_FUNCTION_MODULE_NAME'
exporting formname = p_form
* variant = ' '
* direct_call = ' '
importing fm_name = fm_name
exceptions no_form = 1
no_function_module = 2
others = 3.
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.
exit.
endif.
call function 'SSF_OPEN'
exporting
* ARCHIVE_PARAMETERS =
* USER_SETTINGS = 'X'
* MAIL_SENDER =
* MAIL_RECIPIENT =
* MAIL_APPL_OBJ =
* OUTPUT_OPTIONS =
control_parameters = control
* IMPORTING
* JOB_OUTPUT_OPTIONS =
exceptions
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
others = 5.
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.
exit.
endif.
* Loop through header and item table
LOOP t_header into wa_header.
* Fill table parameter you decide to pass to smartforms
* after that call your form
call function fm_name
exporting
* archive_index =
* archive_parameters =
control_parameters = control
* mail_appl_obj =
* mail_recipient =
* mail_sender =
* output_options =
* user_settings = 'X'
* importing document_output_info =
* job_output_info =
* job_output_options =
exceptions formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
others = 5.
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.
ENDLOOP.
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.
You can get more by refer example report SF_EXAMPLE_03.
Please check.
good luck
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.