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: 

Issue related to Dynamic Field Symbol

Former Member
0 Kudos

Hi All,

There is one function module called EXIT_SAPMM06E_001 having one INCLUDE as below:

INCLUDE ZXM06U17.

ENDFUNCTION.

Inside the INCLUDE ZXM06U17, the code is as below:

field-symbols: <fs_zzbol> type any.

data : l_zzbol(30).

if sy-tcode eq 'ME21N'.

l_zzbol = '(SAPLMEPO)EKKO-ZZBOL'.

elseif sy-tcode eq 'ME21'.

l_zzbol = '(SAPMM06E)EKKO-ZZBOL'.

endif.

assign (l_zzbol) to <fs_zzbol>.

if sy-subrc <> 0.

message e999(zb) with 'Could not Assign BOL Number'

'to <FS_ZZBOL>' l_zzbol.

endif.

As per written code, if the value of (l_zzbol) is not assigned to the field symbol <fs_zzbol>, the above error will pop up.

When I am trying to debug this program in foreground using Z-Transaction and the control comes to this user exit, SAPLXM06 is stored in the program memory.

Here SY-TCODE is either Z-TCODE or Se38 and not ME21N or ME21. Hence neither of the programs SAPLMEPO or SAPMM06E is stored in the program memory. So the variable L_ZZBOL is not getting assigned and the statement u201Cassign (L_ZZBOL) to <FS_ZZBOL>u201D is not working.

Finally the error pops up saying u2018Could not Assign BOL Number'.

Can you please suggest how I can test this user exit; any other approach required as such..

Note: I am using 4.6C SAP version.

Thanks,

Sanjeet

2 REPLIES 2

Former Member
0 Kudos

u have to test this exit from ME21N or ME21 only to get the desired result. u should not test it from any ztcode

0 Kudos

Is it not possible to change the sy-tcode in 4.6c version?

Because it can be changed in ECC 6.0 .