cancel
Showing results for 
Search instead for 
Did you mean: 

how to pass memberset rules (BAS,DEP etc) to CALL METHOD lo_sqe->run_axis_query_symm

a_khanevich
Explorer
0 Kudos
1,502

Dear Experts,

I am trying to use basic BPC Data reading approach in SAP BPC 10.1 NW classic environment according to published How-to guide (How To Migrate BPC 7.x BADIs to BPC 10).
I need to read data from parent members so I use axis query (call method lo_sqe->run_axis_query_symm).

call method lo_sqe->run_axis_query_symm 
  exporting 
    it_axis   = lt_axis 
    it_slicer = lt_slicer 
  importing 
    et_data   = <lt_query_result>. 

Does anyone know how to pass memberset rules (BAS,DEP etc) to such queries?
According to Appendix B I see that "ls_member" variable has "MEMBERSET_FORMULA" parameter but I have no idea how to use it.

ls_member-dimension = 'ACCOUNT'. 
ls_member-member = 'PL110'. " <--- need something like BAS(PL_TOTAL) here
insert ls_member into table ls_axis. 
insert ls_axis into table lt_axis. 
clear ls_axis. 

Please, share your ideas.

Regards,

Oleg.

View Entire Topic
lucas_costa3
Active Contributor
0 Kudos
With this method you don't need to select base members, as the method does it for you. Actually in the documentation there is tip in there: "Though the method is called ‚ axis query ‛ , the internal engine is smart enough to choose which type of query to use. For example , if the selection is all base members, the RSDRI query type will be used automatically."

If you look at the import table IT_AXIS you have:

DIMENSION
HIERARCHY
MEMBER
MEMBERSET_FORMULA

Therefore using your example, BAS(PL_TOTAL), would be something like:

DIMENSION = ACCOUNT
HIERARCHY = PARENTH1
MEMBER = PL_TOTAL

Cheers,

Lucas

former_member186338
Active Contributor
0 Kudos

Sorry, Lucas! If it_axis contain PL_TOTAL the result of this query will be for PL_TOTAL only, not for BAS(PL_TOTAL).

a_khanevich
Explorer
0 Kudos

Yes, exactly, Vadim. Using PL_TOTAL member in axis query gives you the result with PL_TOTAL only.

That's why I'm curious about how to use ls_member-MEMBERSET_FORMULA here without filling lt_axis element by element using cl_ujk_model=>get_children (or similar).

former_member186338
Active Contributor
0 Kudos

Just tested: run_axis_query_symm will ignore information stored in MEMBERSET_FORMULA!

    LOOP AT it_cv ASSIGNING <ls_cv>.
      l_dimname = <ls_cv>-DIMENSION.
      append l_dimname to lt_dim_list.
      LOOP AT <ls_cv>-MEMBER INTO l_member.
        ls_member-DIMENSION = l_dimname.
        ls_member-MEMBER = l_member.
        if l_dimname = 'TIME'.
          ls_member-MEMBERSET_FORMULA-TYPE = CL_UJO_QUERY_MEMBERSET=>GC_BASELEVEL.
        endif.
        insert ls_member into table ls_axis.
      ENDLOOP.
      insert ls_axis into table lt_axis.
      clear ls_axis.
    ENDLOOP.

Tested with GS_BASELEVEL or GS_SAMELEVEL

lucas_costa3
Active Contributor
0 Kudos

Oh I see... Sorry for that.

But what do you want to do then? Always bring the base members? Or both?