BAPI_ALM_ORDER_MAINTAIN - add task list

Hi Experts,
I wanted to execute the bapi BAPI_ALM_ORDER_MAINTAIN, to add a task list to PM order.
Any idea is... a good idea.
Francesco

Hi,
Populate methods table first.
1) Populate header
      t_methods_tab-refnumber = '000001'.
      t_methods_tab-objecttype = 'HEADER'.
      t_methods_tab-method = 'CHANGE'.
      t_methods_tab-objectkey = "Order number".
      APPEND t_methods_tab.
      CLEAR t_methods_tab.
2)
      t_methods_tab-objecttype = ' '.
      t_methods_tab-method = 'SAVE'.
      APPEND t_methods_tab.
      CLEAR t_methods_tab.
3) If operation already present in PM order,
t_methods_tab-refnumber = "opeartion number".
  t_methods_tab-objecttype = 'OPERATION'.
  t_methods_tab-method = 'CHANGE'.
  t_methods_tab-objectkey = "Order number".
  APPEND t_methods_tab.
  CLEAR t_methods_tab.
4) If operation not present in PM order,
t_methods_tab-refnumber = "opeartion number".
  t_methods_tab-objecttype = 'OPERATION'.
  t_methods_tab-method = 'CREATE'.
  t_methods_tab-objectkey = "Order number".
  APPEND t_methods_tab.
  CLEAR t_methods_tab.
5) Populate header and operation table as per input.
6) Call BAPI
      CALL FUNCTION 'BAPI_ALM_ORDER_MAINTAIN'
        TABLES
          it_methods      = t_methods_tab
          it_header        = t_header_tab
          it_header_up   = t_header_up_tab
          it_operation    = t_operation_tab
          it_operation_up = t_operation_up_tab
          return          = t_return.
      READ TABLE t_return WITH KEY type = 'E'.
      IF sy-subrc <> 0.
        CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
      ELSE.
         CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
      ENDIF.
Hope u will find it useful....
Regards,
Aparna Gaikwad

Similar Messages

  • Add component in task list

    Hello All,
    I have an issue with adding component in task list (for example task list number EIMN-68) via transaction IA05.
    When I try to add component to operation, I get the message *
    Standard BOM PAEIMN-68  4 already exists
    Message no. 29771
    Diagnosis
    You want to create a standard BOM for standard object PAEIMN-68 with usage .
    A BOM already exists for this standard object and usage. You cannot extend a standard a standard BOM.
    Procedure
    Check whether the standard BOM is suitable for standard object PAEIMN-68 and usage . If it is not, you need to create the BOM for another standard object.
    Is there any special way to create material master for such components.Whats the solution.
    Please help
    Cheers
    Sunny

    Hi Pithan, how are you..
    I want to add components.
    Just now I was able to add components. I explain how:
    When i added component number in operation, and press enter, system gave me the error that standard bom already exist. In the same screen I changed the BOM usage to 3 as universal usage. After this usage only, system allowed me to add components. No other bom usage allowed me to do so.
    Also, why system took me to BOM screen if I just want to add components.
    I wait for your reply.
    thanks and regards
    Sunny

  • Add JavaScript file to ALL existing Task List pages and to newly created list pages

    We have several OOTB task lists that are in use on several subsites.  We want to add JavaScript to the NewForm.aspx and EditForm.aspx for these task lists. These lists have not been customized, they are based on the standard Task Content Type.
    Since there are several lists already created and in use, it would be far too much work to manually add a Content Editor web part to each page.
    We put the JavaScript file in the top-level site style library.
    Is there a way to programmatically attach a script reference to each existing page in all the subsites AND have the script reference placed on any NEW list pages created from the OOTB Task content type? Or, add a CEWP to all existing list pages using a feature?
    I could not find any examples of this.

    Hi,
    A solution would be like this: Add your script into a Content Editor Web Part in a page, then add this Content Editor Web Part into the NewForm page of these Task lists using
    SharePoint Object Model.
    More information:
    Use
    SPList.Forms property to retrieve the URLs of the specific form of these Task lists:
    http://sharepointcore.blogspot.com/2011/08/sharepoint-listitem-new-edit-and.html
    With
    SPLimitedWebPartManager object, we can retrieve the web parts of a page, choose one and add into another
    page:
    SPLimitedWebPartManager.WebParts
    property
    SPLimitedWebPartManager.AddWebPart
    Another two links about this for your reference:
    http://www.stefangordon.com/add-web-part-to-page-programmatically/
    http://sharepoint.stackexchange.com/questions/9442/how-to-programmatically-add-a-webpart-to-a-page
    Thanks
    Patrick Liang
    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]
    Patrick Liang
    TechNet Community Support

  • Can We Add a Target System Once Task List is Open and Active?

    Has anyone been able to add a system to an existing project (i.e., task list)? We have a pre-existing project that we created when we recently upgraded to ECC 5.0. At the time of the upgrade, we didn't upgrade one system (MNT) in the event we had to look back at how the old version operated or looked. We've since upgraded the MNT system and want to add it as a target system for the pre-existing project.
    Is anyone aware of a method to add this system as a target without creating a new project?

    Hello Bob,
    I've find your question. It's been a while since you've asked it, but did you already found a solution to adding a system to an existing maintenance project?
    I've got that problem now.
    And I would appreciate it if you could forward me the solution.
    (you can also mail it to [email protected])
    kind regards,
    David De Boel

  • Add search filter to ipm task list

    I am using Oracle 10G. Is there a way to add a search filter to refine the rows displayed within the IPM task list web tool?

    Hi
    I was able to solve the problem by adding entries in sap\modification\generic-serachbackend-config.xml.
    Regards
    Satish

  • What is the calender "default list"? Can i use it to add tasks to my Google calender?

    I am aiming to use some Google calenders in Thunderbird. I have installed the add-on's "lightening" and "provider for Google calender" and added my calenders. This later claims to enable adding tasks to the calenders. I have not succeed, i can only add events. Also, in the calender list, there is an item called "default list" at the end. What is this, and how do i use it. Can i use it to add tasks to my Google calender?
    I will be happy for suggestions on how to add tasks to google calenders in thunderbird.
    Is there a up to date documantation on how to best use calenders and google calenders?
    Thanks in advance
    Ayse

    Never mind.
    It appears that the "default list" is actually the list for tasks in Google Calender, I just couldn't see them at first.
    Now all my google calenders and tasks are in full synchronization. Only thing is that, since google calenders does not provide for options such as reminders and % completed for tasks (which can be set in the home calender), I cant use this information.
    Ayşe

  • How to add one task in manager task list in CRM

    Hello,
    I have one scenario like when the user status is changed in service request then manager should get one email notification and that one task should be added in the manager task list.
    To send the email I have configure the Action profile and its working fine, but thing is that I not able to create the task so that manager can see this in his/her 'My Open Task' area. For this do I need to configure any workflow or some thing else.
    Any idea will be help full.
    Thanks
    Subhankar

    Solved by my self

  • I have two lists. The first is "Tasks", second is "Journal". I need a "Create Journal Entry" link in the Tasks list. How do I do that?

    Let's say I have a Task named "Build SSIS for Duke Energy" and it has another column called Active. Now every day I look at my task list and If I worked on that task I want to create a Journal entry of what I have done. So from the Task
    list I'd like a third column that calls the "Journal Entry" list's new form page and pass it in the ID of the task. I have found several TextToHtml scripts out there, but they have to be stored in a script library, and then sourced to a content
    editor web part. The problem is they don't fire when I have my list grouped. In addition to, every time someone creates a new view, I have to go in and add the Content Editor web part, point to the script....
    Any thoughts. It is the grouped view that really bug me.

    Hi,
    If you only want to add a hyperlink to create a Journal entry in the task list, I recommend to add a Hyperlink column in the task list and then create workflow to update the column.
    You can follow the steps as below:
    Open the task list, add a hyperlink column named Create Journal Entry.
    Create a workflow associated to the task list, start the workflow automatically when an item is created.
    Add actions as below:
    Then when a task is created in the task list, the workflow will be stared automatically to update the “Create Journal Entry” column.
    Thanks,
    Jason             
    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]
    Jason Guo
    TechNet Community Support

  • SharePoint Provider Hosted App that can update existing SharePoint Task List

    Note: I am unable to take advantage of the Microsoft.SharePoint library directly. Adding a reference results in a 32bit/64bit library mismatch error.
    I have to find a solution that uses only the Microsoft.SharePoint.Client extension. 
    I am looking for example code where provider-hosted SharePoint App loads a SharePoint Task List View that allows users to interact with the tasks.
    So far I have only been able to programmatically create and then load the SharePoint tasks list, create and populate a DataTable object and set the datasource of a GridView object to that DataTable.
    I am unable to trigger my method linked to my checkbox within the gridview.
    Ideally I would like to just customize a Task View that already has this functionality.
    Here is my default.aspx.cs code-behind file:
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Web;
    using System.Web.UI;
    using System.Web.UI.WebControls;
    using System.Data;
    using SP = Microsoft.SharePoint.Client;
    namespace SPAppBasicWeb
    public partial class Default : System.Web.UI.Page
    protected void Page_PreInit(object sender, EventArgs e)
    Uri redirectUrl;
    switch (SharePointContextProvider.CheckRedirectionStatus(Context, out redirectUrl))
    case RedirectionStatus.Ok:
    return;
    case RedirectionStatus.ShouldRedirect:
    Response.Redirect(redirectUrl.AbsoluteUri, endResponse: true);
    break;
    case RedirectionStatus.CanNotRedirect:
    Response.Write("An error occurred while processing your request.");
    Response.End();
    break;
    protected void Page_Load(object sender, EventArgs e)
    // The following code gets the client context and Title property by using TokenHelper.
    // To access other properties, the app may need to request permissions on the host web.
    var spContext = SharePointContextProvider.Current.GetSharePointContext(Context);
    using (var clientContext = spContext.CreateUserClientContextForSPHost())
    //clientContext.Load(clientContext.Web, web => web.Title);
    //clientContext.ExecuteQuery();
    //Response.Write(clientContext.Web.Title);
    SP.ClientContext cc = new SP.ClientContext("http://server/sites/devapps");
    SP.Web web = cc.Web;
    SP.List list = web.Lists.GetByTitle("General Tasks");
    SP.CamlQuery caml = new SP.CamlQuery();
    Microsoft.SharePoint.Client.ListItemCollection items = list.GetItems(caml);
    cc.Load<Microsoft.SharePoint.Client.List>(list);
    cc.Load<Microsoft.SharePoint.Client.ListItemCollection>(items);
    //try
    //const int ColWidth = 40;
    cc.ExecuteQuery();
    DataTable dt = new DataTable();
    dt.Columns.Add("Task Name", typeof(string));
    dt.Columns.Add("ID", typeof(int));
    foreach (Microsoft.SharePoint.Client.ListItem liTask in items)
    DataRow dr = dt.NewRow();
    dr["Task Name"] = liTask["Title"];
    dr["ID"] = liTask["ID"];
    //dr["chkTask"] = liTask["Checkmark"];
    dt.Rows.Add(dr);
    GridView1.DataSource = dt;
    GridView1.DataBind();
    protected void chkTask_CheckedChanged(object sender, EventArgs e)
    //add code here to update Task Item by ID
    Response.Write("checkbox event triggered");
    Here is my simple default.aspx:
    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="SPAppBasicWeb.Default" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
    <title></title>
    </head>
    <body>
    <form id="form1" runat="server">
    <div>
    <asp:GridView ID="GridView1" runat="server">
    <Columns>
    <asp:TemplateField>
    <ItemTemplate>
    <asp:CheckBox ID="chkTask" runat="server" OnCheckedChanged="chkTask_CheckedChanged" AutoPostBack="true" />
    </ItemTemplate>
    </asp:TemplateField>
    </Columns>
    </asp:GridView>
    </div>
    </form>
    </body>
    </html>
    http://www.net4geeks.com Who said I was a geek?

    Hi,
    Please try to modify your code as below:
    using (var clientContext = spContext.CreateUserClientContextForSPHost())
    SP.Web web = clientContext.Web;
    SP.List list = web.Lists.GetByTitle("General Tasks");
    SP.CamlQuery caml = new SP.CamlQuery();
    Microsoft.SharePoint.Client.ListItemCollection items = list.GetItems(caml);
    clientContext.Load(items);
    clientContext.ExecuteQuery();
    If the code still not works, I suggest you debug the code or following the blog below to create a Provider-Hosted App for SharePoint and read list items from SharePoint list.
    http://blogs.msdn.com/b/steve_fox/archive/2013/02/22/building-your-first-provider-hosted-app-for-sharepoint-part-2.aspx
    Best Regards
    Dennis Guo
    TechNet Community Support

  • How do I roll up tasks from different sites in the same collection into one task list that can be overlayed onto a calendar or a timeline?

    I am working on how to make an aggragate list that I would like to overlay to a calendar, or add to a timeline.  There are more than 20 different project sites that have task lists.  I created a custom content type for a task list that adds the
    column "Major Milestone."  I would like to take all tasks that are marked as Major Milestone and have them be displayed on a calendar or timeline on the parent site that sums up all of the Major Milestones in the child sites.
    How should I go about doing this? ... and thanks in advance!

    Thank you for your responce. I used a content query wp to rollup only the Major Milestones, but am unable to overlay the results to a calendar.. The link you provided is for overlaying different task lists onto a calendar, but does not detail how to
    overlay the results from the content query onto a calendar.

  • GETTING ERROR RELATED TO TASK LIST IN ORDER CREATION USING BAPI_ALM_ORDER_M

    hi all ,
    I am using bapi_alm_order_maintain  to create a new work order . i am passing  task list group and task list counter in IT_TASK_list tables . on execution it is showing an error message "  PLEASE PROVIDE THE MANDATORY TASK LIST DURING WORK ORDER CREATION.
    SEEKING YOUR HELP TO REMOVE THIS ERROR.

    hi all ,
    I am using bapi_alm_order_maintain  to create a new work order . i am passing  task list group and task list counter in IT_TASK_list tables . on execution it is showing an error message "  PLEASE PROVIDE THE MANDATORY TASK LIST DURING WORK ORDER CREATION.
    SEEKING YOUR HELP TO REMOVE THIS ERROR.

  • Related Item link is broken in DispForm.aspx for a task in Workflow Tasks list if file name contains " ' " (single quote)

    Description:
    We have created a custom workflow in Microsoft Visual Studio 2013 and SharePoint 2013. This Workflow is associated with a Document library.
    This Workflow starts as soon as any new item is created OR updated in Document library and creates a Task in Workflow Tasks list.
     Related Item link is not working in following scenario -
    Upload a file that contains “ ' “
    in its name, in a document library
    Navigate to Workflow Tasks list
    Open View Item form (DispForm.aspx ) of  Task Created by workflow then click on link in Related Item fields
    OUPUT:
    Related Item link  truncates after “ ' “
    Eg.
    Original Link: http://<Site URL>/Documents/te'st.txt
    Related Item Field: http://<Site URL>/Documents/te
    Is this known bug in SharePoint 2013 OR any hotfix available to fix it.

    Hi,
    As I tested per your description, I can reproduce the issue as well.
    From what I have found out, it seems SharePoint resolve single quote into different code in different place. During the test, if I set Task Name to Document Name, single quote will be resolved to &#39; , if I set some field to Document encoded URL, single
    quote will be resolved to %27 . For now, I haven't found out any article talking about this issue.
    As workaround, we may find out a way to change the Related Item field. However, it is OOB field in workflow task (SharePoint 2013) content type, and this content type cannot be modified in form.
    I'd suggest you add new column to get document url and place in the form in Task content type settings.
    Regards,
    Rebecca Tu
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • LSMW IBIP Unable to upload the PM operation task list

    Dear Experts,
    I'm trying to use LSMW to upload Equipment (PM) task list.
    I succeed in creating the Header of the task list, but not the operations.
    I have created 2 new structures :ZIBIPTLST  and ZIBIPTLOP
    Source structure  is : ZIBIPTLST
    u2026u2026u2026u2026u2026 ZIBIPTLOP
    Structure relation is :
    IBIPTLST    <<<<= ZIBIPTLST
    u2026u2026u2026u2026..IBIPTLOP <<<<= ZIBIPTLOP
    Field Mapping :
    IBIPTLST
    TCODE     
    RECORDNAME
    EQUNR     (Equipment number)
    PLNNR     (Key for task list group)
    PLNAL     (Group Counter)
    u2026.
    u2026u2026u2026u2026u2026u2026u2026u2026u2026..
    IBIPTLOP
    TCODE     
    RECORDNAME
    VORNR     (Operation)
    ARBPL           (work center)
    u2026
    Unfortunately, they sre no common fields between IBIPTLST and IBIPTLOP, as you could have between PLKO and PLPO.
    I have found an answer about the same issue, explaining that you can add in the structure ZIBIPTLOP , additional fields manually in the Souce field maintenance (adding EQUNR, PLNNR, PLNALu2026).
    But then , i have no idea where to make the link between these new fields and the same fields of IBIPTLST.
    Can you help, and tell me how to structure my files and my LSMW in order to achieve the creation of the Task list Header and Operation in the same Batch input.
    PS :in LSMW, i have created two flat files , one for the header and one for the operation.
    Thanks a lot, your detailed answer will be very appreciated !!
    Jean-Louis

    Hi,
    As you said, u will have to add the equipment and group counter id field in IBIPTLOP structure. U also need to identify the two structures with different ID, say header structure ID is 1 and Operation structure ID is 2. Go to step Maintain Source Field, double click on field SID which is created to enter the header and operation data identifier. In identifying field content, enter identifier as 1 for header SID and 2 for operation SID.
    You will have to maintain the SID identifier in you data template as well, so that LSMW can easily identify header and operation data.
    Below given is how you can create field data.
    ZIA01HEADER - Equipment Task List -Header Structure
      SID                      SID Header
      EQUNR                    Equipment Number
      PLNAL                    Group Counter
      KTEXT                    Description
      ARBPL                    Work center
      WERKS                    Maintenance Planning Plant
      VERWE                    Usage
      VAGRP                    Planner Group
      STATU                    Status
      STRAT                    Maintenance strategy
      ANLZU                    Syst.Condition
      STTAG                    Key Date
    ZIA01OPERATION - Equipment Task List -Operation Structure
      SID                      SID Operation
      EQUNR                    Equipment Number
      PLNAL                    Group Counter
      VORNR                    Operation/Activity Number
      UVORN                    Suboperation
      ARBPL                    Work center
      STEUS                    Control key
      WERKS                    Plant
      LTXA1                    Operation short text
      DAUNO                    Duration
      DAUNE                    Normal duration/unit
      ARBEI                    Work
    ARBEH                    Unit for work
    ANZZL                    Capacity required
    Hope this will work.

  • Global Object Services (GOS) Attachments Deleted from Maintenance Task List

    We use the Global Object Services (GOS) Attachments function to attach Word and Excel Documents to Maintenance Task Lists (transactions IA02, IA09). Recently we noted that more than 300+ Attachments had been deleted/removed from the GOS list visible via IA03/IA09. We are at a loss for explaining how this occurred- all Attachments appear to have been deleted at once/instantaneously. We can see the underlying tables (SGOSHIST and others) still contain entries, but we do not understand why the Attachments are no longer visible in the GOS list via Maintenance Task Lists, or how the ability to access these via GOS can be restored. This is not occurring with other PM Object Attachments - only Task Lists. Any help or suggestions appreciated.

    Is it possible that there was some authorisation change in a role associated with task lists? That would be consistent with the immediate loss - but only in the task list area. Another thought - has anyone been doing any programming in the Generic Object Services Business Add-Ins (perhaps for another module?) - They might have inadvertently clobbered your use?
    Do you use the GOS notes functionality? Does that still work?

  • 2013, Resources do not synch if from MS Project to SharePoint task list

    SharePoint and Project Professional 2013.  I am synching MS Project with a SharePoint task list.  Tasks synch just fine, but I continually get the synch error "We can't synch resource 'resourcename' to the tasks list because the resource
    does not exist on the SharePoint server.  This resource, and any other resource that doesn't exist in SharePoint, will remain assigned to the tasks in your project plan.".  If I then select one of the tasks in SharePoint, add the same
    resource (same spelling), then the resource gets synched to that and all other tasks in the plan (after I choose to use the SharePoint revisions in the popup window).
    I am connected to Project Server and this happens for both a simple site synch to MS Project as well as if I use Project in visibility mode.  I am posting to this forum because if I can solve the simple synch to SharePoint resources that will solve
    both issues.  We will have lots of PMs managing lots of projects and I would like to be able to synch resources from MS Project if possible.
    Thank you in advance for your assistance.
    Larry Christofaro, PMP, MCITP Tribridge

    I am also getting this issue, but for few resources, I observed that these resources had a special character in their email address / name in active directory.
    When I assign a resource from SharePoint it all works fine as mentioned by you.
    Even I am not able to find a solution for this.
    It would be great if anybody can guide us through this.
    Thanks.

Maybe you are looking for

  • Bookmarks in Portal

    Hi Experts, We made some changes to a query used in a webtemplate which is used in Potal. The change was we removed some characteristics and replaces them with thier nav attrs. Now when a user picks the book mark, the bookmarks dont work anymore. Is

  • Using MS Access as backend in Webdynpro Application

    hi guys, I am creating a application in webdynpro in which i want to use MS Access as Backend, so can u please tell how to use MS Access as backend. What all needs to be done and where the database file needs to be stored etc. please give me all the

  • LDAP as data source for UME

    Trying to use a SSL enabled LDAP (Sun) for data source for UME.  It seems that I can't use SSL directly from GRC CUP 5.3. Followed the instructions in saphelp, but when I test the connection, it gives me "Connection test with user path failed". The f

  • Can a CR work only for one aggregation level and not other ?

    Hi Experts, I have a real time infocube (RTIC) over which there is a multiprovider, on top of which I have built 2 aggregation levels. There are sequence of 2 characteristic relationships (CR's based on exit class) defined for the same RTIC. Is it po

  • Request: Maps and Books but no Maps *in* Books?

    OK, I'm loving LR4 so far. Maybe I'm just easy to please or it's that Geolocation data and Bookmaking are exactly the things I've been missing in my enthusiast workflow focused a lot around travel and nature photography, but the headliners instantly