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: 

How to convert table parameter to export parameter in function module

Former Member
0 Kudos

Hi friends,

Is it possible to convert Table parameter to Export parameter. If it possible just tel me how to do that.

Am using BAPI_INSPLOT_GETLIST but i want that table values in my customized BAPIs export parameter.

Thanks,

Arun

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hello Arun,

In your case, you need to create a table type for the structure BAPI2045L1 (the type of table returned by BAPI_INSPLOT_GETLIST). Do this in t-code SE11. now in your custom FM declare an export parameter associating it with the created table type

<parameter_name> TYPE <table type created>

now in your source code call the BAPI which returns the desired table. So u get the table with values.

hopefully its clear now.

for any further query you can always enquire.

thanks and regards,

Koushik

11 REPLIES 11

Former Member
0 Kudos

this is not possible without completeley modifying that SAP standard FM which you probably dont want to.

0 Kudos

Am going to create one function module RFC enabled inside that i will call BAPI_INSPLOT_GETLIST after that how to convert table parameter to export parameter.

0 Kudos

there is no need to convert anything as long as the type of your export parameter is accrodingly set. Use a tabletype for that.

But be aware it has to a DDIC tabletype, so better first create it.

0 Kudos

I created new function module inside export parameter i put that BAPI table name . In source code i called BAPI_INSPLOT_GETLIST and pass that table values into export parameter but its showing some error that table is not an internal table

0 Kudos

I created new function module inside export parameter i put that BAPI table name . In source code i called BAPI_INSPLOT_GETLIST and pass that table values into export parameter but its showing some error that table is not an internal table

Former Member
0 Kudos

Hi,

All you need to do is just declare a parameter under EXPORT tab and associate with it the respective table type.

Suppose,

to export a table of structure type ELIGBOX. Create a table type for the structure and associate the parameter with the table type created. So by this you can convert the table type parameter to an export type parameter.

thanks and regards,

Koushik

0 Kudos

HI Koushik,

Fist of all thanks for your rply, But i need some more clarification inside source code i want to write any code like creating internal table and all.

0 Kudos

you have to type your export parameter with a TABLETYPE, not with a structure to make it work, as already mentioned above.

Feel free to ask if you may have not understood what we are trying to tell you.

raymond_giuseppi
Active Contributor
0 Kudos

- Create a Z table type via SE11 in the [customer namespace|https://service.sap.com/sap/support/notes/16466] ([data type|http://help.sap.com/saphelp_nw04/helpdata/en/90/8d72fbb1af11d194f600a0c929b3c3/frameset.htm], create, [table type|http://help.sap.com/saphelp_nw04/helpdata/en/90/8d7304b1af11d194f600a0c929b3c3/frameset.htm]) giving BAPI2045L1 as line type

- Use this table type for your Z-BAPI export parameter of your [created RFC enabled FM|http://help.sap.com/saphelp_nw70/helpdata/en/9f/db98fc35c111d1829f0000e829fbfe/frameset.htm]

- Move the table parameter INSPLOT_LIST of BAPI_INSPLOT_GETLIST to this export parameter after the call

Regards,

Raymond

Former Member
0 Kudos

Hello Arun,

In your case, you need to create a table type for the structure BAPI2045L1 (the type of table returned by BAPI_INSPLOT_GETLIST). Do this in t-code SE11. now in your custom FM declare an export parameter associating it with the created table type

<parameter_name> TYPE <table type created>

now in your source code call the BAPI which returns the desired table. So u get the table with values.

hopefully its clear now.

for any further query you can always enquire.

thanks and regards,

Koushik

Former Member
0 Kudos

he sir,

first of all you have create se37 a function module in that select goto than creat a new one and in ther you can avoid the group table in export parameters