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: 

on chain-request example

rodrigo_paisante3
Active Contributor
0 Kudos

Hi ALL

I just started to work with abap and I need help. This is my source code:

PROCESS BEFORE OUTPUT.

MODULE prepara_telas.

PROCESS AFTER INPUT.

MODULE cancel AT EXIT-COMMAND.

CHAIN.

FIELD: carrid,

connid

fldate.

MODULE check ON CHAIN-REQUEST.

ENDCHAIN.

1- How i define the input/output field?

2- I dont know what the module check and cancel need to be created and works.

Thanks...

1 ACCEPTED SOLUTION

Former Member
0 Kudos

While working with module pool, we have to understand EXIT-COMMAND and CHAIN Statements:

<b>EXIT-COMMAND:</b> Assume that you have a mandatory field on the screen. In module pool we cannot exit the screen without giving the valuse to mandatory fields. To overcome this, we create a MODULE that is used to leave the screen without entering values for required fields. This is acheived by <b>EXIT-COMMAND</b> Modules.

In your code MODULE cancel Is an EXIT-COMMAND module

<b>check Module in CHAIN</b>

The module Check in your code is used to validate the screen entries considering a collective selection. This is similar to AT SELECTION-SCREEN event in Reports.

3 REPLIES 3

Former Member
0 Kudos

refer thi sprogram.

DEMO_DYNPRO_FIELD_CHAIN

Former Member
0 Kudos

While working with module pool, we have to understand EXIT-COMMAND and CHAIN Statements:

<b>EXIT-COMMAND:</b> Assume that you have a mandatory field on the screen. In module pool we cannot exit the screen without giving the valuse to mandatory fields. To overcome this, we create a MODULE that is used to leave the screen without entering values for required fields. This is acheived by <b>EXIT-COMMAND</b> Modules.

In your code MODULE cancel Is an EXIT-COMMAND module

<b>check Module in CHAIN</b>

The module Check in your code is used to validate the screen entries considering a collective selection. This is similar to AT SELECTION-SCREEN event in Reports.

anversha_s
Active Contributor
0 Kudos

hi,

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

Rgds

Anversh