Skip to Content
author's profile photo Former Member
Former Member

How to write a dynamic pattern

Hello,

when writing abap code there is the possibility of creating your own pattern for code blocks you need regularly e.g. for documentation or tracing code.

(when editing a program in SE80 -> Utilities -> More utilities -> Edit pattern -> Create pattern)

When creating a pattern there is a menu entry Pattern -> Dynamic pattern. I thought that this allows me to write patterns which use variables e.g. for the current user or date. When choosing the entry the statement *$&$EXIT is added in the pattern but there is no documentation what I have to do.

Has anyone experience in creating dynamic pattern who can help me or knows where I can find documentation on this topic?

Thanks

Roman

Add comment
10|10000 characters needed characters exceeded

3 Answers

  • Posted on Mar 29, 2004 at 07:56 AM

    Hello,

    I have to admit that I never tried this myself, but I think you have to activate enhancement SEUED001 and implement customer exit EXIT_SAPLLOCAL_EDT1_00 (or EXIT_SAPLEDITOR_001 for releases < 4.5). Documentation is rather sparse, but I guess it's not too difficult.

    Kind regards, Manfred Oster

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Mar 30, 2004 at 06:36 PM

    Hi Roman,

    We can create patterns by creating a function <patternname>_EDITOR_EXIT. The o/p of the function should be a table of type RSWSOURCET(Version 4.70). On the editor, when you choose other pattern, SAP triggers this function.

    In this function, you can have whatever logic you want. I have created one, where we read a std text for the Modification Log and populate the User Name & Date.

    Hope this helps.

    Regards, Pramod

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Mar 30, 2004 at 06:44 PM

    Hi Roman,

    We can create patterns by creating a function <patternname>_EDITOR_EXIT. The o/p of the function should be a table of type RSWSOURCET(Version 4.70). On the editor, when you choose other pattern, SAP triggers this function.

    In this function, you can have whatever logic you want. I have created one, where we read a std text for the Modification Log and populate the User Name & Date.

    Hope this helps.

    Regards, Pramod

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      In 4.6C we have the standard function module SUBMIT_EDITOR_EXIT. Here we can see the import and export parameters.

      Only one thing is requiered, to create a dynamic pattern that uses xxxx_EDITOR_EXIT FM the pattern must have only this line --> <b>*$&$MUSTER</b>

      If you put <b>$&$EXIT</b> you must implement a Customer Function, but with <b>$&$MUSTER</b> you only need to create the xxxx_EDITOR_EXIT FM.

      That's all.

      Greetings from Spain.