cancel
Showing results for 
Search instead for 
Did you mean: 

Triggering smartform output from the report program

Former Member
0 Kudos

Hi,

I have developed a new report program.The selection screen of the report program is like this.

plant: ________

warehouse: ___________

sheet #: _________ to _________

bay/bin: ___________ to __________

building: ___________ to __________

counter sheet printer: __________

Auditor sheet printer: _________

When the data for sheet#,bay,building, counter sheet printer is given,then the counter sheet smartform has to be output on the screen.

or

When the data for sheet#,bay,building, auditor sheet printer is given,then the auditor sheet smartform has to be output on the screen.

Is it pessible to trigger the smartform from the selection screen of the report.If so can anyone send me a sample code for that.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Create two different smart forms for this and accordingly when you are selecting the fields mange which form to populate .

And here pass parameter 'x' and try to populate your forms.

Former Member
0 Kudos

Hi,

Do I need to use SSF_FUNCTION_MODULE_NAME and the smartform function module in the same report program?

Can you send me a sample code for this?

Former Member
0 Kudos

yes

Call both forms using this SSF_FUNCTION_MODULE_NAME and pass required parameters there.

Let it trigger as per your requirement.

Answers (2)

Answers (2)

Former Member
0 Kudos
Former Member
0 Kudos

CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'

EXPORTING

formname = <smartform name>

IMPORTING

fm_name = v_form_fm

EXCEPTIONS

no_form = 1

no_function_module = 2

OTHERS = 3.

  • Call Smartfrom to print the document

CALL FUNCTION v_form_fm

EXPORTING

p_compensation = p_comp <--parameter list

p_skill = p_skill

p_deci_auhtority = p_da

TABLES

s_job = s_job <--select option list

s_level = s_level

s_date = s_date

EXCEPTIONS

formatting_error = 1

internal_error = 2

send_error = 3

user_canceled = 4

OTHERS = 5.

declare the paramters of your selection screen in the form interface section of the smartform.

If you have a parameter in teh selection screen then declare it in the smartform as:

P_matnr TYPE matnr (in form interface -

>import)

If you have a select option then

S_LEVEL LIKE <dictionary structure like a range>

this u declare it in the tables section of the form interface. For the select option , the dictionary sructures should be like a range (see RNGE_OBJID as an example). If you dont have a dictionary structure

then u need to declare it in the dictionary.

REWARD IF HELPFUL

Former Member
0 Kudos

Hi,

In the report I have declared the select-options as

SELECT-OPTIONS: S_SHNUM FOR GT_BAYCNT-SHNUM,

S_LGPLA FOR GT_BAYCNT-LGPLA,

S_LGBER FOR GT_BAYCNT-LGBER.

Can you please tell me how to declare these values in form interface of the smartform?

Former Member
0 Kudos

declare the paramters of your selection screen in the form interface section of the smartform.

If you have a parameter in teh selection screen then declare it in the smartform as:

P_matnr TYPE matnr (in form interface ->import)

If you have a select option then

S_LEVEL LIKE <dictionary structure like a range>

this u declare it in the tables section of the form interface. For the select option , the dictionary sructures should be like a range (see RNGE_OBJID as an example). If you dont have a dictionary structure

then u need to declare it in the dictionary.

REWARD POINTS IF HELPFUL