09-19-2017 9:47 AM
Hi Good day,
I am able to create the Notification No through BAPI : BAPI_ALM_NOTIF_CREATE
My issue is :
how do i update MAIN WORK CENTER of Notification?
Tried various forums, everyone asked the question but there is no answer as such.
Any input will be appreciated.
This is my Code
data: gs_notif_type type bapi2080-notif_type,
gs_notifheader type bapi2080_nothdri,
gs_notifheader_export type bapi2080_nothdre,
gt_notitem type table of bapi2080_notitemi with header line,
gt_notifcaus type table of bapi2080_notcausi with header line,
gt_longtexts type table of bapi2080_notfulltxti with header line,
gt_return type table of bapiret2 with header line,
g_ind type c.
data : g_qmnum type qmnum.
START-OF-SELECTION.
gs_notif_type = 'R2'."'M2'.
gs_notifheader-refobjecttype = 'QMEL'.
gs_notifheader-short_text = 'Test Notification Create'.
gs_notifheader-funct_loc = ''.
gs_notifheader-reportedby = '9997500'.
gs_notifheader-breakdown = 'X'.
gs_notifheader-strmlfndate = '20070327'.
gs_notifheader-strmlfntime = '100200'.
gs_notifheader-endmlfndate = '20070327'.
gs_notifheader-endmlfntime = '100300'.
gs_notifheader-planplant = '0060'.
gs_notifheader-plangroup = 'BYC'.
* gs_notifheader-pm_wkctr = 'REBFXE04'."g_mainwork_cent.
CALL FUNCTION 'BAPI_ALM_NOTIF_CREATE'
EXPORTING
notif_type = gs_notif_type
notifheader = gs_notifheader
IMPORTING
notifheader_export = gs_notifheader_export
TABLES
notitem = gt_notitem
notifcaus = gt_notifcaus
longtexts = gt_longtexts
return = gt_return.
LOOP AT gt_return WHERE type EQ 'E'.
WRITE: gt_return-message.
g_ind = 'X'.
ENDLOOP.
CHECK g_ind IS INITIAL.
CALL FUNCTION 'BAPI_ALM_NOTIF_SAVE'
EXPORTING
number = gs_notifheader_export-notif_no
TABLES
return = gt_return.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
IMPORTING
return = gt_return.
MOVE : sy-msgv1 to g_qmnum .
Thank you,
J.
02-07-2018 1:02 PM
Hi Jacob,
Please Pass the Object ID value from the Table CRHD by using the combination of Plant (WERKS) and Work Center (ARBPL).
Thanks and Regards,
Venkata Anil Kumar M.
02-07-2018 1:02 PM
Hi Jacob,
Please Pass the Object ID value from the Table CRHD by using the combination of Plant (WERKS) and Work Center (ARBPL).
Thanks and Regards,
Venkata Anil Kumar M.
02-13-2018 6:31 AM
Thank you VenkataAnilKumar Munnaluru. Its been sorted but your answer is on spot.