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.
Scott

Try 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.

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,
    Krishna

    Try 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.

  • 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,
    Sonal

    I 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?

  • HT4995 My location service on Google does not work and nothing is getting saved in my history bookmark

    My location service on Google does not work. It will not bring up my location. Also nothing is getting saved in my history folder in my bookmark.

    I have the same issue, I think. If I open Safari and search Walmart (google is my default search) it doesn't give me location results, and there is a little button at the top that says 'Use Precise Location.' If I tap that button nothing happens. Very frustrating. I've checked all my settings against my wife's iPhone, and my iPad, both of which work, and I can't find anything different.

  • Why does the internet on my new macbook pro not work when my old macbook's does?

    Why does the internet on my new macbook pro not work when my old macbook's does? I'll have to turn the wifi off and back on multiple times to get the internet to continue to work on my Macbook Pro (running mountain lion but did it on lion also) when it runs fine on my old white Macbook (running lion). Is there something I can do to fix it or do I just have to deal with it?

    Here is your fix .. I have uploaded my properly calibrated profile get it here :
    http://www.megaupload.com/?d=YAJL6A9X
    And it should go to your user folder/Library/ColorSync/Profiles
    if you have one already you can rename either one ..
    and then go to system preferences - displays - color to select the profile .
    you will get rid of the blue tint while keeping correct color and gamma
    This is for the newer 2010 MBP's altho if same display was used might also give good results in the previous models as well . .

  • Content enrichment service for SP 2013 not working

    Content enrichment service for SP 2013 not working
    Not able to debug content enrichment service.. Can you please specify the steps for debugging the content enrichment service
    Any help will be greatly appreciated.
    Regards
    BKPA
    BKPA

    Hi ,
    Please see the following articles, run and debug service with breakpoints using F5 from VS, then register the custom content enrichment service with DebugMode and long Timeout to SharePoint, then start a full crawl to call the web service.
    http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2014/04/08/how-to-use-the-sharepoint-2013-content-enrichment-web-service.aspx
    http://www.jeanpaulva.com/index.php/2014/05/21/content-enrichment-web-service/
    http://msdn.microsoft.com/en-us/library/office/jj163968(v=office.15).aspx#content_enrichment_configuration
    http://www.blendmaster.net/blog/2012/09/using-content-enrichment-web-service-callout-in-sharepoint-2013-preview/
    Thanks,
    Daniel Yang
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact [email protected]
    Daniel Yang
    TechNet Community Support

  • Why in my Layout section the All floating section not work in Abobe Elements 12?

    I have Adobe Elements 12, and I'm having trouble in the Layout section at the bottom of the screen. 
    Within the Layout section I can use all the layouts except the All floating. 
    When I first used Elements 12 this was working but all of a sudden it stop working. 
    What can I do to solve this.
    Thank you,
    Albert F Schwartz Jr
    Email - [email protected]

    already answered
    Why in my Layout section the All floating section not work in Abobe Elements 12?

  • Why does the "fix" for firefox copying and pasting not work?

    I did the fix a few times and restarted firefox, with no success. Also, I installed the latest version of firefox and it is slower now. I have to use firefox for school, otherwise I would just find another way.

    In what way is Firefox slow?
    Is this all the time or only with loading web pages?
    What kind of fix do you mean with: ''Why does the "fix" for firefox copying and pasting not work'' ?

  • Notification center does not work at all with mail

    notification center does not work at all with mail there is no sonud no banner . i try to chek and unchek thas box may it is something may effect but still not working where is the notifiication center they said to us about it but i want be fair it's working for imessege and it's not working also for app store update like they said there is abig kiind of joke. i use macbook air mid 2011.

    Have you changed the system voice to an English one in system preferences?

  • Why will the front camera on my iphone 4 not work? On both the camera and snapchat.

    Why will the front camera on my iphone 4 not work? On both my camera and snapchat

    Hi there bananas321,
    You may want to try force closing all open apps and resetting the device as an initial troubleshooting step. Take a look at the articles below for more information.
    iOS: Force an app to close
    http://support.apple.com/kb/ht5137
    iPhone, iPad, iPod touch: Turning off and on (restarting) and resetting
    http://support.apple.com/kb/ht1430
    -Griff W.

  • Facebook notifications on ipad not working

    facebook notifications on ipad not working or displaying on ipad notifications.
    They are displaying on the iPhone though.
    Is this normal behavior or perhaps I have missed something.?
    Please let me know
    Thank you

    Tap Settings > Notifcation Center > Facebook
    Tap Banners or Alerts
    Switch Badge App Icon ON.

  • Change password on the first use - does not work

    Change password on the first use - does not work.
    Created a user and specified 'Change password on the first use' - when user logs in - the 'Change password' window does not pop- up.
    Please advise.

    (APEX 4.0.2) I am running into this same issue - if you don't set the password expiration and locking to 'Yes', the user gets into the app without being asked to change the pw.
    When you do set expiration and locking - after the user logs on with their temporary password, it does take them to the change password page (4155:50) but the username is blank. Because the username didn't get to the page the old password will never match and you get the "Invalid password" message.
    What am I missing? Anyone successful doing this?
    Simple application, default authentication, no javascript, HTTP_SERVER, no ssl.
    Thanks,
    Steve

  • I downloaded the S5 upgrade a week ago. Now, may notification LED will not work when phone is in 'mute' mode. It always did before. How do I fix this?

    I downloaded the S5 upgrade a week ago. Now, may notification LED will not work when phone is in 'mute' mode. It always did before. How do I fix this?

    same thing happened to my S5.  We're beyond frustrated.

  • Why weren't we told that display mirroring would not work with a Mac older than 12 months?

    Why weren't we told that display mirroring would not work with a Mac older than 12 months?

    You were, just not directly. If you go to apple's mountain lion webpage, you'll see this note at the bottom:
    1. AirPlay Mirroring requires a second-generation Apple TV or later, and is supported on the following Mac models: iMac (Mid 2011 or newer), Mac mini (Mid 2011 or newer), MacBook Air (Mid 2011 or newer), and MacBook Pro (Early 2011 or newer).
    http://www.apple.com/osx/whats-new/features.html

  • 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

Maybe you are looking for

  • Script for moving & deleting files

    Hi I'm quite new to scripts & looking for a script to move selected files with time-stamp & also a script to delete selected file/s in a directory. Below is an example of my requirement Move Ex:  c:\work\source\test.txt to c:\work\target\test.txt_042

  • How can I add a third line of text to a title?

    I am making a music video for my highschool students to teach about recycling and I want to add a title to the bottom with the song title, the name of the ficticious band and the ficticious record label. I have tried to add the third line of text, bu

  • How to remove the Char.from one Operating Concern

    Hi Guys, How to remove the Char. from one Operating Concern. I have created one Char. (WWDOC) and moved to Operating Concern (OOCC). Operating Concern is in red status. Now, i want to remove that new assigned Char. (WWDOC)from the operating concern (

  • Short dump in BP after upgrade to ECC 6.0

    Hi, We have upgraded system to ECC 6.0 from ECC 5.0 After upgrade system is giving short dump in transaction BP, event tried to navigate on BP screen. Short dump description: A RAISE statement in the program "CL_OS_TRANSACTION=============CP" raised

  • Creating / updating vendor master from CREMAS03

    Hi All, I am getting vendor master data from external system and SAP XI will convert this into Idoc of message type CREMAS03. I would like to create/update vendor master in R/3 system from Idoc CREMAS03. Which function module / BAPI will cater to thi