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

Problem in ME23N

0 Likes
990

Hello, I'm trying to catch the event modify for example, into a user exit, but i can't do it.

I have

CASE sy-tcode.

WHEN 'ME23N'.

-> IF sy-title CS 'Create'.

PERFORM xxxxxxxxxxx USING xxxxx.

ENDIF.

ENDCASE.

But sy-title always contain the same expression when I modify the document or create other new.

For e.g.: If I change a value in a field and then press Intro

How I could see the action?

Thank you in advance.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
851

To catch the event for modification, you have to look at

field TRTYP FROM T160 table.

SELECT SINGLE TRTYP FROM T160 INTO V_TRTYP WHERE TCODE = SY-TCODE.

IF NOT V_TRTYP IS INITIAL.

CASE V_TRTYP.

WHEN 'H'.

In Create mode

WHEN 'V'.

In Change mode

WHEN 'A'.

Display mode

ENDCASE.

ENDIF.

Regards,

Ravi

Hello, I'm trying to catch the event modify for example, into a user exit, but i can't do it.

I have

CASE sy-tcode.

WHEN 'ME23N'.

-> IF sy-title CS 'Create'.

PERFORM xxxxxxxxxxx USING xxxxx.

ENDIF.

ENDCASE.

But sy-title always contain the same expression when I modify the document or create other new.

For e.g.: If I change a value in a field and then press Intro

How I could see the action?

Thank you in advance.

3 REPLIES 3
Read only

Former Member
0 Likes
852

To catch the event for modification, you have to look at

field TRTYP FROM T160 table.

SELECT SINGLE TRTYP FROM T160 INTO V_TRTYP WHERE TCODE = SY-TCODE.

IF NOT V_TRTYP IS INITIAL.

CASE V_TRTYP.

WHEN 'H'.

In Create mode

WHEN 'V'.

In Change mode

WHEN 'A'.

Display mode

ENDCASE.

ENDIF.

Regards,

Ravi

Read only

Former Member
0 Likes
851

Hi Jose

I seem to recall having this problem a while back on a 4.6C system when using user exit EXIT_SAPLEBND_002. We assumed that SY-TCODE would be ME21N for create, ME22N for change and ME23N fro display.

But, for example, if you go in to display a PO with ME23N, and then press the Change button to get it into change mode, the SY-TCODE stayed ME23N. I think in the end we distinguished between create and change / display by checking whether the PO Number (EBELN) was initial on the first line item of the IT_BEKPO structure. Or something equally inelegant.

Sorry I can't be more helpful.

Cheers

Lyal

Read only

0 Likes
851

Hello Lyal, I've the IT_BEKPO structure empty due to this I can't see any kind of operations like Modify for example.

How can I see this operations? If I don't have any clue in SY-TITLE or IT_BEKPO.

If I press the 'PEN' icon for modify anything, when I change the values into a cell and then press Enter, How could I detect the operation? or If I press NEW icon.

I'm always speaking about ME23N.

Thank You.