12-10-2013 7:03 AM
added custom field in me22n in header level .. i want to make that field mandatory based on some condition like netpr > 'some amount'
here I'm using function exists EXIT_SAPMM06E_006. inside that include loop at screen is not working
pls guide me how to make that zfield mandatory on that condition
thanks & regards,
Anbu
12-10-2013 7:22 AM
Hi -
The sub screen that you have created, there will be PAI event. Is SE51, go to the PAI event. And craete a module example MODULE EVENT_PAI. Double click on it, it will propose you a include. Accept that, then in this module u can add your code.
MODULE event_pai INPUT
* Code for validation
ENDMODULE.
Let us know, if it helps.
Regards,
Atul Mohanty
12-10-2013 7:07 AM
12-10-2013 7:22 AM
Hi -
The sub screen that you have created, there will be PAI event. Is SE51, go to the PAI event. And craete a module example MODULE EVENT_PAI. Double click on it, it will propose you a include. Accept that, then in this module u can add your code.
MODULE event_pai INPUT
* Code for validation
ENDMODULE.
Let us know, if it helps.
Regards,
Atul Mohanty
12-10-2013 7:40 AM
hi atul,
thanks for your info ..
but i'm not getting any screen values in that subscreen .
i needed to validate based on screen values only
see my below codeing
if sy-tcode = 'ME22N'.
if i_ekko-rlwrt > '10000000'.
loop at screen.
* break sssmm.
if screen-name = 'CI_EKKODB-ZARIBA'.
screen-required = '1'.
modify screen.
endif.
endloop.
endif.
how to get screen values over pls
12-10-2013 8:15 AM
Hi -
1. Declare a variable V_RLWART in the top include ZXM06TOP.
2. In the include ZXM06U36 of EXIT_SAPMM06E_006
Pass V_RLWART = i_ekko-RLWART.
3. Now in your include you can check the condition V_RLWART > '10000000'.
I would suggest one more thing, you give screen field name in SE51 EKKO_CI instead of 'CI_EKKODB'
Let us know, if it helps.
Regards,
Atul Mohanty
12-10-2013 8:35 AM
Make sure you are implementing it in the right exits.
EXIT_SAPMM06E_008 => ZXM06U37 - PAI.
From Screen to Database - PAI eg -> e_ci_ekko-zzfield_001 = ekko-zzfield_001.
Make the validation in this exit. And set a flag.
EXIT_SAPMM06E_006 => ZXM06U36 - PBO
From Database to Screen eg -> ekko-zzfield_001 = i_ekko-zzfield_001.
Check the flag set in the PAI above, then loop at screen and set the screen-active, output and required attributes to 1 for that field.
12-10-2013 9:09 AM
Hi atul,
i got that one
another help..
i made that field mantatory based on condition ..so i'm entering some value to that field.
after changing to some other PO also same value remains for that field , i want to clear that field value and update to database before clearing
pls help me
12-10-2013 10:10 AM
Hi -
Use exit ' EXIT_SAPMM06E_009' for the same.
Let us know, in case any further help.
Regards,
Atul Mohanty
12-13-2013 9:03 AM
Hi Atul,
i got the solution ...exit ' EXIT_SAPMM06E_006',exit ' EXIT_SAPMM06E_007' exit ' EXIT_SAPMM06E_008'
thanks you very much
regards,
Anbu
12-10-2013 7:57 AM
It would be better to use the badi ME_PROCESS_PO_CUST ...in that PROCESS_ITEM and PROCESS_HEADER methods..
You can post a check and validate input condition based in process methods
12-10-2013 1:09 PM
You should also use exit EXIT_SAPMM06E_012 in case user doesn't display the customer subscreen (so PAI wont be executed)
You could also migrate to more up-to-date BAdIs like ME_PROCESS_PO_CUST (for check) and ME_GUI_PO_CUST (for display of customer field) - Many threads/wiki blogs are available thru search tool at scn.
Regards,
Raymond