Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

regarding smartforms erro

Former Member
0 Likes
427

hi experts,

i have developed a driver program for the smartforms ,in the driver program i am displaying with the help of final internal table and with the help of structure i m declaring an internal table in the smartforms,the structure is containg the fields which i used in the driver program for output but when i execute this its giving error...plz helpme to short out this problem what are the points i must consider while declaring structure ....

the error:::

ShrtText

Type conflict when calling a function module (field length).

What happened?

Error in ABAP application program.

The current ABAP program "ZRAW_PRODUCTION_REPORT_SFM" had to be terminated

because one of the

statements could not be executed.

This is probably due to an error in the ABAP program.

A function module was called incorrectly.

Error analysis

An exception occurred. This exception is dealt with in more detail below

. The exception, which is assigned to the class 'CX_SY_DYN_CALL_ILLEGAL_TYPE',

was neither

caught nor passed along using a RAISING clause, in the procedure "FORM_DISP"

"(FORM)"

.

Since the caller of the procedure could not have expected this exception

to occur, the running program was terminated.

The reason for the exception is:

The call to the function module "/1BCDWB/SF00000211" is incorrect:

In the function module interface, you can specify only

fields of a specific type and length under "ITAB_FINAL_SFM".

Although the currently specified field

"ITAB_FINAL" is the correct type, its length is incorrect.

the final table in the driver program is given below::

,from this table i m showing output.......

TYPES:BEGIN OF S_FINAL ,

MATNR TYPE MARD-MATNR, "for material number

WERKS TYPE MARD-WERKS, "for plant id

LGORT TYPE MARD-LGORT, "Storage location

LABST TYPE MARD-LABST, "opening stock

INSME TYPE MARD-INSME, "Stock in quality inspection

SPEME TYPE MARD-SPEME, "Blocked stock

EINME TYPE MARD-EINME, "Totl Stck of All Restricted Batches

RETME TYPE MARD-RETME, "Blocked Stock Returns

LIFNR TYPE MSEG-LIFNR, "vendors number

MAKTX TYPE MAKT-MAKTX, "for material description

NAME1 TYPE T001W-NAME1, "plant name

NAME2 TYPE LFA1-NAME1, "vendors name

LABST_TM TYPE MARD-LABST, "target monthly

LABST_CL TYPE MARD-LABST, "closing stock

LABST_RT TYPE MARD-LABST, "receive today

LABST_RTLD TYPE MARD-LABST, "receive till date

LABST_RTY TYPE MARD-LABST , "receive till year

LABST_IT TYPE MARD-LABST, "issued today

LABST_ITLD TYPE MARD-LABST, "issued till date

LABST_ITY TYPE MARD-LABST, "issued till year

BWART TYPE MSEG-BWART, "movement type

MBLNR TYPE MSEG-MBLNR, "material doc number

EISBE_CL TYPE MARC-EISBE , "closing balance

EISBE TYPE MARC-EISBE, "safety stock

<b>LGOBE TYPE T001L-LGOBE, "Description of storage location</b>

<b>P_DATE TYPE SY-DATUM, "for previous date</b>

<b>GPTXT TYPE T750E-GPTXT, "for remarks</b>

END OF S_FINAL.

DATA:ITAB_FINAL TYPE STANDARD TABLE OF S_FINAL WITH HEADER LINE.

the fields which are bolds i m not showing in the output using for some calculation thatsit.

with the refrence of this final table how will i declare my structure so that it wont give the above error if possible kindly send me the syntax of declaring structure along with my fields....

3 REPLIES 3
Read only

varma_narayana
Active Contributor
0 Likes
409

Hii..Rajat..

This error is bcoz of the Internal table declaration in Smartform and Print program are not based on the Same data type.

So You declare the Same Data type S_FINAL in the Global Definitions->Data types Section of Smartform.

And then In the Form interface in the TABLES parameter

Declare the Internal table using this same data type S_FINAL.

Now again activate the Smartform. The FM will be re generated.

Call this FM again in your print program

This will surely work for u...

<b>REWARD IF HELPFUL</b>

Read only

0 Likes
409

dear narayan,

cud u plz explain it more clearly as i m new to smartforms::::;;;;;;

Read only

Former Member
0 Likes
409

hey ravi ,

u need to specify u r final internal table name in tables parameter in the for interface of u r smartform ....so tat it can interface with u r driverprogram......

after giving the internal table name in form interface activate u r smartform and again call u r smartfunction module .... u will find tables parameter(wat ever u have given in form interface) now pass u r final internal table with data.

reward points if helpful....