‎2008 Nov 03 2:07 PM
Hello,
I'm trying to use this bapi, but i can't seem to be able to do it.
What i actually want to do is create a notification via visual composer instead of sapgiu. The actual transaction i'm trying to recreate is the IW26, and i figured this bapi could be used to do it. But everytime i try to test the bapi, i keep on getting a message saying the type of notification i've entered doesn't exist. I've checked in the database and the different types of notification i've entered do exist. I'm now a little at lost on why it's not working.
So my questions will be:
Does anyone know how to recreate the IW26 transaction? Has anyone ever tried to do it in Visual composer?
Is BAPI_SERVNOT_CREATE the right bapi to do it?
Would you have any idea on why it wouldn't recognize the notification type?
I must admit that i'm quite new at SAP, and i'm sure i must be doing something wrong, so any advice on how to go about it would be appreciated.
Thanks in advance.
Regards
‎2008 Nov 04 12:01 AM
Hi.
You should use, instead of that, the BAPI_ALM_NOTIF_CREATE.
You can use this BAPI to create a new maintenance or service notification. You can create certain fields from the notification header as well as items, causes, tasks, actions and long texts for this. You can also maintain partner data.
Take some sample code to help you:
report zpm_create_notif.
data: i_bapi2080_nothdri type standard table of bapi2080_nothdri with header line.
data: i_bapiret2 type standard table of bapiret2 with header line.
data: i_bapi2080_nothdre type standard table of bapi2080_nothdre with header line.
data: i_bapi2080_notfulltxti type standard table of bapi2080_notfulltxti with header line.
create header data
i_bapi2080_nothdri-refobjectkey = 'PJAREF'.
i_bapi2080_nothdri-equipment = '10000030'.
i_bapi2080_nothdri-reportedby = 'PJAREP'.
i_bapi2080_nothdri-short_text = 'PJA Short Test from BAPI'.
i_bapi2080_nothdri-priority = '1'.
create header long text
i_bapi2080_notfulltxti-objtype = 'QMEL'.
i_bapi2080_notfulltxti-FORMAT_COL = 'U1'.
i_bapi2080_notfulltxti-text_line = 'Long text 1'.
append i_bapi2080_notfulltxti.
i_bapi2080_notfulltxti-objtype = 'QMEL'.
i_bapi2080_notfulltxti-FORMAT_COL = 'U1'.
i_bapi2080_notfulltxti-text_line = 'Long text 2'.
append i_bapi2080_notfulltxti.
call function 'BAPI_ALM_NOTIF_CREATE'
exporting
notif_type = 'M1'
notifheader = i_bapi2080_nothdri
importing
notifheader_export = i_bapi2080_nothdre
tables
longtexts = i_bapi2080_notfulltxti
return = i_bapiret2.
call function 'BAPI_ALM_NOTIF_SAVE'
exporting
number = i_bapi2080_nothdre-notif_no.
call function 'BAPI_TRANSACTION_COMMIT'.
Hope it was helpfull, best regards.
F.S.A.
‎2008 Nov 04 12:01 AM
Hi.
You should use, instead of that, the BAPI_ALM_NOTIF_CREATE.
You can use this BAPI to create a new maintenance or service notification. You can create certain fields from the notification header as well as items, causes, tasks, actions and long texts for this. You can also maintain partner data.
Take some sample code to help you:
report zpm_create_notif.
data: i_bapi2080_nothdri type standard table of bapi2080_nothdri with header line.
data: i_bapiret2 type standard table of bapiret2 with header line.
data: i_bapi2080_nothdre type standard table of bapi2080_nothdre with header line.
data: i_bapi2080_notfulltxti type standard table of bapi2080_notfulltxti with header line.
create header data
i_bapi2080_nothdri-refobjectkey = 'PJAREF'.
i_bapi2080_nothdri-equipment = '10000030'.
i_bapi2080_nothdri-reportedby = 'PJAREP'.
i_bapi2080_nothdri-short_text = 'PJA Short Test from BAPI'.
i_bapi2080_nothdri-priority = '1'.
create header long text
i_bapi2080_notfulltxti-objtype = 'QMEL'.
i_bapi2080_notfulltxti-FORMAT_COL = 'U1'.
i_bapi2080_notfulltxti-text_line = 'Long text 1'.
append i_bapi2080_notfulltxti.
i_bapi2080_notfulltxti-objtype = 'QMEL'.
i_bapi2080_notfulltxti-FORMAT_COL = 'U1'.
i_bapi2080_notfulltxti-text_line = 'Long text 2'.
append i_bapi2080_notfulltxti.
call function 'BAPI_ALM_NOTIF_CREATE'
exporting
notif_type = 'M1'
notifheader = i_bapi2080_nothdri
importing
notifheader_export = i_bapi2080_nothdre
tables
longtexts = i_bapi2080_notfulltxti
return = i_bapiret2.
call function 'BAPI_ALM_NOTIF_SAVE'
exporting
number = i_bapi2080_nothdre-notif_no.
call function 'BAPI_TRANSACTION_COMMIT'.
Hope it was helpfull, best regards.
F.S.A.
‎2008 Nov 12 3:41 PM
‎2010 Nov 03 7:34 PM
dear all
the last example with the sets of data is very good i want one to help me with some set of data but to create
service notification of CS with BAPI ( BAPI_SERVNOT_CREATE ) of IW51 transaction.