Problem: you want to block edition of Sales Order in ERP system (VA02 TCODE) based on customer conditions.
Solution: one way to do it is to create an Enhancement Implementation which will contain business logic.
You need to create Enhancement Implementation in the end of SD_SALES_DOCUMENT_ENQUEUE FM. This implementation should contain your business logic to check whether Sales Order should be editable or not. If Sales Order should not be editable implementation should issue an error message which will raise the NO_CHANGE exception. This will prevent user from editing document.
IF lv_editable = abap_false. MESSAGE e001(00) WITH 'Some message' RAISING no_change. ENDIF.
IF lv_editable = abap_false. MESSAGE e001(00) WITH 'Some message' RAISING no_change. ENDIF.
This will work in VA02 TCODE.
Komentowanie jest zakończone.