cancel
Showing results for 
Search instead for 
Did you mean: 

'Control parameters' when call the smartform function module

Former Member
0 Kudos

Hi all,

I want to know what we have to export as value to control papameter while calling the fm of smartform.

Plz also let me know the various parameters in CONVERT_OTF.

Thanks in advance.

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member195383
Active Contributor
0 Kudos

WA_CONTROL_PARAMETERS-GETOTF = 'X'.

  • the above is needed if you want OTF data, to convert it to PDF

WA_CONTROL_PARAMETERS-LANGU = 'E'.

  • Language of smartform

WA_CONTROL_PARAMETERS-DEVICE = 'PRINTER'.

*default o/p device

WA_CONTROL_PARAMETERS-NO_DIALOG = 'X'.

  • if you dont want the pop up screen , that asks you for printing make the value as 'X' .

other wise make it as space or clear it.

WA_CONTROL_PARAMETERS-PREVIEW = SPACE.

  • if u want the print preview , make it as 'X' , otherwise SPACE

**************************************************************************************

  • Below code shows how you can convert the OTF data to PDF data.

  • calling the smartform.

CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'

EXPORTING

FORMNAME = 'Z_SMARTFORM'

IMPORTING

FM_NAME = WF_FUNCMODULENAME

EXCEPTIONS

NO_FORM = 1

NO_FUNCTION_MODULE = 2

OTHERS = 3.

CALL FUNCTION WF_FUNCMODULENAME

EXPORTING

CONTROL_PARAMETERS = WA_CONTROL_PARAMETERS "Control Params

OUTPUT_OPTIONS = WA_OUTPUT_OPT "Output Options

WF_CARRID = WF_CARRID

WF_CONNID = WF_CONNID

WF_FLDATE = WF_FLDATE

IMPORTING

DOCUMENT_OUTPUT_INFO = WA_DOCUMENT_OUTPUT_INFO

JOB_OUTPUT_INFO = WA_JOB_OUTPUT_INFO

JOB_OUTPUT_OPTIONS = WA_JOB_OUTPUT_OPTIONS

EXCEPTIONS

FORMATTING_ERROR = 1

INTERNAL_ERROR = 2

SEND_ERROR = 3

USER_CANCELED = 4

OTHERS = 5.

CALL FUNCTION 'CONVERT_OTF_2_PDF'

EXPORTING

ARCHIVE_INDEX = WA_ARC_IDX

IMPORTING

BIN_FILESIZE = WF_NUMBYTES

TABLES

OTF = WA_JOB_OUTPUT_INFO-OTFDATA[]

DOCTAB_ARCHIVE = TB_DOCTAB_ARCHIVE[]

LINES = TB_LINES[]

EXCEPTIONS

ERR_CONV_NOT_POSSIBLE = 1

ERR_OTF_MC_NOENDMARKER = 2

OTHERS = 3.