cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with smartform

Former Member
0 Kudos

Hi All,

Here I've a report which calls the smartform.

I need to pass the same internal table data and select-options to smartform.

if it is parameter so that in smartform in FORM INTERFACE we will declare as P_EBELN type EKKO-EBELN.

if internal table data with one table means IT_FINAL type EKKO.

But here i need to pass select options data and three different tables data.

the report internal table is like this.

SELECT-OPTIONS:SO_EBELN FOR EKKO-EBELN.

Data:begin of it_final occurs 0,

ebeln type ekko-ebeln,

ebelp type ekpo-ebeln,

matnr type ekpo-matnr,

maktx type makt-maktx,

end of it_final.

Im using :

CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'

EXPORTING

FORMNAME = 'ZPURCHASE'

IMPORTING

FM_NAME = FM_NAME

EXCEPTIONS

NO_FORM = 1

NO_FUNCTION_MODULE = 2

OTHERS = 3.

CALL FUNCTION FM_NAME

EXPORTING

SO_EBELN = SO_EBELN

TABLES

IT_FINAL = IT_FINAL

Thank You,

ANu

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

To pass select-options to smartforms, you must create a structure for that select-options. That means your data can be passed successfully.

let's take example of Purchase order document:

In se11, create a structure with following field:

sign type char1

option type char2

low type ebeln

high type ebeln

you will copy your selection-options to this data variable has type of below structure


data: s_import_ebeln type table of zs_selpo. "zs_selpo is structure you define above

s_import_ebeln[] = SO_EBELN[].

In form interface, define your SO_EBELN type zs_selpo.

Regards,

Answers (2)

Answers (2)

Former Member
0 Kudos

hope ur clear to ur self...

hope the data to be presented in it_final with ebeln no , then y would like to send eblen select optiopn data to sf whether it may be prameter or select option . i mean u gat that eblen no from it_final table .

you may do one thing get all details of eblen in to one table then send to smartform.

importparametrs won't handle table data .. only changing parametrs and obsolete tables interfaces.for smartform or functionmodule.

Moderator message: please write proper English, do not use SMS speak.

Edited by: Thomas Zloch on Oct 13, 2010 11:25 AM

Former Member
0 Kudos

Hi,

the parameters that are declared in the smartforms and that have been used in the abap code must be of the same type.

you can create a custom structure in se11, which includes the fields that you require from ekko,ekpo,makt table eg. ZS_EKKO.then in the smartform you can declare IT_FINAL type ZS_EKKO and same for the abap code.

you cannot pass a select option to a parameter.

regards,

Sakshi