Application Development and Automation 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: 
Read only

Automatic field checks

Former Member
0 Likes
791

Hi Gurus,

How to do automatic field checks (validations) in module pool

sekhar

7 REPLIES 7
Read only

Former Member
0 Likes
761

one way is by assigning help ( F4 ).

Read only

Former Member
0 Likes
761

using process on value request (pov)

Read only

Former Member
0 Likes
761

your screen then create it in your main program.

You declare the module in the PROCESS ON VALUE-REQUEST.

PROCESS ON VALUE-REQUEST.

FIELD TXT_DOCNO MODULE VALUE_BELNR.

You also need to create an internal table where you wil store results of the select query fired below in the module.

here you will get a F4 help on the filed Document Number(TXT_DOCNO) based on the field Company code (TXT_CODCO)

MODULE VALUE_BELNR INPUT.

progname = sy-repid.

dynnum = sy-dynnr.

CLEAR: field_value, dynpro_values.

field_value-fieldname = 'TXT_CODCO'.

APPEND field_value TO dynpro_values.

CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'

EXPORTING

tabname = 'BKPF'

fieldname = 'BUKRS'

dynpprog = progname

dynpnr = dynnum

dynprofield = 'TXT_CODCO'.

CALL FUNCTION 'DYNP_VALUES_READ'

EXPORTING

dyname = progname

dynumb = dynnum

translate_to_upper = 'X'

TABLES

dynpfields = dynpro_values.

READ TABLE dynpro_values INDEX 1 INTO field_value.

SELECT BUKRS BELNR

FROM BKPF

INTO CORRESPONDING FIELDS OF TABLE it_doc1

WHERE BUKRS = field_value-fieldvalue.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

retfield = 'BELNR'

dynpprog = progname

dynpnr = dynnum

dynprofield = 'TXT_BELNR'

value_org = 'S'

TABLES

value_tab = it_doc1.

ENDMODULE. " VALUE_BELNR INPUT

Read only

Former Member
0 Likes
761

hi,

make the fields mandatory.

and attach searchelp to the fields.

Regards

Sandeep Reddy

Read only

Former Member
0 Likes
761

hi shekhar,

if you directly assign data dictionary fields then ,automatic check gets performed...

Read only

0 Likes
761

Hiii..

Chain.

field : field_name module module_name.

endchain.

you can check perticular field by this way..

regards

Manish.

Read only

Former Member
0 Likes
761

hi,

chain - endchain.

chain.

field sflight-carrid values ('LH' ).

field sflight-Connid values ( between '200 and '500').

endchain.

Edited by: Rajyalakshmi Attili on Jun 2, 2008 11:01 AM