10-17-2007 8:59 AM
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
10-17-2007 9:17 AM
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
10-17-2007 9:08 AM
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
10-17-2007 9:17 AM
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
10-17-2007 1:08 PM
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