What is the use of CHAIN and ENDCHAIN statement?

Answer Posted / saurabh shrivastava

If the validation has to be done for more than one field the
those fields are included between chanin and endchain.
Ex
In PAI if you want to validate group of fields put in
chain and End chain statement .


You can declare fields in the chain enchain .


CHAIN.
FIELD chk_ABC.
FIELD chk_DEF.
FIELD chk_GHI.
FIELD CHK-JKL.
MODULE CHK_screenfields.
ENDCHAIN.


MODULE CHK_screenfields INPUT.
CLEAR okcode.
okcode = sy-ucomm.
CASE okcode.
WHEN 'ENTER' OR 'EXECUTE'.

IF chk_ABC IS INITIAL AND chk_DEF IS INITIAL AND CHK_GHI
IS INITIAL .
MESSAGE e000(zo_spa) WITH text-017. " Enter VALUES'
ELSE.
.....
ENDIF.
ENDIF.

ENDMODULE. " modify_screenfields INPUT

Is This Answer Correct ?    26 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the data types of the external layer?

577


What is processing class, where we do them and why? : sap abap hr

569


What is ps structure? : abap hr

795


hi my name is amit i have passed BE(CSE) with honours(72%) in 2006 yr. i have completed SAP/ABAP training with good exposer. i need a staffing company which can provide me real time exposer in SAP R/3. so plz help me out and send any information regarding on my mail id or tele. no. 9999784331 thanks

1447


What is the maximum number of structures that can be included in a table or structure

634






What is the difference between upload and ws_upload ? : abap bdc

675


What is the difference between table and template?

572


What is a function group? : abap modularization

588


There is a situation where there is a field "MATERIAL DESCRIPTION" in say 20 display only transaction. You want that whenever user opens any of these transaction, this particular field is masked with ****. But table does not holds ****. It holds the actual value. What are different ways of doing it? Which is the best way.

928


How do you display a data in a detail list?

577


Explain the Types of Select statements?

649


did u done enhancement framework?how u implemented?

5037


Does the bdc-insert function allow multiple transactions to be processed by sap? : abap bdc

670


Differentiate between table and template ?

598


8)when u create sales report what u can see in that report ? what rthose field names or data element names? 9)when u create purchase order details report what u can see in that report ?what rthose fieldnames or dataelements? 10)when u create material stock report in material master grouped by material type and plant what u can see in report ?what rthose field names or dataelement ? 11)when u create shipping forecast report what u can see in that report ?what rthose data elements or field names?

1609