Skip to Content
0
Former Member
Apr 13, 2007 at 04:15 AM

problem in CRMD_BUS2000126

17 Views

In the CRMD_BUS2000126 transaction , i am performing an activity ,

in this transaction , i am providing 'Person Responsible' field a value .

After performing action ,say 'call succeefull/call unsuccessfull' the Business partner for the 'Person Responsible' must be deleted .

For this , i am using a BADI 'EXEC_METHODCALL_PPF' .

Under this i am using the following code for above query.

But it is not reflecting back in the transaction .

  • Function module to get all data related to Activity.

CALL FUNCTION 'CRM_ORDER_READ'

EXPORTING

it_header_guid = lt_guid

IMPORTING

et_status = t_status

et_partner = t_partner

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.

CLEAR cnt.

IF ip_action CP 'zact'.

READ TABLE t_partner INTO wa_partner WITH KEY ref_guid = wa_guid.

  • Data population for Partner Maintain tbale.

wa_part-ref_guid = wa_guid.

wa_part-ref_kind = c_a.

wa_part-ref_partner_fct = c_partfct.

wa_part-ref_partner_no = space.

  • wa_part-partner_no = space.

wa_part-kind_of_entry = c_c.

wa_field-ref_guid = wa_guid.

wa_field-ref_kind = c_a.

wa_field-objectname = c_partner.

wa_field_name-fieldname = c_par_fct.

INSERT wa_field_name INTO TABLE t_field_name .

CLEAR wa_field_name.

wa_field-ref_guid = wa_guid.

wa_field-ref_kind = c_a.

wa_field-objectname = c_partner.

wa_field_name-fieldname = c_par_no.

INSERT wa_field_name INTO TABLE t_field_name.

CLEAR wa_field_name.

INSERT wa_part INTO TABLE t_part.

CLEAR wa_part.

CLEAR wa_commt.

MOVE wa_guid TO wa_commt-guid.

wa_commt-mode = c_d.

APPEND wa_commt TO t_commt.

  • Function Module to maintain the data in DB table.

CALL FUNCTION 'CRM_ORDER_MAINTAIN'

EXPORTING

it_partner = t_part

CHANGING

ct_orderadm_i = t_commt

ct_input_fields = t_field

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.

If anybody had idea please suggest