on 03-30-2006 8:29 AM
Hi everone,
I try to modify field "Usage" in tab Pricing, but at level of Item, not al level of Header.
It's that possible?? and how??
Thanks.
Finally I do it:
In BAdI: IF_EX_ORDER_SAVE~PREPARE
move iv_guid to l_wa_header_guid.
append l_wa_header_guid to l_it_header_guid.
call function 'CRM_ORDER_READ'
exporting
it_header_guid = l_it_header_guid
importing
et_orderadm_h = l_it_orderadm_h
et_orderadm_i = l_it_orderadm_i
et_doc_flow = l_it_doc_flow
CHANGING
CV_LOG_HANDLE =
exceptions
document_not_found = 1
error_occurred = 2
document_locked = 3
no_change_authority = 4
no_display_authority = 5
no_change_allowed = 6
others = 7
.
if sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
loop at l_it_orderadm_i into l_wa_orderadm_i.
l_wa_sales-ref_guid = l_wa_orderadm_i-guid.
l_wa_sales-usage_type = c_usage_type. "'PRM'.
l_wa_sales-ref_kind = c_ref_kind. "'B'.
append l_wa_sales to l_it_sales.
clear l_wa_sales.
clear l_wa_input_fields.
l_wa_input_fields-ref_guid = l_wa_orderadm_i-guid.
l_wa_input_fields-objectname = c_objectname. "'SALES'.
l_wa_input_fields-ref_kind = c_ref_kind. "'B'.
l_wa_field_names-fieldname = c_fieldname. "'USAGE_TYPE'.
append l_wa_field_names to l_it_field_names.
l_wa_input_fields-field_names[] = l_it_field_names[].
append l_wa_input_fields to l_it_input_fields.
endloop.
call function 'CRM_ORDER_MAINTAIN'
exporting
it_sales = l_it_sales
changing
ct_input_fields = l_it_input_fields
exceptions
error_occurred = 1
document_locked = 2
no_change_allowed = 3
no_authority = 4
others = 5.
if sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
5 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.