Skip to Content
0
Jan 21, 2011 at 10:50 AM

Dynamic data table

25 Views

Hi,

The following is the requirement. I am not familiar with working with data, table as types.

The interface has a method say get_data() to return the contents of a DB table. The classes implementing this interface can be querying different DB tables and hence the return type of the interface method should be generic type.

The program where this method get_data() is called and recieves the data returned will not be aware of the type of DB table returned. Now i have to take this returned data and convert it into an XML.

PROGRAM:

lo_badi_ei->get_data( IMPORTING e_data = lt_data ).

lt_data once recieved has to be converted to XML. I can use CALL TRANSFORMATION for that.

But what should be the type of lt_data? should it be

field-symbol: <lt_data> type standard table.

I tried but I am not able to figure out how to do the above requirement?

Any help will be appreciated.

Thanks and Regards,

Madhura Lobo