09-11-2007 2:33 AM
Hi all,
i have an internal table i_itab1.
through driver program iam retrieving i_itab1-id and the remaining fields
My question is
How i have to declare the internal table in smartform in form interface
do i have to declare in import or tables of form interface
Let me know
I have to loop at i_itab1 and display id,werks,time
Below is my program
report ztest.
types :begin of t_itab1,
id like zabc-id,
werks like marc-werks,
time like zabc-time,
end of t_itab1.
data i_itab1 type table of t_itab1.
data : v_form type tdsfname,
v_name type rs38l_fnam.
start-of-selection.
select id werks time into table i_itab1 from zabc up to
30 rows.
v_form = 'ZSMART'.
call function 'SSF_FUNCTION_MODULE_NAME'
exporting
formname = v_form
VARIANT = ' '
DIRECT_CALL = ' '
importing
fm_name = v_name
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.
if not v_name is initial.
call function v_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
test = i_itab1
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.
endif.
09-11-2007 3:03 AM
Dear David,
If you use Declare Internal Table in Tables, Similar structure should Exist in SAP. So we may have to create a Structure-->SE11 in SAP and use it.
If you have any issues, Please let me know.
Regards,
Lijo joseph
09-11-2007 3:03 AM
Dear David,
If you use Declare Internal Table in Tables, Similar structure should Exist in SAP. So we may have to create a Structure-->SE11 in SAP and use it.
If you have any issues, Please let me know.
Regards,
Lijo joseph
09-11-2007 3:09 AM
Hi Lijo,
can't we do without creating a structure in se11.
I declared an internal in my driver program like this
types :begin of t_itab1,
id like zabc-id,
werks like marc-werks,
time like zabc-time,
end of t_itab1.
data i_itab1 type table of t_itab1.
So you mean to say that i have to create a structure
with field id, werks, time
Let me know if iam wrong?
Can't we do without creating struture
and one more question what is the purpose of import tab in form interface
Thanks
David
09-11-2007 3:37 AM
 Hi,DAVID ,
 Maybe you can use the "import" and "export " statement .
 Regards
09-11-2007 3:54 AM