Assign of Service order to Service Notification using BAPI_ALM_NOTIF_CREATE
Dear Guru's,
I am using BAPI_ALM_NOTIF_CREATE for creation of Notification.
Then BAPI_SERVNOT_SAVE & At last BAPI_TRANSACTION_COMMIT.
Notification is getting created .
But I want to assign the service order to this notification. ( IW52 ).
I have tried with the filing the data of REFOBJECTTYPE = 'BUS1004'.
REFOBJECTKEY = ' 003120007' &
REFRELTYPE. = 'ASGN'.
But it is not getting assigned.
Needed Help.
Regards,
Amitav
Sorry , Typo error.
REFOBJECTTYPE IS 'BUS2088A'.
Similar Messages
-
Planner group is not updated in service notification using BAPI
Hi,
Planner group is not updated in service notification using BAPI BAPI_ALM_ORDER_MAINTAIN.
I have written the below code, but planner group is not updated in the service notification.
Please advice which parameters do i need to pass to update planner group in the service notification.
wa_methods-refnumber = '000001'.
wa_methods-objecttype = 'PARTNER'.
wa_methods-method = 'CREATE'.
wa_methods-objectkey = wa_subscr1-aufnr.
APPEND wa_methods TO i_methods.
wa_methods-refnumber = '000002'.
wa_methods-objecttype = 'HEADER'.
wa_methods-method = 'CREATE'.
wa_methods-objectkey = wa_subscr1-aufnr.
APPEND wa_methods TO i_methods.
wa_methods-refnumber = '000000'.
wa_methods-objecttype = ' '.
wa_methods-method = 'SAVE'.
APPEND wa_methods TO i_methods.
REFRESH i_partner.
CLEAR wa_partner.
wa_partner-orderid = wa_subscr1-aufnr.
wa_partner-partn_role = 'VW'.
wa_partner-partn_role_old = ''.
wa_partner-partner = wa_subscr1-parnr.
wa_partner-partner_old = ''.
APPEND wa_partner TO i_partner.
REFRESH i_planrgrp.
CLEAR wa_planrgrp.
wa_planrgrp-orderid = wa_subscr1-aufnr.
wa_planrgrp-plangroup = wa_subscr1-ingpr.
APPEND wa_planrgrp TO i_planrgrp.
REFRESH i_planrgrp_up.
CLEAR wa_planrgrp_up.
wa_planrgrp_up-orderid = wa_subscr1-aufnr.
wa_planrgrp_up-plangroup = 'X'.
APPEND wa_planrgrp_up TO i_planrgrp_up.
*----Change order details with Technician name
CALL FUNCTION 'BAPI_ALM_ORDER_MAINTAIN'
TABLES
it_methods = i_methods
it_header = i_planrgrp
it_header_up = i_planrgrp_up
it_partner = i_partner
return = i_return.
Thanks & regards,
KrishnaTry this way
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. " <<< Comment this lie
read table lt_return into ls_return with key type = 'E'. " << Change
if sy-subrc ne 0. " << Change
COMMIT WORK AND WAIT.
write: / ls_notif_e-NOTIF_NO.
ELSE.
LOOP AT lt_return INTO ls_return.
WRITE:/ 'errors'.
* ls_return.
ENDLOOP.
endif.
a® -
Problem in customer address while creating service notification using IW51
Hi Experts,
I am trying to create a BDC recording for creating Service Notification using transaction IW51. I have done the recording as follows. On the First screen I am entering notification type. Then on the next screen I am entering the Sold to party and its address by clicking on the icon besides it. After that i enter Functional location, equipment, priority and req end date and save it. When I am running this recording after transferring it to a progam , somehow the address disappears for the newly created notification. I am not able to figure out the reason. Kindly guide me.
Thanks,
SonalI assume you have tried this with update mode = 'A'-all and watched it actually work correctly? May I ask why the BDC instead of BAPI? Is it because you're creating a new partner? If so, are you pressing save on that partner creation?
-
Why is creation of a service notification using BAPI not working?
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.
ScottTry this way
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. " <<< Comment this lie
read table lt_return into ls_return with key type = 'E'. " << Change
if sy-subrc ne 0. " << Change
COMMIT WORK AND WAIT.
write: / ls_notif_e-NOTIF_NO.
ELSE.
LOOP AT lt_return INTO ls_return.
WRITE:/ 'errors'.
* ls_return.
ENDLOOP.
endif.
a® -
How to change activities of a service notification using ABAP Program ?
Hello friends,
As part of a requirement, I need to modify a service notification activity "Activity Code" ( MTR Section ) data and for that I have used the standard bapi "BAPI_ALM_NOTIF_DATA_MODIFY" but the problem is that it is neither saving the activity data nor returning any error message during the process. I have used "BAPI_ALM_NOTIF_SAVE" and "BAPI_TRANSACTION_COMMIT" along with bapi call.
While I can update the activity code of the activity from IW52 transaction.
Please share any information that could help to resolve this issue.
Thanks in advance.
Regards,
Pavan Kumar P.Pavan Kumar P.
BAPI_ALM_NOTIF_SAVE is only for the header.
Questions relating to BAPI_ALM_NOTIF_DATA_MODIFY:
What input parameters are you using when calling the BAPI
Did you use the NOTIFACTV_X tables
Are there any values in the RETURN table
PeteA -
Issue with updating service notification using BAPI_ALM_NOTIF_DATA_ADD
Hi experts,
I would be very grateful if anyone could help me out with this.
I need to update the object code damage code and cause code of the notifications (transaction iw22) through portal. For this I have made a z BAPI and am calling it through portal. Now for my notification type H1 the damage and the object part are mandatory and the cause part is not. Now while trying to update(through portal) any H1 type of notification which already has object part and damage part filled but cause part blank I am getting the error notification locked by EPUSER. When I run the same z bapi on R3 giving same data then error doesnt come and every thing is updated successfully.
Even from portal I am able to update other type of notification where either all damage cause or object part is blank or filled. This particular issue happens only the notifications having only cause part is blank.
The logic that I have used to update the notification where cause part is blank is I have called first ALM_NOTIF_DATA_MODIFY and have passed the damage code and object code table(notifitem) in its parameter so that damage code and object code can be modified(i havent passed the cause code table as passing empty cause code table(Notifcaus)to this bapi throws error) after calling this bapi i have called BAPI_ALM_NOTIF_DATA_ADD and in its parameter i have passed only cause code table(Notifcaus ) (I havent passed table having damage code and object code) . So on the successful execution of this two bapis i should get the updated object, damage and cause codes.
There is a sap note 1058895 which talks about the same issue but even after applying that note same problem is coming. We raised and OSS message to sap to but I guess it wont be of much help.
My observation is that after calling ALM_NOTIF_DATA_MODIFY as I am trying to call ALM_NOTIF_DATA_ADD for same notification so its throwing the lock error but the point is that why then from the R3 side this error is not coming. Are there any FM to enqueue and dequeue notifications like we have for employee numbers in HR module.
Regards,
MehulHi,
Check out the thread below. It might be of help.
Re: update PM notification through fm/bapi
Also, post it in ABAP->General Form for a quicker response.
Thanks
Nidhi -
Creation of service order and service notification
Hi guys,
Please any one help me how to create service order through service notification, and explain me the process.This is very urgent for me kindly help the same.
Reg
Eswar
[email protected]hi eshwar
you can create service order by using the service notification,
create service notification using IW54 after entering the details select the Service notification in the menu and select the service order create OR press the Order buttom ,and enter the order type you want to create
hope this will clear you
regards
thyagarajan -
Creation of Service Notification and filling certain fields
Hi,
I am trying to create a service notification document from inside dunning activity (TR FBVB).
The steps that I followed are
A custom FM is configured which is called after dunning event ISU_DUNNING_BLOCK_DEVICE_0350. This std FM creates a disconnection order number which can be seen via TR EC87. This EC87 transaction has a tab for service orders created via it.
The custom FM configured is called after standard FM is used to get disconnection order and then we are using FM ISU_S_DISCDOC_CHANGE. This FM creates the relevant service notification document for the disconnection order.
The problem we face in here is the equipment number, connection number, installation, material, serial number created via the FM ISU_S_DISCDOC_CHANGE is blank.
Our requirement is to have the service notification created via the above fields populated in it.
Kindly suggest is there any alternative to get those fields populated in the service notification (TR IW53)
Regards,
Imranhi eshwar
you can create service order by using the service notification,
create service notification using IW54 after entering the details select the Service notification in the menu and select the service order create OR press the Order buttom ,and enter the order type you want to create
hope this will clear you
regards
thyagarajan -
Creation of Service Notification No for SO.
Hi everyone,
I am working on the User Exit for the first time. Kindly help me out with the following requirement.
When a sales order is saved, create a service notification and link to the sales order header.
To fulfill this requirement we need to use the following:
Program SAPMV45A, Include MV45AFZZ, USEREXIT_SAVE_DOCUMENT
BAPI to create service Notification is : BAPI_ALM_NOTIF_CREATE
When the service notification is created, the following fields should be populated in the notification as the end result:
1. Sales Organization (VIQMEL-VKORG)
2. Distribution Channel (VIQMEL-VTWEG)
3. Division (VIQMEL-SPART)
4. Sales office (VIQMEL-VKBUR)
5. Sales Group (VIQMEL-VKGRP)
6. Notification short text should contain the sales order number (VIQMEL-QMTXT)
7. Sales Order (VIQMEL-VBELN)
The following fields should be updated in the sales order as the end result:
1. Notification number (VBAK-QMNUM)
I need to check if notification no. needs to be created or not. Also, the notification type should be valid. If not I need to throw a warning mess. but SO no. should be saved. if the condition is satisfied then BAPI should be called and notification no. should be created.
In case if BAPI fails then handling should be done with the help of the transaction SLG1.
Please provide me technical help.
Regards,
AyushiHi Ayushi,
In the Include MV45AFZZ you need to write you code.
First check for whcih service notification. I mean Notification Type.
Then use you BAPI if it is correct for the notification type.
CALL FUNCTION 'BAPI_ALM_NOTIF_CREATE'
EXPORTING
notif_type = p_header-tables-mnmisc-notif_type
notifheader = p_header-tables-mnhead
task_determination = p_header-tables-task_determination
orderid = p_header-tables-mnmisc-orderid
IMPORTING
notifheader_export = l_head
TABLES
notitem = l_it_item " Since you dont have any items to create leave it blank.
notifcaus = l_it_caus " Since you dont have any causes to create leave it blank.
notifactv = l_it_act " Since you dont have any activities to create leave it blank.
notiftask = l_it_task " Since you dont have any tasks to create leave it blank.
notifpartnr = l_it_part "etc ditto
longtexts = l_it_text
return = l_it_return.
read table it_return index 1 / read table it_return TYPE = 'S'
if sy-subrc = 0.
lv_notNumber = MESSAGE_V1 / MESSAGE_V2 .
message 'Notification created' with lv_notnumber type 'S'.
endif.
The above logic is a Psuedo or a hint only. Hope this helps.
Thanks & regards,
Bhargav.
Finally in the user exit give the message -
Updation/Creation of service notification
I want to create a service notification using transaction iw51& iw52. The notification has a few custom fields to be updated I am using BAPI_SERVNOT_CREATE to create the notification but i am not able to update the custome fields the BAPI doesnot have Extension_In/Extension_out fields also. I have tried using BAPI_ALM_NOTIF_DATA_ADD , BAPI_SERVNOT_MODIFY_DATA , BAPI_SERVNOT_ADD_DATA these too have the same issue. I want to know the BAPI which can be used for updating the custom fields
I am prefering to use BAPI instead of BDC.
Kindly Respond urgently.
Thanks.Hi Ayushi,
In the Include MV45AFZZ you need to write you code.
First check for whcih service notification. I mean Notification Type.
Then use you BAPI if it is correct for the notification type.
CALL FUNCTION 'BAPI_ALM_NOTIF_CREATE'
EXPORTING
notif_type = p_header-tables-mnmisc-notif_type
notifheader = p_header-tables-mnhead
task_determination = p_header-tables-task_determination
orderid = p_header-tables-mnmisc-orderid
IMPORTING
notifheader_export = l_head
TABLES
notitem = l_it_item " Since you dont have any items to create leave it blank.
notifcaus = l_it_caus " Since you dont have any causes to create leave it blank.
notifactv = l_it_act " Since you dont have any activities to create leave it blank.
notiftask = l_it_task " Since you dont have any tasks to create leave it blank.
notifpartnr = l_it_part "etc ditto
longtexts = l_it_text
return = l_it_return.
read table it_return index 1 / read table it_return TYPE = 'S'
if sy-subrc = 0.
lv_notNumber = MESSAGE_V1 / MESSAGE_V2 .
message 'Notification created' with lv_notnumber type 'S'.
endif.
The above logic is a Psuedo or a hint only. Hope this helps.
Thanks & regards,
Bhargav.
Finally in the user exit give the message -
How to create an order based on Notification through BAPI_ALM_ORDER_MAINTAIN
Hi
I need to create an order based on the notification no. This is manually can be done using the Standard T.Code IW34.I am using BAPI_ALM_ORDER_MAINTAIN to create an order based on Notification. I am getting the below message( which is success message)
Order %00000000001 saved with number 40001258
BAPI control was ended
Though order is created it not assigned to notification No. I am using ref key as '%00000000001' and also I tried with '%0000000000140232323' where 40232323 is notification No.
And if I checked in order the notification No is assigned to order as '%00000000001'. And when I check back the Notification, the order is not assigned to Notification No. How to assign the created order no to Notification No.
Code is attached for Ref.
Now the problem is the order is not assigned to notification no. Is there any FM or BAPI to do the same fucntionality..!
Regards,
AmarHello Amarnadh,
Keng Haw Soon is right, object key should always have the client like 010.
In your code you were passing it without the client.
Pass like below and it will work.
ls_methods-objectkey = '%00000000001000040232323'.
Regards,
Thanga -
Notification description is missing when using BAPI_ALM_NOTIF_CREATE
Hi,
Creating a notification using BAPI_ALM_NOTIF_CREATE should create 2 entries in IHPA.
one for customer and another for contact with respective partner function.
but in my case it making only customer entry in IHPA.
and also notification description is missing.
CheersHi Narasimhan,
Yes I am passing short_text and partner table
WA_NOTIFHEADER-SHORT_TEXT = KNA1-NAME1.
IT_NOTIFPARTNER-PARTN_ROLE = 'AG'.
IT_NOTIFPARTNER-PARTNER = CUSTOMER
Its really strange, why its wiping out the short text I am giving.
Anything else I need to do ?
Cheers -
Delete Assignment of Sales Order to Service Notification
Hi,
I would like to delete the assignment of a sales order to a service notification (not delete the sales order itself). Can this be done without development?
For the assignment of a service order to a service notification, this deletion is possible via the dropdown menu in the service notification.
When I look at the business processes for system/user status, I do see a business process "Cancel sales order assignment". I tried to trigger it using a user status but that trick does not seem to work.
With regards,
DanHello,
I solved this creating a new activity in the action box, assigning Business transaction "PMMC - Cancel sale order assignment" and leaving function module blank. It resets the system status "SOAS - Sales Order Assigned".
To do something better, it would be useful to write a custom FM that clears possible fields containing the relationship (such as QMEL-VBELN).
Best regards,
Andrea -
How to avoid automatic data change in service notification from work order
Hi,
when I change work order address data the address data from the service notification connected to the order is changed too, how can I avoid this change? Is there anything on customizing to control whichs fields are updated automatically.
Thanks,
Juan.Hi,
You can trying using Books of Business.
Create a book and add that particular user to that book and at the time of task creation, through a workflow you can assign it to the corresponding book.
This might resolve the access issue you are facing.
hope it helps,
Mayank -
Create multiple sales orders from single service notification?
Is it possible to create multiple sales orders from a single notification (IW51)?
We currently create sales orders directly within transaction IW51 (Create Service Notification). We kick off the sales order creation by pressing the "SALES ORD." button in the notification screen. We're now interested in creating a 2nd Sales Order which would tie directly to the same Service Notification. This is so that we can have the second order assigned to a different account assignment WBS (there are two different parties doing work on the service notification).
I assume you would have to go to VA01 to create the Sales Order, but am not sure how to tie it directly to the service notification from here. I treied to do a create with reference, but there is no ability to create with reference to a service notification.
Do I have to create a second service notification for the 2nd Sales Order for this to work? I want to avoid doing this if at all possible.
I'm running SAP R/3 Enterprise
Thanks for your help!Hi,
go to vtaa- copy controls for sales document to sales document.
select your combination of order and quotation go to item level. There select value 0(zero) in field positive/negative negative.
No need to change update document flow.
After setting zero in copy control that be told on above. create order with respective to the quotation.
After saving the order.
go to document flow to see the status in between quotation and order.
If you placed setting right, then u certainly observe for quotation status will be open. so you can create no. of sales order with respect to that quotation..
Have a good day..
Maybe you are looking for
-
Best Practises for File Sharing and Print Server on Windows Server 2012
Is it better to have File Sharing and Print Server installed on the same Windows 2012 Server ? Or, they should be installed on 2 different Windows Servers ? Hussien Sherief
-
Programatically inserting rows of a view object trouble
Hi, I'm using JDev 10.1.3.3. I'm trying to use the application module specific to my app to create rows in a viewobject. User is on page "view", goes to page "new" and fills out a form which upon submit sends the data to an Application Module method
-
Problem with Preview panel in Bridge CS3
Hello, I've got a problem and I don't seem to get rid of it. When I use the Adobe Bridge, everything seemds to work fine, EXCEPT... for the preview panel. It just keeps on showing a 'blank gap' or blank window, from where I can see a part of my Deskt
-
itunes wont inport anythig it show listings but comes up with error ocurred while converting (song title ) the required file cannot be found using windows 8
-
Invoice number against incoming payment in report
Dear Experts, I want to know if we can add the reference of the column invoice number in the customer ledger of SAP against the incoming payment number which we have taken the against those invoices. these are on account payments done which are reco