Sunday, December 19, 2010
When we call smartform function module, NO_OPEN and NO_CLOSE fields of SSFCTRLOP(Smart Forms: Control structure) structure need to be manipulated to display multiple records in Smart forms.

REPORT  ztest_smartform.
DATA:it_nfal   TYPE nfal OCCURS 0 WITH HEADER LINE.
DATA:fm_name   TYPE rs38l_fnam.
DATA:ssfctrlop TYPE ssfctrlop.
"START-OF-SELECTION.

START-OF-SELECTION.
  "select data
  SELECT * FROM nfal INTO TABLE it_nfal UP TO 10 ROWS.

  ssfctrlop-no_dialog = 'X'. "Just set this one. It gives what you want.

  "Get Function module name for given smartform
  CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
    EXPORTING
      formname = 'ZTEST_SMARTFORM'
    IMPORTING
      fm_name  = fm_name.
  "Call Smartform function module.
  CALL FUNCTION fm_name
    EXPORTING
      control_parameters = ssfctrlop
      output_options     = ssfcompop
    TABLES
      it_nfal            = it_nfal.

0 comments:

Post a Comment

Your useful comments, suggestions are appreciated.Your comments are moderated.

Followers

Contact Form

Name

Email *

Message *

Web Dynpro ABAP Book

An SAP Consultant

Follow US


Want to Contribute ?

If you are interested in writing about the new stuff you learn everyday while working, please write to the.sap.consultants@gmail.com.

Click on Contribution for more details.