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

FM

Former Member
0 Likes
746

Hi All,

I have created a function module where in i have populated a workarea and an int table to display header n details data. both of them are populated but data is not being displayed. what is the reason?

6 REPLIES 6
Read only

Former Member
0 Likes
727

Hello SAP User,

Can you please send the code, that would be helpful to tell you the answer.

Regards.

Abhijit.

Read only

vinod_vemuru2
Active Contributor
0 Likes
727

Hi,

Ur work area must be declared under EXPORTING parameters(In function module) and internal table must be declared under TABLES parameters.

If u populate wa and internal table which are declared in function module then it will not be displayed. U have to declare these in FM interface i.e EXPORTING and TABLES tabs.

Check this and let me know if u still have problems. Also check whether u are clearing/Refreshing any where in the code after populating the data.

Thanks,

Vinod.

Read only

0 Likes
727

The workarea and int table are declared like in top include:

z_material LIKE zheader_data,

z_components LIKE zdetails_data OCCURS 0 WITH HEADER LINE.

and z_material is declared under exporting tab

z_components under tables tab

Read only

0 Likes
727

hi,

change the name of exporting parameters and internal table.

than before endfunction assign values like this,

z_material_exp = z_material.

z_components_exp[] = z_components[].

reward if useful.

Read only

0 Likes
727

Hi ,

u declared ur parameters in top include which will take the preceedense. So change the name to some other and assign these values just before end of the FM source code.

z_material LIKE zheader_data,

z_components LIKE zdetails_data OCCURS 0 WITH HEADER LINE.

and z_material1 declare under exporting tab

z_components1 under tables tab

put this code at the end.

z_material1 = z_material.

z_components1[] = z_components[].

But why are u taking 2 work areas and internal tables. U can directly populate ur exporting and tables parameters.

Thanks,

Vinod.

Read only

Former Member
0 Likes
727

send me code are did u write the write stamtenet for o/p.