Skip to Content
0
Former Member
Oct 01, 2009 at 03:21 PM

Why is creation of a service notification using BAPI not working?

232 Views

I need to create a service notification.

I have found 2 BAPIs.

BAPI_SERVICENOTIFICAT_CREATE

BAPI_SERVNOT_CREATE

The code below using the second BAPI is not creating a notification and the return parm does not have any errors.

You can see it does a call to commit after the BAPI call

Perhaps I am missing something critical in the parms.

We are trying to creat a service type notification using equipment.

-


DATA ls_notif_h TYPE bapi2080_nothdri.

data ls_notif_e type BAPI2080_NOTHDRE.

DATA lt_return TYPE STANDARD TABLE OF bapiret2.

DATA ls_return LIKE LINE OF lt_return.

ls_notif_h-equipment = '10000044'.

CALL FUNCTION 'BAPI_SERVNOT_CREATE'

EXPORTING

  • EXTERNAL_NUMBER =

notif_type = 'S3'

notifheader = ls_notif_h

  • TASK_DETERMINATION = ' '

  • SENDER =

  • ORDERID =

IMPORTING

NOTIFHEADER_EXPORT = ls_notif_e

TABLES

  • NOTITEM =

  • NOTIFCAUS =

  • NOTIFACTV =

  • NOTIFTASK =

  • NOTIFPARTNR =

  • LONGTEXTS =

  • KEY_RELATIONSHIPS =

return = lt_return

.

IF lt_return IS INITIAL.

COMMIT WORK AND WAIT.

write: / ls_notif_e-NOTIF_NO.

ELSE.

LOOP AT lt_return INTO ls_return.

WRITE:/ 'errors'.

  • ls_return.

ENDLOOP.

-


Thanks.

Scott