Skip to Content
0
Former Member
May 10, 2005 at 04:51 AM

regarding smartforms

26 Views

Hey,

I tried to execute smartforms demo program,

But.while executing itdisplays PRINT dailog box to user.

why is it..suppose i want to display only forms displaying in ABAP rather printing(which is next step after display).

how to avoid this print dailog box.do we have any demo program to test smartform workings

chandra

below is code sniippet.

report sf_example_01.

data: carr_id type sbook-carrid,

fm_name type rs38l_fnam.

parameter: p_custid type scustom-id default 1.

select-options: s_carrid for carr_id default 'LH' to 'LH'.

parameter: p_form type tdsfname default 'SF_EXAMPLE_01'.

data: customers type ty_customers,

bookings type ty_bookings,

connections type ty_connections.

  • get data

select * from scustom into table customers

where id = p_custid

order by primary key.

select * from sbook into table bookings

where customid = p_custid

and carrid in s_carrid

order by primary key.

select * from spfli into table connections

for all entries in bookings

where carrid = bookings-carrid

and connid = bookings-connid

order by primary key.

  • print data

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.

  • now call the generated function module

call function fm_name

exporting

  • archive_index =

  • archive_parameters =

  • control_parameters =

  • mail_appl_obj =

  • mail_recipient =

  • mail_sender =

  • output_options =

  • user_settings = 'X'

customers = customers

bookings = bookings

connections = connections

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

Message was edited by: ambi chan