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

CS02 enhancement problem

javier_rodruez
Participant
0 Likes
856

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}

1 ACCEPTED SOLUTION
Read only

javier_rodruez
Participant
0 Likes
608

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.

1 REPLY 1
Read only

javier_rodruez
Participant
0 Likes
609

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.