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

Function Module -- Enhancement

Former Member
0 Likes
496

Hi all

I have created Source Code Enhancements(Plug-ins) in a standard function module(one at the begining and second at the End of Function Module).

In these enhancements, I have some business logic coded which are triggerd before and at the End of the standard logic.

Problem here is : I want to access one of the function Module's parameter to do some custom business logic in my enhancement.

Please advice on how to access a parameter from my Enhancement.

Cheers

RJ

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
432

Hi ,

You need to read the Standard program/ function module usign field symbol.

See the below logicto read the YMSEG table into your exit/Badi of standard program.

Data : l_name1(40) TYPE c ,

g_mseg TYPE STANDARD TABLE OF mseg,

FIELD-SYMBOLS: <fs1> TYPE ANY .

l_name1 = '(SAPMM07M)YMSEG[]'.

ASSIGN (l_name1) TO <fs1>.

IF <fs1> IS ASSIGNED.

g_mseg[] = <fs1>.

endif.

1 REPLY 1
Read only

Former Member
0 Likes
433

Hi ,

You need to read the Standard program/ function module usign field symbol.

See the below logicto read the YMSEG table into your exit/Badi of standard program.

Data : l_name1(40) TYPE c ,

g_mseg TYPE STANDARD TABLE OF mseg,

FIELD-SYMBOLS: <fs1> TYPE ANY .

l_name1 = '(SAPMM07M)YMSEG[]'.

ASSIGN (l_name1) TO <fs1>.

IF <fs1> IS ASSIGNED.

g_mseg[] = <fs1>.

endif.