cancel
Showing results for 
Search instead for 
Did you mean: 

Generic extractor using Function Module

Former Member
0 Kudos

Hi Bi Expert

I am testing generic extractor using function module. I have created function module based on by coping RSAX

function group and their get_simple data FM

But when I am testing it gives error function module does exits. I have already FM as local object.

Help me out

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

ya

Former Member
0 Kudos

Hi,

i start from begin ,For doing FM Extraction we want to create Extract structure separately

so create ES with fields that you want for extraction(SE11).

Then goto SE37 copy the FM RSAX_BIW_GET_DATA_SIMPLE.

dont forget to copy global parameter also(SE80) RSAX

In the Table tab there is a tbl E_T_DATA give ur ES name as ref.tbl.

goto source code edit it with

TABLE as your table and find out

CASE I_DSOURCE.

WHEN '<your data source name>'.

OPEN CURSOR WITH HOLD S_CURSOR FOR

SELECT

VBELN " example your fields

VBTYP

NETWR

WAERK

FROM VBAK. *write only select and from.

ENDIF.

  • Fetch records into interface table.

  • named E_T_'Name of extract structure'.

DO.

FETCH NEXT CURSOR S_CURSOR

APPENDING CORRESPONDING FIELDS OF TABLE E_T_DATA

PACKAGE SIZE S_S_IF-MAXSIZE.

IF SY-SUBRC <> 0.

ENDIF.

EXIT.

  • RAISE NO_MORE_DATA.

  • ENDIF.

ENDDO.

CLOSE CURSOR S_CURSOR.

Dont forget to activate

regards ,

Shiraj

Former Member
0 Kudos

Thanks

Problem was solved actually my function group was not active.

thanks a lot for responding all of u

Former Member
0 Kudos

Hi Ajay,

Check here.....

/people/siegfried.szameitat/blog/2005/09/29/generic-extraction-via-function-module

Thanks,

Vijay.

former_member185132
Active Contributor
0 Kudos

Ajay,

What is the error message/dump?

Regards.

Former Member
0 Kudos

thansk for ur reply

error dump{

The function module "ZMTS_RSAX_BIW_GET_DATA_SIMPLE" is called, but

cannot be found in its function group.

Error in ABAP application program.

The current ABAP program "SAPLRSA3" had to be terminated because one of the

statements could not be executed.

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

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_FUNC',

was neither

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

"RSA3_GET_DATA_SIMPLE" "(FUNCTION)"

.

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 program "SAPLRSA3" contains the CALL FUNCTION statement.

The name of the function module to be called is

"ZMTS_RSAX_BIW_GET_DATA_SIMPLE".

but "ZMTS_RSAX_BIW_GET_DATA_SIMPLE" cannot be found in its function group.

Possible reasons:

a) The function module "ZMTS_RSAX_BIW_GET_DATA_SIMPLE" has not been activated.

Therefore,

it cannot be found at runtime.

b) The Function Library contains an incorrect entry for

"ZMTS_RSAX_BIW_GET_DATA_SIMPLE".

c) The function module contains no code, even FUNCTION ... ENDFUNCTION

is missing.}

Edited by: Ajay Kumar on May 11, 2009 9:53 AM

former_member185132
Active Contributor
0 Kudos

Ajay,

The answer is in the dump itself:

Possible reasons:

a) The function module "ZMTS_RSAX_BIW_GET_DATA_SIMPLE" has not been activated. Therefore, it cannot be found at runtime.

b) The Function Library contains an incorrect entry for "ZMTS_RSAX_BIW_GET_DATA_SIMPLE".

c) The function module contains no code, even FUNCTION ... ENDFUNCTION is missing.

Can you check if the FM is

(a) active

(b) present in the function group (goto Main Program --> the include called L<<func grp name>>UXX) and check if your FM in mentioned there

(c) check your FM for function and endfunction statements.

Regards.

Edited by: Suhas Karnik on May 11, 2009 10:03 AM

Former Member
0 Kudos

Hi,

Have you actiavated 'ZMTS_RSAX_BIW_GET_DATA_SIMPLE' FM?

Just check it out.

Regards,

Former Member
0 Kudos

Hi Suhas,

All this I have already checked and activated. I have also mention in thread I have already activated it.

INCLUDE LZMTSFGROUPU01.

"ZMTS_RSAX_BIW_GET_DATA_SIMPLE

it has already included as above in the main program

thanks

Former Member
0 Kudos

Hi,

Just refer this Document and make sure that you haven';t missed any point.

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/a0f46157-e1c4-2910-27aa-e3f4a9c8...

According to me You function module is inactive. can you please log out and log in into system. and check your function module? is it ok or not?

Regards,

Ashish

Former Member
0 Kudos

>

> Hi,

> Just refer this Document and make sure that you haven';t missed any point.

>

> https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/a0f46157-e1c4-2910-27aa-e3f4a9c8...

>

> According to me You function module is inactive. can you please log out and log in into system. and check your function module? is it ok or not?

>

> Regards,

> Ashish

Thanks Ashish

It is already active. Even I have activated it now but same result. And I have followed the all steps what u have given in the link.

help me out.