Skip to Content
0
Former Member
Dec 08, 2008 at 12:33 PM

Reg : Authority check.

29 Views

Hi,

I have requirement where authority check for a field in selection screen.

so_cost is cost center with range in selection screen.

In FM

CALL FUNCTION 'AUTHORITY_CHECK'

EXPORTING

aut_obj = co_auth_obj

field1_object = co_KOSTL(KOSTL)

field1_value = ???????

field2_object = co_actvt

field2_value = co_03

EXCEPTIONS

NO_AUTHORITY = 1

OTHERS = 2.

so how shud i pass the so_cost here? As it select option it may have high and low or ranges.

i have tried using Range and passing ra_cost into FM .

IF NOT so_cost-low IS INITIAL.

ra_cost-sign = co_i.( I )

ra_cost-option = co_eq.(=)

ra_cost-low = so_cost-low.

APPEND ra_cost.

ENDIF.

IF NOT so_cost-high IS INITIAL.

ra_cost-sign = co_i.

ra_cost-option = co_eq.

ra_cost-low = so_cost-high.

APPEND ra_cost.

ENDIF.

But its giving dump

You attempted to pass the field "FIELD2_VALUE" to the formal parameter

"FIELD2_VALUE"

but the formal parameter "FIELD2_VALUE" can accept only fields of

type "C". The field "FIELD2_VALUE" has the type "u".

But i declared as C type only.

so please guide me regarding this.

regards,

Savitha.

Edited by: savitha s on Dec 8, 2008 1:33 PM