Can we change pricing date for line item in billing
Hi Expert,
Can we change pricing date , while raising inoice for particular line iteam
Hi,
We can not change the pricing date for perticular line item at billing document level, the only option is we can enter the required date at the time of invoice creation in VF01 screen.
If your requirement is copying the same pricing date that is entered at sales order, then do the following.
Go to T Code:VTFL and choose your DElivery Type and Billing Type, then choose your item category and then change the pricing type as 'D' .
Regards,
Pasapula.
Similar Messages
-
Can we see costing value for line item batch in Batch Information Cokcpit r
Can we see costing value for line item batch in Batch Information Cokcpit report - BMBC?
Business like to see standard cost/ item and extended cost which should be qty in inventory * standard cost.
Help appreciated.
Edited by: Tom_Eric on Jan 13, 2012 2:33 AMHI.
YES it is passible.
If the GL is activated line item display check box is active then we can able to see the data as per line items.
T<Code. Fbl5n
Thanks.
Vasu
Edited by: Vasu Enaguthi on Apr 7, 2010 8:46 AM -
Change Pricing Condition for an item with CRM_ORDER_MAINTAIN
Hi community,
I try to change an existing condition with the function module crm_order_maintain.
Everything looks fine, no error no dump, but no success
The condition stays the same!
Can anybody find a solution for this?
Heres my report so far:
*& Report ZTEST_PRICING2
REPORT ztest_pricing2.
DATA: lt_guid TYPE crmt_object_guid_tab,
lt_item TYPE crmt_object_guid_tab,
lt_saved TYPE crmt_return_objects,
lt_pridoc TYPE crmt_pric_cond_t,
ls_pridoc TYPE crmt_pric_cond,
lt_pricom TYPE crmt_pridoc_comt,
ls_pricom TYPE crmt_pridoc_com,
lt_header TYPE crmt_orderadm_h_comt,
lt_input TYPE crmt_input_field_tab,
ls_input TYPE crmt_input_field,
ls_input_fn TYPE CRMT_INPUT_FIELD_NAMES,
ls_cond_chg TYPE prct_cond_external_change,
ls_cond TYPE PRCT_COND_DU,
lt_pricing_i TYPE CRMT_PRICING_I_WRKT.
PARAMETERS: lv_head TYPE crmt_object_guid DEFAULT 'C4C61C4E35DDF306E10000000A024089'.
PARAMETERS: lv_item TYPE crmt_object_guid DEFAULT '09C71C4E35DDF306E10000000A024089'.
PARAMETERS: lv_kbetr TYPE prct_cond_rate DEFAULT '100'.
INSERT lv_head INTO TABLE lt_guid.
INSERT lv_item INTO TABLE lt_item.
CALL FUNCTION 'CRM_ORDER_READ'
EXPORTING
it_header_guid = lt_guid
it_item_guid = lt_item
* IV_MODE =
* IV_ONLY_SPEC_ITEMS =
* IT_REQUESTED_OBJECTS =
* IV_NO_AUTH_CHECK =
* IT_ITEM_USAGE_RANGE =
* IV_SUBITEM_DEPTH = -1
* IT_OBJECT_FILTER =
* IV_ONLY_CHANGED_OBJ = FALSE
* IV_STATUS_H_CHECK_RELEVANCE = FALSE
IMPORTING
et_pridoc = lt_pridoc
et_pricing_i = lt_pricing_i
* 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 AND lt_pridoc IS NOT INITIAL.
WRITE: / 'ERROR'.
EXIT.
ENDIF.
READ TABLE lt_pridoc INDEX 1 INTO ls_pridoc.
IF sy-subrc <> 0.
WRITE: / 'ERROR'.
EXIT.
ENDIF.
READ TABLE ls_pridoc-pric_cond INTO ls_cond WITH KEY kschl = 'PB00'.
IF sy-subrc <> 0.
WRITE: / 'ERROR'.
EXIT.
ENDIF.
ls_input-ref_guid = lv_head.
ls_input-ref_kind = 'A'.
ls_input-objectname = 'PRIDOC'.
ls_input_fn-fieldname = 'WAERS'.
INSERT ls_input_fn INTO TABLE ls_input-field_names.
ls_input_fn-fieldname = 'KBETR'.
INSERT ls_input_fn INTO TABLE ls_input-field_names.
INSERT ls_input INTO TABLE lt_input.
ls_pricom-ref_guid = lv_head.
ls_pricom-ref_kind = 'A'.
*ls_pricom-PRICING_TYPE = 'B'.
*ls_pricom-pricing_procedure = 'ZZMTA'.
ls_pricom-pric_cond[] = ls_pridoc-pric_cond[].
MOVE-CORRESPONDING ls_cond TO ls_cond_chg.
ls_cond_chg-waers = 'EUR'.
ls_cond_chg-kbetr = lv_kbetr.
INSERT ls_cond_chg INTO TABLE ls_pricom-cond_change.
APPEND ls_pricom TO lt_pricom.
CALL FUNCTION 'CRM_ORDER_MAINTAIN'
EXPORTING
it_pridoc = lt_pricom
CHANGING
* ct_orderadm_h = lt_header
ct_input_fields = lt_input
EXCEPTIONS
error_occurred = 1
document_locked = 2
no_change_allowed = 3
no_authority = 4
OTHERS = 5.
IF sy-subrc <> 0.
EXIT.
ENDIF.
CALL FUNCTION 'CRM_ORDER_SAVE'
EXPORTING
it_objects_to_save = lt_guid
IMPORTING
et_saved_objects = lt_saved
* ET_EXCEPTION =
* ET_OBJECTS_NOT_SAVED =
EXCEPTIONS
document_not_saved = 1
OTHERS = 2.
IF sy-subrc EQ 0.
COMMIT WORK AND WAIT.
ELSE.
ROLLBACK WORK.
ENDIF.
regards
MarkusHello Jordi,
The example below is whereby i was trying to copy all the pricing condition on one document to another and deleting what's not present on the source document.
You can used this piece of code to adapt your requirement.
CALL FUNCTION 'ZCRC_FM_COPY_PRICE_COND_ALL'
EXPORTING
id_object_guid_src = <fs_el_con_guid>
id_object_guid_dest = <fs_el_so_guid>
id_commit = abap_false
EXCEPTIONS
not_allowed = 1
error_occured = 2
OTHERS = 3.
PERFORM f_recup_donnees USING id_object_guid_src
id_object_guid_dest.
PERFORM f_modif_condition_prix USING id_object_guid_src
id_object_guid_dest.
PERFORM f_header_copy_pricing using id_object_guid_src
id_object_guid_dest.
FORM f_recup_donnees USING pd_object_guid_src TYPE crmt_object_guid
pd_object_guid_dest TYPE crmt_object_guid.
DATA:
lt_header_guid TYPE crmt_object_guid_tab.
INSERT pd_object_guid_src INTO TABLE lt_header_guid.
INSERT pd_object_guid_dest INTO TABLE lt_header_guid.
CLEAR: gt_orderadm_i, gt_doc_flow.
CALL FUNCTION 'CRM_ORDER_READ'
EXPORTING
it_header_guid = lt_header_guid
IMPORTING
et_doc_flow = gt_doc_flow
et_orderadm_i = gt_orderadm_i
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 NE 0.
RAISE error_occured.
ENDIF.
" F_RECUP_DONNEES
FORM f_modif_condition_prix USING pd_guid_src TYPE crmt_object_guid
pd_guid_dest TYPE crmt_object_guid.
DATA : ld_pd_handle_src TYPE prct_handle,
ld_pd_handle_dest TYPE prct_handle,
lt_komv_print_src TYPE prct_cond_print_t,
lt_komv_print_dest TYPE prct_cond_print_t,
ls_komv_print_dest LIKE LINE OF lt_komv_print_dest,
ls_komv_print_src LIKE LINE OF lt_komv_print_src,
lt_cond_chg TYPE prct_cond_print_t,
lt_cond_chg_insert TYPE prct_cond_print_t,
ls_cond_chg TYPE prct_cond_print,
ls_cond_chg_tmp TYPE prct_cond_print,
ls_input_fields TYPE crmt_input_field,
lt_input_fields TYPE crmt_input_field_tab.
DATA : bal_log TYPE balloghndl,
lt_item_ret TYPE prct_item_ret_t,
lt_cond_ret TYPE prct_cond_print_t,
ld_data_changed TYPE xfeld,
gv_decimal TYPE usdefaults-dcpfm,
ld_lines TYPE i,
ld_ajout_cond TYPE abap_bool.
FIELD-SYMBOLS : <fs_orderadm_i_dest> TYPE crmt_orderadm_i_wrk,
<fs_orderadm_i_src> TYPE crmt_orderadm_i_wrk,
<fs_cond_chg> TYPE prct_cond_print,
<fs_cond_chg_insert> TYPE prct_cond_print.
* Début Ajout CD1K904313-001.
DATA: ld_guid_src TYPE crmt_object_guid.
FIELD-SYMBOLS: <fs_doc_flow> TYPE crmt_doc_flow_wrk.
* Début Ajout CD1K904313-001.
* Verrouillage des documents source et destinataire
PERFORM f_lock_document USING pd_guid_src.
PERFORM f_lock_document USING pd_guid_dest.
*Récupérer le pricing handle des documents
* Document source
CALL FUNCTION 'CRM_PRIDOC_GET_HANDLE_OW'
EXPORTING
iv_header_guid = pd_guid_src
IMPORTING
ev_pd_handle = ld_pd_handle_src
EXCEPTIONS
error_occurred = 1
handle_determination_error = 2
orgdata_error = 3
OTHERS = 4.
IF sy-subrc <> 0.
RETURN.
ENDIF.
* Document destinataire
CALL FUNCTION 'CRM_PRIDOC_GET_HANDLE_OW'
EXPORTING
iv_header_guid = pd_guid_dest
IMPORTING
ev_pd_handle = ld_pd_handle_dest
EXCEPTIONS
error_occurred = 1
handle_determination_error = 2
orgdata_error = 3
OTHERS = 4.
IF sy-subrc <> 0.
RETURN.
ENDIF.
* A ne pas traiter les postes de type ZPDF
DELETE gt_orderadm_i WHERE itm_type = 'ZPDF'.
LOOP AT gt_orderadm_i ASSIGNING <fs_orderadm_i_dest> WHERE header = pd_guid_dest.
REFRESH : lt_komv_print_src,
lt_komv_print_dest,
lt_cond_chg,
lt_cond_chg_insert.
* Début Modif CD1K904313-001.
* Récupérer le guid de l'item liée au item destinataire.
READ TABLE gt_doc_flow ASSIGNING <fs_doc_flow> WITH KEY objkey_b = <fs_orderadm_i_dest>-guid.
CHECK sy-subrc EQ 0.
ld_guid_src = <fs_doc_flow>-objkey_a.
* READ TABLE gt_orderadm_i ASSIGNING <fs_orderadm_i_src> WITH KEY header = pd_guid_src
* number_int = <fs_orderadm_i_dest>-number_int.
* Fin Modif CD1K904313-001.
* Récupérer les pricing document
IF sy-subrc EQ 0.
* Document source
CALL FUNCTION 'PRC_PD_ITEM_SHOW'
EXPORTING
iv_pd_handle = ld_pd_handle_src
* iv_item_no = <fs_orderadm_i_src>-guid "Supression CD1K904313-001
iv_item_no = ld_guid_src "Addition CD1K904313-001
IMPORTING
et_komv_print = lt_komv_print_src
EXCEPTIONS
non_existing_handle = 1
non_existing_item = 2
ipc_error = 3
OTHERS = 4.
ENDIF.
* Document destinataire
CALL FUNCTION 'PRC_PD_ITEM_SHOW'
EXPORTING
iv_pd_handle = ld_pd_handle_dest
iv_item_no = <fs_orderadm_i_dest>-guid
IMPORTING
et_komv_print = lt_komv_print_dest
EXCEPTIONS
non_existing_handle = 1
non_existing_item = 2
ipc_error = 3
OTHERS = 4.
* Modification et Suppression des conditions de prix
LOOP AT lt_komv_print_dest INTO ls_komv_print_dest .
CLEAR: ls_cond_chg,
ls_komv_print_src.
MOVE-CORRESPONDING ls_komv_print_dest TO ls_cond_chg.
* Rechercher la condition sur le document source
READ TABLE lt_komv_print_src INTO ls_komv_print_src WITH KEY kschl = ls_komv_print_dest-kschl
zaehk = ls_komv_print_dest-zaehk. "CD1K904313
IF sy-subrc EQ 0.
ls_cond_chg-kbetr_prt = ls_komv_print_src-kbetr_prt.
ls_cond_chg-kwert = ls_komv_print_src-kwert.
ls_cond_chg-kinak = ls_komv_print_src-kinak.
ELSEIF ls_cond_chg-kschl IS NOT INITIAL.
CLEAR ls_cond_chg.
CONTINUE.
ENDIF.
* Format décimal
CASE gv_decimal.
WHEN space. "format N.NNN,NN
REPLACE ALL OCCURRENCES OF '.' IN ls_cond_chg-kbetr_prt WITH ','.
WHEN 'Y'. "format N NNN NNN,NN
REPLACE ALL OCCURRENCES OF '.' IN ls_cond_chg-kbetr_prt WITH ','.
ENDCASE.
INSERT ls_cond_chg INTO TABLE lt_cond_chg.
CLEAR ls_cond_chg.
ENDLOOP.
* Ajout des conditions de prix
LOOP AT lt_komv_print_src INTO ls_komv_print_src WHERE kschl IS NOT INITIAL.
CLEAR: ls_cond_chg, ld_lines, ls_komv_print_dest, ls_cond_chg_tmp, ld_ajout_cond.
* Vérifier la présence de la condition sur le document destinataire
READ TABLE lt_komv_print_dest INTO ls_komv_print_dest WITH KEY kschl = ls_komv_print_src-kschl
zaehk = ls_komv_print_src-zaehk. "CD1K904313.
IF sy-subrc EQ 0.
CLEAR: ls_cond_chg, ls_komv_print_dest.
CONTINUE.
ELSE.
DESCRIBE TABLE lt_cond_chg LINES ld_lines.
READ TABLE lt_cond_chg INTO ls_cond_chg_tmp INDEX ld_lines.
IF sy-subrc EQ 0.
ld_ajout_cond = abap_true.
MOVE-CORRESPONDING ls_komv_print_src TO ls_cond_chg.
ls_cond_chg-knumv = ls_cond_chg_tmp-knumv.
ls_cond_chg-kposn = ls_cond_chg_tmp-kposn.
ls_cond_chg-stunr = ls_cond_chg_tmp-stunr + 10.
ELSE.
CLEAR: ls_cond_chg, ld_lines, ls_komv_print_dest, ls_cond_chg_tmp.
CONTINUE.
ENDIF.
ENDIF.
* Format décimal
CASE gv_decimal.
WHEN space. "format N.NNN,NN
REPLACE ALL OCCURRENCES OF '.' IN ls_cond_chg-kbetr_prt WITH ','.
WHEN 'Y'. "format N NNN NNN,NN
REPLACE ALL OCCURRENCES OF '.' IN ls_cond_chg-kbetr_prt WITH ','.
ENDCASE.
* Récupérer les nouvelles conditions qui seront ajouté au document destinataire
IF ld_ajout_cond EQ abap_true.
INSERT ls_cond_chg INTO TABLE lt_cond_chg_insert.
ENDIF.
INSERT ls_cond_chg INTO TABLE lt_cond_chg.
CLEAR ls_cond_chg.
ENDLOOP.
CALL FUNCTION 'PRC_INT_ITEM_INPUT'
EXPORTING
iv_pd_handle = ld_pd_handle_dest
iv_item_no = <fs_orderadm_i_dest>-guid
it_cond_prt = lt_cond_chg
iv_bal_log = bal_log
iv_req_ret = abap_true
iv_req_cond_prt = abap_true
IMPORTING
et_item_ret = lt_item_ret
et_cond_prt = lt_cond_ret
ev_data_changed = ld_data_changed
EXCEPTIONS
non_existing_handle = 1
non_existing_item = 2
ipc_error = 3.
IF sy-subrc = 0.
* En cas d'ajout de nouvelles conditions de prix, appeler le MF PRC_INT_ITEM_INPUT
* avec les montants
IF lt_cond_chg_insert IS NOT INITIAL.
REFRESH lt_cond_chg[].
lt_cond_chg[] = lt_cond_ret[].
LOOP AT lt_cond_chg_insert ASSIGNING <fs_cond_chg_insert>.
READ TABLE lt_cond_chg ASSIGNING <fs_cond_chg> WITH KEY kschl = <fs_cond_chg_insert>-kschl.
IF sy-subrc EQ 0.
<fs_cond_chg>-kwert = <fs_cond_chg_insert>-kwert.
<fs_cond_chg>-kbetr_prt = <fs_cond_chg_insert>-kbetr_prt.
ENDIF.
ENDLOOP.
REFRESH lt_cond_ret[].
CALL FUNCTION 'PRC_INT_ITEM_INPUT'
EXPORTING
iv_pd_handle = ld_pd_handle_dest
iv_item_no = <fs_orderadm_i_dest>-guid
it_cond_prt = lt_cond_chg
iv_bal_log = bal_log
iv_req_ret = abap_true
iv_req_cond_prt = abap_true
IMPORTING
et_item_ret = lt_item_ret
et_cond_prt = lt_cond_ret
ev_data_changed = ld_data_changed
EXCEPTIONS
non_existing_handle = 1
non_existing_item = 2
ipc_error = 3.
ENDIF.
* Publish event afin de sauvegarder les conditions de prix
CALL FUNCTION 'CRM_EVENT_PUBLISH_OW'
EXPORTING
iv_obj_name = 'PRIDOC'
iv_guid_hi = pd_guid_dest
iv_kind_hi = 'A'
iv_event = 'SAVE'
EXCEPTIONS
OTHERS = 1.
* As no order_maintain will follow implicitly and therefore no
* exec times for the events will be set, call CRM_ORDER_MAINTAIN
* without any parameters
* Then the exec time 'end of document' will be set and with the
* group logic also all exec times before
* But at least one object is needed in input_fields
* --> use PRIDOC
ls_input_fields-ref_guid = <fs_orderadm_i_dest>-guid.
ls_input_fields-ref_kind = 'B'.
ls_input_fields-objectname = 'PRIDOC'.
INSERT ls_input_fields INTO TABLE lt_input_fields.
CLEAR ls_input_fields.
CALL FUNCTION 'CRM_ORDER_MAINTAIN'
CHANGING
ct_input_fields = lt_input_fields
EXCEPTIONS
error_occurred = 1
document_locked = 2
no_change_allowed = 3
no_authority = 4
OTHERS = 5.
ENDIF.
ENDLOOP.
" F_MODIF_CONDITION_PRIX
*& Form F_LOCK_DOCUMENT
* Verrouillage d'un document
FORM f_lock_document USING pd_guid TYPE crmt_object_guid.
CONSTANTS : lc_orderadm_h TYPE crmt_object_name VALUE 'ORDERADM_H',
lc_orderadm_i TYPE crmt_object_name VALUE 'ORDERADM_I'.
DATA: lv_process_mode TYPE crmt_mode,
lv_order_initialized TYPE crmt_boolean,
lv_process_type TYPE crmt_process_type,
lv_already_locked TYPE abap_bool.
DATA: ls_admin_ui_status TYPE crmt_admin_ui_status,
ls_item_usage_range TYPE crmt_item_usage_range.
DATA: lt_objects_to_read TYPE crmt_object_guid_tab,
lt_requested_objects TYPE crmt_object_name_tab,
lt_item_usage_range TYPE crmt_item_usage_range_tab,
lt_locked_contract TYPE crmt_object_guid_tab.
INSERT pd_guid INTO TABLE lt_objects_to_read.
INSERT lc_orderadm_h INTO TABLE lt_requested_objects.
INSERT lc_orderadm_i INTO TABLE lt_requested_objects.
ls_item_usage_range-sign = 'E'.
ls_item_usage_range-value = '02'.
INSERT ls_item_usage_range INTO TABLE lt_item_usage_range.
* LAM: Financing Options should be viewed in a separate screen:
ls_item_usage_range-sign = 'E'.
ls_item_usage_range-value = '05'. "Financing options
INSERT ls_item_usage_range INTO TABLE lt_item_usage_range.
*-> read document in change mode
CALL FUNCTION 'CRM_ORDER_READ'
EXPORTING
it_header_guid = lt_objects_to_read
iv_mode = 'B'
it_requested_objects = lt_requested_objects
it_item_usage_range = lt_item_usage_range
EXCEPTIONS
document_not_found = 1
error_occurred = 2
document_locked = 3
no_change_authority = 4
no_display_authority = 5
OTHERS = 6.
PERFORM enqueue_order IN PROGRAM saplcrm_order_ow IF FOUND
USING pd_guid
abap_false
abap_false
abap_false
CHANGING sy-subrc
lv_already_locked
lt_locked_contract.
" F_LOCK_DOCUMENT
* Fin Ajout CD1K904074-001
FORM f_header_copy_pricing USING pd_guid_src
pd_guid_dest.
DATA : ld_pd_handle_src TYPE prct_handle,
ld_pd_handle_dest TYPE prct_handle,
lt_komv_print_src TYPE prct_cond_print_t,
lt_komv_print_dest TYPE prct_cond_print_t,
ls_komv_print_dest LIKE LINE OF lt_komv_print_dest,
ls_komv_print_src LIKE LINE OF lt_komv_print_src,
lt_cond_chg TYPE prct_cond_print_t,
ls_cond_chg TYPE prct_cond_print,
ls_input_fields TYPE crmt_input_field,
lt_input_fields TYPE crmt_input_field_tab.
DATA : bal_log TYPE balloghndl,
lt_cond_ret TYPE prct_cond_print_t,
ld_data_changed TYPE xfeld,
gv_decimal TYPE usdefaults-dcpfm.
* Verrouillage des documents source et destinataire
PERFORM f_lock_document USING pd_guid_src.
PERFORM f_lock_document USING pd_guid_dest.
* Récupérer le pricing handle des documents
* Document source
CALL FUNCTION 'CRM_PRIDOC_GET_HANDLE_OW'
EXPORTING
iv_header_guid = pd_guid_src
IMPORTING
ev_pd_handle = ld_pd_handle_src
EXCEPTIONS
error_occurred = 1
handle_determination_error = 2
orgdata_error = 3
OTHERS = 4.
IF sy-subrc <> 0.
RETURN.
ENDIF.
* Document destinataire
CALL FUNCTION 'CRM_PRIDOC_GET_HANDLE_OW'
EXPORTING
iv_header_guid = pd_guid_dest
IMPORTING
ev_pd_handle = ld_pd_handle_dest
EXCEPTIONS
error_occurred = 1
handle_determination_error = 2
orgdata_error = 3
OTHERS = 4.
IF sy-subrc <> 0.
RETURN.
ENDIF.
* * Récupérer les pricing document
* Document Source
CALL FUNCTION 'PRC_PD_HEAD_SHOW'
EXPORTING
iv_pd_handle = ld_pd_handle_src
IMPORTING
et_komv_print = lt_komv_print_src
EXCEPTIONS
non_existing_handle = 1
ipc_error = 2
OTHERS = 3.
CHECK sy-subrc EQ 0.
* Document Destinataire
CALL FUNCTION 'PRC_PD_HEAD_SHOW'
EXPORTING
iv_pd_handle = ld_pd_handle_dest
IMPORTING
et_komv_print = lt_komv_print_dest
EXCEPTIONS
non_existing_handle = 1
ipc_error = 2
OTHERS = 3.
CHECK sy-subrc EQ 0.
* * Modification et Suppression des conditions de prix
LOOP AT lt_komv_print_src INTO ls_komv_print_src .
CLEAR: ls_cond_chg,
ls_komv_print_dest.
MOVE-CORRESPONDING ls_komv_print_src TO ls_cond_chg.
* Rechercher la condition sur le document source
READ TABLE lt_komv_print_dest INTO ls_komv_print_dest WITH KEY kschl = ls_komv_print_src-kschl
zaehk = ls_komv_print_src-zaehk.
IF sy-subrc EQ 0.
IF ls_komv_print_src-kbetr NE ls_komv_print_dest-kbetr.
ls_cond_chg-kbetr_prt = ls_komv_print_src-kbetr_prt.
ls_cond_chg-kwert = ls_komv_print_src-kwert.
ls_cond_chg-kinak = ls_komv_print_src-kinak.
CASE gv_decimal.
WHEN space. "format N.NNN,NN
REPLACE ALL OCCURRENCES OF '.' IN ls_cond_chg-kbetr_prt WITH ','.
WHEN 'Y'. "format N NNN NNN,NN
REPLACE ALL OCCURRENCES OF '.' IN ls_cond_chg-kbetr_prt WITH ','.
ENDCASE.
ENDIF.
ENDIF.
CLEAR ls_cond_chg-krech.
INSERT ls_cond_chg INTO TABLE lt_cond_chg.
CLEAR ls_cond_chg.
ENDLOOP.
CALL FUNCTION 'PRC_INT_HEAD_INPUT'
EXPORTING
iv_pd_handle = ld_pd_handle_dest
iv_bal_log = bal_log
it_cond_prt = lt_cond_chg
iv_req_ret = abap_true
iv_req_cond_prt = abap_true
IMPORTING
et_cond_prt = lt_cond_ret
ev_data_changed = ld_data_changed
EXCEPTIONS
non_existing_handle = 1
ipc_error = 2
not_allowed = 3
OTHERS = 4.
CHECK sy-subrc EQ 0.
* * Publish event afin de sauvegarder les conditions de prix
CALL FUNCTION 'CRM_EVENT_PUBLISH_OW'
EXPORTING
iv_obj_name = 'PRIDOC'
iv_guid_hi = pd_guid_dest
iv_kind_hi = 'A'
iv_event = 'SAVE'
EXCEPTIONS
OTHERS = 1.
* As no order_maintain will follow implicitly and therefore no
* exec times for the events will be set, call CRM_ORDER_MAINTAIN
* without any parameters
* Then the exec time 'end of document' will be set and with the
* group logic also all exec times before
* But at least one object is needed in input_fields
* --> use PRIDOC
ls_input_fields-ref_guid = pd_guid_dest.
ls_input_fields-ref_kind = 'A'.
ls_input_fields-objectname = 'PRIDOC'.
INSERT ls_input_fields INTO TABLE lt_input_fields.
CLEAR ls_input_fields.
CALL FUNCTION 'CRM_ORDER_MAINTAIN'
CHANGING
ct_input_fields = lt_input_fields
EXCEPTIONS
error_occurred = 1
document_locked = 2
no_change_allowed = 3
no_authority = 4
OTHERS = 5.
ENDFORM.
FORM f_header_copy_pricing USING pd_guid_src
pd_guid_dest.
DATA : ld_pd_handle_src TYPE prct_handle,
ld_pd_handle_dest TYPE prct_handle,
lt_komv_print_src TYPE prct_cond_print_t,
lt_komv_print_dest TYPE prct_cond_print_t,
ls_komv_print_dest LIKE LINE OF lt_komv_print_dest,
ls_komv_print_src LIKE LINE OF lt_komv_print_src,
lt_cond_chg TYPE prct_cond_print_t,
ls_cond_chg TYPE prct_cond_print,
ls_input_fields TYPE crmt_input_field,
lt_input_fields TYPE crmt_input_field_tab.
DATA : bal_log TYPE balloghndl,
lt_cond_ret TYPE prct_cond_print_t,
ld_data_changed TYPE xfeld,
gv_decimal TYPE usdefaults-dcpfm.
PERFORM f_lock_document USING pd_guid_src.
PERFORM f_lock_document USING pd_guid_dest.
* Récupérer le pricing handle des documents
* Document source
CALL FUNCTION 'CRM_PRIDOC_GET_HANDLE_OW'
EXPORTING
iv_header_guid = pd_guid_src
IMPORTING
ev_pd_handle = ld_pd_handle_src
EXCEPTIONS
error_occurred = 1
handle_determination_error = 2
orgdata_error = 3
OTHERS = 4.
IF sy-subrc <> 0.
RETURN.
ENDIF.
* Document destinataire
CALL FUNCTION 'CRM_PRIDOC_GET_HANDLE_OW'
EXPORTING
iv_header_guid = pd_guid_dest
IMPORTING
ev_pd_handle = ld_pd_handle_dest
EXCEPTIONS
error_occurred = 1
handle_determination_error = 2
orgdata_error = 3
OTHERS = 4.
IF sy-subrc <> 0.
RETURN.
ENDIF.
* * Récupérer les pricing document
* Document Source
CALL FUNCTION 'PRC_PD_HEAD_SHOW'
EXPORTING
iv_pd_handle = ld_pd_handle_src
IMPORTING
et_komv_print = lt_komv_print_src
EXCEPTIONS
non_existing_handle = 1
ipc_error = 2
OTHERS = 3.
CHECK sy-subrc EQ 0.
* Document Destinataire
CALL FUNCTION 'PRC_PD_HEAD_SHOW'
EXPORTING
iv_pd_handle = ld_pd_handle_dest
IMPORTING
et_komv_print = lt_komv_print_dest
EXCEPTIONS
non_existing_handle = 1
ipc_error = 2
OTHERS = 3.
CHECK sy-subrc EQ 0.
* * Modification et Suppression des conditions de prix
LOOP AT lt_komv_print_src INTO ls_komv_print_src .
CLEAR: ls_cond_chg,
ls_komv_print_dest.
MOVE-CORRESPONDING ls_komv_print_src TO ls_cond_chg.
* Rechercher la condition sur le document source
READ TABLE lt_komv_print_dest INTO ls_komv_print_dest WITH KEY kschl = ls_komv_print_src-kschl
zaehk = ls_komv_print_src-zaehk.
IF sy-subrc EQ 0.
IF ls_komv_print_src-kbetr NE ls_komv_print_dest-kbetr.
ls_cond_chg-kbetr_prt = ls_komv_print_src-kbetr_prt.
ls_cond_chg-kwert = ls_komv_print_src-kwert.
ls_cond_chg-kinak = ls_komv_print_src-kinak.
CASE gv_decimal.
WHEN space. "format N.NNN,NN
REPLACE ALL OCCURRENCES OF '.' IN ls_cond_chg-kbetr_prt WITH ','.
WHEN 'Y'. "format N NNN NNN,NN
REPLACE ALL OCCURRENCES OF '.' IN ls_cond_chg-kbetr_prt WITH ','.
ENDCASE.
ENDIF.
ENDIF.
CLEAR ls_cond_chg-krech.
INSERT ls_cond_chg INTO TABLE lt_cond_chg.
CLEAR ls_cond_chg.
ENDLOOP.
CALL FUNCTION 'PRC_INT_HEAD_INPUT'
EXPORTING
iv_pd_handle = ld_pd_handle_dest
iv_bal_log = bal_log
it_cond_prt = lt_cond_chg
iv_req_ret = abap_true
iv_req_cond_prt = abap_true
IMPORTING
et_cond_prt = lt_cond_ret
ev_data_changed = ld_data_changed
EXCEPTIONS
non_existing_handle = 1
ipc_error = 2
not_allowed = 3
OTHERS = 4.
CHECK sy-subrc EQ 0.
CALL FUNCTION 'CRM_EVENT_PUBLISH_OW'
EXPORTING
iv_obj_name = 'PRIDOC'
iv_guid_hi = pd_guid_dest
iv_kind_hi = 'A'
iv_event = 'SAVE'
EXCEPTIONS
OTHERS = 1.
ls_input_fields-ref_guid = pd_guid_dest.
ls_input_fields-ref_kind = 'A'.
ls_input_fields-objectname = 'PRIDOC'.
INSERT ls_input_fields INTO TABLE lt_input_fields.
CLEAR ls_input_fields.
CALL FUNCTION 'CRM_ORDER_MAINTAIN'
CHANGING
ct_input_fields = lt_input_fields
EXCEPTIONS
error_occurred = 1
document_locked = 2
no_change_allowed = 3
no_authority = 4
OTHERS = 5. -
Batch quantity not deducting when FIRST date (for line item) is in future.
Hi Folks,
My requirement is when creating sales order for batch managed materials, if i give any quantity with future date that is,
if todays date is 02.07.2010 and if i create sales order..
material => mat1
Quantity => 20
Date => 12.07.2010 (this is not required delivery date,this is first delivery date in schedule line for that item)
Batch => B1
and initially if Batch B1 has quantity 100 ,after saving this sales order, the quantity must be 80.
but its not deducting, for future dates ,thats why the same batch is showing quantity 100, next time
when i m creating new sales order.where as it should show 80.
where exactly the quantity deduction is carried out (include or PAI PBO modules).
any hints.
I appreciate your response.
ThanksHi Folks,
My requirement is when creating sales order for batch managed materials, if i give any quantity with future date that is,
if todays date is 02.07.2010 and if i create sales order..
material => mat1
Quantity => 20
Date => 12.07.2010 (this is not required delivery date,this is first delivery date in schedule line for that item)
Batch => B1
and initially if Batch B1 has quantity 100 ,after saving this sales order, the quantity must be 80.
but its not deducting, for future dates ,thats why the same batch is showing quantity 100, next time
when i m creating new sales order.where as it should show 80.
where exactly the quantity deduction is carried out (include or PAI PBO modules).
any hints.
I appreciate your response.
Thanks -
Can't change sort settings for multiple items in iTunes 7.1
iTunes 7.1 introduces a great feature—the ability to set a separate Sort Name, Sort Artist, Sort Album, etc. This means that "Weird Al" Yankovic songs can finally appear down among the Y's instead of up at the top of every list, by changing the Sort Artist to Yankovic, Weird Al.
Unfortunately, this feature is fatally crippled in 7.1. As far as I can tell, you can only change the Sorting information on individual tracks. When you change the information for multiple tracks, the Sorting tab doesn't show up. This renders the feature all but useless.
Let's say (hypothetically) that your friend is an enormous nerd (in theory) and your friend has 139 "Weird Al" Yankovic tracks (for the purposes of this example only, of course). Instead of just selecting all these tracks at once and changing the Sort Artist to Yankovic, "Weird Al", I (I mean, he) has to retype this information for each individual track. That's crazy! Surely this must be a bug.
Core 2 Duo 20" iMac Mac OS X (10.4.8)I just found the solution to this myself.
In a very un-Apple way, this is an undocumented feature only accessible by right- (or control-) clicking.
1. Change one track to your desired sort settings (for instance, set the Sort Artist to Yankovic, Weird Al.
2. Right-click on that track. In the contextual menu that appears, there is a new submenu called "Apply Sort Field." If you choose "Same Artist," it will apply your new sorting information to all your other tracks by "Weird Al" Yankovic (or, if you are not a huge nerd, any other artist you substitute). -
Can you change street date for a book in review?
Is it possible to change the street date of your book if the book hasn't been approved yet?
Our original release date for the book has long come and gone. We went by Apple's stated up to 10 days thing, and it's now over 30. It would be great to adjust the street date so we could at least take preorders. Is this possible?Same...there is only one
Page 42 in the iTP Guide https://itunesconnect.apple.com/docs/UsingiTunesProducerPaidBooks.pdf
...covers the topic, but not when the dates are borked.
You may want to contact Apple about this one... -
User Exit to make changes in sales order line item data.
Hi All,
I need to know about user exit by whcih I can make changes in sales order line item details --> Account assignment tab --> Sales order no and line item no.
I want to make changes so as to bring the active maintenance contract no and line item no here instead of sales order no and line item no. So whenever ( Va02 or Va03) we go to sales order line item and se the account assignment tab I should see the contract no there.
Just let me know the USER EXIT to do the above changes.
Points will be awarded.
Regards,
Satish.Hi,
Please have a look at the following user exits...
1. user exit_ save_document
2. user exit_save_document_prepare
Regards
sankar -
User exit to change Release date for ME54N
Dear Folks,
I need and user exit / BADI to update EBAN-FRGDT (Release date) based on the value in EBAN-FRGKX (Release indicator).
For example : If the PR release indicator changed to "F", I need to change the EBAN-FRGDT (Release date) to sy-datum and then save. Please help me.
Thanks,
Kishore. PHi Rohini ,
I have used BTE 1120 (Business Transaction Event) to change the value date for line items (BSEG-VALUT) for F110.
May be this can help u ..... try once ....
Regards,
AKS -
Table for line item in F-47 Display Document - Down Payment
Hi,
Can anyone please tell me from which table can I pick the values for line items. I'm developing a report in smartforms for down payment request. For header items I found out that the values are stored in table - BKPF.
Please help..
Regards,
SriramHi,
Go to Logical database through SE36 and give KDF for vendor and DDF for customer. You will get the details of tables there.
Regards
shankar -
Different Pricing date for two line items
Hi guru's
How to give different pricing dates for two line items
in a sales order
To elaborate
I have two line items one i need pricing date order date
second one i need pricing date should be delivery date
Thanks in advance
SrinivasDear Srinivas,
While creating sales order select the item which you want to change the pricing date then go to menu>GOTO>Item -->Click on Sales A here you can able to change the pricing date as you like.
You can change the pricing date of the item in the sales order through sales order change mode but that sales order should be open.
I hope it will help you,
Regards,
Murali. -
How can we change Pricing condition price date
Hi SAP Gurus,
I have requirement as following.
When we create a sales order if any contract is available it should be populated in a diaglog box, and when user select a one , we keep this as a z-field in the sales order header level, so far fine.
And the requirement includes the pricing date for one of pricing condition should be the first delivery date(schedulelinedate).
We have the condition records with the pricing date as document date, we cannt keep commited delivery date as pricingdate(komv-kdatu).
So i need a solution, thru i can modify the KOMV-KDATU
for the condition type,with the first schedule line date.
could anybody knows how to modify the KOMV structure values?????
The quick answer will be highly apreciated?
Thanks & Regards,
PraveenHi Praveen,
You can use user exit "USEREXIT_PRICING_PREPARE_TKOMK" to change Pricing Condition Table at header level & "USEREXIT_PRICING_PREPARE_TKOMP" at item level. These exits are present in include "MV45AFZZ" of Sales Order program "SAPMV45A".
Cheers,
Gajendra -
Hi,
I have customized the change rules for Line item.
Still the system not allowing to make changes to that particular field? Can any one tell me, whats the reason for the same.
Following Field is made as changeable for the line item.
BSEG-VBUND Trading partner.
The above field is available in More data Tab or additional data tab while making entry or display of document.
Thanks,
LalatenduHi,
That i know, but trading partner was not entered in the GL Master data. Infact some one wrongly entered Trading partner in Customer master and during bank posting system automatically picked Trading partner.
When thye r trying to clear open items for that GL account , because of that assignment system is not allowing to clear those line item.
If i can remove that trading partner from document, my problem will be solved.
Can any one guide me..or if u need more info please let me know.
Thanks,
Lalatendu -
Function module for FI document change with G/L line items
Hi!
Does anybody know how to change FI document with G/L line items (fields like XREF3, SGTXT, ZUONR - generally speaking, all the fields can be changed with FB02)?
FM FI_DOCUMENT_CHANGE has needed functionality and works well for account payables and account receivables line items, but it doesn't handle general ledger line items.
Regards,
Maxim.Hello!
The function has some mandatory fields to use:
I_AWTYP -> get value from BKPF-AWTYP for the specific document;
I_AWREF -> number of the document to change;
I_AWORG-> concatenate document's company with respective year;
Then, only one of the following fields should be filled:
i_lifnr,
i_kunnr,
i_obzei,
i_buzei.
You can find the relevant data for this fields in BSEG.
The structure I_BSEGC should be filled with data you think appropriate. I didn't tested it, but i think the first fields are sufficient.
Then, add lines (1 for each field you wish to change) in table T_ACCCHG.
However, you should notice that you're not allowed to change all fields. For instance, KKBER is one of the fields that is forbidden to change in this FM.
Hope that helps.
Rui Delca Mendes -
Changing the default view for Line Items in an Auction.
Hello All,
We have a version 5 client who is asking for us to change the default view for line items in an auction.
Currently, if you have an auction setup, and you go to the Line Items tab, the default view is the "Basic View". The client would like to change the Default from "basic view" to "price view".
Is there a way to change this default in the system? Can this be configured using query groups? Any information would be helpful.Hi wood cloud,
This is not possible, bcz there is no VLV for that drop down and we cant set it to the price view.
Thanks,
Ankur Goyal -
How can i decide candidates for line item dimension?
1Q): we have many infocubes out of all these infocubes, i have to decide which infocubes are the candidates for lineitem dimension? How to do it? Please tell me the technical specs how to do the analysis to find out the candidates for line item dimension?
2Q): if i have the small dimension can i combine all these dimension in to one dimension? what is the benefit of doing this? how to find out which dimensions are small?
<u>Pizzaman i like to hear from you on this topic</u>. Thanks to SDN Community. i appreciate your help. Again Thank you.The process of figuring out what you might want to create as a line item dimension can vary a bit, it can depend a lot on your exisitng level of domain expertise (how well do you know the data in question). If you are familiar with the data, I would recommend you just take an initial guess at what you believe could be line item dimensions. If you are not familiar witht the data, you might want to examine the source more to understand the cardinality of different characteristics and identify any relationships between characteristics.
I really encourage people to just go ahead and model it and load some data and review, rather than agonizing over developing the theoretically perfect model on paper before they start. You learn a lot more that way.
Any of the SAP rules of thumb, are just that, general rules, not a pronouncement from God. There are always extenuating or unique circumstances that might warrant disregarding the rule, e.g. if the InfoCube will never become very large, maybe some of the concerns just are not worth your effort.
With every release of the Oracle (and the other DBs too)Oracle keeps getting better at data warehousing and star schemas. Oracle 10i is supposed to have made handling bitmap indices much more efficient, which is on of the factors influencing the decision to create a line item dimension.
There are other threads on SDN on line item dims that provide more technical detail and can help answer you first question
As far as 2Q - generally, it's better to have several small dimensions than one larger dimension. But having said that, combining a few <b>very small dimensions</b> into another slightly larger (<i>but still small</i>) dimension is a good idea. It keeps the number of table joins down which will improve query performance. You would do this with characterisitcs that have very few values, e.g. yes/no indicators.
e.g.
You have 8 characteristics that all of which have only two values. You put them in one dimension, and the max size of the dimension table is still only 2x2x2x2x2x2x2x2 or 256 rows. If you had these characteristics in other much larger dimensions, it's not hard to see it causing those dimensions to double, perhaps creating hundreds of thousands of dimension table rows to be created.
For more - read <a href="http://www.kimballgroup.com/html/designtipsPDF/DesignTips2003/KimballDT48DeClutter.pdf">Ralph Kimball Design Tip 48 - Junk Dimensions</a>
Maybe you are looking for
-
Mail: new message window blocks the Mail program
Hello, When you write a new mail, the new nice interface makes the window of the new mail appear as it did on the iPad. However, this does not allow you to use the Mail program for other uses: for instance, I used to open the new mail window, and con
-
hello, Im trying to convert a script to pdf data. In the open_form I set getotf = 'X' and in the close form , i get the OTf data. I convert this otf to pdf data. In the pdf output, I only have the static fields and no data.Though the number of pages
-
A few questions about replacing a PSU with few variations.
So I've spent a lot of time the last few weeks browsing these forums, searching the web, watching eBay, and asking around locally. I am still torn between forking over the $150-$200 for an eBay replacement or trying one of the adapters (http://atxg4.
-
In Mail on OSX 10.4.6 macintel, Images in received html messages do not load. In preferences the "display remote images in html messages" is checked. Any idea what the problem is? Thanks
-
Why can't I open certain .dll files?
On an old computer i Have a file called atmcd32d.dll that says type labview vi library. When I open it it shows me a library of vi functions that I need to run an instrument. I've downloaded updated drivers from the instrument website and the new fil