‎2010 Apr 05 8:38 AM
Hi Experts,
I have written a code to validate the partners(Sold-to & Ship-to) while creating a sales order in VA01 (program 'MV45AFZB') ( user exit form: USEREXIT_CHECK_VBAK).
If an invalid relationship is detected, this enhancement will display an error message and stop the sales order creation until the correct sold-to/ship-to relationship is entered or maintained.
I could able to give the error message based on the validation but the all the fields(Sold-to & Ship-to) on the screen are grayed out and are not ready for input.
Please suggest if there is any way to make these fields input enabled.
We are using SAP version ECC 6.0
Thanks in advance,
Anil
‎2010 Apr 05 5:36 PM
‎2010 Apr 05 8:49 AM
If the user double click on any of the fields, then the fields will be available for input again.
Regards
Vinod
‎2010 Apr 05 9:00 AM
Hi Vinod,
PO Number and PO date fields are input enabled but not the sold-to and ship-to fields. I tried even by double clicking on these fields but still these fields are not input enabled.
Thanks,
Anil
Edited by: Anil Lankapalli on Apr 5, 2010 10:01 AM
‎2010 Apr 05 9:09 AM
Try putting this code after raising the message
if screen-name = 'VBAK-KUNNR'.
screen-input = 1.
endif .Regards
Vinod
‎2010 Apr 05 4:47 PM
Hi Vinod,
I want to make Sold-to as well as Ship-to fields as input enabled. Ship-to screen field(KUWEV-KUNNR) is not accessible in the form :USEREXIT_CHECK_VBAK.
Please advise me if I need to use a different user exit form to do this validation.
Thanks,
Anil
‎2010 Apr 05 5:36 PM
‎2010 Apr 07 12:18 AM
Hi Keshav,
Thanks for your reply. By including the code in SAVE_DOCUMENT_PREPARE of MV45AFZZ I could able to give the error message. Still all the fields are grayed out. and I need to rerun the transaction VA01 with the correct sold-to and ship-to partner data.
Please suggest is there any other way to correct the ship-to data without re running the transaction VA01. After displaying the error I want the Ship-to and sold-to fields should be displayed as input enabled fields.
Thanks,
Anil
‎2010 Apr 07 3:20 AM
Hi,
Dnt Give Error message Use popup and use FCODE RETURN in the EXIT..
Regards,
Srinivas.