‎2007 Jul 27 9:22 AM
Hi
i am doing validations for PO line items like som material types not allowed for this po type and account assignment cat K is mandatory etc. i am facing problem while executing me21. if any error related to my validations from user exit comes that case screen will be in disply mode. so i need screen to be in editable mode to correct wrong entries.
sample of my code is as follows. iam using MM06E005 ,EXIT_SAPMM06E_017, zxm06u42
My code:
if ( sy-tcode = 'ME22N' and i_ekko-bsart = 'NB' and i_ekko-aedat < 20070718 ) .
message e006(znb) with i_ekpo-mtart.
endif.
if ( ( sy-tcode = 'ME21' or sy-tcode = 'ME21N' or sy-tcode = 'ME22' or sy-tcode = 'ME22N' )
and i_ekko-bsart = 'nb' ).
if ( i_ekpo-mtart = 'roh' or i_ekpo-mtart = 'halb' or
i_ekpo-mtart = 'fert' or i_ekpo-mtart = 'fhmi' or
i_ekpo-mtart = 'hawa' ).
message E000(ZNB) WITH i_ekpo-mtart.
‎2007 Jul 27 9:28 AM
Hi,
When you raise an error message PBO will not be executed again,
You will get only those FILEDS as editable which you put in the flow logic using CHAIN ENDCHAIN or FILED.
SO put your PAI module along with CHAIN ENDCHAIN over all the fields which you want to show in edit mode after the error message.
If you simply raise an error message from a normal PAI module then all the screen will be read only.
So create CHAIN ENDCHAIN over all the fields and associate a PAI MODULE for that and raise your messages from there.
Regards,
Sesh
‎2007 Jul 27 9:32 AM
‎2007 Jul 27 9:47 AM
Hi raymond
if use I_AKTYP also scrren will come in display mode only. i need editable.
‎2007 Jul 27 12:47 PM
Hello CHINNA,
You can have another option by using a BADI like ME_PROCESS_PO_CUST and method PROCESS_ITEM.
Best regards,