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

User-exits

Former Member
0 Likes
314

In exits I want to pass some other values from other program. How can do that? .

2 REPLIES 2
Read only

Former Member
0 Likes
297

I am not sure what is your requirement but you can exprt some value to memory from your other Z program and then catch it in your user exit.

Read only

Clemenss
Active Contributor
0 Likes
297

Hi buddula1 5,

ich you mean you want to access other fields in the callin program than the ones passed in the exit modules interface, you can do so using dynamic assign (just an example - adapt to your needs):


FUNCTION FIELD_EXIT_ZLSPR.
*"----------------------------------------------------------------------
*"*"Local Interface:
*"       IMPORTING
*"             VALUE(INPUT)
*"       EXPORTING
*"             VALUE(OUTPUT)
*"----------------------------------------------------------------------
*-----------------------------------------------------------------------
* 17.02.2000 CLi Field-Exit for payment lock on invoice screen
* Transaction F-43
*-----------------------------------------------------------------------

CONSTANTS: BSL(20) VALUE '(SAPMF05A)BSEG-BSCHL'.

FIELD-SYMBOLS: <BSL>.

ASSIGN (BSL) TO <BSL>.
IF SY-SUBRC = 0.
   IF INPUT  = ' '  AND
*     <BSL> <> '37' AND
      <BSL> <> '27'.
      OUTPUT = 'A'.
      MESSAGE S002(ZF) WITH 'Zahlsperre "A" wurde gesetzt'.
   ELSE.
      OUTPUT = INPUT.
   ENDIF.
ELSE.
   OUTPUT = INPUT.
ENDIF.
ENDFUNCTION.

This is no longer documented in ABAP help but it works since ever until (at least) ECC600. Have debugger stop in your Exit, click call hierarchy, jump to calling program/routine(s) and seen what fields are availabe in debugger. You can assign them dynamically (use capittal letters!) - read and write access!).

Regards,

Clemens