cancel
Showing results for 
Search instead for 
Did you mean: 

Problem in Dialog pop'up of Smartform...!

Former Member
0 Kudos

Hello Gurus.

I already tried multiple ABAP code for this one...but it seems i'm missing something.

I trying to call an MM form, from a type of message (transaction VL02N). So i'm trying to eliminate the popup so that i can have the controls of the message (Print / Preview).

So...here's my code:


*&---------------------------------------------------------------------*
*&      Form  getsmart
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
FORM getsmart.

  DATA: funcao TYPE rs38l_fnam.

  CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
    EXPORTING
      formname           = 'ZTMM_FR_MM15'
    IMPORTING
      fm_name            = funcao
    EXCEPTIONS
      no_form            = 1
      no_function_module = 2
      OTHERS             = 3.

  MOVE 'X' TO wa_control-no_dialog.
  MOVE 'X' TO wa_output-tdnewid.
  MOVE 'X' TO wa_output-tdnoprev.
  MOVE 'LZOP' TO wa_output-tddest.
  MOVE space  TO wa_output-tdimmed.
  MOVE 'PRINTER' TO wa_control-device.


  CALL FUNCTION funcao
    EXPORTING
      control_parameteres = wa_control
      output_parameteres  = wa_output
      user_settings       = ''
    TABLES
      gt_header           = gt_header
      gt_main             = gt_main
    EXCEPTIONS
      formatting_error    = 1
      internal_error      = 2
      send_error          = 3
      user_canceled       = 4
      OTHERS              = 5.
  IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.


ENDFORM.                    "GETSMART

Thx for your time,

And regards

Rui Ribeiro

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Thanks for your help!

Former Member
0 Kudos

U need to have composer parameters also

Former Member
0 Kudos

Kartik,

Can you be more specific. (Never done that before).

Cumprs,

Former Member
0 Kudos

In my previous answer i mentioned composer parameters actually they are the output option which u've alreeady passed.

also u set this value

MOVE space TO wa_control-preview.

this sap help will also help u

http://help.sap.com/saphelp_nw04/helpdata/en/d5/6243ea8a4111d4b605006094192fe3/content.htm

Edited by: kartik tarla on Jan 17, 2009 10:11 AM

Former Member
0 Kudos

Already saw my problem.

But still cant just "Preview" de document, without the pop'up...

SuhaSaha
Advisor
Advisor
0 Kudos

Hello,

You have to pass PREVIEW as 'X' as well.


  MOVE 'X' TO wa_control-preview.

Try this.

BR,

Suhas