‎2009 Mar 03 11:15 AM
Hai All,
I am using FUNCTION MODULE---- 'CSAP_MAT_BOM_READ' to get the component details of a BOM Header.
I am exporting the input parameters to the func mod as
EXPORTING
material = w_mast-matnr
PLANT = w_mast-werks
bom_usage = w_mast-stlan
ALTERNATIVE = w_mast-stlal
VALID_FROM = v_datum
VALID_TO = v_datum
and getting the details into int tab as
TABLES
T_STPO = i_stpo
But When i execute, the program is being terminated due to a short dump.
The error description is as shown below
*The reason for the exception is:*
*The call to the function module "CSAP_MAT_BOM_READ" is incorrect:*
*In the function module interface, you can specify only*
*fields of a specific type and length under "T_STPO".*
*Although the currently specified field*
*" " is the correct type, its length is incorrect.*
Please Help me in solving this exception....
‎2009 Mar 03 11:32 AM
Hi,
Check this one
Declare like this,
Data: it_tstp2 TYPE TABLE OF stpo_api02,
it_tstk2 TYPE TABLE OF stko_api02.
CALL FUNCTION 'CSAP_MAT_BOM_READ'
EXPORTING
material = wa_mast-matnr
plant = wa_mast-werks
bom_usage = wa_mast-stlan
alternative = wa_mast-stlal
IMPORTING
fl_warning = fg_warning
TABLES
t_stpo = it_tstp2
t_stko = it_tstk2
EXCEPTIONS
error = 1
OTHERS = 2.
IF sy-subrc = 0.
Endif.
‎2009 Mar 03 11:18 AM
the type decalartion for i_stpo should be of type T_STPO
check in the F.M what is the type of T_STPO , declare i_stpo to be of same type ie
data:i_stpo type standard table of "type of T_STPO"
this is simple
Hope it helps
Bhanu
‎2009 Mar 03 11:18 AM
Hi kavitha,
I think the table parameter(i_stpo) what u have used is diff frm the one which is there in th Function Module. Please see the table type or the table used there. And declare the same type as in ur code also.
Keerthi.
‎2009 Mar 03 11:24 AM
Declare T_STPO of type STPO_API02
Data: T_STPO type table of STPO_API02.
‎2009 Mar 03 11:26 AM
Hi,
Try passing the same values in se37 (execute FM) and check whether any data is returned in table t_stpo
If the same data is returning some data in se37, then there is some error in your coding part.
Check it once and let me know.
Regards,
Tarun
‎2009 Mar 03 11:32 AM
Hi,
Check this one
Declare like this,
Data: it_tstp2 TYPE TABLE OF stpo_api02,
it_tstk2 TYPE TABLE OF stko_api02.
CALL FUNCTION 'CSAP_MAT_BOM_READ'
EXPORTING
material = wa_mast-matnr
plant = wa_mast-werks
bom_usage = wa_mast-stlan
alternative = wa_mast-stlal
IMPORTING
fl_warning = fg_warning
TABLES
t_stpo = it_tstp2
t_stko = it_tstk2
EXCEPTIONS
error = 1
OTHERS = 2.
IF sy-subrc = 0.
Endif.
‎2009 Mar 03 11:50 AM
I tried ur code, an error message stating 'You are not authorised to display this BOM'
is being displayed.
‎2009 Mar 03 12:02 PM
Hi,
Check with other valid BOM or give valid inputs material number, plant, BOM usage and Alternative BOM. check the same BOM in CS03.