How to use WCM for a maintenance order ?

HI friends,
     Can u please tell the steps how i should use WCM in a maintenance order?
Regards,
M.Alagesan

Hi Alagesan,
To use WCM in Maintenance Orders, you should have activated either a Standard or Enhanceed Model Architecture for the Planning Plant in SPRO. (SPRO>PMCS>WCM--> Master Data --> Architecture)
Also you should Activate WCM for Maintenance Orders (SPRO>PMCS>WCM--> Approvals)
Then the Reference Object you are using for Order creation should have the Permit(Approval) used above assigned to it & Auto Proposal should be checked.
When you create a Order on such Equipment, WCM will get activated Automatically. Also you can activate using Operational Control key of WCM.
If Standard Model the Flow is Order --> Work Clearance Application --> Work Clearence Document. Release Permits in Order and proceed to Tag in WCD. Then Release the Order for Execution.... and so on.
If Enhanced Model the Flow is Order --> Valuation --> Work Approval --> Work Clearance Application --> Work Clearence Document. Release Permits in Order and proceed to Tag in WCD. Then Release the Order for Execution.... and so on.
Regards,
MLN Prasad

Similar Messages

  • How to use Bapi for creating sales order

    Dear All,
    I am facing problem in creating Sales orders using BAPI.
    Actually I am getting one file as an input and after validating the contents in the file i am preparing an internal table which has 6 fields - Customer number,PO Number,Material Number,Quantity,Price,Unit of measure.
    Now  my doubt is that while using BAPI_SALESORDER_CREATEFROMDAT2 , I am not getting how to pass PO Number and Customer number.
    Please Help.
    Regards,
    Shweta

    Hi shweta upadhyay
    I have gone through you are post i have done some coding for creating sales order using bapi , I think it is helpful for you.
    *& Report  YOBJ_BAPI_SALESORDER
    *& REPORT : CREATING SALES ORDER USING STANDARD BAPI
    *& AUTHOR : S.PAVAN KUMAR INUMARTHY
    REPORT  YOBJ_BAPI_SALESORDER.
    DATA : ORDER_HEADER_IN LIKE STANDARD TABLE OF BAPISDHD1 WITH HEADER LINE.
    DATA : ORDER_ITEMS_IN LIKE STANDARD TABLE OF BAPISDITM WITH HEADER LINE.
    DATA : ORDER_PARTNERS LIKE STANDARD TABLE OF BAPIPARNR WITH HEADER LINE.
    DATA : RETURN TYPE STANDARD TABLE OF BAPIRET2 WITH HEADER LINE.
    DATA : SALESDOCUMENT LIKE BAPIVBELN-VBELN.
    *APPENDING VALUES FOR HEADER.
    ORDER_HEADER_IN-DOC_TYPE = 'TA'.
    ORDER_HEADER_IN-SALES_ORG = '1000'.
    ORDER_HEADER_IN-DISTR_CHAN = '10'.
    ORDER_HEADER_IN-DIVISION = '00'.
    ORDER_HEADER_IN-SALES_GRP = '130'.
    ORDER_HEADER_IN-SALES_OFF = '1030'.
    APPEND ORDER_HEADER_IN.
    *APPENDING VALUES FOR ITEM
    ORDER_ITEMS_IN-MATERIAL = 'M-13'.
    ORDER_ITEMS_IN-PLANT = '1000'.
    ORDER_ITEMS_IN-SALES_UNIT = 'ST'.
    ORDER_ITEMS_IN-DIVISION = '07'.
    ORDER_ITEMS_IN-GROSS_WGHT = '28000'.
    ORDER_ITEMS_IN-NET_WEIGHT = '28000'.
    ORDER_ITEMS_IN-UNTOF_WGHT = 'KG'.
    ORDER_ITEMS_IN-VOLUME = '0.780'.
    ORDER_ITEMS_IN-VOLUNIT = 'M3'.
    APPEND ORDER_ITEMS_IN.
    *APPENDING VALUES FOR PARTNER
    ORDER_PARTNERS-PARTN_ROLE = 'AG'.
    ORDER_PARTNERS-PARTN_NUMB = '0000001000'.
    ORDER_PARTNERS-COUNTRY = 'DE'.
    ORDER_PARTNERS-TRANSPZONE = 'D000080000'.
    APPEND ORDER_PARTNERS.
    CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT2'
      EXPORTING
    *   SALESDOCUMENTIN               =
        ORDER_HEADER_IN               = ORDER_HEADER_IN
    *   ORDER_HEADER_INX              =
    *   SENDER                        =
    *   BINARY_RELATIONSHIPTYPE       =
    *   INT_NUMBER_ASSIGNMENT         =
    *   BEHAVE_WHEN_ERROR             =
    *   LOGIC_SWITCH                  =
    *   TESTRUN                       =
    *   CONVERT                       = ' '
    IMPORTING
       SALESDOCUMENT                  = SALESDOCUMENT
      TABLES
       RETURN                         = RETURN
       ORDER_ITEMS_IN                 = ORDER_ITEMS_IN
    *   ORDER_ITEMS_INX               =
        ORDER_PARTNERS                = ORDER_PARTNERS
    *   ORDER_SCHEDULES_IN            =
    *   ORDER_SCHEDULES_INX           =
    *   ORDER_CONDITIONS_IN           =
    *   ORDER_CONDITIONS_INX          =
    *   ORDER_CFGS_REF                =
    *   ORDER_CFGS_INST               =
    *   ORDER_CFGS_PART_OF            =
    *   ORDER_CFGS_VALUE              =
    *   ORDER_CFGS_BLOB               =
    *   ORDER_CFGS_VK                 =
    *   ORDER_CFGS_REFINST            =
    *   ORDER_CCARD                   =
    *   ORDER_TEXT                    =
    *   ORDER_KEYS                    =
    *   EXTENSIONIN                   =
    *   PARTNERADDRESSES              =
              IF SY-SUBRC = 0.
              CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
    *           EXPORTING
    *             WAIT          =
    *           IMPORTING
    *             RETURN        =
               ENDIF.
    WRITE : 'SALES ORDER IS :', SALESDOCUMENT.
    This will be very helpful for you .
    this one is the correct answer I have tried it and I am posting it for you.
    Message was edited by: pavan inumarthy

  • How to create a PR for each Maintenance Order

    Dear All,
    Please guide me how to create a PR for each Maintenance Order.
    I test on Ides, I have some Maintenance Orders, all of them require the same stock material. When I run MRP, system always create one PR for all requirements. I don't know how to change.
    Regards,
    QuangDD

    Hi,
    As you planning for Stock Items, by running MRP, system will create single PR only. If it is non stock items, then it would be possible to create different PR based on Orders.
    Regards,
    Maheswaran.

  • How to use i for if condition in a for i in loop?

    Hi friends,
    I have a question on how to use i for IF condition in a loop, in order to get an efficient programming and results. Here is outlined SQL:
    cursor is
    select c1,c2,c3 from table1; -- 100 rows returned.
    open cursor
    loop
    fetch c1,c2,c3 into v1,v2,v3;
    for i in 1..3 loop
    if 'v'||i between 90 and 100 then
    v_grade := 'Excellent';
    elsif 'v'||i between 80 and 89 then
    elsif 'v'||i between 50 and 59 then
    end if;
    end loop;
    close cursor;
    This way, I don't need to use a lot of if..then for hard code v1,v2,v3,.... actually I have more v..
    But Oracle gave an error of this usage of 'if 'v'||i' or 'v'||to_char(i).
    Thanks for any advice in advance!

    user508774 wrote:
    Thanks for comments and advices. But I didn't get your inputs clearly. Are you saying I don't need to use PL/SQL to achieve this?Correct. Ronel and John showed you the basic approaches. SQL is not a mere I/O language for making read and write calls. It is a very capable, flexible and powerful language. One can solve a problem with a few lines of SQL code, that will take 100's of lines of PL/SQL or Java code.
    So do not underestimate what can be done in SQL.
    v_cmd := 'UPDATE parts_categ_counts SET w1='||v1||', w2='||v2||...||v9||' WHERE seq='||vseq||';
    EXECUTE IMMEDIATE v_cmd;This code is also wrong. Besides the fact that there is no need for dynamic SQL, this approach creates a brand new SQL statement each loop iteration.
    SQL is source code. It needs to be parsed (compiled). The end result is an executable program that is called a cursor. This cursor needs to be stored in server memory (the SQL Shared Pool in the SGA).
    The problem with your code is that it is slow and expensive - it generates lots of unique SQL statements that need CPU for parsing and server memory for storage.
    These add up to a very significant performance overhead. That is the wrong approach. The correct approach is the same one that you would use in any other programming language.
    Let's say you need to use Java to process a bunch of CSV files - exact same CSV layout used by each file. A file needs to be read, processed, and a log file created.
    Will you write a Java program that loops through the files, for each file found, write a Java program for processing that file, compile it, then execute it?
    Or would you write a Java program that takes the name of the file as input, and then process that file and writes the log file?
    The 2nd approach provides a program that can process any of those CSV files - one simply needs to pass the filename as an input parameter.
    Your code and approach use the 1st method. Not the 2nd. And that is why it is wrong.
    To create a SQL program with parameters is done by using bind variables. Instead of
    v_cmd := 'UPDATE parts_categ_counts SET w1='||v1||', w2='||v2||...||v9||' WHERE seq='||vseq||';
    The following SQL source code should be created:
    v_cmd := 'UPDATE parts_categ_counts SET w1=:v1, w2=:v2 ..., w9=:v9 WHERE seq= :vseq';
    The tokens with the colon prefix (such as :v1), are bind variables. Think of these as the parameters to the SQL cursor.
    The server parses this SQL into a cursor. You can now execute the same cursor over and over again, using different bind variables. (just like the 2nd approach above that one would use in Java)
    In PL/SQL, this is made even easier as you can code native SQL code with PL/SQL code and use PL/SQL variables in it. The PL/SQL compiler is clever enough to do the SQL parsing, variable binding, and cursor execution for you. So in PL/SQL, you would use:
    UPDATE parts_categ_counts SET w1=v1, w2=v2 ..., w9=v9 WHERE seq= vseq;
    Where v1 and the others are PL/SQL variables.
    That all said - PL/SQL is only used for data crunching, when the processing of data is too complex for the SQL language to deal with. And this is very seldom the case.
    The main reason for using PL/SQL it to provide processing flow control, conditional processing and error handling, for SQL code. As the SQL language does not have these features.

  • How to creat deadlock for the purchase order in SAP Workflow

    How to creat deadlock for the purchase order in SAP Workflow

    Hi Ben,
    Are you using FM "CONVERT_DATE_TO_EXTERNAL" before passing delivery date?  If not, use FM like this, before passing the date to BAPI_PO_CREATE1 and it might work
      DATA: vf_doc_date(10),
                 internal_date TYPE d.
         vf_doc_date = sy-datum.              "Document date.
         internal_date = vf_doc_date.
      CALL FUNCTION 'CONVERT_DATE_TO_EXTERNAL'
        EXPORTING
          date_internal            = internal_date
        IMPORTING
          date_external            = vf_doc_date
        EXCEPTIONS
          date_internal_is_invalid = 1
          OTHERS                   = 2.
    Regards,
    Vivek

  • How to Use BAPI_OUTB_DELIVERY_CHANGE for Batch Split

    Hi Experts, I have the follow delivery:
    Item        Material   Deliv.Qty    Un
    10     739911     2     PQT
    And I want to obtain this:
    Item        Material   Deliv.Qty    Un                            Batch
    10     739911     0     PQT
    900001     739911     1     PQT          ZZ00060
    900002     739911     1     PQT          ZZ00061
    But, after using the Bapi I obtained this:
    Item        Material   Deliv.Qty    Un                            Batch
    10     739911     1,372     PQT
    900001     739911     0,314     PQT          ZZ00060
    900002     739911     0,314     PQT          ZZ00061
    So as you can see the problem is with the "Deliv.Qty". I expected:
    Item        Deliv.Qty
    10            0
    900001     1     
    900002     1     
    But I obtained:
    Item        Deliv.Qty
    10     1,372
    900001     0,314
    900002     0,314
    The parameters that I am using in the Bapi are:
    HEADER_DATA                                   
    DELIV_NUMB = 801174646
    HEADER_CONTROL                                
    DELIV_NUMB = 801174646
    DELIVERY = 801174646
    TECHN_CONTROL
    UPD_IND = U
    ITEM_DATA (three records):   
    DELIV_NUMB = 801174646
    DELIV_ITEM = 000010  
    MATERIAL = 739911  
    FACT_UNIT_NOM = 1   
    FACT_UNIT_DENOM = 1   
    DELIV_NUMB = 801174646  
    DELIV_ITEM = 900001     
    MATERIAL = 739911     
    BATCH = ZZ00060    
    HIERARITEM = 000010     
    USEHIERITM = 1          
    DLV_QTY = 1
    DLV_QTY_IMUNIT = 1
    FACT_UNIT_NOM = 1      
    FACT_UNIT_DENOM = 1      
    DELIV_NUMB = 801174646  
    DELIV_ITEM = 900002     
    MATERIAL = 739911     
    BATCH = ZZ00061    
    HIERARITEM = 000010     
    USEHIERITM = 1          
    DLV_QTY = 1
    DLV_QTY_IMUNIT = 1
    FACT_UNIT_NOM = 1      
    FACT_UNIT_DENOM = 1
    ITEM_CONTROL (three records):
    DELIV_NUMB = 801174646
    DELIV_ITEM = 000010  
    CHG_DELQTY = X
    DELIV_NUMB = 801174646
    DELIV_ITEM = 900001  
    CHG_DELQTY = X
    DELIV_NUMB = 801174646
    DELIV_ITEM = 900002  
    CHG_DELQTY = X
    So I am missing something but I don't know what.
    Can any one help me with this please?
    PD: I have looked the following forums in order to use the Bapi:
    How to Use BAPI_OUTB_DELIVERY_CHANGE for Batch Split
    batch split using BAPI_OUTB_DELIVERY_CHANGE
    Re: Help in BAPI_OUTB_DELIVERY_CHANGE(batch-split)
    BAPI_OUTB_DELIVERY_CHANGE - Batch Splits don't work
    Help for BAPI_OUTB_DELIVERY_CHANGE

    Hey,
    My code is for the inbound delivery but it should work the same.
    Give this a try.
    REPORT  z_delivery_batch_split.
    DATA:header_data  LIKE  bapiibdlvhdrchg,
    header_control  LIKE  bapiibdlvhdrctrlchg,
    delivery  LIKE  bapiibdlvhdrchg-deliv_numb,
    ls_return LIKE bapiret2,
    item_data  TYPE TABLE OF  bapiibdlvitemchg,
    item_control  TYPE TABLE OF bapiibdlvitemctrlchg,
    ls_item_data  LIKE  bapiibdlvitemchg,
    ls_item_control LIKE  bapiibdlvitemctrlchg,
    return TYPE TABLE OF bapiret2 WITH NON-UNIQUE KEY type.
    header_data-deliv_numb = '1800005005'.
    header_control-deliv_numb = '1800005005'.
    delivery = '1800005005'.
    ls_item_data-deliv_numb = '1800005005'.
    ls_item_data-deliv_item = '900001'.
    ls_item_data-material = '000000000020067722'.
    PERFORM create_batch CHANGING ls_item_data-batch.
    ls_item_data-hieraritem = '000010'.
    ls_item_data-usehieritm = '1'.
    ls_item_data-dlv_qty = 80.
    ls_item_data-dlv_qty_imunit = 80.
    ls_item_data-fact_unit_nom = '1'.
    ls_item_data-fact_unit_denom = '1'.
    ls_item_data-sales_unit = 'EA'.
    ls_item_data-base_uom = 'EA'.
    APPEND ls_item_data TO item_data.
    ls_item_data-deliv_numb = '1800005005'.
    ls_item_data-deliv_item = '900002'.
    ls_item_data-material = '000000000020067722'.
    PERFORM create_batch CHANGING ls_item_data-batch.
    ls_item_data-hieraritem = '000010'.
    ls_item_data-usehieritm = '1'.
    ls_item_data-dlv_qty = 60.
    ls_item_data-dlv_qty_imunit = 60.
    ls_item_data-fact_unit_nom = '1'.
    ls_item_data-fact_unit_denom = '1'.
    ls_item_data-sales_unit = 'EA'.
    ls_item_data-base_uom = 'EA'.
    APPEND ls_item_data TO item_data.
    ls_item_control-deliv_numb = '1800005005'.
    ls_item_control-deliv_item = '900001'.
    ls_item_control-chg_delqty = 'X'.
    APPEND ls_item_control TO item_control.
    ls_item_control-deliv_numb = '1800005005'.
    ls_item_control-deliv_item = '900002'.
    ls_item_control-chg_delqty = 'X'.
    APPEND ls_item_control TO item_control.
    break cgavin.
    CALL FUNCTION 'BAPI_INB_DELIVERY_CHANGE'
       EXPORTING
         header_data          = header_data
         header_control       = header_control
         delivery             = delivery
    *   TECHN_CONTROL        = TECHN_CONTROL
       TABLES
    *   HEADER_PARTNER       = HEADER_PARTNER
    *   HEADER_PARTNER_ADDR  = HEADER_PARTNER_ADDR
    *   HEADER_DEADLINES     = HEADER_DEADLINES
         item_data            = item_data
         item_control         = item_control
    *   ITEM_SERIAL_NO       = ITEM_SERIAL_NO
    *   EXTENSION1           = EXTENSION1
    *   EXTENSION2           = EXTENSION2
         return               = return
    *   TOKENREFERENCE       = TOKENREFERENCE
    *   HANDLING_UNIT_HEADER = HANDLING_UNIT_HEADER
    *   HANDLING_UNIT_ITEM   = HANDLING_UNIT_ITEM
    *   PARTIAL_GR_OBJECTS   =          PARTIAL_GR_OBJECTS
    READ TABLE return
    INTO ls_return
    WITH TABLE KEY type = 'E'.
    IF sy-subrc = 0.
       MESSAGE ID ls_return-id TYPE ls_return-type NUMBER ls_return-number WITH ls_return-message_v1 ls_return-message_v2
       ls_return-message_v3 ls_return-message_v4.
    ENDIF.
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
      EXPORTING
        wait          = 'X'.
    break cgavin.
    *&      Form  CREATE_BATCH
    *       text
    *      <--P_LS_ITEM_DATA_BATCH  text
    FORM create_batch  CHANGING p_ls_item_data_batch.
       DATA: ls_bncom TYPE bncom.
       ls_bncom-matnr = ls_item_data-material.
       ls_bncom-werks = 'C333'.
       ls_bncom-lgort = '3000'.
       SELECT SINGLE mtart
         FROM mara
         INTO ls_bncom-mtart
         WHERE matnr = ls_bncom-matnr.
       CALL FUNCTION 'VB_NEXT_BATCH_NUMBER'
         EXPORTING
           matnr                          = ls_bncom-matnr
           werks                          = ls_bncom-werks
           check_batch                    = 'X'
           check_material                 = ''
           message_when_auto              = ' '
           x_bncom                        = ls_bncom
           lock_batch                     = ' '
         IMPORTING
           new_charg                      = p_ls_item_data_batch
         EXCEPTIONS
           no_material                    = 1
           no_plant                       = 2
           material_not_found             = 3
           plant_not_found                = 4
           no_batch_handling              = 5
           batch_exist                    = 6
           no_number                      = 7
           illegal_batch_number           = 8
           interval_not_found             = 9
           object_not_found               = 10
           interval_overflow              = 11
           error_automatic_batch_number   = 12
           cancelled                      = 13
           automatic_batch_num_not_active = 14
           OTHERS                         = 15.
       IF sy-subrc = 0.
         CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
           EXPORTING
             wait = 'X'.
       ENDIF.
    ENDFORM.                    " CREATE_BATCH

  • Create partners for a maintenance order ( IW32 transaction)

    Hello:
    I need create partners for a maintenance order ( IW32 transaction) in a program.
    I'm using IBAPI_ALM_ORDERPARTNER_MAINT but it does not do anything.
    when,in partners data, an error exists, this is returned but when all is correct, bapi does not do anything.
    help me please.
    Thanks's
    REPORT  ZPM_PRUEBA_BAPI_INTER.
    DATA G_PAR TYPE I_PARNR.
    parameters p_aufnr like aufk-aufnr.
    SELECT-OPTIONS: S_PAR FOR G_PAR.
    parameters p_id(2).
    data lv_mens(255)   TYPE c.
    data: BEGIN OF lt_partner OCCURS 0.
            INCLUDE STRUCTURE BAPI_ALM_ORDER_PARTNER.
    data: end of lt_partner.
    data: BEGIN OF lt_partner_UP OCCURS 0.
            INCLUDE STRUCTURE BAPI_ALM_ORDER_PARTNER_UP.
    data: end of lt_partner_UP.
    DATA: BEGIN OF LT_ERR_COM.
           INCLUDE STRUCTURE BAPIRET2.
    DATA      END OF  LT_ERR_COM.
    *data begin of lt_errors occurs 0.
    *       include structure BAL_S_MSG.
    *data end of lt_errors.
    data: lt_errors type standard table of BAL_S_MSG with header line.
    start-of-selection.
      lt_partner-PARTN_ROLE = p_id.
    *  lt_partner_UP
      LOOP AT S_PAR.
        lt_partner-PARTNER = S_PAR-LOW.
        APPEND lt_partner.
      ENDLOOP.
    *1038062
      CALL FUNCTION 'IBAPI_ALM_ORDERPARTNER_MAINT'
        EXPORTING
          IV_ORDERID                           = p_aufnr
    * IMPORTING
    *   EV_CREDITLIMIT_CHECK_NECESSARY       =
      TABLES
        IT_PARTNER                           = lt_partner
    *   IT_PARTNER_UP                        =
    *   ET_PARTNER                            =
          ERRORS                               = lt_errors
      CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
    EXPORTING
       WAIT          = 'X'
    IMPORTING
       RETURN        = LT_ERR_COM
      loop at  lt_errors.
    *    write: /2 lt_errors-MSGV1,lt_errors-MSGV2,lt_errors-MSGV3,lt_errors-MSGV4.
           CALL FUNCTION 'FORMAT_MESSAGE'
          EXPORTING
            ID              = lt_errors-msgid
    *           LANG            = '-D'
            NO              = lt_errors-MSGNO
            V1              = lt_errors-msgv1
            V2              = lt_errors-msgv2
            V3              = lt_errors-msgv3
            V4              = lt_errors-msgv4
          IMPORTING
            MSG             = lv_mens
          EXCEPTIONS
            NOT_FOUND       = 1
            OTHERS          = 2.
         WRITE lv_mens
      endloop         .

    Hi,
    First, you can/should not use the FM IBAPI_ALM_ORDERPARTNER_MAINT. This FM is part of the service order BAPI called BAPI_ALM_ORDER_MAINTAIN and this is the correct FM to call for your requirement.
    A released BAPI by SAP will "survive" any upgrade. This is certainly not true for the mentioned FM IBAPI_ALM_ORDERPARTNER_MAINT, for instance.
    Please read the documentation for FM BAPI_ALM_ORDER_MAINTAIN either from SE37 (use language EN) or from transaction BAPI. There are sections for partner handling there (you must fill both the IT_PARTNER and the IT_PARTNER_UP tables for instance.
    This thread here on SDN will be of interest for solving your problem: Re: Deleting partner with BAPI_ALM_ORDER_MAINTAIN does not work
    If you find this answer of help then award some points so others can benefit from the answer as well.
    Best regards, Johan

  • Create partners for a maintenance order

    Hello:
    I need create partners for a maintenance order ( IW32 transaction) in a program.
    I'm using IBAPI_ALM_ORDERPARTNER_MAINT but it does  not do  anything.
    when,in partners data, an error  exists, this is returned but when all is correct, bapi does not do anything.
    REPORT  ZPM_PRUEBA_BAPI_INTER.
    DATA G_PAR TYPE I_PARNR.
    parameters p_aufnr like aufk-aufnr.
    SELECT-OPTIONS: S_PAR FOR G_PAR.
    parameters p_id(2).
    data lv_mens(255)   TYPE c.
    data: BEGIN OF lt_partner OCCURS 0.
            INCLUDE STRUCTURE BAPI_ALM_ORDER_PARTNER.
    data: end of lt_partner.
    data: BEGIN OF lt_partner_UP OCCURS 0.
            INCLUDE STRUCTURE BAPI_ALM_ORDER_PARTNER_UP.
    data: end of lt_partner_UP.
    DATA: BEGIN OF LT_ERR_COM.
           INCLUDE STRUCTURE BAPIRET2.
    DATA      END OF  LT_ERR_COM.
    *data begin of lt_errors occurs 0.
    *       include structure BAL_S_MSG.
    *data end of lt_errors.
    data: lt_errors type standard table of BAL_S_MSG with header line.
    start-of-selection.
      lt_partner-PARTN_ROLE = p_id.
    *  lt_partner_UP
      LOOP AT S_PAR.
        lt_partner-PARTNER = S_PAR-LOW.
        APPEND lt_partner.
      ENDLOOP.
    *1038062
      CALL FUNCTION 'IBAPI_ALM_ORDERPARTNER_MAINT'
        EXPORTING
          IV_ORDERID                           = p_aufnr
    * IMPORTING
    *   EV_CREDITLIMIT_CHECK_NECESSARY       =
      TABLES
        IT_PARTNER                           = lt_partner
    *   IT_PARTNER_UP                        =
    *   ET_PARTNER                            =
          ERRORS                               = lt_errors
      CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
    EXPORTING
       WAIT          = 'X'
    IMPORTING
       RETURN        = LT_ERR_COM
      loop at  lt_errors.
    *    write: /2 lt_errors-MSGV1,lt_errors-MSGV2,lt_errors-MSGV3,lt_errors-MSGV4.
           CALL FUNCTION 'FORMAT_MESSAGE'
          EXPORTING
            ID              = lt_errors-msgid
    *           LANG            = '-D'
            NO              = lt_errors-MSGNO
            V1              = lt_errors-msgv1
            V2              = lt_errors-msgv2
            V3              = lt_errors-msgv3
            V4              = lt_errors-msgv4
          IMPORTING
            MSG             = lv_mens
          EXCEPTIONS
            NOT_FOUND       = 1
            OTHERS          = 2.
         WRITE lv_mens
      endloop         .
    help me please.
    Thanks's

    Hi,
    First, you can/should not use the FM IBAPI_ALM_ORDERPARTNER_MAINT. This FM is part of the service order BAPI called BAPI_ALM_ORDER_MAINTAIN and this is the correct FM to call for your requirement.
    A released BAPI by SAP will "survive" any upgrade. This is certainly not true for the mentioned FM IBAPI_ALM_ORDERPARTNER_MAINT, for instance.
    Please read the documentation for FM BAPI_ALM_ORDER_MAINTAIN either from SE37 (use language EN) or from transaction BAPI. There are sections for partner handling there (you must fill both the IT_PARTNER and the IT_PARTNER_UP tables for instance.
    This thread here on SDN will be of interest for solving your problem: Re: Deleting partner with BAPI_ALM_ORDER_MAINTAIN does not work
    If you find this answer of help then award some points so others can benefit from the answer as well.
    Best regards, Johan

  • How to extract TEXT for archived Purchase Orders ?

    Hi Friends,
    Can any one tell me how to extract TEXT for archived Purchase Orders ?
    I have used READ_TEXT but that is not fetching texts for archived PO's. Whenever I am trying to fetch data from STXH against archived PO, no value is coming and resulting SY_SUBRC <> 0.
    Any demo code will be highly appreciated.
    Thanks in advance..
    Sivaji

    Hi,
    You can see that table STXH is linked to archiving object MM_EKKO (you can see it in tcode DB15).
    My suggest is that you must get the data. See the demo object BC_SBOOK in tcode AOBJ. You can see the report to reload data. The object is get the data in an internal table. So for report SBOOKR you can see this function module:
    *   get data records from the data container
    *   SBOOK
        CALL FUNCTION 'ARCHIVE_GET_TABLE'
          EXPORTING
            archive_handle        = lv_handle
            record_structure      = 'SBOOK'
            all_records_of_object = 'X'
          TABLES
            table                 = lt_sbook_tmp
          EXCEPTIONS
            end_of_object         = 0.         "not entries of this type
    *   check lt_sbook_tmp entries against selections. Delete not
    *   requested entries
        LOOP AT lt_sbook_tmp ASSIGNING <ls_sbook>
                             WHERE carrid IN s_carrid
                               AND connid IN s_connid
                               AND fldate IN s_fldate.
          APPEND <ls_sbook> TO lt_sbook.
        ENDLOOP.
        REFRESH lt_sbook_tmp.
    The idea is that you get the same data that you handle in READ_TEXT (because you don't have the data in database) and recovery the text.
    I hope this helps you
    REgards
    Eduardo

  • 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

  • How to create transaction for a maintenance view, Thank you.

    How to create transaction for a maintenance view,
    Thank you.
    deniz...

    Hi Deniz,
    Go to se93.
    Then create the new T.code.
    Under that select parameter Transaction.
    Then give the sm30 in the t.code in default values tab.
    check the checkbox skip initial screen.
    in classification tab.
    click checkbox inherit gui attributes..
    Now below..
    In the default values..
    select
    viewname and give ur table name.
    UPDATE= Xsave
    view - table name ( Should be upper case
    update X ( should be upper case).
    http://www.sap-basis-abap.com/sapbs011.htm
    Hope this helps you.
    Regards,
    Viveks

  • How to Use 'uid' for AD Users Without Domain Name For User Log in OAM

    How to Use 'uid' for synchronized Active Directory (AD) Users into Oracle Internet Directory (OID) Without Domain Name For User Logins in OIDDAS and OAM
    We successfully integrated OAM 11g with EBS R12.1.3 Now all the AD user id's stored in fnd_users table as [email protected]
    How can we remove @abc.com
    We are using OID 11g and OAM 11g
    Found the similar note for OID 10G: How to Use 'uid' for AD Users Without Domain Name For User Logins in OIDDAS and SSO [ID 580480.1]
    We are in OID 11g.
    Any help on this greatly appreciated.

    I couldn't find any reference that could be helpful -- Please log a SR and see if this is supported and if the steps are available.
    Thanks,
    Hussein

  • How to use webcam for Yahoo Messenger on MacBook Pro, How to use webcam for Yahoo Messenger on MacBook Pro

    How to use webcam for Yahoo Messenger on MacBook Pro, How to use webcam for Yahoo Messenger on MacBook Pro because it's not working =(

    The cheap & easy way is to just drag the app to the Trash.
    If you want to get all of the associated files use an app deleting app like the free AppCleaner;
    http://www.freemacsoft.net/appcleaner/
    Just drag an app and drop it on the AppCleaner icon in the Dock and it will find and present to you all the files it thinks are associated with the app. You can uncheck any that you want to keep and then let AppCleaner Trash the rest.

  • Origin Object Type for Plant Maintenance Orders in Profit Center Accounting

    Hi,
    I want to make a selection for plant maintenance orders in transaction KE5Z, report for line items in Profit Center Accounting. When checking possible input options for the selection field <b></b>Origing Object Type<b></b> the system shows value 15 for Maintenance Orders. However I discovered in our system the maintenance orders are reported as Origing Object Type 03, which is Overhead Orders according to the selection list. So I cannot distinguish between overhead orders and maintenance orders in this report.
    What is the cause our maintenance orders are assigned to Origin Object Type 03 in stead of 15 and what is the customizing transaction to correct this ?

    Looks like, this is no longer supported. Refer to note 168004 and  102434.
    Cause and prerequisites
    These functions were not programmed to meet the above requirements.
    As of Release 4.0, the object type is transferred directly.
    Solution
    Once you have implemented the advance correction. the origin object type 'Overhead cost order' (03) is assigned irrespective of what is the SCOPE for orders.
    As a result of implementing this note or as of Release 4.6B, the order category distinguishes between overhead cost orders and production orders in the origin object type. In this case, the following origin object types result (as described above in 1.):
    Order category 04 to 10, 40 => 04 (production order)
    All other order categories => 03 (overhead cost order)
    The logic that the origin object type was set depending on the object class (as described above in 2.) is no longer supported. The object class can be evaluated separately in Reporting. -
    The corrections of this note refer in Release 4.0B to the corrections from Note 102434.

  • 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

  • How to add "%" symobl in Bex query?

    Hello All, In a Bex query, there is one structure with 3 elements as Rows. I have to show the resultant values in a specified format... in the first row, the values are to be suffixed with character "K" and the remaining 2 rows values are suffixed wi

  • Is there a way to change the default image save to .jpg rather than.bmp?

    Currently the default save is a .bmp file.  I do not see a way to change this in the <edit> <preferences> area.  Also is there a way to export/save a designated area on a pdf as a .jpg image file rather than the options given: Word, Exel, Powerpoint,

  • Display a register in a function

    Hi, I have a PL/SQL function compiled succesfully, but it doesn't works as I wish, and I don't know why. So I tried to display a register of a table but there are errors. Here is the code: create or replace PACKAGE BODY "SML_ACUMULADOS" as -- Para qu

  • Check Printing - PDF displays fine, Printer prints PS Code

    We are using XML Publisher 5.6.2 to build the check printing program. The template is working fine and we are able to see the checks with MICR thru the request output ( as PDF ). Now, we need to print these checks directly to the printer and as per t

  • File--XI--R/3 Create PO

    Hi Friends, Iam working on a scenario where Iam sending a .xml file to XI which contains the required data to create a PO in R/3 like (DocType, PurchasingGroup, PurchasingOrg, CompCode, Plant, StorageLoc, VendorCode, MatNumber, Price...). I mapped th