Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Enhancement point question

Hi, the ABAP gurus out there.

I wrote a simple program below to test the "Enhancement Point", but it did not return what I expected. I thought the program below will insert '00001000" and '00002000' into the internal table first, then instead of inserting '00007000" and '00008000' , it should insert '00003000' and '00004000'. But at the end, the internal table has 4 records -

'00001000", '00002000", '00007000" and '00008000".

Where did I do wrong?

Thanks in advance!

Fisher Li

REPORT ZFISHER_TEST_200.

TYPES: BEGIN OF ITAB_TYPE,

PERNR TYPE PA0001-PERNR.

TYPES: END OF ITAB_TYPE.

DATA: ITAB_DOC TYPE ITAB_TYPE OCCURS 0 WITH HEADER LINE.

ENHANCEMENT-POINT EO_ENHANCEMENT2 SPOTS ES_FISHER_SPOT1 STATIC .

$$-Start: EO_ENHANCEMENT2----


$$

ENHANCEMENT 1 EI_FISHER_IMPLEMENTATION2. "active version

*

ITAB_DOC-PERNR = '00003000'.

APPEND ITAB_DOC.

ITAB_DOC-PERNR = '00004000'.

APPEND ITAB_DOC.

ENDENHANCEMENT.

$$-End: EO_ENHANCEMENT2----


$$

ITAB_DOC-PERNR = '00001000'.

APPEND ITAB_DOC.

ITAB_DOC-PERNR = '00002000'.

APPEND ITAB_DOC.

ENhancement-section fisher_program2 spots ES_FISHER_SPOT1 STATIC.

ITAB_DOC-PERNR = '00007000'.

APPEND ITAB_DOC.

ITAB_DOC-PERNR = '00008000'.

APPEND ITAB_DOC.

end-ENhancement-section.

loop at ITAB_DOC.

write:/ ITAB_DOC-PERNR.

endloop.

Tags:
Not what you were looking for? View more on this topic or Ask a question