‎2010 Feb 18 6:59 AM
Hi,
I am populating error message in module pool program . I want to edit the fields in the same screen currently it is nor allowing .
I use the CHAIN and ENDCHAIN also .
In my module pool screen i selecting some records if records contains different data the it is populating the error after that in the same screen i want to change the data .
Regrads
Nandan.N
‎2010 Feb 19 4:32 AM
Hi,
You can do it using CHAIN...ENDCHAIN.
In the main screen flow logic,
PROCESS BEFORE OUTPUT.
MODULE STATUS_1000.
PROCESS AFTER INPUT.
CHAIN.
FIELD : field1 MODULE check-field1,
field2 MODULE check-field2,
field3 MODULE check-field3.
ENDCHAIN.Now write the code for these modules in F01 include.
MODULE check-field1 INPUT.
SELECT SINGLE field1
FROM ztable
INTO lv_field1
WHERE field1 = ztable-field1.
IF sy-subrc = 0.
MESSAGE 'field1 already exists' TYPE 'E'.
ENDIF.
ENDMODULE. " check-field1 INPUTHope it helps you.
Thanks,
Sri.
‎2010 Feb 18 2:23 PM
Are you using chain. endchain. with the field you want to have the end user fill in:
For example:
Chain.
field: field1, field2, field3.
module error_check.
endchain.
‎2010 Feb 19 4:32 AM
Hi,
You can do it using CHAIN...ENDCHAIN.
In the main screen flow logic,
PROCESS BEFORE OUTPUT.
MODULE STATUS_1000.
PROCESS AFTER INPUT.
CHAIN.
FIELD : field1 MODULE check-field1,
field2 MODULE check-field2,
field3 MODULE check-field3.
ENDCHAIN.Now write the code for these modules in F01 include.
MODULE check-field1 INPUT.
SELECT SINGLE field1
FROM ztable
INTO lv_field1
WHERE field1 = ztable-field1.
IF sy-subrc = 0.
MESSAGE 'field1 already exists' TYPE 'E'.
ENDIF.
ENDMODULE. " check-field1 INPUTHope it helps you.
Thanks,
Sri.
‎2010 Feb 20 11:46 AM
Hi,
I am getting the data into internal table. Then i am populating the data in PBO event in Display mode . I am selecting some data on that screen. Then i given validation in the screen . After getting error message they do not want go back in the same screen they want to change .
I used the
Chain .
Filed w_final-mark.
Endchain .
But it is not allowing to change the fields .
Regards
Nandan.N
‎2010 Feb 22 11:23 AM
Hi Srihari,
In this case follow the following code,
PROCESS AFTER INPUT.
CHAIN.
FIELD: FIELD_01 MODULE CHECK_FIELD_01,
FIELD_02 MODULE CHECK_FIELD_02,
FIELD_03 MODULE CHECK_FIELD_03,
FIELD_04 MODULE CHECK_FIELD_04.
ENDCHAIN.
Write your validations for the screen FIELD_01 in the MODULE CHECK_FIELD_01
so when you enter data in this field it enters this Module and checks the validations, if value passes the validation then the cursor moves to the next field (i.e. Field_02) otherwise if it fails the validation & you have specified the message type as 'E' then it waits on the same field of the screen till a correct value is entered.
Hope it helps you,
Regards,
Abhijit G. Borkar