This document provides answers to frequently asked questions about using BAPI_ALM_NOTIF* and BAPI_SERVNOT* functions in SAP. It explains how to test these functions using transaction SE37, what to consider when including them in custom programs, how sort numbers are used in related tables, and how to populate fields in long text tables for these functions.
This document provides answers to frequently asked questions about using BAPI_ALM_NOTIF* and BAPI_SERVNOT* functions in SAP. It explains how to test these functions using transaction SE37, what to consider when including them in custom programs, how sort numbers are used in related tables, and how to populate fields in long text tables for these functions.
This document provides answers to frequently asked questions about using BAPI_ALM_NOTIF* and BAPI_SERVNOT* functions in SAP. It explains how to test these functions using transaction SE37, what to consider when including them in custom programs, how sort numbers are used in related tables, and how to populate fields in long text tables for these functions.
This document provides answers to frequently asked questions about using BAPI_ALM_NOTIF* and BAPI_SERVNOT* functions in SAP. It explains how to test these functions using transaction SE37, what to consider when including them in custom programs, how sort numbers are used in related tables, and how to populate fields in long text tables for these functions.
Version 6 Validity: 01.02.2005 - active Language English Header Data Released On 01.02.2005 21:04:46 Release Status Released for Customer Component PM-WOC-MN Maintenance Notifications CS-CM-SN Service Notification Priority Recommendations / Additional Info Category FAQ Symptom 1. How can I test BAPI_ALM_NOTIF* and BAPI_SERVNOT*? 2. What must I take into account when including BAPI_ALM_NOTIF* and BAPI_SERVNOT* in customer-specific programs? 3. Which meaning has the sort number in the item, cause, activity, and task? 4. How must the sort numbers be filled in tables NOTITEM, NOTIFCAUS, NOTIFACTV, and NOTIFTASK? 5. What is the meaning of fields OBJTYPE and OBJKEY in the following long text tables: BAPI_SERVNOT_CREATE / BAPI_ALM_NOTIF_CREATE: LONGTEXTS BAPI_SERVNOT_ADD_DATA / BAPI_ALM_NOTIF_DATA_ADD: NOTFULLTXT BAPI_SERVNOT_GET_DETAIL / BAPI_ALM_NOTIF_GET_DETAIL : NOTLONGTXT ? 6. How must fields OBJTYPE and OBJKEY be filled? 7. How must table KEY_RELATIONSHIP be filled in the interfaces of the following BAPIs: BAPI_SERVNOT_CREATE / BAPI_ALM_NOTIF_CREATE, BAPI_SERVNOT_ADD_DATA / BAPI_ALM_NOTIF_DATA_ADD ? 8. How must table E_BIN_RELATIONTAB be filled in the interfaces of the following BAPIs: BAPI_SERVNOT_CREATE / BAPI_ALM_NOTIF_CREATE ? 9. How must the fields SENDER, REFOBJECTTYPE, REFOBJECTKEY, and REFRELTYPE be filled? 10. What does the parameter TASK_DETERMINATION mean in the interfaces of the following BAPIs: BAPI_SERVNOT_CREATE / BAPI_ALM_NOTIF_CREATE ? Other Terms BAPI_SERVNOT_ADD_DATA, BAPI_SERVNOT_CHANGEUSRSTAT, BAPI_SERVNOT_CLOSE, BAPI_SERVNOT_CREATE, BAPI_SERVNOT_DEL_DATA, BAPI_SERVNOT_GET_DETAIL, BAPI_SERVNOT_MODIFY_DATA, BAPI_SERVNOT_POSTPONE, BAPI_SERVNOT_PUTINPROGRESS Other Components Page 1 of 6 604300 - FAQ: BAPI_ALM_NOTIF* and BAPI_SERVNOT* 02-Jul-14 https://websmp130.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/sno/ui/main.do?param=69... BAPI_ALM_NOTIF_CHANGEUSRSTAT, BAPI_ALM_NOTIF_CLOSE, BAPI_ALM_NOTIF_CREATE, BAPI_ALM_NOTIF_DATA_ADD, BAPI_ALM_NOTIF_DATA_DELETE, BAPI_ALM_NOTIF_DATA_MODIFY, BAPI_ALM_NOTIF_GET_DETAIL, BAPI_ALM_NOTIF_POSTPONE, BAPI_ALM_NOTIF_PUTINPROGRESS Reason and Prerequisites * Solution 1. Question Question Question Question How can I test BAPI_ALM_NOTIF* and BAPI_SERVNOT*? Answer Answer Answer Answer The easiest option is to use transaction SE37 to set up test sequences. The procedure is described in the example of BAPI BAPI_ALM_NOTIF_CREATE: a) Transaction SE37, BAPI_ALM_NOTIF_CREATE b) Menu path: Function module -> Tests -> Test sequences c) In the 'Select function module, Enter test sequence' dialog box, enter the following function modules: First line: Function module BAPI_ALM_NOTIF_CREATE Second line: Function module BAPI_ALM_NOTIF_SAVE Third line: Function module BAPI_TRANSACTION_COMMIT d) Choose 'Execute' (Enter). e) On the entry screen of the function module test, enter the data that the notification to be created is to receive, and execute the test using the F8 key. You then receive a notification number. f) Exit the screen with the green arrow -> the entry screen of the test for function module BAPI_ALM_NOTIF_SAVE is displayed. Here, enter the notification number you received in the first step - all twelve digits including leading zeros. Press F8 again. g) Use the green arrow to return -> the entry screen of the test for function module BAPI_TRANSACTION_COMMIT is displayed. Here, parameter 'WAIT' remains initial. Press F8 again, and then F3. h) The system displays another dialog box 'Test sequences'. In the 'Notes' field, assign a name for the test sequence just created, choose the 'Save' symbol (Enter) and return to the initial screen of transaction SE37. You can display and edit the generated notifications using the online transactions. i) Use the menu path: Function module -> Test -> Test sequences to display already created sequences. For this purpose, do not enter any function modules, but select the 'Get sequence' icon and access the list of the test sequences. j) To create more test sequences for other notification BAPIs, proceed exactly as before, but in each case enter the name of the relevant BAPI to be tested instead of function module BAPI_ALM_NOTIF_CREATE: BAPI_ALM_NOTIF_DATA_ADD, BAPI_ALM_NOTIF_DATA_DELETE, BAPI_ALM_NOTIF_DATA_MODIFY, BAPI_ALM_NOTIF_POSTPONE, BAPI_ALM_NOTIF_PUTINPROGRESS, BAPI_ALM_NOTIF_CHANGEUSRSTAT, BAPI_ALM_NOTIF_CLOSE, BAPI_ALM_NOTIF_TASK_COMPLETE, BAPI_ALM_NOTIF_TASK_RELEASE, BAPI_ALM_NOTIF_TASK_SUCCESS. Page 2 of 6 604300 - FAQ: BAPI_ALM_NOTIF* and BAPI_SERVNOT* 02-Jul-14 https://websmp130.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/sno/ui/main.do?param=69... k) You can apply the same procedure to the following BAPIs: BAPI_SERVNOT_CREATE, BAPI_SERVNOT_ADD_DATA, BAPI_SERVNOT_DEL_DATA, BAPI_SERVNOT_MODIFY_DATA, BAPI_SERVNOT_POSTPONE, BAPI_SERVNOT_CLOSE, BAPI_SERVNOT_PUTINPROGRESS, BAPI_SERVNOT_CHANGEUSRSTAT, BAPI_SERVNOT_COMPLETE_TASK, BAPI_SERVNOT_RELEASE_TASK, BAPI_SERVNOT_SUCCESSFUL_TASK, just with the difference that you have to use the second function module in the test sequence BAPI_SERVNOT_SAVE. 2. Question Question Question Question What must I take into account when including BAPI_ALM_NOTIF* and BAPI_SERVNOT* in customer-specific programs? Answer Answer Answer Answer a) The changes of the notification data exist on the database only after the function modules BAPI_ALM_NOTIF_SAVE (or BAPI_SERVNOT_SAVE) and BAPI_TRANSACTION_COMMIT have been run successfully. b) In BAPI_TRANSACTION_COMMIT, the COMMIT WORK is submitted. When the customer- specific program is terminated at a place after the call of this function module, only those data changes that were performed after the COMMIT WORK are reset. Further information is available in the documentation of function module BAPI_ALM_NOTIF_SAVE or BAPI_SERVNOT_SAVE and BAPI_TRANSACTION_COMMIT. c) If a notification number is assigned explicitly when one of the BAPIs is called, it must have twelve digits, including leading zeros if required. 3. Question Question Question Question Which meaning has the sort number in item, cause, activity, and task? Answer Answer Answer Answer a) Sort number in the item: If several items are provided with the same sort number, you can assign a common cause, a common activity, or a common task to these items. b) Sort number in cause, activity, task: In contrast to the notification processing using the corresponding online transactions, this serves as a key field to access the relevant cause, activity, and task. In addition, there is also the sort number for the item in cause, activity, and task. it is used to sort causes, activities, and tasks at header or item level. In the causes, the sort number for the item must be filled with a number greater than or equal to zero, since causes always belong to items and can never occur at header level. In activities and tasks, the sort number for the item can be equal to zero. In this case, they belong to the notification header. 4. Question Question Question Question How must the sort numbers be filled in tables NOTITEM, NOTIFCAUS, NOTIFACTV, and NOTIFTASK? Answer Answer Answer Answer a) Table NOTITEM: Field ITEM_SORT_NO must always be filled in this table, otherwise the data (changes) are not copied to the notification. This field corresponds to the field VIQMFE-POSNR and designates the sort number for the item. This is filled automatically in online transactions (IW22, IW28, IW52, IW58). However, if you did not enter a value, you must specify it explicitly in the case of BAPIs. The field ITEM_KEY, however, must not be filled. If it is empty, it is automatically filled by the system with a default value. It corresponds to the field VIQMFE-FENUM and designates the item number in the item set. These numbers can be assigned as required for BAPIs, the system does not check these numbers. If you do not enter a value, the system automatically proposes the highest number assigned +1. This occurs online as well as for BAPIs. b) Table NOTIFCAUS: The field ITEM_SORT_NO must contain the sort number of the item to which the cause is supposed to be assigned. This field must always be filled since causes can only be created with reference to an item. Page 3 of 6 604300 - FAQ: BAPI_ALM_NOTIF* and BAPI_SERVNOT* 02-Jul-14 https://websmp130.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/sno/ui/main.do?param=69... The field CAUSE_SORT_NO must also be filled since the sort number, unlike the notification processing in the online transactions, is not populated automatically in the BAPI case. c) Table NOTIFACTV: The field ITEM_SORT_NO must be filled in this table if the relevant activity is assigned to an item; if it is assigned to the notification header, referring to the entire notification, the field remains initial; the field TASK_SORT_NO must always be filled due to the same reason as for the field CAUSE_SORT_NO. d) Table NOTIFTASK: The field ITEM_SORT_NO must be filled in this table if the relevant task is assigned to an item; if it is assigned to the notification header, referring to the entire notification, the field remains initial; the field TASK_SORT_NO must always be filled due to the same reason as for fields CAUSE_SORT_NO and ACT_SORT_NO. 5. Question Question Question Question What is the meaning of fields OBJTYPE and OBJKEY in the following long text tables: BAPI_SERVNOT_CREATE / BAPI_ALM_NOTIF_CREATE: LONGTEXTS BAPI_SERVNOT_ADD_DATA / BAPI_ALM_NOTIF_DATA_ADD: NOTFULLTXT Answer Answer Answer Answer The importance of these fields is described in the function module documentation of the function modules BAPI_SERVNOT_CREATE and BAPI_ALM_NOTIF_CREATE. 6. Question Question Question Question How must fields OBJTYPE and OBJKEY be filled? Answer Answer Answer Answer OBJTYP|OBJKEY ======================================================================= QMEL| initial ('') --> Long text for notification header ----------------------------------------------------------------------- QMFE| BAPI2080_NOTITEMI-ITEM_SORT_NO --> Long text for item Example: Long text for item with sort number 2: OBJKEY = '0002'. ----------------------------------------------------------------------- QMUR| BAPI2080_NOTCAUSI-ITEM_SORT_NO and | BAPI2080_NOTCAUSI-CAUSE_SORT_NO --> Long text for item cause Example: Long text for cause with sort number 1; this cause belongs to the item with sort number 2: OBJKEY = '00020001'. ----------------------------------------------------------------------- QMSM| BAPI2080_NOTTASKI-ITEM_SORT_NO and | BAPI2080_NOTTASKI-TASK_SORT_NO --> Long text for item task Example: Long text for task with sort number 3; this task belongs to the item with sort number 2: OBJKEY = '00020003'. --> Long text for header task Example: Long text for task with sort number 4; this task belongs to the notification header: OBJKEY = '0004'. The long texts must be entered in the sequence above: - first the long texts for the item tasks - then the long texts for the header tasks ----------------------------------------------------------------------- QMMA| BAPI2080_NOTACTVI-ITEM_SORT_NO and | BAPI2080_NOTACTVI-ACT_SORT_NO --> Long text for the item activity Example: Long text for activity with sort number 5; this activity belongs to the item with sort number 2: OBJKEY = '00020005'. --> Long text for header activity Example: Long text for activity with sort number 6; this activity belongs to the message header: Page 4 of 6 604300 - FAQ: BAPI_ALM_NOTIF* and BAPI_SERVNOT* 02-Jul-14 https://websmp130.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/sno/ui/main.do?param=69... OBJKEY = '0006'. The long texts must be entered in the sequence above: - first the long texts for the item activities - then the long texts for the header activities 7. Question Question Question Question How must table KEY_RELATIONSHIP be filled in the interfaces of the following BAPIs: BAPI_SERVNOT_CREATE / BAPI_ALM_NOTIF_CREATE, BAPI_SERVNOT_ADD_DATA / BAPI_ALM_NOTIF_DATA_ADD ? Answer Answer Answer Answer This table is filled automatically by the system. It contains the key relationships within the notification data. 8. Question Question Question Question How must table E_BIN_RELATIONTAB be filled in the interfaces of the following BAPIs: BAPI_SERVNOT_CREATE / BAPI_ALM_NOTIF_CREATE ? Answer Answer Answer Answer This table is filled automatically by the system. It displays the document flow within the notification. 9. Question Question Question Question How must the fields SENDER, REFOBJECTTYPE, REFOBJECTKEY, and REFRELTYPE be filled? Answer Answer Answer Answer These fields can be filled if a reference object is known to which the notification is to refer to. For example, this reference object may be an already existing notification or a service process from a CRM system. REFOBJECTTYPE corresponds to the BOR object of the reference object. REFRELTYPE must be contained in the table ORBRELTYP and allowed for the object and reference object pair. Example: The reference object is a service notification with number 4711: SENDER: Field 'Logical system' from table T000 REFOBJECTTYPE : BUS2080 REFOBJECTKEY : 000000004711 REFRELTYPE : REFZ. 10. Question Question Question Question What does the parameter TASK_DETERMINATION mean in the interfaces of the following BAPIs: BAPI_SERVNOT_CREATE / BAPI_ALM_NOTIF_CREATE ? Answer Answer Answer Answer If the parameter is set, and a response profile is also assigned in Customizing for the notification type, the tasks are automatically generated from the response profile when the notification is created. Validity Software Component From Rel. To Rel. And Subsequent SAP_APPL 46A 46B 46C 46C 470 470 References Page 5 of 6 604300 - FAQ: BAPI_ALM_NOTIF* and BAPI_SERVNOT* 02-Jul-14 https://websmp130.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/sno/ui/main.do?param=69... This document refers to: SAP Notes 1467042 BAPI_ALM_NOTIF_CREATE : Message IX011 - Partner function ... 1157144 BAPI_ALM_NOTIF_SAVE processes message I::000 784451 Not possible to create causes for PM/CS notificatns via BAPI This document is referenced by: SAP Notes (3) 1467042 BAPI_ALM_NOTIF_CREATE : Message IX011 - Partner function ... 1157144 BAPI_ALM_NOTIF_SAVE processes message I::000 784451 Not possible to create causes for PM/CS notificatns via BAPI Page 6 of 6 604300 - FAQ: BAPI_ALM_NOTIF* and BAPI_SERVNOT* 02-Jul-14 https://websmp130.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/sno/ui/main.do?param=69...