cancel
Showing results for 
Search instead for 
Did you mean: 

Java Web Dynpro disconnectIfAlive

victorpale
Participant
0 Kudos

Dear SAP guru's

If I have a wdContext.currentBapi_Flight_GetList_InputElement().modelObject().modelInstance().disconnectIfAlive() in my Java Web Dynpro code, this should go before or after wdContext.nodeOutput().invalidate()?

For example, what code is ok?

wdContext.currentBapi_Flight_Getlist_InputElement().modelObject().execute();

wdContect.nodeOutput().invalidate();

wdContext.currentBapi_Flight_GetList_InputElement().modelObject().modelInstance().disconnectIfAlive();

or

wdContext.currentBapi_Flight_Getlist_InputElement().modelObject().execute();

wdContext.currentBapi_Flight_GetList_InputElement().modelObject().modelInstance().disconnectIfAlive();

wdContect.nodeOutput().invalidate();

Is indistinct order of the disconnectIfAlive()?

Best regards.

Accepted Solutions (1)

Accepted Solutions (1)

Stefan-EA
Contributor
0 Kudos

Hi Victor,

I would go with the second option.

  1. Execute the RFC
  2. Disconnect from the backend
  3. Synchronize your context with the model

Answers (1)

Answers (1)

vijay_kumar49
Active Contributor
0 Kudos

Dear Carmona,

This is Currect code

wdContext.currentBapi_Flight_Getlist_InputElement().modelObject().execute();

wdContext.currentBapi_Flight_GetList_InputElement().modelObject().modelInstance().disconnectIfAlive();

wdContect.nodeOutput().invalidate();

1) Execute BAPI. 2) Disconnect your existing BAPI and 3) Invalidate the Contect

Hope this helps !!!

Regards

Vijay K