‎2014 Oct 24 7:53 AM
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
‎2014 Oct 24 7:56 AM
‎2014 Oct 24 7:56 AM
hi
that looks like a customizing issue, not a developpment
regards
Fred
‎2014 Oct 24 7:58 AM
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
‎2014 Oct 24 8:16 AM
You could try, but ask functional, developer are not often masters of Customizing...
Seems there is a difference for Material Group
Regards,
Raymond
PS: Is "where can I will" a revealing slip ?
‎2014 Oct 24 9:32 AM
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
‎2014 Oct 24 9:50 AM
‎2014 Oct 24 11:49 AM
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
‎2014 Nov 03 10:22 AM
‎2014 Nov 04 10:27 AM
‎2016 Sep 20 10:40 AM