Attaching notificaiton to workorder header data in IW32 txn.

Hello,
I am trying to create a header notificaiton for maintenance workorder (PM09). I am able to successfully create a header notification using BAPI_ALM_NOTIF_CREATE. I am also saving the notification and updating the workorder with the header notification using BAPI_ALM_ORDER_MAINTAIN.
The notification is successfully created->saved->shows up in the object list of workorder and visible using IW33 txn. However the Notifctn field on HeaderData tab is still empty (shows a create icon besides the empty field). I am able to create this notification directly via IW32 txn by clicking on the create icon besides the Notifctn field.
Below is the code i am using
data: lv_header     type BAPI_ALM_ORDER_HEADERS_I,
      lv_method     TYPE BAPI_ALM_ORDER_METHOD,
      lv_header_up  TYPE BAPI_ALM_ORDER_HEADERS_UP.
data: l_ret type string.
MOVE-CORRESPONDING WO_HEADER to lv_header.   " work order header saved in WO_HEADER
lv_header-NOTIF_NO = wd_this->header_notif_no.
APPEND lv_header to it_header.
lv_header_up-orderid = WORK_ORDER_NUMBER.      " work order number saved before.
lv_header_up-notif_no = abap_true.
APPEND lv_header_up to it_header_up.
*----- Update method table .
lv_method-refnumber = 1.
lv_method-objecttype = 'HEADER'.
lv_method-method = 'CHANGE'.
lv_method-objectkey = WORK_ORDER_NUMBER.
APPEND lv_method to it_method.
*----- Populate other parameters for BAPI_ALM_ORDER_MAINTAIN -----*
CLEAR l_method.
  l_method-method = 'SAVE'.
  APPEND l_method TO it_method.
  CALL FUNCTION 'BAPI_ALM_ORDER_MAINTAIN'
    TABLES
      it_methods              =it_method
   IT_HEADER               = it_header
   IT_HEADER_UP            = it_header_up
    it_operation            =  it_operation
    it_operation_up         =  it_operation_up
    it_objectlist           =  it_objectlist
    it_objectlist_up        =  it_objectlist_up
      it_text                 = it_text
      it_text_lines           = it_text_line
      return                  = it_ret.
  READ TABLE it_ret INTO l_ret WITH KEY type = 'E'.
  IF sy-subrc = 0.
    e_error = l_ret.
    CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'.
    LOOP AT lt_ret INTO l_ret WHERE type = 'E'.
     issue_error_message( l_ret ).
    ENDLOOP.
  ELSE.
The BAPI ('BAPI_ALM_ORDER_MAINTAIN') works fine for all other tasks. I am also considering implementing note 1475809, however wanted to check with others in the community for some tips.
Thanks,
Vivek
Edited by: Vivek Priyadarshi on Jan 11, 2011 5:22 PM

Nailed it! 
Unfortunately SAP forgets to take care of complete functionality once in a while, but luckily they put enhancement points at the right locations.
To link notification to workorder header implicit enhancement has to be implemented in FM: IBAPI_PROC_METHOD_TABLE_EXEC.
From this enhancment call FM:
CALL FUNCTION 'IOPEXT_MAKE_HEADERNOTIF'
  EXPORTING
    i_qmnum       = <fs_order_tab>-QMNUM
pass the notificaiton number in export parameter.
Edited by: Vivek Priyadarshi on Jan 18, 2011 4:09 PM

Similar Messages

  • Pre-Populating the header data in the survey attached to an activity in CRM

    Hello Gurus,
    I have a question regarding Pre-Populating the header data in the survey attached to an activity in CRM Mobile 4.0. That in can we define a Functional module for a PBO (Process Before Output) for a survey u201CZ_SVY_Templateu201D in CRM 4.0.
    So that when a Sales rep opens the Survey in CRM Mobile 4.0 the Organizationu2019s Header data should automatically be displayed in the u201CZ_SVY_Templateu201D, so that he just needs to fill out only the remaining additional blank fields in the survey.
    << Moderator message - Please do not offer points >>
    Thanks,
    Siddhu
    Edited by: Rob Burbank on Oct 8, 2010 2:16 PM

    Moderator message - Cross post locked
    Rob

  • Header Data badi button not visible in webdynpro portal view

    Hi,
    We have implemented  "HRHAP00_ADD_HEADER  " for fetching additonal data for appraisee in objective setting appraisal.
    Badi is fetching data and show button " Additoanl data " in  R/3 view , but the button is not visible in ESS, MSS view.
    We are  using Webdynpro platform.
    Has anybody face similar kind of problem in webdynpro?  how to address this.
    regards
    Pallavi

    Hi Ana,
    Standard button is available info  but it is not showing cutom fileds.
    Technical resources has made zimplementation of standard badi header data, but when we try to attach it to templte id doesnt show button.
    regards
    Pallavi

  • Fax PO attachments along with general header data using smartforms

    Hi all,
    I have a requirement which is as follows in ECC 6 system.
    When the purchase order is sent to the vendor through fax, it should also include the attchemnts that are in the Purchase order along with the general header data for the purchase order.
    Thanks and Regards,
    Sireesha

    Hi Mick,
    Your thread seems to be linked to this one which is in process.
    In FAX & Print of PO attachment not coming
    Kind regards,
    Yann

  • SAP VBA interfacing - error: FI/CO interface: Inconsistent FI/CO document header data for updating

    Hello,
    Currently I'm working with excel SAP interfacing. For this I am using VBA to call different BAPI functions.
    I have already some interface scripts working, however I have also one which I cannot discover what I'm missing.
    The VBA code is to reach BAPI_ACC_DOCUMENT_POST
    My error is ---> FI/CO interface: Inconsistent FI/CO document header data for updating
    So I'm appealing to you SAP bapi VBA gurus whether you have any ideas how to fix my issue.
    I'm attaching below my code for you to review:
    Option Explicit
    ' Declaration for the necessary objects
    Dim objBAPICortrol, objConnection, objCreateMaterial, objReturn As Object
    Dim objPRFCT, objNTXT, objDTXT As Object
    Dim vLastRow, vRows As Integer
    Dim objMaterial1, objMaterial2, retMess As Object
    Sub Batch()
    ' Getting the last filled Row in Column
    vLastRow = Cells(Rows.Count, "A").End(xlUp).Row
    ' Setting the necessary variables for R/3 connection
    Set objBAPICortrol = CreateObject("SAP.functions")
    Set objConnection = objBAPICortrol.Connection
    objConnection.System = "SYSTEM NAME"
    objConnection.Client = "Client number"
    objConnection.user = "USERNAME"
    objConnection.Password = "PASSWORD"
    objConnection.Language = "EN"
    ' Establish a connection
    If objConnection.logon(0, False) <> False Then
    'MsgBox "Connection Established"
    End If
    On Error Resume Next
    ' Assign the Parameters
    Set objCreateMaterial = objBAPICortrol.Add("BAPI_ACC_DOCUMENT_POST")
    Set objMaterial = objCreateMaterial.Exports.Item("DOCUMENTHEADER")
    Set objMaterial1 = objCreateMaterial.Tables.Item("ACCOUNTGL")
    Set objMaterial2 = objCreateMaterial.Tables.Item("CURRENCYAMOUNT")
    'Set Values
    objMaterial.Value("USERNAME") = "USERNAME"
    objMaterial.Value("HEADER_TXT") = "BAPITEST"
    objMaterial.Value("COMP_CODE") = "0001"
    objMaterial.Value("PSTNG_DATE") = "20140506"
    objMaterial.Value("TRANS_DATE") = "20140506"
    objMaterial.Value("DOC_DATE") = "20140506"
    objMaterial.Value("FISC_YEAR") = "2014"
    objMaterial.Value("DOC_TYPE") = "SA"
    objMaterial.Value("REF_DOC_NO") = "BAPITEST"
    objMaterial.Value("FIS_PERIOD") = "00"
    objMaterial1.Rows.Add
    objMaterial1.Value(1, "ITEMNO_ACC") = "1"
    objMaterial1.Value(1, "GL_ACCOUNT") = "0007180000"
    objMaterial1.Value(1, "ITEM_TEXT") = "BAPITEST1"
    objMaterial1.Value(1, "DOC_TYPE") = "SA"
    objMaterial1.Value(1, "COMP_CODE") = "0001"
    objMaterial1.Value(1, "PROFIT_CTR") = "AZ1111" ---->'profit center is normally having 10CHARS but as there are letters I'm not using zeros at the beginning
    objMaterial1.Value(1, "ITEMNO_ACC") = "2"
    objMaterial1.Value(1, "GL_ACCOUNT") = "0007180000"
    objMaterial1.Value(1, "ITEM_TEXT") = "BAPITEST1"
    objMaterial1.Value(1, "DOC_TYPE") = "SA"
    objMaterial1.Value(1, "COMP_CODE") = "0001"
    objMaterial1.Value(1, "PROFIT_CTR") = "AZ1111"
    objMaterial2.Rows.Add
    objMaterial2.Value(1, "ITEMNO_ACC") = "1"
    objMaterial2.Value(1, "CURRENCY") = "EUR"
    objMaterial2.Value(1, "AMT_DOCCUR") = "-1.00"
    objMaterial2.Value(1, "ITEMNO_ACC") = "2"
    objMaterial2.Value(1, "CURRENCY") = "EUR"
    objMaterial2.Value(1, "AMT_DOCCUR") = "1.00"
    ' Function call
    objCreateMaterial.call
    Set objReturn = objBAPICortrol.Add("BAPI_TRANSACTION_COMMIT")
    objReturn.call
    Set retMess = objCreateMaterial.Tables.Item("RETURN")
    If retMess Is Nothing Then
    MsgBox retMess.Value(1, "MESSAGE")
    End If
    ' Get return parameters & display in excel
    Set objReturn = objCreateMaterial.Tables("RETURN")
    ActiveSheet.Cells(5, 1) = retMess.Value(2, "MESSAGE")
    End Sub

    after some searching I've discovered that once I'm creating next line for accounting document it is not working properly.
    When I debug the BAPI in SE37 after inserting new line it is asking for GL account input, however if I run it using VBA and delete the account from the code, the return message is not giving me any error that GL account is missing.
    I appreciate any ideas.

  • Appraisal -Additional header data

    HI,
    we have implemeted the HRHAP00_ADD_HEADER  Badi to get the additional employee data in the print layout of a form.
    I attahched this badi to  the additonal header data in the Lay out of a from ,still iam unable to get the further details of a employee in the print form.
    If any one has the similar experience or worked with the additional header data badi please share with me how to  get the additonal header data functionality.
    Thanks in advacne
    VK

    Hi ,
    Thanks for the reply. As you pointed out ,we are moving from ehp3 smart forms to ehp4 adobe forms.
    The BAdi was working fine with the smart form ,when we attached the same with the ehp4 standard print layout it  is not working.
    As i do not have much exposure to the techinical aspects i am unable to crack this issue. Please advise me where exactly i need to work and how to incorporate the BAdi into the form.
    Thanks a lot for your response.
    Thanks
    VK

  • Search help for VA01 Header Data Partners

    Hello Team,
    I have a requirement in va01/02/03 ,  where i will need to create/enhance a search help for one of the partner functions under SO header data.
    and values will need to be extracted from a customer Z-Table., taking into consideration the sales area of the SO
    Right now, I am not sure, but it looks like it has a search help attached to it, but when i press F4, nothing comes up.
    Is there a way i can check if there is any standard search help associated with those screen field?

    thankyou suresh.
    As i have created this search help and in the view i have given the join conditions as
    MARA-MATNR = MARC-MATNR
    MARA-MATNR = MAKT-MATNR
    MARA-MATNR=MVKE-MATNR
    and in search help parameters :
    VKORG
    MATNR
    BISMT
    MAKTX
    MTART
    WERKS
    PRODH
    I took the Hotkey as 1.
    Please guide me what are selection conditions that i need to give in my VIEW.
    Here iam using 4 tables.
    MARA
    MAKT
    MVKE
    Edited by: vinay raj on Jun 12, 2009 6:42 AM
    Edited by: vinay raj on Jun 12, 2009 7:18 AM

  • F-48 (post vendor down payment:header data)

    Hi Experts,
    Good Evening to you,
    when i was posting F-48 (post vendor down payment:header data) i was getting an error of No Special G/L acct defined for acct type K sp. G/L ind B recon.acct so at that time i went to OBYR and given in Acct type-K SGL Ind-B in that given Recon account and Special GL Account both the numbers but still the erroring is coming. Later i went to FS00 and checked in Control Data that the GL Account the reconciliation account-vendor is already given but still the error is coming.
    So if anybody faced the same error means let me know.
    Awaiting for your golden replies & points will be assign for useful answers.
    Thanks & Best Regards,
    KK

    Hi Rams,
    The problem of "No Special G/L acct defined for acct type K ....." has been rectified when i specify the Special GL A/c in OBYR.
    Now the issue is i gave a wrong Sp GL account in OBYR and posted a document later i recongnise that i gave wrong SP GL and went back to OBYR and gave the correct SP GL A/c number. So there was a posting has done earlier 1 document so can you tellme how to change from Old Sp GL  to New Sp GL.
    Awaiting for your golden reply.
    thanks & best regards,
    KK.

  • How to display the header data on different position in alv report

    hi all,
    how to display the header data on different position in alv report.
    for example ,
    customer                                                   name
      xxxx                                                         xxxx
                     vendor        name     street 
                      xxxx         xxxx      xxxxx
    pls   help me .

    hi
    as per my understanding you need to trnasfer header internal table data  to pdf..
    please check the following links for internal table to pdf..
    Convertion of Internal table data to PDF
    This link is related to ur issue
    Re: how to insert the calling of the FM: OTF to PDF
    Thanks

  • PO/ S.Location and GR msg check box in 'delivery/invoice' tab of header dat

    Hi all,
    Under which case the below 2 fields are required to b filled while creating a PO apart from making them mandatory fieds in document type settings.
    1. GR msg check box in 'delivery/invoice' tab of header data
    2. Storage Location data in item details
    in me59n, system unable process p.req to PO becoz it is mandatory to fill these two fields.

    Hi,
    1. GR message check box issues message to the buyer after every the goods receipt against the PO.
    Message type has to be configured for this functionality.
    2. If you are managing stock of material at storage location level , then you will need to maintain this at PO item level.
    Regards,
    Maheshwari

  • It is necessary to create one header data for each file to be sent to CDFS.

    hi GUYS
    my sce anrio is FILE-XI-PROXY
    REQUIREMENT IS
    SOURCE FILE                      TARGET FILE WILL BE
    H1                                             H1                        H1                    H1
    I1                                               I1                         I2                      I3
    I2                                                F1                        F1                    F1
    I3                                           
    F1
    It is necessary to create one header data for each file to be sent to TARGET. Each file will be related to only one SAP Company Code.
    Thanks
    NAG

    aa

  • How to display text value in the header data (Header text) of credit memo

    Hi...
    I need to display the text value of the text field in the header text of the header data in credit memo.
    The text values are stored in a ztable and i need to display it based on the billing document stored in vbrk (zfield) that was inserted during the creation of credit request..
    Appreciate your help on how to do this...
    Thansk and will surely reward the points..
    Kanthi..

    Hi kanthi ,
                   Read the value from Z Table and during the creation of cedit memo check out for some exit where u the value from The zTABLE AND use function module SAVE_TEXT with object and id in the header text .
    Please award if useful.

  • SSRS 2008 R2 - Dynamic header data stays the same when exporting

    Background:
    I have a SSRS 2008 R2 report with a single Tablix.
    The data is grouped by InvoiceID, with each appearing on a separate page.
    I'm displaying some of the detail data in the group header row using Expressions similar to the following:
    ="Invoice # "  & ReportItems!InvoiceID.Value"
    The data referred to by my ReportItems statements are all hidden in the detail row (Advanced Mode, the Hidden Value for the Static Row Group is set to false).
    Problem:
    When I Preview the report in Visual Studio, everything looks as it should - the dynamic header data changes correctly with each group.
    However, whenever I export the results (I've tried all the formats), the header data is the same for every group - its taking the values from the first group and using it in all the groups.
    I've copied the same expressions into my Totals row, and the data is correct when exported; its only happening in my header rows.
    Any help in resolving this is greatly appreciated, thank you.

    Hi Alex,
    According to your description, you have a header with expression contains ReportItems. Now you find it shows incorrect result when exporting to a file. Right?
    In Reporting Services, it has reported some similar issue that the ReportItem returns unexpected result when exporting.  In this scenario, since you just want to show the group name in each page as a header for detail rows. So you can make the
    detail rows group on the Group. Then delete the Group column but still keep the group. After that add a row above detail row (Out side of group) and put in "=Fields!InvoiceID.Value". Now it will show the corresponding Group name
    when you set page break between each group instance. We have tested this case in our local environment. Here are screenshots for your reference:
    Reference:
    SSRS
    field expressions using ReportItem refrences have unexpected results when exporting
    If you have any question, please feel free to ask.
    Best Regards,
    Simon Hou

  • BADI ME_PROCESS_PO_CUST for changing header data

    Hello Experts,
    I'm using Method PROCESS_HEADER in Badi ME_PROCESS_PO_CUST in order to change some header data.
    I want to change header data depending on the partner data which are on header level.
    It works fine as long as there are data changed in the header or item level and not only on the partner screen.
    The method in this Badi isn't processed if only partner data are changed. But for me it is necessary to set a special field on the header depending on the partner data.
    Regards,
    Sven

    Hi,
    Firstly, for changing Header data without any INSERT/UPDATE?MODIFY statement, badi - ME_PROCESS_PO_CUST  will not be useful.
    As method you mentioned has no header parameters under CHANGING / EXPORTING clause.
    You can use the badi which has the parametrs you want in either change/ Export mode. It can be defined under table also.
    Below is the list of important badis gettign called, however none of them contains header values in change/export clause.
    ME_CCP_ACTIVE_CHECK
    MD_STOCK_TRANSFER
    ME_DEFINE_CALCTYPE
    ME_PO_PRICING
    ME_FIELDSTATUS_STOCK
    ME_COMMITMENT_STO_CH
    ME_COMMITMNT_PARKING
    ME_INFOREC_SEND
    ME_CHECK_SOURCES
    ME_PURCHDOC_POSTED
    Instead you can use enhacement MM06E005  Customer fields in purchasing document.
    Create a project under Transaction CMOD.
    Assign enhancement as Project component.
    You'll find Exit 012. At time of save you can change header im_ekko based on you parterner data tab.
    Regards,
    Amee.

  • Status of transfer (shipment costs header data)

    Kindly explain it to me in general language,
    Status of transfer (shipment costs header data)
    This status describes the stage of forwarding for a shipment cost document.
    Use
    The status is determined by the system and cannot be changed manually. To determine the status, the system cumulates the item statuses. The following rules apply:
    Item     | Status
      000001 | _ | A | B | C | B | C | C | C
      000002 | _ | _ | _ | _ | A | A | B | C
    Header   | _ | A | B | C | B | B | B | C
    You can select shipment costs that have reached a certain forwarding status.

    Dear Pradeep,
    the matrix describes how the header status gets calculated when the cost document has two items.
    The header status is a cumulation of the item status. This is valid for the calculation, accounting and
    transfer status!
    Example:
    If item 00001 has status 'C' and item 00002 'A', the header status will be 'B'.
    Item | Status
    000001 | _ | A | B | C | B | C | C | C
    000002 | _ | _ | _  | _ | A | A | B | C
    Header | _ | A | B | C | B | B | B | C
    Regards,
    Tom

Maybe you are looking for

  • Using Airport Express to Extend a Time Capsule Network: Results (*Long*)

    Thought I would share my recent (2 hours ago) experience with setting up an Airport Express to Extend a Time Capsule 802.11N 5Ghz Network. Basically I just followed the directions in the Apple Airport Utility, using the "Extend a Wireless Network" se

  • Hanging all over the place

    PLEASE HELP!!! I've tried to install Solaris 8 on Intel a number of times. Sometimes I get the whole way through the install without a hitch, but then everything hangs once I get into the CDE (I can just sit and stare at it for 5 minutes and it hangs

  • Listener suddenly looses connection to database reporting ORA-12518

    Hi all, This has been causing me endless problems for two days now and I desperately need to leave our database running before the weekend. I cloned our database and moved it to a new server following the instructions in this guide, after a quite a f

  • Lost pictures---cannot find volume

    I recently installed Leopard on my IMAC. Did the archive and erase method. More recently I installed an update from Photoshop CS2 to CS4. Now my wife gets "cannot find volume PICTURES" error message and has lost all her pictures. I lost all pictures

  • Who at adobe can give me the correct downloads for already pruchased CS6 instead of App Manager ?

    Hi There ..I have in the past purchased CS3, then CS4, and then CS 5 all for my HP Tower with Windows XP .. with Microsoft going to stop support on XP . .I have had the techies assemble a new machine 64 bit HP Tower with Windows 7 ... and these resel