‎2012 Sep 19 8:30 AM
Hi experts,
I need to implement some validations referred to modification of BOM positions.
I have implement the Enhancement Spot ES_SAPLCSDI and more specifically, the FORM okcode_bearbeiten with the coding pasted above.
Our requirement (BOM positions validation) is encapsulated on function module Z_ZMA0001_BOM_COMPO_VALID.
After pressing the save button (icon bar), if there's an error I want to display the error message and after that allow the user to correct it, not ending the CS02 transaction. I am not able to achieve this requirement. Otherwise if I set the "e" message the program is blocked. Anyone could help me?
Lots of thanks!!!
Javier
{abap}
IF okcode EQ 'FCBU'.
IF rc29k-stlan IS INITIAL.
SELECT SINGLE stlan INTO rc29k-stlan FROM mast WHERE matnr = rc29k-matnr
AND stlnr = rc29k-stlnr.
ENDIF.
CALL FUNCTION 'Z_ZMA0001_BOM_COMPO_VALID'
EXPORTING
i_matnr = rc29k-matnr
i_stlnr = rc29k-stlnr
i_stlan = rc29k-stlan
i_stlal = rc29k-stlal
i_idnrk = rc29p-idnrk
i_rekrs = rc29p-rekrs
IMPORTING
e_message = l_message.
IF l_message = 'X'.
MESSAGE s324(ze) WITH rc29k-matnr DISPLAY LIKE 'E'.
ENDIF.
**</MOD-001>
ENDIF.
{abap}
‎2012 Sep 20 8:53 AM
Corrected.
Finally I've solved this requirement implementing the BAdI BOM_UPDATE. The useful OSS note that open my mind to find the solution was 585491 - Information on BAdIs in BOM area.
‎2012 Sep 20 8:53 AM
Corrected.
Finally I've solved this requirement implementing the BAdI BOM_UPDATE. The useful OSS note that open my mind to find the solution was 585491 - Information on BAdIs in BOM area.