cancel
Showing results for 
Search instead for 
Did you mean: 

SmartForm output is canceled

Former Member
0 Kudos

High there,

im very new to abap-programming and now i have a problem with smartforms. i have a programm which calls a smartform. if the user presses the cancel-button in the printing-dialog, the programm doesn't end, it jumps back to the input-dynpro. the problem is, that the internal table with the output-data was allready send to the smartform. if the user now starts the programm again, all data is there, but twice. so, after pressing the cancel-button, the parameter-table is not initialized. how can i use these control-options to close the smartform in my programm?

thanks for helping me, harry

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

high max,

how can i do this without using the ssf_open and ssf_close functions. or, if i don't use ssf_open, can i use ssf_close anyway?

but this doesn't really matter, i will use both functions. Does someone have a coding which works with the cancel-button?

thanks for your help, harry

Former Member
0 Kudos

Hi

The behaviour u've described is very strange, perhaps u've transfered the data to a internal table defined in the smartform? If it's so u should clear all data in the initialization of the smartforms.

Or perhaps if the user press exit u append the data to be printed twice?

Max

Former Member
0 Kudos

high max,

the problem is, that the initialization of the tables in the smartform happens after the input of the data, so the internal table is empty and though the smartform to. twice printing doesn't solve the problem because the recordsets appear twice after the other and not one after the other and then a second time.

thank you so far!

harry

Former Member
0 Kudos

Hi

U need to export the calling to popup for user dialog out from smartform fm: use the fm SSF_OPEN.

So the program should be:

DATA: E_SSFCOMPIN TYPE SSFCOMPIN.

* Open dialog
  CALL FUNCTION 'SSF_OPEN'
       EXPORTING
            INPUT  = E_SSFCOMPIN
*       IMPORTING
*            RESULT = I_SSFCRESOP
       EXCEPTIONS
            ERROR  = 1
            OTHERS = 2.
  IF SY-SUBRC <> 0.
    MESSAGE S012(SSFCOMPOSER).
    STOP.
  ENDIF.

* Call smartform
SSFCTRLOP-NO_OPEN   = 'X'.
SSFCTRLOP-NO_CLOSE  = 'X'.

CALL FUNCTION FM_NAME
     EXPORTING
       ..............
       CONTROL_PARAMETERS         = SSFCTRLOP
      .............
* Close Smartform
CALL FUNCTION 'SSF_CLOSE.

Anyway u can clear all data in the INIZIALIZATION tab

Max

Edited by: max bianchi on Apr 9, 2008 4:51 PM