cancel
Showing results for 
Search instead for 
Did you mean: 

how to supress popup...

Former Member
0 Kudos

Hi experts,

In smartform, i need to print the customer details, in selection screen i have the select option for customer number, im getting a problem with the popup when i have a range of customers like 1 to 10 etc...

Generally, when we execute the smartform w'll get the popup for the output device once,

Here my problem is, when it was given a range of customers, im fetching all the data which need to be printed into t_kna1, im calling the Function Modules related to smartform within the loop. so that im getting the popup for each time the loop repeats.

But i need to get it only once, the remaining records should not ask for the popup.

Hope the question is clear, plz some one help me in this regard.

Thanks in advance.

Accepted Solutions (1)

Accepted Solutions (1)

naimesh_patel
Active Contributor
0 Kudos

To avoid the popup, you can set the controlling parameter NO_DIALOG. To get it only once you can set some flag and than check for that next time. If it is set don't dispaly the dialog.

Like:


DO 10 TIMES.
IF L_FLAG IS INITIAL.
  CLEAR  E_CONTROL-NO_DIALOG .
  L_FLAG = 'X'.
ELSE.
  E_CONTROL-NO_DIALOG   = 'X'.
ENDIF.

...
  CALL FUNCTION L_FM_NAME
    EXPORTING
      CONTROL_PARAMETERS         = LS_CONTROL

Regards,

Naimesh Patel

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi all,

Thanks alot for all ur replies.

Former Member
0 Kudos

Hi mytri,

Refer this code

TABLES:
  spfli.
 
DATA:
  t_spfli type
    STANDARD TABLE OF spfli.
 
DATA:
  fs_spfli TYPE spfli.
 
DATA:
  w_form TYPE  tdsfname,
  w_flag TYPE i,
  f_nam TYPE rs38l_fnam,
  w_input   TYPE ssfcompin,
  w_control TYPE ssfctrlop.
 
SELECTION-SCREEN BEGIN OF BLOCK blk  WITH FRAME.
SELECT-OPTIONS s_carrid FOR spfli-carrid.
SELECTION-SCREEN END OF BLOCK blk .
 
SELECTION-SCREEN BEGIN OF BLOCK block1 WITH FRAME.
PARAMETERS:
p_single RADIOBUTTON GROUP rad1,
p_ind    RADIOBUTTON GROUP rad1.
SELECTION-SCREEN END OF BLOCK block1.
 
 
START-OF-SELECTION.
  PERFORM display_data.
  PERFORM ssf_function_module_name.
  PERFORM spool_request.
*&---------------------------------------------------------------------*
*&      Form  display_data
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*  -->  p1        text
*  <--  p2        text
*----------------------------------------------------------------------*
FORM display_data .
  SELECT *
  FROM spfli
  INTO TABLE t_spfli
  WHERE carrid IN s_carrid.
ENDFORM.                    " display_data
*&---------------------------------------------------------------------*
*&      Form  ssf_function_module_name
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*  -->  p1        text
*  <--  p2        text
*----------------------------------------------------------------------*
FORM ssf_function_module_name .
  CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
    EXPORTING
      formname           = '  '
    IMPORTING
      fm_name            = f_nam
    EXCEPTIONS
      no_form            = 1
      no_function_module = 2.
*  IF sy-subrc NE 0.
*    MESSAGE 'Form cannot be displayed' TYPE 'E' .
*  ENDIF.                               " IF sy-subrc eq 0
ENDFORM.                               " ssf_function_module_name
*&---------------------------------------------------------------------*
*&      Form  spool_request
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*  -->  p1        text
*  <--  p2        text
*----------------------------------------------------------------------*
FORM spool_request .
 
w_input-dialog = 'X'.
 
  CALL FUNCTION 'SSFCOMP_OPEN'
    EXPORTING
      input = w_input
    EXCEPTIONS
      error = 1.
*" LOOP AT t_spfli .....................................................
 
  LOOP AT t_spfli INTO fs_spfli.
    w_control-no_open   = ' '.
    w_control-no_close  = ' '.
*"Single spool request..................................................
    IF p_single EQ 'X'.
      w_control-no_open   = 'X'.
      w_control-no_close  = 'X'.
    ELSE.
*"Individual spool request.............................................
      IF w_flag NE '1'.
        w_control-no_open  = 'X'.
        w_control-no_close = ' '.
        w_flag = 1.
        CALL FUNCTION ' '
          EXPORTING
           control_parameters          = w_control
            fs_spfli                   = fs_spfli
         EXCEPTIONS
           formatting_error           = 1
           internal_error             = 2
           send_error                 = 3
           user_canceled              = 4.
       endif.                          " IF w_flag ne '1'
      ENDIF.                           " IF p_single eq 'X'.
      CALL FUNCTION '  '
        EXPORTING
          control_parameters = w_control
          fs_spfli           = fs_spfli
        EXCEPTIONS
          formatting_error   = 1
          internal_error     = 2
          send_error         = 3
          user_canceled      = 4.
    ENDLOOP.                             " LOOP at t_spfli into ...
 
*&--------------------------------------------------------------------*
*&This function module close the spool request                        *
*&--------------------------------------------------------------------*
    CALL FUNCTION 'SSFCOMP_CLOSE'
      EXCEPTIONS
        error = 1.
  ENDFORM.                               " spool_request

Regards,

Sravanthi

Former Member
0 Kudos

Hi,

Thanks a lot for ur reply...

It supressed the popup, but im getting the list for only the first customer, but not the all.

i should get the total lists, if i gave 1 to 10 in selection screen, then i should get the 10 different lists, now im getting only one i.e. the 1st customer list.

plz suggest me some solution.

Thanks in advance...