Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Call sapscript form and get back output in OTF?

Former Member
0 Kudos

Hi!

Is it possible to get sapscript form output as OTF data?

As for smartform we can proceed as follows:

CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'

EXPORTING

formname = 'ZFORMNAME'

IMPORTING

fm_name = v_form_name

EXCEPTIONS

no_form = 1

no_function_module = 2

OTHERS = 3.

w_ctrlop-getotf = 'X'.

w_ctrlop-no_dialog = 'X'.

w_compop-tdnoprev = 'X'.

CALL FUNCTION v_form_name

EXPORTING

control_parameters = w_ctrlop

output_options = w_compop

user_settings = 'X'

IMPORTING

job_output_info = w_return

EXCEPTIONS

formatting_error = 1

internal_error = 2

send_error = 3

user_canceled = 4

OTHERS = 5.

i_otf[] = w_return-otfdata[].

Is it possible to do something like that for sapscript?

Regards,

Maxim.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

hi,

in sapscript it can be done in the close_form

like

data itab like ITCOO occurs 0 with header line

CALL FUNCTION 'CLOSE_FORM'

TABLES

OTFDATA = itab.

cheers,

sasi

2 REPLIES 2

Former Member
0 Kudos

hi,

in sapscript it can be done in the close_form

like

data itab like ITCOO occurs 0 with header line

CALL FUNCTION 'CLOSE_FORM'

TABLES

OTFDATA = itab.

cheers,

sasi

0 Kudos

Hi,

In OPEN_FORM you must set TDGETOTF='X' in the Options(Structure ITCPO).

Then you get OFTDATA in CLOSE_FORM.

Regards

Frank Brackmann