cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Extractor based on function module

Former Member
0 Likes
751

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.

View Entire Topic
Former Member
0 Likes

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

ria_aggarwal1
Newcomer
0 Likes

Hello Salah,

True, I need this today, and it helped. Still i am facing a problem but atleast now E_T_Data missing parameter issue is not coming.

Thanks,

Ria Aggarwal.