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 is collective search help? : sap abap data dictionary

609


How to create a button in selection screen ?

1488


when run my program in se38 it was showing output, when i take background execution and giving printer details it was shoing out put. but in SP01 when i give the Spool Request Number it was showing not yet processed entire page why it happens i dont know please give me a solution.

2081


Tell me a scenario where did you use secondary index?

635


out bound process code for quotation?

1570






How will you transfer data into a file in application server?

595


how to read the standard field value in your custom program.

991


What is luw?

688


visibility section for class level and attributes level

817


Explain what is an rfc?

615


How many lists can a program can produce?

599


What are the differences between a database index and a match code? : abap data dictionary

654


What is a size category?

679


Can you assign a matchcode object to a parameter? If so how?

603


How to find the return code of an stmt in abap programs?

628