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

help with the FM view_get_data

Former Member
0 Likes
2,329

Hello,

i need some help with the function module 'view_get_data' ,when i try to execute the function only with the name of the view without conditions( the prameter DBA_SELLIST ), it returns me the table correctly, but when i'm trying to execute the function with conditions, it returns an empty table. Please tell me how to execute the function the conditions so it would work.

Best regards,

Udi.

Hello,

i need some help with the function module 'view_get_data' ,when i try to execute the function only with the name of the view without conditions( the prameter DBA_SELLIST ), it returns me the table correctly, but when i'm trying to execute the function with conditions, it returns an empty table. Please tell me how to execute the function the conditions so it would work.

Best regards,

Udi.

3 REPLIES 3
Read only

Former Member
0 Likes
995


check first that any view is there for the table other wise the data will not be populated..
pass the view name inot table DD25V.

select * from DD25V where viewname = p_view .  " view name passing to fm  
if sy-subrc = 0.
CALL FUNCTION 'VIEW_GET_DATA'
  EXPORTING
     VALUE(VIEW_NAME)  =     "Pass table name
  TABLES
      DATA                        = pass internal table with above table name
else.
 write : 'view does not exist'.
endif.

regards,

Prabhudas

Read only

Former Member
0 Likes
995

What did you populate DBA_SELLIST with?

Rob

Read only

0 Likes
996

Hello Rob,

thank you for your replay.

this are the values i populated in the DBA_SELLIST :

DBA_SELLIST-VIEWFIELD = 'ARTPR'.

DBA_SELLIST-OPERATOR = 'EQ'.

DBA_SELLIST-VALUE = 'MS'.

view_name = 'V_T356'.