Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Error by using bapi BAPI_ALM_ORDER_MAINTAIN

Former Member
0 Likes
2,752

Hi,

Am tyring to upadte the data at tcode /isdfps/lmfl02.(For operations & service lines)

For operations, Its updating successfully But for service lines its prompting below error:

E SRV 007 "The field MATL_GROUP is customised as Hidden mode"     MATL_GROUP

Hence request you to suggest me how to overcome on this.

Thank u in advance.

Below is the code for reference:

   clear wa_methods.
  wa_methods-refnumber = '000001'.
  wa_methods-objecttype = 'HEADER'.
*  wa_methods-method = 'CREATE'.
   wa_methods-method = 'CHANGE'.
  wa_methods-objectkey = '000008000141'.
  append wa_methods to it_methods. clear wa_methods.

*-- Operation Mapping
  wa_methods-refnumber = '000001'. " Operation-1
  wa_methods-objecttype = 'OPERATION'.
*  wa_methods-method = 'CREATE'.
   wa_methods-method = 'CHANGE'.
  concatenate '000008000141' '0010'  into wa_methods-objectkey.
  append wa_methods to it_methods. clear wa_methods.

*----serviceline
   wa_methods-refnumber = '000001'. " Operation-1
   wa_methods-objecttype = 'SERVICELINE'.
*   wa_methods-method = 'DIALOG'.
   wa_methods-method = 'CREATE'.
*  concatenate '000008000121' '0010'  into wa_methods-objectkey.
  concatenate '000008000141' '0010'  into wa_methods-objectkey.
  append wa_methods to it_methods. clear wa_methods.

  wa_methods-refnumber = '000001'.
  wa_methods-objecttype = ''.
  wa_methods-method = 'SAVE'.
  wa_methods-objectkey = '000008000141'.
  append wa_methods to it_methods. clear wa_methods.

*release
   wa_methods-refnumber = '000001'.
   wa_methods-objecttype = 'HEADER'.
*  wa_methods-method = 'CREATE'.
   wa_methods-method = 'RELEASE'.
   wa_methods-objectkey = '000008000141'.
  append wa_methods to it_methods. clear wa_methods.

*-- Header Mapping
  clear wa_header.
  wa_header-orderid = '000008000141'.
  wa_header-order_type = 'FL01'.   " order type
  wa_header-planplant = 'CX01'.     " plant
  wa_header-mn_wk_ctr = 'CX-FLODR'.    " work center
wa_header-START_DATE = '20141017'. "17.10.2014
  wa_header-BASICSTART = sy-uzeit.
  wa_header-short_text  = 'XYZ'. "short text value
  append wa_header to it_header. clear wa_header.

  clear wa_operation.
  wa_operation-activity = '0010'.
  wa_operation-control_key = 'PM03'.
  wa_operation-WORK_CNTR = 'CX-FLODR'.
  wa_operation-PLANT = 'CX01'.
  wa_operation-DESCRIPTION = 'WXYZ'.
  wa_operation-MATL_GROUP = '008003'.
  append wa_operation to it_operation. clear wa_operation.

clear wa_SERVICELINES.
wa_SERVICELINES-ACTIVITY = '0010' .
wa_SERVICELINES-OUTLINE =  '0000000001'.
wa_SERVICELINES-SRV_LINE = '0000000010'.
wa_SERVICELINES-SERVICE =  '000000000003000006'.
wa_SERVICELINES-SHORT_TEXT = 'Landing Service BR'.
wa_SERVICELINES-USERF1_TXT = 'WXYZ'.
wa_SERVICELINES-QUANTITY   = '3'.
wa_SERVICELINES-GROSS_PRICE = '1.00'.
wa_SERVICELINES-MATL_GROUP = '008003'.

append wa_SERVICELINES to it_SERVICELINES.

  refresh return.
  call function 'BAPI_ALM_ORDER_MAINTAIN'
    TABLES
      it_methods       = it_methods
      it_header        = it_header
      it_header_up     = it_header_up
      it_header_srv    = it_header_srv
      it_header_srv_up = it_header_srv_up
      it_userstatus    = it_userstatus
*      it_partner       = it_partner
*      it_partner_up    = it_partner_up
      it_operation     = it_operation
      it_operation_up  = it_operation_up
      it_relation      = it_relation
      it_relation_up   = it_relation_up
      it_component     = it_component
      it_component_up  = it_component_up
      it_text          = it_text
      it_text_lines    = it_text_lines
      extension_in     = extension_in
      return           = return
      et_numbers       = et_numbers
      IT_SERVICELINES  = IT_SERVICELINES.

  loop at return into wa_return.
  endloop.
  skip.
  loop at et_numbers into wa_numbers.
    createdorder = wa_numbers-aufnr_new.
    exit.
  endloop.

  call function 'BAPI_TRANSACTION_COMMIT'
    EXPORTING
      wait = 'X'.

  CALL FUNCTION 'DEQUEUE_ALL'
    EXPORTING
      _SYNCHRON = 'X'.
  commit work and wait.

************************

am getting above error message in return iTAB.

Please help me to solve this error.

BR,

Shabas

10 REPLIES 10
Read only

Former Member
0 Likes
1,708

Could Anyone help me on this.

Read only

FredericGirod
Active Contributor
0 Likes
1,708

hi

that looks like a customizing issue, not a developpment

regards

Fred

Read only

0 Likes
1,708

Hi Frédéric,

Thank you for prompt response.

Could you please suggest me where can I will do this customizing changes.

Thank u in advance.

BR,

Shabs


Read only

0 Likes
1,708

You could try, but ask functional, developer are not often masters of Customizing...

  • Enter transaction SPRO.
    • Select Maintenance and Service Processing
      • Select Define Field Selection for Order Operation (PM and CS)
      • Select Define Field Selection for Components (PM and CS)

    Seems there is a difference for Material Group

    Regards,

    Raymond

    PS: Is "where can I will" a revealing slip ?

    Read only

    0 Likes
    1,708

    Raymond,

    Thank you for your reply.

    Am getting the error like "The field MATL_GROUP is customised as Hidden mode".

    But I hav checked in configration, It not showing in hidden mode.

    How can we overcome this issue.

    Please suggest.

    Br,
    Shabas

    Read only

    0 Likes
    1,708

    Try to execute same operation with IW32 (*) if that is not possible, ask functional to revise his requirement.

    Regards,

    Raymond

    (*) add an external service PM03 item to an existing order operation list and check field material group, is input allowed ?

    Read only

    0 Likes
    1,708

    Raymond,

    Thank you for your response.

    Now am able to update the service line details as well. But mutliple service line items are not populating. Below is the code for the same.

    Request you to suggest me how to upload multiple service line entries under one operation entry.

    Code:

       clear wa_methods.
      wa_methods-refnumber = '000001'.
      wa_methods-objecttype = 'HEADER'.
    *  wa_methods-method = 'CREATE'.
       wa_methods-method = 'CHANGE'.
      wa_methods-objectkey = '000008000148'.
      append wa_methods to it_methods. clear wa_methods.

    *-- Operation Mapping
      wa_methods-refnumber = '000001'. " Operation-1
      wa_methods-objecttype = 'OPERATION'.
    *  wa_methods-method = 'CREATE'.
       wa_methods-method = 'CHANGE'.
      concatenate '000008000148' '0010'  into wa_methods-objectkey.
      append wa_methods to it_methods. clear wa_methods.

    *----serviceline first entry
       wa_methods-refnumber = '000001'. " Operation-1
       wa_methods-objecttype = 'SERVICELINE'.
       wa_methods-method = 'CREATE'.
      concatenate '000008000148' '0010'  into wa_methods-objectkey.
      append wa_methods to it_methods. clear wa_methods.

    **service line 2 entry

       wa_methods-refnumber = '000002'. " Operation-1

       wa_methods-objecttype = 'SERVICELINE'.

    *   wa_methods-method = 'DIALOG'.

       wa_methods-method = 'CREATE'.

      concatenate '000008000148' '0020'  into wa_methods-objectkey.

      append wa_methods to it_methods. clear wa_methods.

    clear wa_SERVICELINES.
    wa_SERVICELINES-ACTIVITY = '0010' .
    wa_SERVICELINES-OUTLINE =  '0000000001'.
    wa_SERVICELINES-SRV_LINE = '0000000010'.
    wa_SERVICELINES-SERVICE =  '000000000003000006'.
    wa_SERVICELINES-SHORT_TEXT = 'Landing Service BR'.
    *wa_SERVICELINES-USERF1_TXT = 'WXYZ'.
    wa_SERVICELINES-QUANTITY   = '3'.
    wa_SERVICELINES-GROSS_PRICE = '1.00'.
    wa_SERVICELINES-NET_PRICE = '1.00'.
    *wa_SERVICELINES-MATL_GROUP = '008003'.
    append wa_SERVIELINES to it_SERVICELINES.

    clear wa_SERVICELINES.
    wa_SERVICELINES-ACTIVITY = '0020' .
    wa_SERVICELINES-OUTLINE =  '0000000001'.
    wa_SERVICELINES-SRV_LINE = '0000000010'.
    wa_SERVICELINES-SERVICE =  '000000000003000006'.
    wa_SERVICELINES-SHORT_TEXT = 'Landing Service BR'.
    wa_SERVICELINES-QUANTITY   = '3'.
    wa_SERVICELINES-GROSS_PRICE = '1.00'.
    wa_SERVICELINES-NET_PRICE = '1.00'.
    append wa_SERVICELINES to it_SERVICELINES.

       refresh return.
      call function 'BAPI_ALM_ORDER_MAINTAIN'
        TABLES
          it_methods       = it_methods
          it_header        = it_header
          it_header_up     = it_header_up
          it_header_srv    = it_header_srv
          it_header_srv_up = it_header_srv_up
          it_userstatus    = it_userstatus
    *      it_partner       = it_partner
    *      it_partner_up    = it_partner_up
          it_operation     = it_operation
          it_operation_up  = it_operation_up
          it_relation      = it_relation
          it_relation_up   = it_relation_up
          it_component     = it_component
          it_component_up  = it_component_up
          it_text          = it_text
          it_text_lines    = it_text_lines
          extension_in     = extension_in
          return           = return
          et_numbers       = et_numbers
          IT_SERVICELINES  = IT_SERVICELINES.


      loop at return into wa_return.
      endloop.
      skip.
      loop at et_numbers into wa_numbers.
        createdorder = wa_numbers-aufnr_new.
        exit.
      endloop.

      call function 'BAPI_TRANSACTION_COMMIT'
        EXPORTING
          wait = 'X'.

        CALL FUNCTION 'DEQUEUE_ALL'
        EXPORTING
          _SYNCHRON = 'X'.
      commit work and wait.


    Thank u in advance.

    BR,

    shabas

    Read only

    0 Likes
    1,708

    Hi,

    Could anyone help me on this. please

    BR,

    Shabas

    Read only

    0 Likes
    1,708

    Hi,

    Could anyone help me on this. please

    BR,

    Shab

    Read only

    0 Likes
    1,708

    Any updates on this issue? I am having the same issue.