Application Development 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: 

ABAP for Super Dumps: Import- & Export-Parameter for a Table in a FM

Former Member
0 Kudos

Hello ABAP Profs,

sorry I am BW.

<b>Import- & Export-Parameter for a Table in and out of an Function Modul.</b>

I want to import a table into a Function Module, change it and export it again.

How do I have to define the Import- and Export- Parameters in the FM ?

The table looks looks this:

DATA: zvpshub_tab TYPE SORTED TABLE OF /bic/pzvpshub WITH UNIQUE KEY

/bic/zvpshub objvers /bic/zvpsoursy INITIAL SIZE 0.

Thanks a lot

Martin Sautter

1 ACCEPTED SOLUTION

Clemenss
Active Contributor
0 Kudos

Hi Martin,

go to dictionary and define a table type: In SE11, enter name in Data type field, use Create button. You will be offered choice of data element, structure or table type. Use table type.In key tab define as in DATA statement.

Then use it as type for CHANGING parameter in your function.

Regards,

Clemens

3 REPLIES 3

Former Member
0 Kudos

You have to define it on the on the 'TABLES' section of the FM.

Just give a name and a dictionary structure in your case '/bic/pzvpshub'.

Regards,

Srihari

Clemenss
Active Contributor
0 Kudos

Hi Martin,

go to dictionary and define a table type: In SE11, enter name in Data type field, use Create button. You will be offered choice of data element, structure or table type. Use table type.In key tab define as in DATA statement.

Then use it as type for CHANGING parameter in your function.

Regards,

Clemens

Former Member
0 Kudos

Hi Clemens,

<u>in SE11</u> I defined a datatype of Type Structure: ZVPSHUB_ROW.

<u>in SE11</u> I defiend a datatype of Type Tabletype: ZVPSHUB_TAB,

bases on Rowtype ZVPSHUB_ROW.

<u>in SE 80</u> I creates an FM with a CHANGEING Parameter referencing ZVPSHUB_TAB:

FUNCTION ZVP_SHUB_TAB_LOAD.

*"----


""Lokale Schnittstelle:

*" CHANGING

*" VALUE(SHUB_TAB) TYPE ZVPSHUB_TAB

*"----


<u>in RSA1</u> in BW in the Startroutine of the Upload Rules in defined the table:

DATA:shub_tab TYPE zvpshub_tab.

<u>in RSA1</u> in BW in the Startroutine of the Upload Rules in defined the table:

DATA:shub_tab TYPE zvpshub_tab.

<u>in RSA1</u> in BW in the Startroutine i called the FM

CALL FUNCTION 'ZVP_SHUB_TAB_LOAD'

CHANGING

shub_tab = shub_tab.

and it works ..

Thank You

Martin Sautter