SAP_QUERY_AD_HOC is a standard Executable ABAP Report available within your SAP system (depending on your version and release level). Below is the basic information available for this SAP report including which OBJECTS it interacts with such as TABLES, FUNCTION MODULES, INCLUDES ETC. Also check out the submitted Comments related to this SAP report or see any standard documentation available.
If you would like to execute this report or see the full code listing simply enter SAP_QUERY_AD_HOC into the relevant SAP transactions such as SE38 or SE80
This report can be called from another progam/report simply by using the ABAP SUBMIT statement, see below for example ABAP code snipts of how to do this.
Selection Text: P_WSID = Global area
Selection Text: P_SGNAME = InfoSet
Selection Text: P_QUNAME = Query
Selection Text: P_BGNAME = User Group
Title: Call SAP Query for ad hoc Reporting
INCLUDE RSAQCOMC.
No SAP DATABASE tables are accessed within this REPORT code!
RS_SUBMIT_INFO call function 'RS_SUBMIT_INFO' importing p_submit_info = subinfo.
SAP_QUERY_AD_HOC call function 'SAP_QUERY_AD_HOC' exporting i_workspace = p_wsid i_usergroup = p_bgname i_infoset = p_sgname i_query = p_quname i_check_only = 'X' i_user_check = space exceptions others = 1.
SAP_QUERY_AD_HOC call function 'SAP_QUERY_AD_HOC' exporting i_workspace = p_wsid i_usergroup = p_bgname i_infoset = p_sgname i_query = p_quname i_check_only = 'X' i_user_check = 'X' exceptions others = 1.
SAP_QUERY_AD_HOC call function 'SAP_QUERY_AD_HOC' exporting i_workspace = p_wsid i_usergroup = p_bgname i_infoset = p_sgname i_query = p_quname exceptions others = 1.
RS_SELECTIONSCREEN_READ call function 'RS_SELECTIONSCREEN_READ' exporting program = l_program tables fieldvalues = l_selvalues.
RSAQSUG_SELECT_USERGROUP call function 'RSAQSUG_SELECT_USERGROUP' exporting sug_workspace = l_workspace sug_superuser = 'X' sug_no_syst = 'X' importing sug_usergroup = p_usergroup.
RS_SELECTIONSCREEN_READ call function 'RS_SELECTIONSCREEN_READ' exporting program = l_program tables fieldvalues = l_selvalues.
RSAQSUL_SELECT_FUNC_AREA call function 'RSAQSUL_SELECT_FUNC_AREA' exporting sul_workspace = l_workspace sul_queryname = 'XXX' sul_transcode = 'SQ01' sul_usergroup = l_usergroup importing sul_func_area = p_infoset.
RSAQSUL_SELECT_FUNC_AREA call function 'RSAQSUL_SELECT_FUNC_AREA' exporting sul_workspace = l_workspace sul_transcode = 'SQ03' importing sul_func_area = p_infoset.
RS_SELECTIONSCREEN_READ call function 'RS_SELECTIONSCREEN_READ' exporting program = l_program tables fieldvalues = l_selvalues.
RSAQSQU_SELECT_QUERY call function 'RSAQSQU_SELECT_QUERY' exporting squ_workspace = l_workspace squ_user_group_in = l_usergroup squ_complete = space squ_tcode = 'SQ00' squ_hflag = 'X' importing squ_query_out = p_query.
Although this basic information may have limited use it does provide an easy to find location to store any knowledge about this program/report.
SAP_QUERY_AD_HOC - Call SAP Query for ad hoc Reporting SAP_QUERY_AD_HOC - Call SAP Query for ad hoc Reporting SAP_PSA_PARTNO_CORRECT - Report SAP_PSA_PARTNO_CORRECT SAP_PSA_PARTNO_CORRECT - Report SAP_PSA_PARTNO_CORRECT SAP_PSA_PARTITION_CHECK_ORA - compress existing requests in one partition SAP_PSA_PARTITION_CHECK_ORA - compress existing requests in one partition