cancel
Showing results for 
Search instead for 
Did you mean: 

Usage of User Exit EXIT_SAPMP56T_003?...

Lukas_Weigelt
Active Contributor
0 Kudos

Hi,

I'm having problems understanding the concept of the user exit EXIT_SAPMP56T_003. In another thread was propagated I could use this exit to add customer information to the table user, even from ESS WDAs, to allow for alteration of the data flow which even takes effect on the clusters.

As per the IMG suggests, I have now created an enhancement project Z_TRIP which I have assigned the Exit FITR0005 to. I checked via debugging whether the code within the FM EXIT_SAPMP56T_003 is being executed, and it is. However, for proceeding any further I'm pretty confused because 1. I cannot create implicit enhancements in the FM (just nothing happens, not even an error) and 2. The Include ZXTRVU05 apparently doesn't even exist. I can't navigate into it and I can't see it in the function group XTRV either.... Does SAP want me to MODIFY its explicit enhancement sport here? This is really getting frustrating and incomprehensive. Could somebody please clear this up?

FUNCTION EXIT_SAPMP56T_003.
*"----------------------------------------------------------------------
*"*"Lokale Schnittstelle:
*"  IMPORTING
*"     REFERENCE(KMSUM) TYPE  TABLE
*"     REFERENCE(BELEG) TYPE  TABLE
*"     REFERENCE(EXBEL) TYPE  TABLE
*"     REFERENCE(ABZUG) TYPE  TABLE
*"     REFERENCE(ZIEL) TYPE  TABLE
*"     REFERENCE(ZWECK) TYPE  TABLE
*"     REFERENCE(KONTI) TYPE  TABLE
*"     REFERENCE(VSCH) TYPE  TABLE
*"     REFERENCE(KMVER) TYPE  TABLE
*"     REFERENCE(PAUFA) TYPE  TABLE
*"     REFERENCE(UEBPA) TYPE  TABLE
*"     REFERENCE(BELER) TYPE  TABLE
*"     REFERENCE(VPFPS) TYPE  TABLE
*"     REFERENCE(VPFPA) TYPE  TABLE
*"     REFERENCE(ROT) TYPE  TABLE
*"     REFERENCE(RUW) TYPE  TABLE
*"     REFERENCE(AEND) TYPE  TABLE
*"     REFERENCE(KOSTR) TYPE  TABLE
*"     REFERENCE(KOSTZ) TYPE  TABLE
*"     REFERENCE(KOSTB) TYPE  TABLE
*"     REFERENCE(KOSTK) TYPE  TABLE
*"     REFERENCE(V0SPLIT) TYPE  TABLE
*"     REFERENCE(EDITOR) TYPE  TABLE
*"     REFERENCE(USER) TYPE  TABLE
*"     REFERENCE(T_GUEST_OLD) TYPE  TABLE OPTIONAL
*"     REFERENCE(TRIP_HEADER) TYPE  PTRV_HEAD
*"     REFERENCE(TRIP_PERIOD) TYPE  PTRV_PERIO
*"     REFERENCE(TRIP_STATUS) TYPE  PTK12
*"----------------------------------------------------------------------


INCLUDE ZXTRVU05 .


ENDFUNCTION.

Cheers.... Lukas...

Accepted Solutions (0)

Answers (2)

Answers (2)

Lukas_Weigelt
Active Contributor
0 Kudos

Reopened..

My initial though was being able to ADD data to the table USER i.e. PTK99 in this customer exit. However it seems I can only modify already existent data...

All internal tables are transferred as generic table types. Editing of
 specific tables is as follows:

 FIELD-SYMBOLS: <KMSUM> TYPE PTRV_KMSUM.
 LOOP AT KMSUM ASSIGNING <KMSUM>.
    IF <KMSUM>-xxx = ...
       ...
    ENDIF.
 ENDLOOP.

Since the table USER doesn't contain any data at this point, I cannot Loop over it.

When I try using an "ASSIGN X TO Y CASTING" statement I'm getting the following error message:

"USER" and "<FS_RECORDSET>" contain references, internal tables, or		
strings. In the current statement, these must occur at the same offset		
position and they must be compatible.

I cannot append an initial line either since the tabel USER is marked as Import parameter...

What can be done to append data to an initial table in this user exit? Is it even possible? Could there be a work around to achieve this?

Cheers, Lukas

Former Member
0 Kudos

Lukas,

Have you looked at the other exits/enhancements provided? There is another FITR0003 (EXIT_SAPMP56T_002) called before trip is saved, which should help.

Lukas_Weigelt
Active Contributor
0 Kudos

Yes indeed, this is the one I should have used. With this, it works the way I wanted it to. So I have to conclude for myself Exit ZXTRVU03 is suited for altering/adding data whereas ZXTRVU05 is only suited to reprocess already existent data and/or for preventing the trip from getting saved dependant on coded queries.

Thanks!

Cheers, Lukas

Former Member
0 Kudos

Lukas,

You have to create that INCLUDE ZXTRVU05 by double-clicking if that is what you are asking. It is the old-kind enhancements (user exits) done using SMOD and CMOD.

Lukas_Weigelt
Active Contributor
0 Kudos

Thanks,

I didn't press 'Enter' after the warning message "zxxxx is reserved for customer includes etc." showed in the title bar. I go hang myself now with a wireless LAN cable or something...

Cheers, Lukas