Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Alternative for 0FI_GL_4

Hi Experts,

We are currently using 0FI_GL_4 under classic GL. We are upgrading to new GL and I was told that we need to replace the old extractions with new alternative because the tables seem to have changed with regards to new GL.

I don't have any firm knowledge on GL stuff from SAP perspective.

Could you kindly please shed some light on below requests :

1) To start with, please give me some links to refer how new GL stuff hangs together with new GL(anything would help)

2) let me know the new tables that are using by new GL's datasource

3) If we need to replace 0FI_GL_4, whats the new datasource

Please respond and points will be awarded for any valuable information

Best wishes

Shanthi.

Former Member
Former Member replied

Hi Shanti,

Refer this and take the help of an ABAPer to solve your problem.

Refer to sample function module RSA3_GET_DATA_SIMPLE. it's on every system.

FUNCTION RSA3_GET_DATA_SIMPLE.

*"----


""Lokale Schnittstelle:

*" IMPORTING

*" VALUE(I_REQUNR) TYPE SBIWA_S_INTERFACE-REQUNR

*" VALUE(I_CHABASNM) TYPE SBIWA_S_INTERFACE-CHABASNM

*" OPTIONAL

*" VALUE(I_ISOURCE) TYPE SBIWA_S_INTERFACE-ISOURCE

*" OPTIONAL

*" VALUE(I_MAXSIZE) TYPE SBIWA_S_INTERFACE-MAXSIZE

*" OPTIONAL

*" VALUE(I_INITFLAG) TYPE SBIWA_S_INTERFACE-INITFLAG

*" OPTIONAL

*" VALUE(I_UPDMODE) TYPE SBIWA_S_INTERFACE-UPDMODE

*" OPTIONAL

*" VALUE(I_DATAPAKID) TYPE SBIWA_S_INTERFACE-DATAPAKID

*" OPTIONAL

*" VALUE(I_RLOGSYS) TYPE SRSC_S_INTERFACE-RLOGSYS

*" OPTIONAL

*" TABLES

*" I_T_SELECT TYPE SBIWA_T_SELECT OPTIONAL

*" I_T_FIELDS TYPE SBIWA_T_FIELDS OPTIONAL

*" E_T_DATA OPTIONAL

*" EXCEPTIONS

*" NO_MORE_DATA

*" ERROR_PASSED_TO_MESS_HANDLER

*"----


STATICS: S_S_IF_SIMPLE TYPE SRSC_S_IF_SIMPLE,

S_FNAME LIKE TFDIR-FUNCNAME.

IF I_INITFLAG = 'X'.

*====== INIT ===========================================================

*------ create interface structure -


S_S_IF_SIMPLE-REQUNR = I_REQUNR.

IF NOT I_ISOURCE IS INITIAL.

S_S_IF_SIMPLE-DSOURCE = I_ISOURCE.

ELSE.

S_S_IF_SIMPLE-DSOURCE = I_CHABASNM.

ENDIF.

S_S_IF_SIMPLE-MAXSIZE = I_MAXSIZE.

S_S_IF_SIMPLE-INITFLAG = I_INITFLAG.

APPEND LINES OF I_T_SELECT TO S_S_IF_SIMPLE-T_SELECT.

APPEND LINES OF I_T_FIELDS TO S_S_IF_SIMPLE-T_FIELDS.

DATA L_S_OSOURCE TYPE RSAOT_S_OSOURCE.

CALL FUNCTION 'RSA1_SINGLE_OLTPSOURCE_GET'

EXPORTING

I_OLTPSOURCE = S_S_IF_SIMPLE-DSOURCE

IMPORTING

E_S_OLTPSOURCE = L_S_OSOURCE.

S_FNAME = L_S_OSOURCE-EXTRACTOR.

*----


call extractor in init mode -


DATA L_DEBUG(1).

IMPORT L_DEBUG FROM MEMORY ID 'RSFH_DBG'.

IF L_DEBUG = RSFH_C_DEBUG_LATE.

BREAK-POINT. "#EC NOBREAK

ENDIF.

CALL FUNCTION S_FNAME

EXPORTING

I_REQUNR = S_S_IF_SIMPLE-REQUNR

I_DSOURCE = S_S_IF_SIMPLE-DSOURCE

I_MAXSIZE = S_S_IF_SIMPLE-MAXSIZE

I_INITFLAG = S_S_IF_SIMPLE-INITFLAG

TABLES

I_T_SELECT = S_S_IF_SIMPLE-T_SELECT

I_T_FIELDS = S_S_IF_SIMPLE-T_FIELDS

EXCEPTIONS

NO_MORE_DATA = 1

ERROR_PASSED_TO_MESS_HANDLER = 2

OTHERS.

ELSE.

*======= FETCH =========================================================

REFRESH E_T_DATA.

CLEAR E_T_DATA.

CLEAR S_S_IF_SIMPLE-INITFLAG.

CALL FUNCTION S_FNAME

EXPORTING

I_REQUNR = S_S_IF_SIMPLE-REQUNR

I_ISOURCE = S_S_IF_SIMPLE-DSOURCE

I_DSOURCE = S_S_IF_SIMPLE-DSOURCE "30C

I_MAXSIZE = S_S_IF_SIMPLE-MAXSIZE

I_INITFLAG = S_S_IF_SIMPLE-INITFLAG

TABLES

I_T_SELECT = S_S_IF_SIMPLE-T_SELECT

I_T_FIELDS = S_S_IF_SIMPLE-T_FIELDS

E_T_DATA = E_T_DATA

EXCEPTIONS

NO_MORE_DATA = 1

ERROR_PASSED_TO_MESS_HANDLER = 2

OTHERS = 3.

ENDIF.

*========= ERROR HANDLING ==============================================

CASE SY-SUBRC.

WHEN '0'.

WHEN '1'. RAISE NO_MORE_DATA.

WHEN '2'.

LOG_WRITE SY-MSGTY SY-MSGID SY-MSGNO SY-MSGV1 SY-MSGV2.

RAISE ERROR_PASSED_TO_MESS_HANDLER.

WHEN OTHERS.

LOG_WRITE SY-MSGTY SY-MSGID SY-MSGNO SY-MSGV1 SY-MSGV2.

RAISE ERROR_PASSED_TO_MESS_HANDLER.

ENDCASE.

ENDFUNCTION.

Hope this helps

Regards

Karthik

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question