Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Field Validation for Authorization Object field on selection screen

Former Member
0 Kudos
243

Hi Experts,

We have included a new field u2018Authorization Objectu2019 in the selection screen which should be reflected in the field Authorization Object of the spool property. Please let us know how we can provide F4 help for this field and also validate it in the code.

The data element "RSPOAUTH" is used for the field on selection screen parameter. However, as there is no value table attached to the domain, we are unable to provide any F4 help and hence cannot validate the field in the code.

Looking forward for your valuable reply.

Thanks in advance.

--Warm Regards,

Prajakta Kanitkar.

2 REPLIES 2

Former Member
0 Kudos
95

Hi Prajakta,

You can refer the following code for getting F4 help.

TYPES: BEGIN OF stru_btc,

zesgbtc TYPE zhr_del_btc,

END OF stru_btc.

DATA: it_btc TYPE STANDARD TABLE OF stru_btc

SELECT-OPTIONS: s_zzbtc FOR pa0001-zzbtc NO INTERVALS.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_zzbtc-low.

SELECT * FROM zbtc INTO CORRESPONDING FIELDS OF TABLE it_btc.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

retfield = 'BTC'

dynpprog = sy-repid

dynpnr = sy-dynnr

dynprofield = 'S_ZZBTC'

value_org = 'S'

TABLES

value_tab = it_btc

EXCEPTIONS

parameter_error = 1

no_values_found = 2

OTHERS = 3.

IF sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

Hope this will help you.

Thanks & Regards.

Aniruddha

Former Member
0 Kudos
95

TOBJ is the Master Table for Authorization Objects. You can select the Distinct Values from TOBJ and get them into an internal Table and then you can use the FM "'F4IF_FIELD_VALUE_REQUEST'" for displaying these values as F4 Search Help.

Refer:http://www.abapcode.info/2007/12/how-to-create-f1-or-f4-help-on.html