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.
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 | |
| 3 | |
| 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.