cancel
Showing results for 
Search instead for 
Did you mean: 

smartforms-avoid the form if no values are there

Former Member
0 Kudos

Hi All,

iam printing 6 different forms at a time by writing the code in se38 like this.<b>But if any form doesnt have any value then i should avoid that form</b>. My total code is developed in forms only.Just by calling forms in se38 iam printing.

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

  • PROGRAM ID : YIBRK_TERMINATION_FORMS *

  • TITLE : Termination Statement Forms *

  • CREATE DATE: 15.02.2007 *

  • AUTHOR : SREDDY5(SRINIVAS REDDY) *

----


  • *

----


  • CHANGE HISTORY *

----


  • DATE | NAME | DESCRIPTION | REFERENCE *

----


  • *

  • *

----


  • *

  • *

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

REPORT yibrk_smartforms.

DATA: fm_name1 TYPE rs38l_fnam,

fm_name2 TYPE rs38l_fnam,

fm_name3 TYPE rs38l_fnam,

fm_name4 TYPE rs38l_fnam,

fm_name5 TYPE rs38l_fnam,

fm_name6 TYPE rs38l_fnam.

DATA: w_control LIKE ssfctrlop.

SELECTION-SCREEN : BEGIN OF BLOCK s_blk WITH FRAME TITLE text-000.

PARAMETERS : p_gin LIKE pa0002-pernr.

SELECTION-SCREEN : END OF BLOCK s_blk.

START-OF-SELECTION.

CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'

EXPORTING

formname = 'YIBRK_SMARTFISPP'

IMPORTING

fm_name = fm_name1

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.

CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'

EXPORTING

formname = 'YIBRK_SMARTFAVC'

IMPORTING

fm_name = fm_name2

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.

CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'

EXPORTING

formname = 'YIBRK_SMARTFISPS'

IMPORTING

fm_name = fm_name3

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.

CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'

EXPORTING

formname = 'YIBRK_SMARTFDMP'

IMPORTING

fm_name = fm_name4

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.

CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'

EXPORTING

formname = 'YIBRK_SMARTFCSI_CTI'

IMPORTING

fm_name = fm_name5

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.

CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'

EXPORTING

formname = 'YIBRK_TERMINATION_BANKING'

IMPORTING

fm_name = fm_name6

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.

w_control-no_open = 'X'.

w_control-no_close = 'X'.

CALL FUNCTION 'SSF_OPEN'

  • EXPORTING

  • ARCHIVE_PARAMETERS =

  • USER_SETTINGS = 'X'

  • MAIL_SENDER =

  • MAIL_RECIPIENT =

  • MAIL_APPL_OBJ =

  • OUTPUT_OPTIONS =

  • CONTROL_PARAMETERS =

  • IMPORTING

  • JOB_OUTPUT_OPTIONS =

.

CALL FUNCTION fm_name1

EXPORTING

control_parameters = w_control

per_no = p_gin.

CALL FUNCTION fm_name2

EXPORTING

control_parameters = w_control

per_no = p_gin.

CALL FUNCTION fm_name3

EXPORTING

control_parameters = w_control

per_no = p_gin.

CALL FUNCTION fm_name4

EXPORTING

control_parameters = w_control

per_no = p_gin.

CALL FUNCTION fm_name5

EXPORTING

control_parameters = w_control

per_no = p_gin.

CALL FUNCTION fm_name6

EXPORTING

control_parameters = w_control

per_no = p_gin.

CALL FUNCTION 'SSF_CLOSE'

  • IMPORTING

  • JOB_OUTPUT_INFO =

.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi

In the SF, check if there is data, then set a flag. Use this flag in all windows in the Condition tab. So that, a SF with all its windows will fire only when flag is set.

Regards,

Raj

Former Member
0 Kudos

Hi,

Thanks for u r solution but if i do as said the empty page(Blank page ) will be printed bcoz here individual forms are there.How to avoid that blank page?

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi

Am afraid there is no other option than to check the availability of data before calling SF in driver program.

Regards,

Raj

Former Member
0 Kudos

Check the internal table has value or not ,if no value then skip smartform.

if not int_tab[] is initial.

call fm.

endif

Former Member
0 Kudos

Hi ,

Thanks for u r reply.

But iam not doing any calculations in se38. My total code is there in individuallyn in each form. Iam not passing any itab from se38 to smartform