cancel
Showing results for 
Search instead for 
Did you mean: 

smartform problem

Former Member
0 Kudos

i have a smartform and the user input is select-options. .

-


tcode: se 38

smartform driver program

-



types: begin of ty_mkpf,
          mblnr type mkpf-belnr,
         ...............
         end of ty_mkpf.

data: it_mkpf type standard table of ty_mkpf,
         wa_mkpf type ty_mkpf.
data: fmname type rs38l_fnam.
**---------------------------------------------------------**
SELECT-OPTIONS S_MBLNR FOR MKPF-MBLNR .
**------------------------------------------------------------**

select mblnr ____ into i_mkpf ............. where mblnr in s_mblnr.
**---------------------------------------------------------**
call function 'SSF_FUNCTION_MODULE_NAME' 
  exporting 
    formname                 = 'ZSMARTFORM' 
*   VARIANT                  = ' ' 
*   DIRECT_CALL              = ' ' 
  IMPORTING 
    FM_NAME                  = FM_NAME 
  EXCEPTIONS 
    NO_FORM                  = 1 
    NO_FUNCTION_MODULE       = 2 
    OTHERS                   = 3. 
if sy-subrc <> 0. 
   WRITE: / 'ERROR 1'. 
* 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 
*   ARCHIVE_INDEX              = 
*   ARCHIVE_INDEX_TAB          = 
*   ARCHIVE_PARAMETERS         = 
*   CONTROL_PARAMETERS         = 
*   MAIL_APPL_OBJ              = 
*   MAIL_RECIPIENT             = 
*   MAIL_SENDER                = 
*   OUTPUT_OPTIONS             = 
*   USER_SETTINGS              = 'X' 
* IMPORTING 
*   DOCUMENT_OUTPUT_INFO       = 
*   JOB_OUTPUT_INFO            = 
*   JOB_OUTPUT_OPTIONS         = 
  TABLES 
    Gt_MKPF                    =  IT_MKPF    <= i am passing thru tables
  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. 
**----------------------------------------------------------**

tcode :smartforms 
---------------------
form interface => tables

gt_mkpf  type  it_mkpf .   

but i am getting errors like " it_mkpf is unknown/ not defined "

pls tell me how to access the 'table' parameter in form interface.

Moderator message: please use more descriptive subject lines from now on.

Edited by: Thomas Zloch on Jun 29, 2010 3:20 PM

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi..

Since you have defined IT_MKPF only in your Report/ Driver Prog..it would not be recognized in your Smartform.

You will have to create Structure and Table Type in ABAP Dictionary SE11 exactly similar to what you are using in your report.

Then declare the table and structure in smartform using the created structure and table type, it will work fine.

Regards,

Karthik

Former Member
0 Kudos

thankx a ton for ur response, but can u pls elaborate ur answer wid an example

Moderator message: please don't use SMS speak.

Edited by: Thomas Zloch on Jun 29, 2010 3:20 PM

Former Member
0 Kudos

hi,

The table which u have defined in the interface should be in the data dictionary

form interface => tables

gt_mkpf type it_mkpf .---- this it_mkpf should be a data dictionary object .

so the solution for this is u can either create a structure in se11 from the mkpf the field which u want , and then use tat structure in the form interface .

For eg : if i created a structure Zmkpf in se11 then u define like this in form interface --

gt_mkpf type zmkpf

Answers (0)