‎2007 Apr 23 11:39 AM
‎2007 Apr 23 11:41 AM
Hi Suresh
To make all the fields ready for Input, even if a single field was entered wrongly.
we use this in PAI
CHAIN.
fields: f1, f2, f3.
module < mod Name>.
endchain.
Hope this helps !!!
Britto
‎2007 Apr 23 11:41 AM
Hi Suresh
To make all the fields ready for Input, even if a single field was entered wrongly.
we use this in PAI
CHAIN.
fields: f1, f2, f3.
module < mod Name>.
endchain.
Hope this helps !!!
Britto
‎2007 Apr 23 11:45 AM
Chain and endchain..............form an processing chain in module pool program. It surves different activities :
1. For data validetion:
If you want to keep a no of fields ready for input in the time of validetion then put them within end and endchain.
2. If you want a module to be execute depending a no of fields ( on input/ on request) then it is used.
‎2007 Apr 23 11:47 AM
hi suresh
1. It is used in module pool programming
2. Lets say there are 5 fields on a screen , when trying to execute there is an error in one of the 5 fields
3. All the other 4 fields will get greyed out(changes to display mode) on the screen.
4. To overcome that we use chanin endchain
5.
MODULE PAI
CHAIN.
FIELDS : FIELD1,
FIELD2,
.....
ENDCHAIN.
regards
navjot
‎2014 Jan 22 5:28 PM
‎2007 Apr 23 11:48 AM
Hi,
check this sample code....
PROCESS AFTER INPUT.
Module to control Exit
MODULE EXIT_PROGRAM AT EXIT-COMMAND.
CHAIN.
Validate Remittance advice No
FIELD: WS_REMIT_HEAD-COMP_CODE module check_comp_code,
WS_REMIT_HEAD-REM_ADV_NO,
WS_REMIT_HEAD-FYEAR.
MODULE CHECK_REMITTANCE.
ENDCHAIN.
MODULE USER_COMMAND_0100.
MODULE CHECK_REMITTANCE INPUT.
DATA:
LW_DOC_DATE LIKE SY-DATUM, " Document Date
WA_REMIT LIKE ZFI_REMIT-REM_ADV_NO." Remittance Advice Number
Check the Remittance no is Exists
SELECT SINGLE REM_ADV_NO " Remittance Advice No
FROM ZFI_REMIT
INTO WA_REMIT
WHERE COMP_CODE = WS_REMIT_HEAD-COMP_CODE
AND REM_ADV_NO = WS_REMIT_HEAD-REM_ADV_NO
AND FYEAR = WS_REMIT_HEAD-FYEAR.
IF SY-SUBRC EQ 0.
if exists set the display Flag
W_FLAG_CREA_DISP = SPACE.
ELSE.
if not Exists set Create remittance flag
W_FLAG_CREA_DISP = SPACE.
MESSAGE 'Enter a Valid Remittance Number'(050)
TYPE C_MESSAGE_E.
ENDIF. " IF SY-SUBRC EQ 0.
ENDMODULE. " check_remittance INPUT
with regards...
Jay
‎2007 Apr 23 11:53 AM
Hi Suresh,
The CHAIN ... END CHAIN statement is used in Flow logic block.
While creating screen, we want to validate group of fields, for validating group of fields we are using CHAIN.... END CHAIN statement.
Chain
FIeld wa_tmp-name
Field wa_tmp-ID
Module valudate NAME_ID
End chain.
the above example is used to validate 2 fields..
mail me for any clarifications
Rajesh
‎2007 Apr 23 11:56 AM
Man its very easy once u throw an error message with the message command on the screen the screen will be displayed in output only mode.In order to make the fields editable we require chain endchain,,,,,the fields defined in chain endchain will be available for input even after the error message is thrown...
hope it helps..
if not clear tell me i will try to make it more simple for u
‎2007 Apr 23 1:04 PM
Hi Suresh,
Please refer to the following link.
http://help.sap.com/saphelp_47x200/helpdata/en/e1/8e51341a06084de10000009b38f83b/frameset.htm
Thanks and Regards
Archana.S
‎2020 Dec 18 12:03 PM
Hi,
If error detected inside the chain and end chain, then fields that are in chain are made Input enabled other fields which are not mentioned in chain and end chain remain input disabled.
Between chain and end chain user executes module and field.
Regards,
Nasreen