This website is not affiliated with, sponsored by, or approved by SAP AG.

Starting BEx query with parameters from ABAP

Business Warehouse

Moderators: thx4allthefish, Snowy

Starting BEx query with parameters from ABAP

Postby kerum » Fri Sep 28, 2007 2:12 am

Hi,

I'm looking for possibility to start BEx query with parameters from ABAP.
There are some funktion modules, which start queries (launch excel),
for example RSAH_LAUNCH_EXCEL or RSSEM_QUERY_LAUNCH and accept parameters, but I'm still getting empty selection-screen.

Here is my example, which is not working:

Code: Select all
lv_query = 'YB_MAKLER_DETAIL'.

CALL FUNCTION 'CONVERSION_EXIT_GENID_INPUT'
  EXPORTING
    input  = lv_query
  IMPORTING
    output = lv_genuniid.

IF lv_genuniid = ''.
  WRITE: / 'There is no Query', lv_query.
ELSE.

  ls_var-vnam = 'YS_MKLE'.
  ls_var-vartyp = '1'.
  ls_var-vparsel = 'P'.
  ls_var-sign = 'I'.
  ls_var-opt  = 'EQ'.
  ls_var-low  = '0000005100'.
  ls_var-iobjnm = '/MSG/VM_GESNR'.
  APPEND ls_var TO lt_var.

  ls_var-vnam = 'YS_VTGJ'.
  ls_var-vartyp = '1'.
  ls_var-vparsel = 'P'.
  ls_var-sign = 'I'.
  ls_var-opt  = 'EQ'.
  ls_var-low  = '1999'.
  ls_var-iobjnm = 'YB_VTGJJJ'.
  APPEND ls_var TO lt_var.

  CALL FUNCTION 'RSAH_LAUNCH_EXCEL'
    EXPORTING
      i_genuniid                       = lv_genuniid
      i_objvers                        = 'A'
      i_hide_sapgui                    = 'X'
    TABLES
      i_t_var                          = lt_var.
ENDIF.


If parameter 'i_hide_sapgui' is empty, I'm getting empty selection-screen,
If parameter 'i_hide_sapgui' equals 'X' I'm getting selection-screen filled with values, which were used last time manualy, not with values from the internal table 'lt_var'.

Do you have any idea how to pass parameters to the query with this function module?

Regards,
Krzysztof

kerum
 
Posts: 32
Joined: Thu Sep 04, 2003 8:23 am

Postby skarkada » Fri Sep 28, 2007 3:57 pm

Examine the FM RSBBS_TOOL_REPORTCALL and it might help you in determining how to populate i_t_var.
Sudhi Karkada
skarkada
 
Posts: 697
Joined: Mon Oct 21, 2002 1:12 pm
Location: Houston, TX, USA

Postby kerum » Mon Oct 01, 2007 2:00 am

Hello,

I've looked at this FM but it's not very helpful for me. It presuppose the use of report/report interface (RRI) and read its input from the memory. I don't have any RRI customizing, is it needed in this case?

regards,
Krzysztof
kerum
 
Posts: 32
Joined: Thu Sep 04, 2003 8:23 am

Postby kerum » Mon Oct 01, 2007 4:02 am

Hello,

I have partial success! When I provide I_WORKBOOKID to the function module RSAH_LAUNCH_EXCEL in previous example,
I'm getting the Excel without selection screen and the variables are filled in, it's the desired effect. Great!
It doesn't matter if I provide the query id (I_GENUNIID).

My problem: I have a lot of queries without workbooks. Is there a possibility to generate some standard workbook on demand?

regards,
Krzysztof
kerum
 
Posts: 32
Joined: Thu Sep 04, 2003 8:23 am

Re: Starting BEx query with parameters from ABAP

Postby Thames » Mon Feb 09, 2009 5:43 am

Krzysztof, what version of BI do you use?
Thames
 
Posts: 1
Joined: Thu Feb 05, 2009 7:15 am

Re: Starting BEx query with parameters from ABAP

Postby kerum » Wed Jan 06, 2010 11:40 pm

Hi,

we are using SAP_BW 701 Patchlevel 5 and the problem persists -
when I use FM RSAH_LAUNCH_EXCEL or RSSEM_QUERY_LAUNCH with a filled
table with parameters, they are not passed and set on the selection screen.

regards,
K.
kerum
 
Posts: 32
Joined: Thu Sep 04, 2003 8:23 am


Return to Business Warehouse

Who is online

Users browsing this forum: Google [Bot] and 1 guest




This website is not affiliated with, sponsored by, or approved by SAP AG.