Skip to Content
author's profile photo Former Member
Former Member

Using bapi_ALM_order_maintain some fields are not getting updated while creating service ordet

Hi Experts,

Can any one plz help me to rectify below issue

Using BAPI_ALM_ORDER_MAINTAIN

some like accounting indicator,service product,quantity,priority are not getting updated while creating service ...we also done customization to auto create notification while creating servive order...

Service order is getting created .

For bapi

I'm passing above mentioned also in header

And headersrv

ThanK's &regards,

Ganga

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Jan 13, 2016 at 04:36 AM

    Hi,

    This is the code i'm using to create service order, below are the fields are not getting updated in service order.

    calc_motive = '41'.

    material = 'ISS_SR-1'.

    quantity = '1'.

    wbs_elem = 00033296.

    finish_date = '20151218'.

    start_date = '20151218'.

    priority = '3'.

    CONSTANTS:

    y_lk_header TYPE char6 VALUE 'HEADER',

    y_lk_create TYPE char6 VALUE 'CREATE',

    y_lk_text TYPE char4 VALUE 'TEXT',

    y_lk_partner TYPE char7 VALUE 'PARTNER',

    y_lk_operation TYPE char9 VALUE 'OPERATION',

    y_lk_save TYPE char4 VALUE 'SAVE',

    y_lk_objkey TYPE char12 VALUE '%00000000001',

    y_lk_000001 TYPE char6 VALUE '000001',

    y_lk_space TYPE char1 VALUE '',

    y_lk_ag TYPE char2 VALUE 'AG',

    y_lk_sh TYPE char2 VALUE 'WE',

    y_lk_zl TYPE char2 VALUE 'ZL',

    *populating method table for Header

    y_lwa_methods-refnumber = y_lk_000001.

    y_lwa_methods-objecttype = y_lk_header.

    y_lwa_methods-method = y_lk_create.

    y_lwa_methods-objectkey = y_lk_objkey.

    APPEND y_lwa_methods TO y_li_methods.

    CLEAR y_lwa_methods.

    *populating method table for save

    y_lwa_methods-refnumber = '000000'.

    y_lwa_methods-objecttype = y_lk_space.

    y_lwa_methods-method = y_lk_save.

    y_lwa_methods-objectkey = y_lk_space.

    APPEND y_lwa_methods TO y_li_methods.

    CLEAR y_lwa_methods.

    y_lwa_header-planplant = y_lv_plant.

    y_lwa_header-plant = y_lv_plant.

    y_lwa_header-mn_wk_ctr = 'WCS01'.

    y_lwa_header-wbs_elem = 00033296.

    y_lwa_header-finish_date = '20151218'.

    y_lwa_header-start_date = '20151218'.

    y_lwa_header-priority = '3'.

    y_lwa_header-order_type = 'ZS01'.

    y_lwa_header-calc_motive = '41'.

    y_lwa_header_srv-material = 'ISS_SR-1'.

    y_lwa_header_srv-quantity = '1'.

    y_lwa_header_up-calc_motive = 'X'.

    y_lwa_header_srv_up-material = 'X'.

    y_lwa_header_srv_up-quantity = 'X'.

    y_lwa_header_up-wbs_elem = 'X'.

    y_lwa_partner-orderid = y_lk_objkey.

    y_lwa_partner-partn_role = y_lk_ag.

    y_lwa_partner-partner = '384'.

    APPEND y_lwa_partner TO y_li_partner.

    CLEAR y_lwa_partner.

    y_lwa_partner-orderid = y_lk_objkey.

    y_lwa_partner-partn_role = y_lk_sh.

    y_lwa_partner-partner = '384'.

    APPEND y_lwa_partner TO y_li_partner.

    CLEAR y_lwa_partner.

    y_lwa_methods-refnumber = y_lk_000001.

    y_lwa_methods-objecttype = y_lk_partner.

    y_lwa_methods-method = y_lk_create.

    y_lwa_methods-objectkey = y_lk_objkey.

    APPEND y_lwa_methods TO y_li_methods.

    CLEAR y_lwa_methods.

    *Populating for operation table

    y_lwa_operation-activity = '0010'.

    y_lwa_operation-control_key = 'ZSM1'.

    y_lwa_operation-acttype = 'CS0001'.

    y_lwa_operation-description = 'Operation text'.

    y_lwa_operation-plant = 'WCS01'.

    APPEND y_lwa_operation TO y_li_operation.

    CLEAR y_lwa_operation.

    *populating method table for operation

    y_lwa_methods-refnumber = y_lk_000001.

    y_lwa_methods-objecttype = y_lk_operation.

    y_lwa_methods-method = y_lk_create.

    y_lwa_methods-objectkey = y_lk_objkey.

    APPEND y_lwa_methods TO y_li_methods.

    CLEAR y_lwa_methods.

    APPEND y_lwa_header TO y_li_header.

    APPEND y_lwa_header_up TO y_li_header_up.

    CLEAR: y_lwa_header,y_lwa_header_up.

    APPEND y_lwa_header_srv TO y_li_header_srv.

    CLEAR y_lwa_header_srv.

    CALL FUNCTION 'BAPI_ALM_ORDER_MAINTAIN'

    TABLES

    it_methods = y_li_methods

    it_header = y_li_header

    * it_header_up = y_li_header_up

    it_header_srv = y_li_header_srv

    * it_header_srv_up = y_li_header_srv_up

    it_partner = y_li_partner

    * it_partner_up = y_li_partner_up

    it_operation = y_li_operation

    * it_operation_up = y_li_operation_up

    return = y_li_return

    et_numbers = y_li_numbers.

    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'

    EXPORTING

    wait = 'X'.


    Untitled.png (87.2 kB)
    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.