Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Issue with user exit on Input enabled query

Hi All

We have implemented a user exit in our implementation to lock a few columns. But when we run the query we find that though the columns are locked we donu2019t get any new rows. The message we get is u2013 No new rows or columns because the axis is not input-ready. The same problem doesnu2019t occur for a data slice based on selections.

Please suggest what can be done in this case.

Thanks.

The exit code is:

method if_rspls_ds_methods~is_protected.

----


  • --> i_s_data data record, the values for infoobjects from

  • n_ts_fields are set, the rest is initial

  • <-- e_t_mesg messages

  • <-- e_noinput flag, records is protected or not

----


  • begin example code:

  • infrastructure needed by the buffer:

data: l_s_mesg type if_rspls_cr_types=>tn_s_mesg.

field-symbols: <l_th_buf> type hashed table,

<l_s_buf> type any.

  • end example code:

e_noinput = rs_c_true.

clear e_t_mesg.

  • begin of example code:

  • use the buffer?

  • o_use_buffer is switched on by default in the constructor

if o_use_buffer = rs_c_true.

  • yes:

assign o_r_th_buf->* to <l_th_buf>.

assign o_r_s_buf->* to <l_s_buf>.

<l_s_buf> = i_s_data.

read table <l_th_buf> into <l_s_buf> from <l_s_buf>.

if sy-subrc > 0.

  • record with result not yet buffered: implement your algorithm

  • for the dataslice here: e.g. call a method that returns the

  • fields e_noinput and e_s_mesg

CALL METHOD my_dataslice

EXPORTING

i_s_data = i_s_data

IMPORTING

e_s_mesg = o_r_s_mesg->*

e_noinput = o_r_protected->*.

insert <l_s_buf> into table <l_th_buf>.

endif.

e_noinput = o_r_protected->*."fix pointer to <l_s_buf>-protected

if e_noinput = rs_c_true and e_t_mesg is supplied.

  • o_r_s_mesg is a pointer to '_S_MESG' in the buffer workarea

append o_r_s_mesg->* to e_t_mesg.

endif.

else.

  • no, do not use the buffer, call a method that returns the

  • fields e_noinput and e_s_mesg

CALL METHOD my_dataslice

EXPORTING

i_s_data = i_s_data

IMPORTING

e_s_mesg = l_s_mesg

e_noinput = e_noinput.

if e_noinput = rs_c_true and e_t_mesg is supplied.

append l_s_mesg to e_t_mesg.

endif.

endif.

"* end of example code:

endmethod.

method MY_DATASLICE.

----


  • --> i_s_data data record, the values for infoobjects from

  • n_ts_fields are set, the rest is initial

  • <-- e_s_mesg messages

  • <-- e_noinput flag, records is protected or not

----


field-symbols: <py> type /bic/oizsemplyr,

<fy> type /bi0/oifiscyear,

<pp> type /bi0/oifiscper3,

<pc> type /bic/oizplncycle,

<po> type /bic/oizsemplorg.

data: fy type /bi0/oifiscyear,

prevy type /bi0/oifiscyear,

am type /bi0/oifiscper3,

pc type /bic/oizplncycle.

e_noinput = rs_c_true.

clear e_s_mesg.

assign component '/BIC/ZSEMPLYR' of structure i_s_data to <py>.

assign component 'FISCYEAR' of structure i_s_data to <fy>.

assign component 'FISCPER3' of structure i_s_data to <pp>.

assign component '/BIC/ZSEMPLORG' of structure i_s_data to <po>.

assign component '/BIC/ZPLNCYCLE' of structure i_s_data to <pc>.

select single fiscyear plncycle actmonth

into (fy, pc, am) from zbadminval

where adminarea = <po>.

e_noinput = rs_c_true.

prevy = sy-datum+0(4).

prevy = prevy - 1.

if <py> = fy and <pc> = pc and ( <pp> > am or <fy> > fy ).

e_noinput = rs_c_false.

elseif <py> = prevy and <pc> = 'P2' and <fy> > <py>.

e_noinput = rs_c_false.

endif.

endmethod.

Edited by: rakshita hegde on Apr 12, 2009 11:10 AM

Former Member
Not what you were looking for? View more on this topic or Ask a question