2008 Feb 19 1:27 PM
Hello,
i have implemented mm06e005 user exit for contract additional fields.
Everything works fine the data is saved to fieldds in ekko\ekpo tables
I would like to add customer checks on the additional fields .
I am throwing an error message in exit_sapmm06e_012 if there is an incorrect data . After the error the screen gets blocked , all the fields are in a display mode , and the error can not be correct .
The behaviour reminds the standard behaviour - if there is a standard error all the fields except for the problematic field get blocked . After a debug of the transaction code i have seen an usage of the message command and the usage of the mmpur macros - mm_messages_mac .
Tried using them both the result is the same - the screen is blocked .
I would really appreciate any help on the current problem .
Thank you in advance for your time , points will be awarded .
Leon Katsevman.
2008 Feb 20 6:57 AM
Hi,
Even i have faced the same problem, but i rectified that.
See for your custom fields just validate the fields in the Screen exit :SAPMM06E 0201 CUSTSCR1 SAPLXM06 0201 Subscreen: agreement header
Here you create a module and end module and validate your fields here.
By doing this only the required field will be in change mode.
see the below code for your reference:
ROCESS BEFORE OUTPUT.
MODULE BRAZIL_SCREEN.
PROCESS AFTER INPUT.
FIELD CI_EKKODB-ZZREIMB MODULE VALIDATE_DATA.
FIELD CI_EKKODB-ZZCONTRGER MODULE VALIDATE_CONTRGER.
PROCESS ON VALUE-REQUEST.
FIELD CI_EKKODB-ZZREIMB MODULE GET_F4HELP.
----
***INCLUDE ZXM06I01 .
----
&----
*& Module GET_F4HELP INPUT
&----
text
----
module GET_F4HELP input.
CLEAR LV_MODE.
SET PARAMETER ID 'MODE' FIELD LV_MODE.
CLEAR DYNPFIELDS.
REFRESH DYNPFIELDS.
DYNPFIELDS-FIELDNAME = 'CI_EKKODB-ZZREIMB'.
APPEND DYNPFIELDS.
CALL FUNCTION 'DYNP_VALUES_READ'
EXPORTING
DYNAME = 'SAPLXM06'
DYNUMB = '0201'
TABLES
DYNPFIELDS = DYNPFIELDS
EXCEPTIONS
OTHERS = 4.
IF SY-SUBRC = 0.
CLEAR OK-CODE.
LOOP AT SCREEN.
IF SCREEN-NAME = 'CI_EKKODB-ZZREIMB' AND
SCREEN-INPUT = 0.
LV_MODE = 'X'.
SET PARAMETER ID 'MODE' FIELD LV_MODE.
ENDIF.
ENDLOOP.
CALL SCREEN 1100 STARTING AT 100 7.
ENDIF.
endmodule. " GET_F4HELP INPUT
&----
*& Module VALIDATE_DATA INPUT
&----
text
----
module VALIDATE_DATA input.
if ci_ekkodb-zzreimb+0(1) GT 5 OR
ci_ekkodb-zzreimb+1(1) GT 5 OR
ci_ekkodb-zzreimb+2(1) GT 5 OR
ci_ekkodb-zzreimb+3(1) GT 5 OR
ci_ekkodb-zzreimb+4(1) GT 5.
message e002(00).
endif.
endmodule. " VALIDATE_DATA INPUT
&----
*& Module VALIDATE_CONTRGER INPUT
&----
text
----
module VALIDATE_CONTRGER input.
select single ZZCONTRGER from ZTBRMM_CONTRGER into lv_contrger
where zzcontrger = ci_ekkodb-zzcontrger.
if sy-subrc NE 0 AND ci_ekkodb-zzcontrger NE space.
message e002(00).
endif.
endmodule. " VALIDATE_CONTRGER INPUT
Thanks.
Note: Reward Points if you find useful.
Hello,
i have implemented mm06e005 user exit for contract additional fields.
Everything works fine the data is saved to fieldds in ekko\ekpo tables
I would like to add customer checks on the additional fields .
I am throwing an error message in exit_sapmm06e_012 if there is an incorrect data . After the error the screen gets blocked , all the fields are in a display mode , and the error can not be correct .
The behaviour reminds the standard behaviour - if there is a standard error all the fields except for the problematic field get blocked . After a debug of the transaction code i have seen an usage of the message command and the usage of the mmpur macros - mm_messages_mac .
Tried using them both the result is the same - the screen is blocked .
I would really appreciate any help on the current problem .
Thank you in advance for your time , points will be awarded .
Leon Katsevman.
2008 Feb 19 5:00 PM
Hello,
here it's implemented like this:
In ZXM06U43
IF sy-tcode = 'ME22N' OR sy-tcode = 'ME21N'.
Just the message-Handling
mmpur_message_config 'E' 'X' 'X'.
lf_enjoy = 'X'.
ENDIF.
.......
l_begru is just a field to prevent the usage of old material groups
IF NOT l_begru IS INITIAL.
IF lf_enjoy = 'X'.
mmpur_business_obj_context tekpo-id k_error_context.
mmpur_message 'E' 'ZI2M_01' '010' tekpo-ebelp tekpo-matkl '' ''.
ELSE.
MESSAGE ID 'ZI2M_01' TYPE 'E' NUMBER 010
WITH tekpo-ebelp tekpo-matkl .
ENDIF.
ENDIF.
....
Messages appear this way in the separat windows an field may be changed.
OSS-Note 310154 may be helpful.
Regards
Wolfgang
2008 Feb 20 6:57 AM
Hi,
Even i have faced the same problem, but i rectified that.
See for your custom fields just validate the fields in the Screen exit :SAPMM06E 0201 CUSTSCR1 SAPLXM06 0201 Subscreen: agreement header
Here you create a module and end module and validate your fields here.
By doing this only the required field will be in change mode.
see the below code for your reference:
ROCESS BEFORE OUTPUT.
MODULE BRAZIL_SCREEN.
PROCESS AFTER INPUT.
FIELD CI_EKKODB-ZZREIMB MODULE VALIDATE_DATA.
FIELD CI_EKKODB-ZZCONTRGER MODULE VALIDATE_CONTRGER.
PROCESS ON VALUE-REQUEST.
FIELD CI_EKKODB-ZZREIMB MODULE GET_F4HELP.
----
***INCLUDE ZXM06I01 .
----
&----
*& Module GET_F4HELP INPUT
&----
text
----
module GET_F4HELP input.
CLEAR LV_MODE.
SET PARAMETER ID 'MODE' FIELD LV_MODE.
CLEAR DYNPFIELDS.
REFRESH DYNPFIELDS.
DYNPFIELDS-FIELDNAME = 'CI_EKKODB-ZZREIMB'.
APPEND DYNPFIELDS.
CALL FUNCTION 'DYNP_VALUES_READ'
EXPORTING
DYNAME = 'SAPLXM06'
DYNUMB = '0201'
TABLES
DYNPFIELDS = DYNPFIELDS
EXCEPTIONS
OTHERS = 4.
IF SY-SUBRC = 0.
CLEAR OK-CODE.
LOOP AT SCREEN.
IF SCREEN-NAME = 'CI_EKKODB-ZZREIMB' AND
SCREEN-INPUT = 0.
LV_MODE = 'X'.
SET PARAMETER ID 'MODE' FIELD LV_MODE.
ENDIF.
ENDLOOP.
CALL SCREEN 1100 STARTING AT 100 7.
ENDIF.
endmodule. " GET_F4HELP INPUT
&----
*& Module VALIDATE_DATA INPUT
&----
text
----
module VALIDATE_DATA input.
if ci_ekkodb-zzreimb+0(1) GT 5 OR
ci_ekkodb-zzreimb+1(1) GT 5 OR
ci_ekkodb-zzreimb+2(1) GT 5 OR
ci_ekkodb-zzreimb+3(1) GT 5 OR
ci_ekkodb-zzreimb+4(1) GT 5.
message e002(00).
endif.
endmodule. " VALIDATE_DATA INPUT
&----
*& Module VALIDATE_CONTRGER INPUT
&----
text
----
module VALIDATE_CONTRGER input.
select single ZZCONTRGER from ZTBRMM_CONTRGER into lv_contrger
where zzcontrger = ci_ekkodb-zzcontrger.
if sy-subrc NE 0 AND ci_ekkodb-zzcontrger NE space.
message e002(00).
endif.
endmodule. " VALIDATE_CONTRGER INPUT
Thanks.
Note: Reward Points if you find useful.