12-13-2009 7:34 AM
Hi,
I am enhancing the functionality of transaction code IW31/IW32 where it is triggering my user exit. Inside the userexit I am calling bapi bapi_alm_notif_create for creation of notification in IW21.
But when the bapi is called it is going into dump, saying 'perform commit' is called again. What shall I do to overcome this.
Before coming to my include itself the transaction is saving, where I hope the commit is happening and so when my bapi calls the commit, it is going to dump. So I need to overcome this.
Please help.
12-16-2009 9:17 AM
Hi Vinraaj,
You can not use Commit in Enhancement..
Give a try by creating seperate program and use commit there instead directly in enhancement.(I am not sure but it may work)
and then use SUBMIT.
Hope it will solve your problem..
Thanks & Regards
ilesh 24x7
ilesh Nandaniya
12-14-2009 7:19 AM
when excuting BAPI_ALM_NOTIF_CREATE then its going to dump?
1. Below function module put 1st break-points in line call function 'IQS4_CHECK_ERROR_SEVERE'
and check RETURN table
2. Below function module put 2nd break-points in line call function 'IQS4_CHECK_ERROR_SEVERE'
and check RETURN table
then you can get some information in return table
and also check COMMITWORK is excuting two times?
FUNCTION BAPI_ALM_NOTIF_CREATE .
*"----
""Lokale Schnittstelle:
*" IMPORTING
*" VALUE(EXTERNAL_NUMBER) LIKE BAPI2080_NOTHDRE-NOTIF_NO OPTIONAL
*" VALUE(NOTIF_TYPE) LIKE BAPI2080-NOTIF_TYPE
*" VALUE(NOTIFHEADER) LIKE BAPI2080_NOTHDRI STRUCTURE
*" BAPI2080_NOTHDRI
*" VALUE(TASK_DETERMINATION) LIKE BAPIFLAG STRUCTURE BAPIFLAG
*" DEFAULT SPACE
*" VALUE(SENDER) LIKE BAPI_SENDER STRUCTURE BAPI_SENDER OPTIONAL
*" VALUE(ORDERID) LIKE BAPI2080_NOTHDRE-ORDERID OPTIONAL
*" EXPORTING
*" VALUE(NOTIFHEADER_EXPORT) LIKE BAPI2080_NOTHDRE STRUCTURE
*" BAPI2080_NOTHDRE
*" TABLES
*" NOTITEM STRUCTURE BAPI2080_NOTITEMI OPTIONAL
*" NOTIFCAUS STRUCTURE BAPI2080_NOTCAUSI OPTIONAL
*" NOTIFACTV STRUCTURE BAPI2080_NOTACTVI OPTIONAL
*" NOTIFTASK STRUCTURE BAPI2080_NOTTASKI OPTIONAL
*" NOTIFPARTNR STRUCTURE BAPI2080_NOTPARTNRI OPTIONAL
*" LONGTEXTS STRUCTURE BAPI2080_NOTFULLTXTI OPTIONAL
*" KEY_RELATIONSHIPS STRUCTURE BAPI2080_NOTKEYE OPTIONAL
*" RETURN STRUCTURE BAPIRET2 OPTIONAL
*"----
*--- Check notification type ( "PM/CS" )
call function 'IQS4_CHECK_NOTIF_TYPE_PM_CS'
EXPORTING
i_qmart = notif_type
i_qmnum = external_number
TABLES
return = return.
*--- Check fatal errors
call function 'IQS4_CHECK_ERROR_SEVERE'
TABLES
return = return
EXCEPTIONS
severe_error = 1
others = 2.
if sy-subrc ne 0. "notification's type is not valid
exit.
endif.
Create notification
call function 'IWON_NOTIFICATION_CREATE'
exporting
EXTERNAL_NUMBER = EXTERNAL_NUMBER
NOTIF_TYPE = NOTIF_TYPE
NOTIFHEADER = NOTIFHEADER
TASK_DETERMINATION = TASK_DETERMINATION
SENDER = SENDER
ORDERID = ORDERID
importing
NOTIFHEADER_EXPORT = NOTIFHEADER_EXPORT
tables
NOTITEM = NOTITEM
NOTIFCAUS = NOTIFCAUS
NOTIFACTV = NOTIFACTV
NOTIFTASK = NOTIFTASK
NOTIFPARTNR = NOTIFPARTNR
LONGTEXTS = LONGTEXTS
KEY_RELATIONSHIPS = KEY_RELATIONSHIPS
RETURN = RETURN.
*--- Check fatal errors
call function 'IQS4_CHECK_ERROR_SEVERE'
tables
return = return
exceptions
severe_error = 1
others = 2.
if not sy-subrc is initial.
exit.
endif. "notification's type is not valid
ENDFUNCTION.
12-14-2009 11:23 AM
Hi,
Comment the code BAPI TRANSACTION COMMIT and try your code.
OR
try to write implicit enhancment before the code where u r getting dump.
Regards
Edited by: Rasheed salman on Dec 14, 2009 12:23 PM
12-16-2009 9:03 AM
Hi,
I tried commenting and when it's executed it's not going into dump. Also the dump will happen only when I provide 'longtext' parameter in the call function. The long text parameter will lead the call in a perform PERFORM TEXT_UPDATE_F00 ON COMMIT' where it is going into dump.
12-14-2009 12:04 PM
Are you creating a notification and linking it to the order that you are currently processing???
PeteA
12-16-2009 9:04 AM
12-16-2009 9:17 AM
Hi Vinraaj,
You can not use Commit in Enhancement..
Give a try by creating seperate program and use commit there instead directly in enhancement.(I am not sure but it may work)
and then use SUBMIT.
Hope it will solve your problem..
Thanks & Regards
ilesh 24x7
ilesh Nandaniya
01-29-2010 9:54 AM