2006 Aug 10 2:42 PM
Hello there,
I am having problem when trying to call the BAPI : BAPI_SERV_NOT_SAVE.
First called function 'BAPI_SERVNOT_CREATE' which returned notification number.
after that I know to call BAPI:
CALL FUNCTION 'BAPI_SERVNOT_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.
IF sy-subrc = 0.
IF notifheader_export-notif_no NOT IS INITIAL.
MOVE notifheader_export-notif_no TO number.
CALL FUNCTION 'BAPI_SERVNOT_SAVE'
EXPORTING
number = number
IMPORTING
notifheader = notifheader
TABLES
return = return.
ENDIF.
...
But the returned notifheader doesn't contain any number.
Also after called BAPI_TRANACTION_COMMIT, the notification isn't saved at all.
Would anyone please help.
Thanks.
Alexander
2006 Aug 10 2:59 PM
Hey,
After the call to function 'BAPI_SERVNOT_CREATE' read the contents of the table RETURN. If it does not have a entry with key = E then call the subsequent BAPI's.
Use the code below after the call to function 'BAPI_SERVNOT_CREATE'.
READ TABLE return WITH KEY type = 'E'.
IF sy-subrc EQ 0.
*Write the error
ELSE.
CALL FUNCTION 'BAPI_SERVNOT_SAVE'
READ TABLE return WITH KEY type = 'E'.
IF sy-subrc EQ 0.
*Write the error
ELSE.
CALL 'BAPI_TRANSACTION_COMMIT'
ENDIF.
ENDIF.
-Kiran
*Please mark useful answers
Hello there,
I am having problem when trying to call the BAPI : BAPI_SERV_NOT_SAVE.
First called function 'BAPI_SERVNOT_CREATE' which returned notification number.
after that I know to call BAPI:
CALL FUNCTION 'BAPI_SERVNOT_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.
IF sy-subrc = 0.
IF notifheader_export-notif_no NOT IS INITIAL.
MOVE notifheader_export-notif_no TO number.
CALL FUNCTION 'BAPI_SERVNOT_SAVE'
EXPORTING
number = number
IMPORTING
notifheader = notifheader
TABLES
return = return.
ENDIF.
...
But the returned notifheader doesn't contain any number.
Also after called BAPI_TRANACTION_COMMIT, the notification isn't saved at all.
Would anyone please help.
Thanks.
Alexander
2006 Aug 10 2:59 PM
Do you have external number range for service notification.check out with your Functional consultant.
If that is the case specify the value with the external number parameter.
2006 Aug 10 2:59 PM
Hey,
After the call to function 'BAPI_SERVNOT_CREATE' read the contents of the table RETURN. If it does not have a entry with key = E then call the subsequent BAPI's.
Use the code below after the call to function 'BAPI_SERVNOT_CREATE'.
READ TABLE return WITH KEY type = 'E'.
IF sy-subrc EQ 0.
*Write the error
ELSE.
CALL FUNCTION 'BAPI_SERVNOT_SAVE'
READ TABLE return WITH KEY type = 'E'.
IF sy-subrc EQ 0.
*Write the error
ELSE.
CALL 'BAPI_TRANSACTION_COMMIT'
ENDIF.
ENDIF.
-Kiran
*Please mark useful answers
2006 Aug 10 3:24 PM
Hi Kiran,
after the call BAPI_SERVNOT_CREATE the return table is empty, so first function doens't contain any errors.
I tries in SE37 BAPI_SERVNOT_SAVE with notification number returned from BAPI_SERVNOT_CREATE. Returntable is empty, but result gives table with message 000 in it. and notifheader doesn't contain any number...
I getting frustrated..
2006 Aug 10 3:30 PM
Hey,
You need to check the export paramter NOTIFHEADER_EXPORT and not the import parameter NOTIFHEADER.
Kiran
2006 Aug 10 3:36 PM
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |