on 06-27-2007 5:09 PM
Hi;
i have a program that calls a smartform but i get an error, it seems like is not passing the table structure to the smartform.
this is the structure i've created to fill it later with data.
DATA: BEGIN OF repo OCCURS 0,
material LIKE mseg-matnr,
uventa LIKE mseg-erfme,
descri LIKE makt-maktx,
santer LIKE mseg-menge,
crecibi LIKE mseg-menge,
fingre LIKE mkpf-budat,
resolu(10) TYPE c,
recep(10) TYPE c,
devolu LIKE mseg-menge,
iotros LIKE mseg-menge,
ventas LIKE mseg-menge,
sotros LIKE mseg-menge,
acumula LIKE mseg-menge,
saldo LIKE mseg-menge.
DATA: END OF repo.
Then i fill the REPO structure with data an pass it (i've checked that there is data).
CALL FUNCTION fn_name
EXPORTING
fecha1 = pfecha-low
fecha2 = pfechant-high
ciudad = pcentro
TABLES
itab = repo
EXCEPTIONS
formating_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5.
when compile the program and the smartform they don't show any error.
in the smartform:
1) form interface => parameter ITAB1 LIKE type ref. ITAB
2) global defin = > name var ITAB2 TYPE type ref. ITAB
The error when running the program:
Err.tmpo.ejec. CALL_FUNCTION_PARM_MISSING
Excep. CX_SY_DYN_CALL_PARAM_MISSING
Texto breve
Incorrect parameter with CALL FUNCTION.
Anál.errores
An exception occurred that is explained in detail below.
The exception, which is assigned to class 'CX_SY_DYN_CALL_PARAM_MISSING', was not caught and
therefore caused a runtime error.
The reason for the exception is:
When calling the function module "/1BCDWB/SF00000043", one of the parameters
needed according to the interface description was not specified.
This parameter was "ITAB1".
Here is where the error shows.
>>>>> CALL FUNCTION fn_name
251 EXPORTING
252 fecha1 = pfecha-low
253 fecha2 = pfechant-high
254 ciudad = pcentro
255 TABLES
256 itab = repo
257 EXCEPTIONS
258 formating_error = 1
259 internal_error = 2
260 send_error = 3
261 user_canceled = 4
262 OTHERS = 5.
Thanks on advance.
David Fúnez
Tegucigalpa, Honduras
Corp. Mandofer
Hi,
In smartform, you need to declare
form interface->Import parameters
Declare these parametrs
pfecha-low
pfechant-high
pcentro
Form Interface->Tables
Declare
itab like znewtable
Kindly rewar points by clicking the star on the left of reply,if it helps.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey,
Check your FORM INTERFACE in smartforms. Number or type of parameteres that you are passing to CALL FUNCTION fm_name in your program is different than what you have in your smartform.
Also, while passing tables, be sure that the structure of the table in the program is same as that of in the smartfotrm. To achieve that, there are two options :
1. Create a zstructure in data dictionary
OR
2. Define a structure in the GLOBAL DEFINITIONS->TYPES in the smartform. Then define a table of that structure type & then use that table in your form interface or global definitions.
i.e. In SMARTFORMS->GLOBAL DEFINITIONS->TYPES, define
TYPES : BEGIN OF x_struct1,
field1 type.....,
field2 type.....,
.....
END OF x_struct1.
TYPES : it_itab TYPE TABLE OF x_struct1.
Now, use it_itab to define your tables in the smartform so that type mismatch between your program & form wont happen. Here sequence and no of fields should be same in both program & smartform.
Reward points if the answer is helpful.
Thankx,
Mukul
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
When you have to pass an internal table to the Smartform by using the Function Module then that need to be create as an structure with SE11, then declare internal table in SMARTFORM of that type and then pass it.
Regards,
Amit
Reward all helpful replies.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Amit;
i've created the structure as you said, but a still get the same error.
TABLES: mara, mseg, mkpf, makt, znewtable.
DATA: BEGIN OF repo OCCURS 0.
INCLUDE STRUCTURE znewtable.
DATA: END OF repo.
It works Ok, i fill the structure with the data and shows the same error.
What could i doing grong..?
David Fúnez
Tegucigalpa, Honduras
Corp. Mandofer
User | Count |
---|---|
88 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.