Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

FM based Data Source problem

Former Member
0 Likes
1,163

I made a function group ZFGROUP and function module ZFMODUL like this:

FUNCTION ZFMODUL.
*"----------------------------------------------------------------------
*"*"Local Interface:
*"  EXPORTING
*"     VALUE(ZFINTTBL) TYPE  ZFINTTABLE
*"----------------------------------------------------------------------

select distinct *
from  DFMCA_RETURN
into table ZFINTTBL
where REVENUE_TYPE = 'DNPV'.

ENDFUNCTION.

ZFINTTABLE is a table type defined in SE11. It has the same structure as DFMCA_RETURN (some table). For a test i just want to select distinct records from that table.

The module works fine when I call it from ABAP program:

*&---------------------------------------------------------------------*
*& Report  ZTEST20130227
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*

REPORT  ZTEST20130227.

data: X type ZFINTTABLE,
       X_line like line of X.

call function 'ZFMODUL' importing ZFINTTBL = X.

data n type i.
n = 0.

loop at X into X_line.
   write: / X_line-TAXPAYER, X_line-FBNUM.
   n = n + 1.
endloop.

write: / 'Konec programa, število zapisov = ', n.

But when I try to use it as a base for data source, i get the error "The specified table does not exist" (see attached file).

Can anybody tell me what is wrong ?

Thanks in advance.

7 REPLIES 7
Read only

Former Member
0 Likes
1,101

Hi Miran,

I think you are doing this development for Late Payment Interest Charges- FINT.

DFMCA_RETURN is a standard SAP Table available within R/3 SAP systems depending on your version and release level, possibly this table is accessible in you system or not it depends on some condition.

Find more on

http://help.sap.com/saphelp_nw70/helpdata/en/c1/c5b1f0db4e42ae8d8ff07b73b0c592/frameset.htm

Regards,

Arpit Varma

Read only

RaymondGiuseppi
Active Contributor
0 Likes
1,101

In RSO2 you must fill the 2 fields function module name AND structure for the DataSource, of course you must first click on extraction by FM and do not play with the other options...

However, the FM must have a defined signature to be allowed as Datasouce, Usually we copy the  sample FM  RSAX_BIW_GET_DATA_SIMPLE to customernamespace, like Z_XXXX and adapt the code.

(More information is available at help.sap.com like Maintaining Generic DataSources.)

Regards,

Raymond

Read only

0 Likes
1,101

Thank you for your answer.

Now I copied the RSAX_BIW_GET_DATA_SIMPLE module into ZFMODUL1, function group ZFGROUP. But when I try to adapt it according to intformation written in

http://help.sap.com/saphelp_crm700_ehp02/helpdata/EN/86/1c8c3e94243446e10000000a114084/content.htm

I get the message TABLE parameters are obsolete (Capture2.png) and from now on I can't edit the module anymore.


Regards

  Miran

Read only

0 Likes
1,101

Don't use your Table Type in the TABLE tab, but the structure behind (DFMCA_RETURN). Ignore Warnings (BW used to use TABLE parameter, and it should be a long time before SAP changes it. ) And don't forget to copy TOP include too.

Regards,

Raymond

Read only

0 Likes
1,101

Thanks again, but when I replace SFLIGHT with DFMCA_RETURN (in the field "Associated type") ,

I get the message "TABLES parameters are obsolete". After that I am not able to save, activate nor edit the module.

Regards

Miran

Read only

0 Likes
1,101

What is your version, for me it is a warning message... Just press ENTER.

Read only

0 Likes
1,101

ENTER did the work. Now I managed to save the data source.

Thanks a lot & regards

Miran