Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9730

Re: Is anyone familiar with "Z_EXTRACT_DATA_OO" from .NET Framework Data Provider?

$
0
0

I know it is a Z object, but as I said, it is part of the .NET Framework Data Provider and should be the same for everyone using it. Anyway, I have copied some of the code I think is most relevant. What puzzles me is that it doesn't even return a "no data selected" error message even though the source code states it should. Out_Recordcount returns "00000000" though. Still, since I'm using it the same way I have used any other RFC and I

have had situations before where an RFC wasn't designed to do what I expected, I wanted to make sure I am even on the right track.

 

Oh and regarding RFC_READ_TABLE. I am using BBP_RFC_READ_TABLE right now, but it has its limitations. I was hoping to find a more powerful tool in Z_EXTRACT_DATA_OO. I have seen RSAQ_REMOTE_QUERY_CALL being recommended, but if I understand it correctly we need to create a new query in the SAP system every time we need different data.

 

Anyway, here is the code.

 

Generate Extract Code     CALL METHOD querygen->generate(       EXPORTING         sql_compatible_dates_on = in_sql_dates_on       EXCEPTIONS         generation_failed = 10         OTHERS            = 20 ).     IF sy-subrc <> 0.       PERFORM generate_return_messages         TABLES           out_return_tab.       EXIT.     ENDIF.
 * Generate Sub Routine Pool     PERFORM generate_subroutines       CHANGING         subroutine_prog         rc.     IF rc <> 0.       PERFORM generate_return_messages         TABLES           out_return_tab.       EXIT.     ENDIF.
 * Extract Data     PERFORM extract_data       TABLES         out_zdatatable       USING         subroutine_prog       CHANGING         extractrowcount         rc.     IF rc <> 0.       PERFORM generate_return_messages         TABLES           out_return_tab.       EXIT.     ENDIF.   ENDIF. "Metadata_only is initial
 * Populate Output Parameters   out_recordlength         = querygen->recordlength.   out_recordcount          = extractrowcount.   out_userdecimalpoint     = req->user_decimalpoint.   out_userdateformat       = req->user_dateformat.
 * Set moredata flag. Assume there is more data if
 * extracted record count = requested record count   IF out_recordcount = req->req_rowcount.     out_moredata = 'X'.   ELSE.     out_moredata = space.   ENDIF.
 * Populate output tables   PERFORM filter_column_metadata     TABLES       req->select_fields       out_tablestructure_tab.   out_tableheader[]              = metadata->object_attributes( ).   out_technicalsettings[]        = metadata->technical_settings( ).   out_interfacestructure_tab[]   = metadata->foreign_keys( ).   out_relationships_tab[]        = metadata->object_relationships( ).   out_indexheader_tab[]          = metadata->index_attributes( ).   out_indexfields_tab[]          = metadata->index_columns( ).   out_viewbasetables_tab[]       = metadata->view_basetables( ).   out_aggregatefields_tab[]      = metadata->view_columns( ).   out_viewjoins_tab[]            = metadata->view_joins( ).   out_viewselectconditions_tab[] = metadata->view_selectconditions( ).   IF req->metadata_only IS INITIAL.     inout_pkwhereclause[] = pk_where->where_parameters[].   ENDIF.
 * Generate "no data selected" message if out_recordcount = 0   IF out_recordcount = 0.     PERFORM add_message USING 'I' '026' space space space space.   ENDIF.
 * Generate success message if we made it here   PERFORM add_message USING 'S' '001' space space space space

Viewing all articles
Browse latest Browse all 9730

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>