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

access internal table outside BAPI

Former Member
0 Likes
708

Hi all,

Im using standard BAPI FM .I want to access internal table outside BAPI (which is used in BAPI ) .

How do i do it ?

6 REPLIES 6
Read only

Former Member
0 Likes
649

Hi,

In TABLES clause you can find the internal table,

By accessing that you can use internal table outside bapi.

Regards,

Phani.

Read only

0 Likes
649

I dont have that internal table in tables clause.

Read only

SujeetMishra
Active Contributor
0 Likes
649

Hello Shital,

see that BAPI in SE37.

and try to understand tables,internal table declaration used in BAPI.

simply you need to paste same declaration in your current program.

Hope it will solve your problem.

Have a Nice Day.

Regards,

Sujeet

Read only

0 Likes
649

Hi sujeet,

Thanks for reply.Problem is i can declare the same internal table in my program as in BAPI but when i come out of BAPI ther is no data in internal table.I want to access the data inside internal table.

Read only

Former Member
0 Likes
649

Hi,

If it is a ZBAPI, then you have the following way :

EXPORT (itab) TO MEMORY ID id. ( this will use SAP memory).

After the BAPI, you can use IMPORT (itab) from memory ID.

i dont think, it is possible if it is standard BAPI..

Revrt back if any issue.

Regards,

Naveen

Read only

Former Member
0 Likes
649

HI,

After the BAPI execution, you will check for the sy-subrc and copy the internal table body as shown below:.

If sy-subrc = 0.

itab[ ] = bapi_itab[ ].

endif.

Hope it helps you.