Skip to Content
0
Former Member
Nov 21, 2006 at 11:13 AM

client specific user exits in FI-SL. by using GCX2 T.code

314 Views

Hi this is Sekhar,

I have a program ZGIVU000(Function pool) which is a copy of RGIVU000. After copying RGIVU000 program to ZGIVU000 added a logic in the Subroutine, i will assign ZGIVU000 to Client Specific user-exits in FI-SL's Application area GIMV. For this T.Code is GCX2. Now this user exit(Sub Routine) will trigger for every FI posting, and it retrieves Business Activity and upload to FI Posting T.Codes. Now I need to check how the user exit is triggering,, I need to check my program is working properly or not.I am enclosing the ZGIVU000(Function pool)..For ur Reference.

Report ZGIVU000.

************************************************************************

  • This user exit populates the BUSINESS ACTIVITY for FI postings. The *

  • cost center field is checked to see it contains a value. If so, *

  • it is used along with the controlling area to read the cost center *

  • master to obtain the department code field from which the business *

  • activity will be derived. *

  • *

  • If a WBS element was entered, a lookup is made in the WBS Element *

  • Master Data Table (PRPS). Once found, the project type associated *

  • with the WBS element is obtained to perform a lookup in the Project *

  • Type Lookup Table in order to obtain the BUSINESS ACTIVITY and *

  • EXPENDITURE TYPE for that WBS Element. *

************************************************************************

FORM E99_MVC USING FROM_FIELD TO_FIELD.

CHECK TO_FIELD = SPACE.

IF ACCIT_GLX-KOSTL NE SPACE.

SELECT * FROM CSKS WHERE KOSTL EQ ACCIT_GLX-KOSTL

AND KOKRS EQ ACCIT_GLX-KOKRS.

IF SY-SUBRC EQ 0.

MOVE CSKS-ABTEI+0(4) TO TO_FIELD.

EXIT.

ENDIF.

ENDSELECT.

ELSE. "only WBS element exists...no cost center

IF ACCIT_GLX-PS_PSP_PNR NE SPACE.

  • select single * from prps where

  • pspnr eq accit_glx-ps_psp_pnr.

CALL FUNCTION 'CJPN_GET_WBS_ELEMENT'

EXPORTING

  • I_INDEX = 1

  • I_OBJNR = ' '

  • I_POSID = ' '

I_PSPNR = ACCIT_GLX-PS_PSP_PNR

  • NO_BUFFER = ' '

IMPORTING

E_PRPS = PRPS

EXCEPTIONS

INPUT_ERROR = 1

NOT_FOUND = 2

OTHERS = 3.

IF SY-SUBRC EQ 0.

SELECT SINGLE * FROM T9AB5 WHERE

PRART EQ PRPS-PRART.

IF SY-SUBRC EQ 0.

MOVE T9AB5-ZZAEXPTYP TO GLU1-ZZAEXPTYP.

MOVE T9AB5-ZZABUSACT TO TO_FIELD.

ENDIF.

ENDIF.

ENDIF.

ENDIF.

ENDFORM.