cancel
Showing results for 
Search instead for 
Did you mean: 

Please help : Open word document store in CRM transaction order

Former Member
0 Kudos

Web dynpro Gurus

I have a function module in my CRM system which opens a word document by taking the CRM order number as input. The FM is working correctly in backend.

I have called this FM on LinktoAction field in my web dynpro . The RFC runs but i get an error "Access not possible using NULL object reference., error key: RFC_ERROR_SYSTEM_FAILURE".

The expectation is that the FM will run and open the word document in MS word as it does in the backend.

Please let me know where I am going wrong. Pasting the method from which I have called the RFC.

Zcrm_Open_Last_Account_Review_Input getdoc = null;

try

{

getdoc = new Zcrm_Open_Last_Account_Review_Input();

wdContext.nodeZcrm_Open_Last_Account_Review_Input().bind(getdoc);

wdContext.currentZcrm_Open_Last_Account_Review_InputElement().setObject_Id(wdContext.currentContextElement().getObjectid());

wdContext.currentZcrm_Open_Last_Account_Review_InputElement().modelObject().execute();

}

catch(Exception e)

{

IWDMessageManager msgMrg = wdThis.wdGetAPI().getComponent().getMessageManager();

String msg = e.getLocalizedMessage();

if ((msg==null) || (msg.length()==0))

{

msg = e.getMessage();

}

msgMrg.reportException(msg,true);

}

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Sanjay:

I do have a sim'lr rqmt. I've no problem in CRM backend side(it opens the word doc properly), but when i'm trying to open from webdynpro(java) end it is not opening properly. It shows some error pop in word saying not the correct format to open with.

Can u send me the code written in web-dynpro to open the ms-word doc, if you've solved with you problem. Waiting for you reply.

Thanks in advance,

Munna SAP

Former Member
0 Kudos

Hi All:

I've solved it by my own by changing my code to meet the r\3 requirement to get the byte[] array for word document.

Thnaks,

Munna_SAP

Former Member
0 Kudos

Please explain in detail what you want me to check.

I did find that I have to go into debugging mode to change some variables once/twice for the document I am trying to open. After that it works fine in the backend without debugger help.

Maybe I should check whether there is no problem opening the document from WD in QA/Prod, assuming some development settings might be wrong on R/3 side

Former Member
0 Kudos

Sanjay,

If this works at R/3 side but fails on Java side, then check RFM default parameters. Neither JCo (hence) nor Adaptive RFC supplies default parameter values. You have to do this explicitly and manually.

VS