on ‎2006 Jul 04 1:17 PM
I have create an extractor based on
A function module: ZSALESTEXT_EXTRACT
Extract structure: ZOXDT20030
When I execute this extractor on debug mode, as the function module ZSALESTEXT_EXTRACT is called I have a short dump with the following message:
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:
When calling the function module "ZSALESTEXT_EXTRACT", one of the parameters
needed according to the interface description was not specified.
This parameter was "E_T_DATA".
Do you know what's happen ?
Many thanks
Annexe Function module code :
FUNCTION ZSALESTEXT_EXTRACT.
*"----
""Local interface:
*" TABLES
*" E_T_DATA STRUCTURE ZOXDT20030
*" SELECTION STRUCTURE RSSELECT
*"----
Data: D_NAME LIKE THEAD-TDNAME,
d_vbeln like vbap-vbeln,
d_posnr like vbap-posnr,
d_date1 like vbap-aedat,
d_date2 like vbap-aedat,
TRESULT LIKE TLINE occurs 1 with header line.
*internal table
Types: BEGIN OF SalesTextTable,
VBELN Like VBAP-VBELN,
POSNR Like VBAP-POSNR,
TextMST Like TLINE-TDLINE,
TextKPI Like TLINE-TDLINE,
END OF SalesTextTable.
*Tables: Like SalesTextTable with header line.
DATA: ITAB TYPE TABLE OF SalesTextTable with header line
WITH KEY VBELN
POSNR,
WA_ITAB LIKE LINE OF ITAB.
LOOP AT SELECTION WHERE FIELDNM EQ 'DATE1'.
d_date1 = SELECTION-LOW.
ENDLOOP.
LOOP AT SELECTION WHERE FIELDNM EQ 'DATE2'.
d_date2 = SELECTION-LOW.
ENDLOOP.
Select VBELN POSNR
into corresponding fields of table ITAB
from VBAP
where AEDAT between d_date1 and d_date2.
*
Loop at ITAB into WA_ITAB.
Concatenate WA_ITAB-VBELN WA_ITAB-POSNR into d_name.
* Material Sales Text
CALL FUNCTION 'ZSALES_ORDER_TEXT_BW'
EXPORTING
CLIENT = SY-MANDT
ID = '0001'
LANGUAGE = 'E'
NAME = d_name
OBJECT = 'VBBP'
TABLES
LINES = TRESULT.
If sy-subrc = 0.
Read table TRESULT index 1.
E_T_DATA-TextMST = TRESULT-TDLINE.
refresh TRESULT.
clear TRESULT.
endif.
* KPI Comment
CALL FUNCTION 'ZSALES_ORDER_TEXT_BW'
EXPORTING
CLIENT = SY-MANDT
ID = 'Z004'
LANGUAGE = 'E'
NAME = d_name
OBJECT = 'VBBP'
TABLES
LINES = TRESULT.
If sy-subrc = 0.
Read table TRESULT index 1.
E_T_DATA-TextKPIC = TRESULT-TDLINE.
clear TRESULT.
endif.
E_T_DATA-SALES_ORDER = WA_ITAB-VBELN.
E_T_DATA-SALES_ITEM = WA_ITAB-POSNR.
Append E_T_DATA.
endloop.
ENDFUNCTION.
Request clarification before answering.
This FM does not have the correct import parameters. Have a look at RSAX_BIW_GET_DATA_SIMPLE.
FUNCTION RSAX_BIW_GET_DATA_SIMPLE.
*"----
""Lokale Schnittstelle:
*" IMPORTING
*" VALUE(I_REQUNR) TYPE SRSC_S_IF_SIMPLE-REQUNR
*" VALUE(I_DSOURCE) TYPE SRSC_S_IF_SIMPLE-DSOURCE OPTIONAL
*" VALUE(I_MAXSIZE) TYPE SRSC_S_IF_SIMPLE-MAXSIZE OPTIONAL
*" VALUE(I_INITFLAG) TYPE SRSC_S_IF_SIMPLE-INITFLAG OPTIONAL
*" VALUE(I_READ_ONLY) TYPE SRSC_S_IF_SIMPLE-READONLY OPTIONAL
*" VALUE(I_REMOTE_CALL) TYPE SBIWA_FLAG DEFAULT SBIWA_C_FLAG_OFF
*" TABLES
*" I_T_SELECT TYPE SRSC_S_IF_SIMPLE-T_SELECT OPTIONAL
*" I_T_FIELDS TYPE SRSC_S_IF_SIMPLE-T_FIELDS OPTIONAL
*" E_T_DATA STRUCTURE SFLIGHT OPTIONAL
*" EXCEPTIONS
*" NO_MORE_DATA
*" ERROR_PASSED_TO_MESS_HANDLER
Your FM will be called from the service API and must have the same parameters as this same FM.
Cheers
Aneesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello SAP gurus.
I know i konw, it's maybe too late, but who knew, maybe somebody would need the answer. I faced the same problem this morning, the answer is that in my FM i forgete to put my inputs as OPTIONAL (E_T_DATA especialy).
Hard luck.
Hope it can help
Salah
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello luminy13,
importing, exporting and tables parameters need to fit together, both on program side that calls the function module, and on "the other side", the definition of the function module interface itself.
Make sure that the parameters on both sides are of the same type/structure/table structure.
Check the type of x_t_data on the side that calls the function module. Use the same type for e_t_data in the function module interface.
Sorry if you knew all that already,
regards,
Annette
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 5 | |
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.