Ansicht
Dokumentation
CRM_CMG_ON_CREATION - Business Add-In: Data Transfer When Creating a Case
ROGBILLS - Synchronize billing plans PERFORM Short ReferenceThis documentation is copyright by SAP AG.
You can use this Business Add-In to transfer information to a case, if for example, the case is created from a business transaction, or a business transaction from the transaction application is added to the case record.
In the standard system, the transaction is hung in the case record as an object.
After you have called the IMG activity, proceed as follows:
- In the following dialog box, enter in the field "Implementation" a name for the BAdI implementation and choose Copy.
- If implementations have already been created for the BAdI, a dialog box with the existing implementations will be displayed. In this dialog box, choose Create.
- In the corresponding field, enter a short text for implementation .
- In the tab Propertiesenter filter properties - if this is a filter-dependent BAdI.
- Choose the tab Interface.
- The name of the implementing class is generated by the system based on the name of your impmlementation. You can change the name.
- If the BAdI is a menu exit, the tab FCodes also appears.Enter a function here and, if necessary, additional data.
- Save your entries and assign a package.
- Position the cursor on a method. Call up the Class Builder by double-clicking it.
- Between the statements method <Interface-Name>~<Name of Method>. and endmethod, enter the coding you request for the implementation.
- Save and activate your coding, and navigate back to the screen Change Implementation.
- Save on the screen Change Implementation.
- Note: You can first create an implementation for the BAdI and then activate this later on. In this case, close the processing function at this time.
- Choose Activate.
- When the application program is executed, the coding you have created will be run.
If you have implemented the Business Add-In interface SCMG_CHNG_BFR_STR_C, ensure that the CHANGE method there is executed after the TRANSFER_DATA_FROM_ORDER method of this Business Add-In. If both implementations refer to the same data, if necessary the changes to this Add-In are overwritten.
If the IV_NEW flag is set, the case is newly created. If the IV_DEL flag is set, an existing link between case and transaction is deleted.
With the following implementation, the partners in the transaction are read and hung in the case record.
data: lt_partner type crmt_partner_external_wrkt,
ls_partner type crmt_partner_external_wrk,
lv_anchor type string,
lv_bor_type type oj_name,
lv_bor_key type swo_typeid,
lv_sps_id type string.
call function 'CRM_PARTNER_READ_OW'
exporting
iv_ref_guid = iv_order_guid
iv_ref_kind = 'A'
importing
et_partner_wrk = lt_partner
exceptions
error_occurred = 1
parameter_error = 2
entry_does_not_exist = 3
others = 4.
call function 'CRM_CMG_GET_RELATION_DATA'
exporting
ir_case = ir_case
iv_ppretyp = 'C1'
importing
ev_anchor = lv_anchor
ev_bor_type = lv_bor_type
ev_sps_id = lv_sps_id
exceptions
failed = 1
others = 2.
loop at lt_partner into ls_partner.
lv_bor_key = ls_partner-partner_no.
call method ir_case->bor_object_insert
exporting
im_anchor = lv_anchor
im_bor_key = lv_bor_key
im_bor_type = lv_bor_type
im_sps_id = lv_sps_id
exceptions
failed = 1
not_enqueued = 2
others = 3.
endloop.
Fill RESBD Structure from EBP Component Structure Addresses (Business Address Services)
This documentation is copyright by SAP AG.
Length: 6194 Date: 20240523 Time: 151847 sap01-206 ( 35 ms )