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

chain endchain problem

Former Member
0 Likes
466

Hi;

in my screen there are two fields for matnr and werks and 2 other fields for their text makt-maktx and t001w-name1. i take the texts in my screen PBO.

in PAI 'chain endchain' i check the entries from MARC if user enter the right entries.

when i press enter , before controlling the entries i want to write the text.

but it does not work. WHY?

thanks.

2 REPLIES 2
Read only

Former Member
0 Likes
389

Hi ,

use <b>FIELD <fldname> MODULE <modulename> on chain-input</b> .

Hope it is helpful for u .

Regards ,

Senthil

Read only

anversha_s
Active Contributor
0 Likes
389

hi,

chk this sample code.

For example if there are 10 fields in the screen and for 5 fields whenever the user enters wrong values u like to give some error message. You can declare that fields in the chain enchain so that only those fields will be input enabled and all other fields will disabled.

CHAIN.
FIELD chk_connobj.
FIELD chk_inst.
FIELD chk_devloc.
FIELD ehaud-haus.
FIELD eanl-anlage.
MODULE modify_screenfields.
ENDCHAIN.
 
*&---------------------------------------------------------------------*
*& Module modify_screenfields INPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
 
MODULE modify_screenfields INPUT.
CLEAR okcode.
okcode = sy-ucomm.
CASE okcode.
WHEN 'ENTER' OR 'EXECUTE'.
 
IF chk_connobj IS INITIAL AND chk_inst EQ c_x AND
chk_devloc EQ c_x.
IF ehaud-haus IS INITIAL.
SET CURSOR FIELD 'EHAUD-HAUS'.
MESSAGE e000(zo_spa) WITH text-017. " Enter Connection obj
ELSE.
PERFORM conn_obj_check.
ENDIF.
ENDIF.
 
ENDMODULE. " modify_screenfields INPUT

Regards

Anver