Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Screen editable at me21

Former Member
0 Likes
614

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.

4 REPLIES 4
Read only

seshatalpasai_madala
Product and Topic Expert
Product and Topic Expert
0 Likes
568

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

Read only

RaymondGiuseppi
Active Contributor
0 Likes
568

Check parameter of EXIT_SAPMM06E_017 : I_AKTYP "Create, Change, Display" and not the transaction code.

Regards

Read only

0 Likes
568

Hi raymond

if use I_AKTYP also scrren will come in display mode only. i need editable.

Read only

0 Likes
568

Hello CHINNA,

You can have another option by using a BADI like ME_PROCESS_PO_CUST and method PROCESS_ITEM.

Best regards,