on 06-09-2011 1:30 PM
Hello Experts,
I have a requirement in which I need to fill standard category field in activity_h using data coming from ECC system. SAP has recomended to apply a manual note 710149 [ Version 4]
As mentioned in the note i have coded in the method CRM_DATAEXCH_R3D_MBDOC_FILL as mentioend below:
READ TABLE ti_bapimtcs ASSIGNING <fs_bapimtcs>
WITH KEY tabname = 'BAPISDHD'.
IF sy-subrc = 0.
ASSIGN ct_bus_trans_msg TO <fs_bad_bus_transn_message>.
IF sy-subrc = 0.
LOOP AT <fs_bad_bus_transn_message>-orderadm_h ASSIGNING <fs_orderadm_h>.
IF <fs_bad_bus_transn_message>-activity_h IS INITIAL.
* ASSIGN <fs_orderadm_h>-sendbits TO <fs_activity_h>.
* assign component
* CLEAR wa_activity_h.
ENDIF.
* LOOP AT <fs_bad_bus_transn_message>-activity_h ASSIGNING <fs_activity_h>.
IF <fs_bapimtcs>-data+254(4) IS NOT INITIAL.
CASE <fs_bapimtcs>-data+254(4).
WHEN 'ARIB'.
wa_activity_h-category = 'TEL'.
WHEN 'B2B'.
wa_activity_h-category = 'TEL'.
WHEN 'DFUE'.
wa_activity_h-category = 'TEL'.
WHEN 'EFRM'.
wa_activity_h-category = 'TEL'.
WHEN 'EMAI'.
wa_activity_h-category = 'TEL'.
WHEN 'FAX'.
wa_activity_h-category = 'TEL'.
WHEN 'FSE'.
wa_activity_h-category = 'TEL'.
WHEN 'GFAX'.
wa_activity_h-category = 'TEL'.
WHEN 'GHX'.
wa_activity_h-category = 'TEL'.
WHEN 'JDNT'.
wa_activity_h-category = 'TEL'.
WHEN 'MAIL'.
wa_activity_h-category = 'TEL'.
WHEN 'MDNT'.
wa_activity_h-category = 'TEL'.
WHEN 'NHNT'.
wa_activity_h-category = 'TEL'.
WHEN 'OSD'.
wa_activity_h-category = 'TEL'.
WHEN 'OSDM'.
wa_activity_h-category = 'TEL'.
WHEN 'SCIQ'.
wa_activity_h-category = 'TEL'.
WHEN 'TELE'.
wa_activity_h-category = '202'.
WHEN 'WCNT'.
wa_activity_h-category = 'TEL'.
WHEN 'WEB'.
wa_activity_h-category = 'INT'.
WHEN 'XWEB'.
wa_activity_h-category = 'ZO1'.
ENDCASE.
wa_activity_h-orderadm_h_guid = <fs_orderadm_h>-orderadm_h_guid.
* wa_activity_h-sendbits = <fs_orderadm_h>-sendbits.
APPEND wa_activity_h TO <fs_bad_bus_transn_message>-activity_h.
ENDIF.
* ENDLOOP.
ENDLOOP.
LOOP AT <fs_bad_bus_transn_message>-activity_h ASSIGNING <fs_activity_h>.
* Resolve the sendbits into a table of field names
REFRESH lt_fields.
* CALL FUNCTION 'SMOG_SENDBITS_CHECK'
* EXPORTING
* structurename = 'BAD_ACTIVITY_H_MESS'
* sndbits = <fs_activity_h>-sendbits
* TABLES
* sfields = lt_fields
* EXCEPTIONS
* structure_not_found = 1
* OTHERS = 2.
* CHECK sy-subrc EQ 0.
** Add the names of the new fields
CLEAR ls_field.
ls_field-fieldname = 'CATEGORY'.
INSERT ls_field INTO TABLE lt_new_fields.
INSERT LINES OF lt_new_fields INTO TABLE lt_fields.
** Code the sendbits again
CALL FUNCTION 'SMO_SNDBITS_SETX'
EXPORTING
structurename = 'BAD_ACTIVITY_H_MESS'
* fieldname = 'CATEGORY'
TABLES
sfields = lt_fields
CHANGING
sndbits = <fs_activity_h>-sendbits
EXCEPTIONS
structure_not_found = 1
wrong_fieldname = 2
OTHERS = 3.
ENDLOOP.
ENDIF.
ENDIF.
But my category field is not getting updated. Please let me know how to resolve this issue.
Regards,
Pranay
We are not using this BADI any more.
We have enhanced the ORDERADM_H structure with BSARK field from ECC and filling the data in the middleware Exit.
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.