BAPI or FM to create attachment to maintenance order

Hello,
I need to create an attachement to maintenance order via a BAPI or FM.
Can anybody help me please.
Thanks,
Widad.

Hi Widad,
check the below code for your reference.
DATA: my_object TYPE REF TO cl_gos_manager.
DATA: ls_object TYPE borident.
DATA: li_service TYPE tgos_sels,
ls_service TYPE sgos_sels.
MOVE: i_objkey TO ls_object-objkey,
i_objtype TO ls_object-objtype.
MOVE: 'I' TO ls_service-sign,
'EQ' TO ls_service-option,
'SRELATIONS' TO ls_service-low,
'SRELATIONS' TO ls_service-high.
APPEND ls_service TO li_service.
CREATE OBJECT my_object
EXPORTING
is_object = ls_object
it_service_selection = li_service
EXCEPTIONS
object_invalid = 1
callback_invalid = 2
OTHERS = 3.
IF sy-subrc 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
CALL METHOD my_object->start_service_direct
EXPORTING
ip_service = 'SRELATIONS'
is_object = ls_object
EXCEPTIONS
no_object = 1
object_invalid = 2
execution_failed = 3
OTHERS = 4.
IF sy-subrc 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.

Similar Messages

  • Purchase requisition,Purchase order attach to maintenance order

    Dear all,
    Can any one tell me that, is it possible to attach Reservation or Purchase requisition or Purchase order
    attach to maintenance order? (which is not created from the maintenance order)

    hi
    if you have created the material reservation against the movement type 261 the you have the option to specify the order.
    also there will be option to change the order specified.
    kindly check .also  i think there is no provision to assign reservation for material issued
    regards
    thyagarajan

  • Is possible create PO from maintenance order?

    From IW31 I can create a PR, and then PO in reference to PR.
    Is possible create directly PO from maintenance order? how?
    thx for attention

    Hi Paolo,
    It is not possible to create a purchase order directly from a maintenance work order. The standard SAP process is as follows:
    Create a component for external procurement on the work order - this results in the creation of a purchase requisition. The purchase requisition is then processed by the purchasing officer - the source of supply is assigned and the purchase requisition is then converted into a purchase order. If the component referenced a material master, the material may be specified on a contract/source list. In this case, the vendor and the price can be automatically deteremined during PO creation. If the material isn't on contract however, the purchasing officer may need to manually assign the correct vendor details and the price.
    The assumption is that the maintenance personnel are not purchasing experts - they just place a request for the product, and manual intervention is required from the appropriate purchasing expert within the company before this request can be sent to an external vendor.
    Regards,
    Monika

  • BAPI or FM to Create a Meter Reading Order

    Hi,
      Can anyone suggest me the name of a standard BAPI or any standard function module which can create a Meter Reading Order. I tried with ISU_S_METERREAD_CREATE but it is not creating the order, don't know why.
      Please Help.
    Regards,
    Kirti Bhushan.

    Sometimes ,BAPI´s are executed without errors (sy-subrc = 0 ) and don´t create the item (order,invoice etc.).
    That´s why you have to do a commit work after execution :
    CALL FUNCTION BAPI ****
    IF sy-subrc = 0 .
    commit work.
    endif.

  • Attachment in maintenance orders

    Dear Experts,
    If we attach any attachment to the order is it possible to indicate it in the report or at least in the order? In which table it sits?
    Please do the needful
    Thanks and best regards,
    Praveen

    Praveen,
    I'm assuming you mean attachments via the Services for Object (SfO) button...
    We did something some years ago which set a user-status if any SfO attachments were assigned. This done at save via user-exit IWO10009. You can then view the user-status in the order list-edit reports.
    The tables are SRGBTBREL, SOFM, SOOD and SOC3
    PeteA
    [www.pjas.com]

  • Purchase requisition created through plant maintenance order

    Hi Dear Experts,
    Is there report where  i can see purchase requsitions (thats are created from PM order) with PM order number?
    Regards,
    Aktolga

    hi
    you can check in IW37N, IWBK
    regards
    thyagarajan

  • 4.6C method for creating a Maintenance Order

    Hi,
    We have a requirement to create and update maintenance orders on a 4.6C system.  The scenario is that we need to programmatically mimic what users can do in IW31 and IW32.  The BAPI_ALM_ORDER_MAINTAIN function module is not available on this system (SAP delivered that BAPI in a later version.)  We've looked at IBIP but it does not offer structures for order data.  Using "call transaction" and BDC data structures directly seems to be an option but difficult to implement and prone to error.
    What other options exist for creating/updating maintenance orders on a 4.6C system?  Thanks in advance for any information or examples you can provide.
    -Jason

    Ok.  I've actually figured out how this works.
    I'll post what I've found out in case it helps anyone else.
    The parameters seem to be: ( with my example data in brackets)
    I_AUFNR – order number
    I_VAPLZ – work center ( MAINT.)
    I_VAWRK – plant ( 0001)
    I_PLNTY – Task list type = ( A )
    I_PLNNR – Task list group ( 55)
    I_PLNAL – Task list group counter ( 1)
    The problem I have is that this bapi is not released, and it is not remote enabled. 
    Are there any released BAPIs that would do the same thing?
    Or would I need to write my own remote-enabled BAPI that calls this one, and then try to call my BAPI ( using .NET Connector ) ?
    Thanks,
    Derek

  • Change of GL code in Maintenance Order

    Dear All,
    We have got a requirement that when stores is issuing maintenance material against reservation created through a maintenance order the default GL consumption Ac debited is " Consumption of Stores and Spares Indigenous " , instead of this GL code " Repairs & maintenance " GL code should be hit .
    How do we configure the same in system. Useful answers will be rewarded with points.
    Regards
    Milind Nair

    Hi,
    Thanks for the reply but if I do the changes it will be at company code level , I want the accounting effect to occur only in case of material consumed against maintenance order that too for some specified plants only.
    In case stores are consumed against production order then it should not hit repairs & maintenance but it should hit stores and spares consumed . Hope I am clear pls get back if you need any further clarifications.
    Regards
    Milind Nair

  • Can User Exit works for Settlement Rule in Maintenance Order creation?

    Dear Experts,
    I have this situation where I tried to create an Internal Maintenance Order via IW31 for multiple equipments from different functional location (different cost centers) using the Object List.  However, the settlement rule has a problem to pull out as there's no Equipment in the reference object. That's the reason, I'm looking at the User Exit which I understand the IWO10027, can do the work.  Since I'm new to User Exit, can I enhance the settlement rule by the following condition.
    The costs spent on each equipment will be used as a basis of calculating the weightage (via equivalence no) for the settlement rule.
    Can it be done that way?
    regards,
    Abraham

    Sanjay,
    This data can be checked in the following user-exits:
    COZF0001: Change purchase req. for externally processed operation
    COZF0002: Change purchase req. for externally procured component
    PeteA

  • How to calculate work in process for maintenance order

    how to calculate work in process for maintenance order i.e raw materials not used

    Hi,
    Generally, when u create PR from maintenance order, account assignment category should be F. Cost of services first settles on the order when u create service entry sheet. Further it got settled onto settlement receiver given in order.
    If you want to change the category from F to K for maintenance orders then follow the IMG menu path as given below.
    Plant Maintenance and Customer Service > Maintenance and Service Processing > Maintenance and Service Orders  >
    General Data > Define Account Assignment Cat. and Document Type for Purchase Requisitions

  • Planner group field in Maintenance order

    Hi,
    When we create a General Maintenance Order, the planner group from Equipment/Functional Location, value, will automatically appear in the Order.
    But in Refurbishment Order, which is for material, the planner group field do not come automatically.
    Is there any option to maintain the planner group field in the Material master, so that, this can appear automatically in the Refurbishment order.
    Kindly suggest.
    Raja.

    Hi Kutti Raja,
    The Material Master route you are looking for does not look feasible,as there is no relation between Planner Group and Material .
    If your Refurbishment Order is triggered through a Notification (M4), then Planner Group automatically flows to Order.
    The other alternative can be
    1. Create a Z-Table having Material vs Planner Group.
    2, Use the User-Exit  IWO10018  to have default planner group INGPR value.
    This works as I have already tested while replying to a discussion. Please go through this.work order completed by
    and go through my reply having 6 steps. You need to work in the similar lines.
    Take help of an ABAPer.
    Jogeswara Rao K

  • Problem printing plant maintenance order (DEFAULT PRINTERS)

    Hi,
    I configured default printer in SPRO --> Plant maintenance and customer service --> Maintenance and Service Processing --> Maintenance and service orders --> Print control --> Define printer
    I created 2 plant maintenance orders to test the printings jobs.
    For 2 different orders, I got the following error message in the printing logs (it's in french): INOPÉRANT (means not working in english). What config should I correct. Could the problem be in the orders? Thanks.
    TEST IMPRESSION 31.03.2009 u2013 PROTOCOLE IMPRESSION u2013 BORDEREAU 11100942
    000011100942 0010  5210A   YUL_CONTROL#2    2060 Bon de main-d'oeuv  3  VALLIEMA   31.03.09   07:20:53
    000011100942 0020  5235    YUL_ENTR#6       2060 Bon de main-d'oeuv  2  VALLIEMA   31.03.09   07:20:53
    000011100942 0030  5235A   YUL_ENTR#12      2060 INOPÉRANT
    000011100942 0040  5235B   YUL_ENTR#9       2060 INOPÉRANT
    000011100942 0050  5235C   YUL_ENTR#9       2060 INOPÉRANT
    000011100942 0060  5280B   YUL_ENTR#4       2060 Bon de main-d'oeuv  2  VALLIEMA   31.03.09   07:20:53
    000011100942 0070  7230I   YMX_ENT#2        2060 Bon de main-d'oeuv  2  VALLIEMA   31.03.09   07:20:53
    TEST IMPRESSION 31.03.2009 u2013 PROTOCOLE IMPRESSION u2013 BORDEREAU 13208581
    Ordre Nº     Opé.  Poste   Uté sortie       APap Formulaire        Cop. Utilis.    Date       Heure
    000013208581 0010  5235A   YUL_ENTR#12      2060 Bon de main-d'oeuv  1  VALLIEMA   31.03.09   08:03:16
    000013208581 0020  5235B   YUL_ENTR#9       2060 INOPÉRANT
    000013208581 0030  5235C   YUL_ENTR#9       2060 INOPÉRANT

    Hi,
    I am not sure but are you trying to print shop papers at default printer specified in config.First thing is are orders released,I presume they are released hence you are getting message.
    Next thing is check config as below:
    Application area - O for maint orders
    Planning plant -  * or define your plant
    Planner group - * or same as above
    Shop paper - Define shop paper or *
    Output device - LOCL or your device property...It is advised to put LOCL as different users can ahave different printers.
    Storage mode -1 for printing only
    then select print immediately and delete after output.
    After this in your master(SU01) define output device as LOCL and this will pick up your default printer of your desktop or working station as configured in windows.
    Also check if right shopapers you have assigned to order type,you can confirm them if you see in print preview.
    regds,
    atul

  • How to assign the budget to maintenance order

    Dear PM Guru's,
    I like to know the how to assign the budget for a maintenance order. how we control the expenses from a maintenance order. suppose for a small work manangement assigns budget as 2lacs. now i like to restrict if any thing purchased once budget reached to 2lacs system should populates the error message to restrict the creation of Purchase orders / material requisitions and some other issues. Please suggest me how i can map in SAP? if any one have full documentatioin regard this please send through mail.
    thanks in advance to all of PM Guru's.
    regards
    Jalu

    Hi,
    There are different approaches for budget control in PM orders.
    1) Option1: In koab transaction maintain commitment managemen active and in budget profile (oioa) you must tick total values ,annual values,activation type should be 1-automatic activated when budget allocation done. Then distribute budget in PM order through KO22.
    2) Option2:You can also opt for Investment management approach but it is mainly done in case of capital work/projects/internal orders. In this approach you need to activate IM for orders(done by CO people). Investment programs are created and budget distributed through IM52. For details you may consult your FICO consulatnt.
    3) Option3: Fund Management approach enables you to monitor budget-relevant plant maintenance processes. enables you to monitor budget-relevant plant maintenance processes in FM.
    The link between the plant maintenance process and FM is established by entering an FM account assignment (commitment item, funds center, and fund) when you create a plant maintenance order.
    You have to enter the FM account assignment manually. If, however, you have maintained the assignments of FM account assignments to CO account assignments, the system determines the FM account assignment from the cost center of the technical object (functional location, equipment) which is assigned to the plant maintenance order.
    FM takes care of budget related processes from creation of maintenance order till settlement.
    Hope this helps you to decide an appropiate approach.
    Regards,
    S.Basu
    Edited by: S Basu on Nov 10, 2011 5:34 PM
    Edited by: S Basu on Nov 10, 2011 5:34 PM

  • Development in maintenance order?

    hi
    in our organisation MM people have develop a screen in purchase requisition tthrough user exit.when
    you click on the customer data tab which is a development purchase requisition owner name and
    contact no we have to put manually so that purchase people can know.now the requirement is
    when purchase requisition is created automatically  through maintenance order (account assignment F
    and item category D)purchase requisition owner name and contact no should come automatically
    in customer data tab in purchase requisition.Right now we are putting purchase requisition owner
    name and contact no in change mode of purchase requisition.should we do some development
    in maintenance order so that purchase requisition owner name and contact number will
    come in purchase requisition automatically.
                                                                                    regards
                                                                                    sanjay

    Hi,
    There are two user exits available which allow you to adjust field values for transfer to the purchase requisition:
    COZF0001 for external operations
    COZF0002 for external components
    The exits only allows change of fields in structure EBAN_ORD_CUST. To include additional fields it is necessary to append this structure with any additional fields. You will need to add code to your exit to fill the appended fields.
    Alternatively, BADI IWO1_PREQ_BADI might suit your needs.
    -Paul

  • Bapi's for creating Maintenance order in IW31 with notification

    Hi All,
       Is there any bapi's for creating Maintenance order with Notification number in the transaction iw31.
      Also is there any bapi's for creating measurement document.
    Points will be awarded.
    Regards,
    vinoth

    RFC MeasDocument: Individual Processing, Create
    MEASUREM_DOCUM_RFC_SINGLE_001
    RFC MeasDocument: Individual Processing, Change/Display or Read
    MEASUREM_DOCUM_RFC_SINGLE_002

Maybe you are looking for

  • Missing some basic functionality

    I seem to be missing some basic functionality, like switching to tty1-n using Ctrl+Alt+F1-n.  I can't begin to guess what this is related to, as after several installs I've never experienced that to be missing.  Can anyone point me in the right direc

  • Using dept ID on Canon-iRADVC5250 from MAC10.8.5

    Hi All, OS - mix of Windows OS & MAC's Print queue thru server 2008 Dept ID - No ID for B&W jobs( print or copy) Printer driver - PS3 Situation -configurations on Windows OS is fine. MAC- if we enable dept ID on the properties ,the password is asked

  • TS3694 "The iPhone could not be restored. An unknown error occured (3194)." Troubleshooting reveals no problems

    I'm trying to restore an iphone 3GS before selling it. I've already erased everything by going into settings and clicking on erase and restore. The phone says to connect to iTunes and iTunes says "The iPhone "iPhone" could not be restored. An unknown

  • N73 firmware update failure!

    Hello, I'm currently using firmware version 3.0704.1.0.1 and I'm like to update this firmware with the latest verison of firmware which is 4.x.xxx.x.x.x. I constantly get an error when I'm trying to install the latest version of firmware. The message

  • Field Validation for Authorization Object field on selection screen

    Hi Experts, We have included a new field u2018Authorization Objectu2019 in the selection screen which should be reflected in the field Authorization Object of the spool property. Please let us know how we can provide F4 help for this field and also v