Skip to Content

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

Function Module INM_INITIATIVE_SAVE_DB

Hi Experts

Please assist.

If i try and save an Initiative after Creating it, i get error in portal :

"No Authorization to update activity on"

In tx st22 it says that :

An internal error in the database interface occurred during access to

the data of table "INM_INITIATIVE ".

Line 20 on the function Module (the insert is not happening)

" INSERT INM_INITIATIVE FROM TABLE IT_INSERT."

But if i debug, al the data is correct.

FUNCTION INM_INITIATIVE_SAVE_DB.

*"----


""Update Function Module:

*"

""Local Interface:

*" IMPORTING

*" VALUE(IT_DELETE) TYPE INM_TT_INITIATIVES_DB OPTIONAL

*" VALUE(IT_INSERT) TYPE INM_TT_INITIATIVES_DB OPTIONAL

*" VALUE(IT_UPDATE_NEW) TYPE INM_TT_INITIATIVES_DB OPTIONAL

*" VALUE(IT_UPDATE_OLD) TYPE INM_TT_INITIATIVES_DB OPTIONAL

*" VALUE(IT_UPDATE_SET_NEW) TYPE INM_TT_INITIATIVES_DB OPTIONAL

*" VALUE(IT_UPDATE_SET_OLD) TYPE INM_TT_INITIATIVES_DB OPTIONAL

*"----


DATA:

LS_UPDATE_SET_NEW TYPE INM_INITIATIVE.

*-Insert

IF IT_INSERT[] IS NOT INITIAL.

INSERT INM_INITIATIVE FROM TABLE IT_INSERT.

IF SY-SUBRC IS NOT INITIAL.

RAISE EXCEPTION TYPE CX_RPM_DB_INSERT

EXPORTING

MV_TABNAME = 'INM_INITIATIVE'.

ENDIF.

ENDIF.

*-Update

IF IT_UPDATE_NEW[] IS NOT INITIAL.

UPDATE INM_INITIATIVE FROM TABLE IT_UPDATE_NEW.

IF SY-SUBRC IS NOT INITIAL.

RAISE EXCEPTION TYPE CX_RPM_DB_UPDATE

EXPORTING

OV_TABLE_NAME = 'INM_INITIATIVE'.

ENDIF.

ENDIF.

*-Update SET

IF IT_UPDATE_SET_NEW[] IS NOT INITIAL.

LOOP AT IT_UPDATE_SET_NEW INTO LS_UPDATE_SET_NEW.

UPDATE INM_INITIATIVE

SET LAST_CHANGED_ON = LS_UPDATE_SET_NEW-LAST_CHANGED_ON

LAST_CHANGED_BY = LS_UPDATE_SET_NEW-LAST_CHANGED_BY

WHERE GUID = LS_UPDATE_SET_NEW-GUID.

IF SY-SUBRC IS NOT INITIAL.

RAISE EXCEPTION TYPE CX_RPM_DB_UPDATE

EXPORTING

OV_TABLE_NAME = 'INM_INITIATIVE'.

ENDIF.

ENDLOOP.

ENDIF.

*-Delete

IF IT_DELETE[] IS NOT INITIAL.

DELETE INM_INITIATIVE FROM TABLE IT_DELETE.

IF SY-SUBRC IS NOT INITIAL.

RAISE EXCEPTION TYPE CX_RPM_DB_DELETE

EXPORTING

OV_TABLE_NAME = 'INM_INITIATIVE'.

ENDIF.

ENDIF.

ENDFUNCTION.

Any idea on what the problem could be, i checked object links and DFM transactions, all is fine.

However i cannot create an initiative.

Please assist soonest.

Regards,

Ihsaan Mayet

Edited by: Ihsaan Mayet on May 17, 2011 10:41 AM

Former Member
Not what you were looking for? View more on this topic or Ask a question