SAP R/3 форум ABAP консультантов
Russian ABAP Developer's Club

Home - FAQ - Search - Memberlist - Usergroups - Profile - Log in to check your private messages - Register - Log in - English
Blogs - Weblogs News

Calling Smartforms



 
Post new topic   Reply to topic    Russian ABAP Developer's Club Forum Index -> Smartforms, SapScripts, PDF
View previous topic :: View next topic  
Author Message
admin
Администратор
Администратор



Joined: 01 Sep 2007
Posts: 1639

PostPosted: Tue Sep 11, 2007 3:35 pm    Post subject: Calling Smartforms Reply with quote

You should use 'SSF_FUNCTION_MODULE_NAME' & call function fm_name in your program & not others.

Code:
*&---------------------------------------------------------------------*
*& Report  ZTACA_DRIVER_SMARTFORM                                      *
*&                                                                     *
*&---------------------------------------------------------------------*
*&                                                                     *
*&                                                                     *
*&---------------------------------------------------------------------*

REPORT  ZTACA_DRIVER_SMARTFORM                  .

Tables : sflight.
Data : fm_name TYPE rs38l_fnam.

*data : Begin of it_flttab occurs 0,
*        carrid type sflight-carrid,
*        connid type sflight-connid,
*        fldate type sflight-fldate,
*        seatsmax type sflight-seatsmax,
*        seatsocc type sflight-seatsocc,
*        End of it_flttab.

data : it_flttab like table  of sflight.
Data : g_salary type i .
*       it_flttab type standard table of ty_flt.
g_salary = 1000.


select carrid connid fldate seatsmax seatsocc from sflight into
corresponding fields of table it_flttab.

CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
  EXPORTING
    formname                 = 'ZTACA_SMFORM2'
*   VARIANT                  = ' '
*   DIRECT_CALL              = ' '
 IMPORTING
   FM_NAME                  = fm_name
 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 fm_name
  Exporting
     salary = g_salary
  TABLES
     it_flttab = it_flttab
  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.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Russian ABAP Developer's Club Forum Index -> Smartforms, SapScripts, PDF All times are GMT + 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


All product names are trademarks of their respective companies. SAPNET.RU websites are in no way affiliated with SAP AG.
SAP, SAP R/3, R/3 software, mySAP, ABAP, BAPI, xApps, SAP NetWeaver and any other are registered trademarks of SAP AG.
Every effort is made to ensure content integrity. Use information on this site at your own risk.