The original solution in document Web-services enhancement for MS Word integration in CRM 2007 is no longer valid now, since the automatically generated web service response structure is now marked by SAP as "cannot be enhanced", to avoid inconsistency caused by any manual change.
For example, if we need to create current user and current system date on the word template for Service contract.
For detail step by step how to do this using application extension tool, you can refer to this link.
You do not need to configure them in the end UI.
Make sure you have included the two extension fields into your web service structure.
Then create a word template based on this web service. And then the two extension fields are available in the web service response structure. You could now use them in the word template.
Create a filter for your BAdI implementation whose value equals to the name of web service you created in step2.
Implement method as below:
METHOD if_ex_crm_wst_rt_badi~outbound_processing.
FIELD-SYMBOLS: <container> TYPE any,
<root> TYPE any,
<header> TYPE any,
<user> TYPE any,
<date> TYPE any.
ASSIGN outbound->* TO <container>.
* replace ZSERV_CONTRACT with your own web service name
ASSIGN COMPONENT 'ZSERV_CONTRACT' OF STRUCTURE <container> TO <root>.
CHECK sy-subrc = 0.
ASSIGN COMPONENT 'ADMINISTRATIVEHEADEROFORDER' OF STRUCTURE <root> TO <header>.
CHECK sy-subrc = 0.
ASSIGN COMPONENT 'ZZFLD00012H' OF STRUCTURE <header> TO <user>.
CHECK sy-subrc = 0.
<user> = sy-uname.
ASSIGN COMPONENT 'ZZFLD00012I' OF STRUCTURE <header> TO <user>.
CHECK sy-subrc = 0.
<user> = sy-datlo.
ENDMETHOD.
Create a new attachment for a given Service contract based on the word template you created in step2.
And in the runtime, the two extension fields in the template are merged with the data we fill in our BAdI implementation.
Using AET to enhance the web service structure and BAdI implementation to fill extension fields with values, we could fulfill customer requirement with a modification free approach. Such enhancement is transportable and could still survive after upgrade.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
9 | |
4 | |
2 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |