on 2012 Dec 02 4:17 PM
Hi Gurus,
I have created a custom PA infotype.
I need to add a validation logic on 'BEGDA' and 'ENDDA' which should get triggered, when I try to save the infotype.
The logic is very small one., but am not able to understand where to add the validation logic.
I have written the validation logic in the related module pool program of screen 2000 in PAI module., but its not getting triggered.
Below is the screen 2000 flow logic.
Kindly let me know where to write the logic.
PROCESS BEFORE OUTPUT.
MODULE BEFORE_OUTPUT.
CALL SUBSCREEN subscreen_empl INCLUDING empl_prog empl_dynnr.
CALL SUBSCREEN subscreen_header INCLUDING header_prog header_dynnr.
MODULE P9123.
MODULE HIDDEN_DATA.
PROCESS AFTER INPUT.
MODULE EXIT AT EXIT-COMMAND.
CHAIN.
FIELD P9123-BEGDA.
FIELD P9123-ENDDA.
FIELD P9123-ZABC.
MODULE INPUT_STATUS ON CHAIN-REQUEST.
ENDCHAIN.
MODULE PRE_INPUT_CHECKS.
CHAIN.
FIELD P9123-BEGDA.
FIELD P9123-ENDDA.
FIELD RP50M-SPRTX.
FIELD P9123-ZABC.
MODULE POST_INPUT_CHECKS.
ENDCHAIN.
Thanks in advance,
Goutham.
Hello,
Create an implementation of the BADI HRPAD00INFTY and put your validation in AFTER_INPUT method.
To get input structure, call the following method :
CALL METHOD cl_pt_container_util=>read_container
EXPORTING
im_container = new_innnn
IMPORTING
ex_value = ls_p9123.
Check the ls_p9123-begda and ls_p9123-endda as per your requirement and validate the record.
This is a multiple use badi, so create an impl for each infotype validation to avoid confusion.
Hope it helps!!!!
Rgrds,
Sravan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Given it's a custom infotype, I presonally wouldn't put it in a BADI. I would go with the PAI check module ...
PROCESS AFTER INPUT.
MODULE EXIT AT EXIT-COMMAND.
CHAIN.
FIELD P9123-BEGDA.
FIELD P9123-ENDDA.
FIELD P9123-ZABC.
MODULE INPUT_STATUS ON CHAIN-REQUEST.
ENDCHAIN.
CHAIN.
FIELD P9123-BEGDA.
FIELD P9123-ENDDA.
MODULE CHECK_START_END_DATE.
ENDCHAIN.
Hello Adam,
Its a custom infotype so you can put any piece of code in the flow logic.
But in general, its always recommended to put validations for infotype in user-exit/BADI as it follows the logical DB behaviour.
If you want to put some default values then you can use PAI or PBO. Else its upto you how to proceed...!!!!!!
Rgrds,
Sravan
Hi ,
The check logic can easily be placed in PAI.
Please refer http://help.sap.com/saphelp_nw04s/helpdata/en/9f/dbabbd35c111d1829f0000e829fbfe/frameset.htm
Reward, if found helpful.
Cheers,
Regards,
Amit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
111 | |
8 | |
8 | |
6 | |
6 | |
5 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.