Application Development 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: 

How to write a dynamic pattern

Former Member
0 Kudos
1,020

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

4 REPLIES 4

manfred_oster
Explorer
0 Kudos
250

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

Former Member
0 Kudos
250

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

Former Member
0 Kudos
250

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

0 Kudos
250

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.