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

Function Module creation in 4.6C

Former Member
0 Likes
673

Hi techies,

I am not an ABAPer, but just copying Function Module code from 3.1 R/3 to 4.6C R/3.

In 3.1, for the Table Parameter "E_DATA", there are two columns 'Reference Structure' and 'Reference type'. Since I am using the structure 'ZBFNEW', it looks following:

<u>Table parameters Ref. structure Reference Type</u> E_DATA ZBFNEW - Now same thing I wanted to do in 4.6C, but there under table parameter tab, there are no field called 'Ref Structure. The column are: Parameter Name, Type Specification and Reference type.

So the question is How do I assign Structure in FM for Table parameter. In coulmn, i tried with all the options (Type, LIKE and TYPE Ref To), but it gives error "Only table types may be used as the reference type for a table parameter"

Any suggestion guys???

Regards, Pankaj

4 REPLIES 4
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
602

Make the Type Specification <b>LIKE</b> and the reference type <b>ZBFNEW</b>

Should work for you.

Regards,

Rich Heilman

Read only

Former Member
0 Likes
602

Hi Rich,

As I mentioned, I tried with LIKE, but it gives the error "Tables using LIKE may only reference flat structures. Message no. FL 043"

REgards

Pankaj

Read only

Former Member
0 Likes
602

Rich's suggestion should work for you. The message you are receiving

is in regards to a new feature in 4.6 that did not exist in 3.1. Using SE11,

you can define an internal table definition in the Dictionary.

Put the new table definition name next to structures. Hit create and you

will be asked about what you are creating. Pick the Table Type option. For example,

you could create a table type definition called Z_T_ZBFNEW, based on

structure ZBFNEW. Then you would use the TYPE setting for your table,

setting it to TYPE Z_T_ZBFNEW.

As an aside, the TABLE parameter tab is considered to be

obsolete in 4.6. You can now pass tables using the

EXPORTING, IMPORTING and CHANGING parameters. So if/when you start

coding new Function Modules, I suggest you stop using the

TABLE parameter tab.

Just curious, how does a non-ABAPer get assigned the task to copy

Function Modules? Keep smiling and good luck!

Message was edited by: Charles Folwell

Read only

Former Member
0 Likes
602

Thanks both of you? I hope it will work now.

To clarify your curiosity....I am a SAP BW consultant wherin we need to build the Datasource on FM and extract structure. It's a ABAPer job, but since he is not abailable at the moment, I took plunge and enjoying at the moment....but surely it's not my domain. Anyway thanks...

Regards, Pankaj