cancel
Showing results for 
Search instead for 
Did you mean: 

data services - function table structure not correct

former_member334621
Discoverer
0 Kudos

Hello Everyone!

I am using Data Services to read a RFC from my BW system, which is defined as a "Source BW" datastore in DS.

After importing the function, i realize that the structure of the function is not imported correctly.

When i look at se37 in BW, i can see the correct structure of import table parameter:


and then looking at table E_T_GRID_DATA:

While in DS, E_T_GRID_DATA has only this "Line" component:

has anyone faced this and now how to import the correct structure ?



Thanks in advance,

Liron.


Accepted Solutions (0)

Answers (3)

Answers (3)

former_member334621
Discoverer
0 Kudos

Hi All,

i have debugged FM /BODS/FUNCTION_GET and found where the LINE component is assigned:

in line 587, "PERFORM MOVE_IF_TABLES TABLES PRMTAB":

inside the perform:

PRMTAB-TABNAME = IF_TABLES-DBSTRUCT.

IF PRMTAB-TABNAME = SPACE.

IF IF_TABLES-TYPES = 'O'.

* The name was greater than 26 characters, could not fit in DBFIELD

PRMTAB-TABNAME = IF_TABLES-TYP.

ELSE.

PRMTAB-TABNAME = 'RSSOURCE'.

ENDIF.

* RAISE REF_STRUCTURE_MISSING.

ENDIF.


table RSSOURCE is the table type with the LINE component (viewed in SE11).


I went to look where IF_TABLES-DBSTRUCT is defined:

that happens in line 563:

CALL FUNCTION 'FUNCTION_IMPORT_INTERFACE'

EXPORTING

FUNCNAME = FUNCNAME

* IMPORTING

* GLOBAL_FLAG = I01

* REMOTE_CALL = I02

* UPDATE_TASK = I03

TABLES

EXCEPTION_LIST = IF_EXCEPT

EXPORT_PARAMETER = IF_EXPORT

IMPORT_PARAMETER = IF_IMPORT

CHANGING_PARAMETER = IF_CHANGE

TABLES_PARAMETER = IF_TABLES

EXCEPTIONS

ERROR_MESSAGE = 01

FUNCTION_NOT_FOUND = 02

INVALID_NAME = 03.

IF SY-SUBRC > 0.

RAISE FM_NOT_FOUND.

ENDIF.


but i can't understand the inside of the FM since all comments inside are in German.


one more interesting thing is that table IF_TABLES[], does contain row 1 where PARAMETER = E_T_GRID_DATA and TYP = /BIC/NE_2 - which is the correct database structure for my RFC.

the only problem is that the column DBSTRUCT is empty.


In a test SP13 system, the same RFC worked fine, so something worked differently, but i can't compare.


Regards,

Liron

santossh
Active Participant
0 Kudos

Hi Liron,

Looking at the issue I can certainly say  that the issue lies in FM.

Can you try executing the FM from SE37 T-code of the system where the FM is created and check the output results?

(If it returns nothing, then you can consult developer and try debugging the FM)

I suppose the Associated type for the Parameters used in the in the Tables tab of FM should be table type (try changing to TableType instead of structure - you can ask developer to check this possibility).

Regards,

Santosh G.

werner_daehn
Active Contributor
0 Kudos

That does not make sense. There has to be something wrong, an element called LINE does not even exist. Your structure as seen in SAPGUI is active, so it can't be that. Datatypes are all fine and the problem is not a missing column but different columns. I would check if you are really connected to the same system.

If nothing else helps, look in the se37 transaction for all functions called /BODS/.... One of these is called something like "function import" (can't recall the exact name) and run this function from SAPGUI. The return of this RFC is what DS Designer does show as imported structure.

former_member334621
Discoverer
0 Kudos

Hi Werner,

thank you for the reply.

I found FM /BODS/FUNCTION_GET, which when ran, does in fact return the structure E_T_GRID_DATA with element "Line".

So i guess the problem lies in this FM ?

Regards,

Liron Ezra.

werner_daehn
Active Contributor
0 Kudos

I guess best would be to go to an ABAP developer and ask him for an explanation why this function module returns a LINE but not the structure you see in se37.

Either you together come to the conclusion that there is something wrong in the system and you can fix it. Or it is with the function module and you can point us into the direction of where.

Would that work for you?