2007 Mar 22 10:27 AM
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.
2007 Mar 22 10:30 AM
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.
2007 Mar 22 10:30 AM
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
2007 Mar 22 10:46 AM
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
2007 Mar 23 6:44 AM
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.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |