on 09-17-2014 12:47 PM
Hi,
Could any help in this issue.I am using Below Code to update Date of Quote
ls_input_field-ref_guid = is_status_wrk-guid.
ls_input_field-objectname = 'APPOINTMENT'
ls_input_field-ref_kind = 'A'
ls_input_field-ref_handle = '0000000000'.
ls_input_field-logical_key = ZQUSA0 .
ls_input_field_names-fieldname = TIMESTAMP_TO
INSERT ls_input_field_names INTO TABLE lt_input_field_names.
ls_input_field_names-fieldname = TIMESTAMP_FROM.
INSERT ls_input_field_names INTO TABLE lt_input_field_names.
ls_input_field-field_names = lt_input_field_names.
APPEND ls_input_field TO lt_input_field.
ls_appointment-mode = B.
ls_appointment-ref_guid = is_status_wrk-guid .
ls_appointment-ref_handle ='0000000000'
ls_appointment-ref_kind = A
ls_appointment-timestamp_to = lv_finish_quote. .
ls_appointment-timestamp_from = lv_finish_quote.
ls_appointment-appt_type = ZQUSA0 .
APPEND ls_appointment TO lt_appointment.
ls_orderadm_h1-guid = is_status_wrk-guid.
ls_orderadm_h1-handle = lc_handle.
APPEND ls_orderadm_h1 TO lt_orderadm_h1.
CALL FUNCTION 'CRM_ORDER_MAINTAIN'
EXPORTING
it_appointment = lt_appointment
CHANGING
ct_orderadm_h = lt_orderadm_h1
ct_input_fields = lt_input_field
EXCEPTIONS
error_occurred = 1
document_locked = 2
no_change_allowed = 3
no_authority = 4
OTHERS = 5.
Thnaks,
Anil
Hello Anil,
Another approach would be to put a break-point in CRM_ORDER_MAINTAIN, change what you want to change in SAP GUI or WebUI and see with which parameters the function module is called. I use this approach quite often.
And I would also say: if you get a dump you should show us the screenshot of it. It might contain valuable information.
Best regards,
Thomas Wagner
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Anil,
The CRM_ORDER_STATUS BADI might already called by the CRM_ORDER_MAINTAIN function module and therefore it could be a recursive call. You could look for the precise function module which is only changing the appointment timestamps and call that one. That FM could be found by googleing or debugging or having a closer look at CRM_ORDER_MAINTAIN as CRM_ORDER_MAINTAIN will surely call that specific function module too.
Best regards,
Thomas
Hi Anil,
are u intending to change or newly assigning date to the quote?
if u are changing date no need to pass handle and u have pass the field logical key
one more thing is in input fields have to pass the field "appt_type".
Regards,
Padma.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Anil,
Can you try to call function module CRM_DATES_TIMECONTEXT_DELETE before CRM_ORDER_MAINTAN? You have one example how to change dates in a business transaction here (just don't use the save statement in BADI).
If still with problems, can you share some lines of dump?
Kind regards,
Garcia
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.