cancel
Showing results for 
Search instead for 
Did you mean: 

node did not refrrshed, even invalidate

Former Member
0 Kudos

Hello Friends,

I am calling a bapi in wdmodifyview, and want what surprise me the data is not modifying even I used the node.invalidate after executing the bapi ?

Any idea what can be done more to refresh the node ?

Regards,

( if its helps I can paste my code here )...

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

okey, I debugged the application and I must say the node is refreshed, but the input field with f4 help did not refreshed,

So now let me talk in a bit details: Actually I have an input field with f4 help which shows various variant. The user deletes one variant, the control comes to my wdmodifyview, there I call again the bapi ( which deliver me the new records ) everything fine, but still the deleted variant is visible in input field ( which actually did not come back even after the bapi call ) so my question is how I can refresh the input field f4 help....

Regards,

Former Member
0 Kudos

Hi,

If I get it correctly, the user chooses a variant to be deleted from the value help of the input field. Then on some action you delete this variant, make a BAPI call and populate again.

Since it loads the same page again, because of the statefulness of WD, you see the selected variant still in the input field. If this is the case, you can simply set the text property of the input field UI element to empty string inside wdDoModifyView() like this:

//Do this after you have completed all the BAPI calls and everything...
IWDInputField fld = (IWDInputField) view.getElement("<id of input field>");
fld.setValue("");

Regards,

Satyajit.

Former Member
0 Kudos

Thanks for your reply Satyajit, but what about when out of 4 variant only 1 is deleted, means it has to still show 3 variant, if I set the input field to "", how I will show the other three variant ?

Regards,

Former Member
0 Kudos

Hi,

Ok so now the question is how have you built the value help? If it is a static DropDownByIndex then you have to delete the element at lead selection of the context node bound to the dropdown.

If the values come from the BAPI, then you will have to invalidate the context node bound to the dropdowns and then rebuild it again by adding the elements.

Regards,

Satyajit.

Former Member
0 Kudos

<b>

If the values come from the BAPI, then you will have to invalidate the context node bound to the dropdowns and then rebuild it again by adding the elements.</b>

This is what I am doing, my code for creating the input help is in wdmodifyview, and it call the bapi, and fill the f4 help, so next time same method executes, everything is newly created, bapi call fetch the new records, but it display the same old resutl....

if it help I can paste me code...

Regards,

Former Member
0 Kudos

Hi,

Please post the code for wdDoModifyView() here.

Regards,

Satyajit.

Former Member
0 Kudos

Code of wdmodify:

//@@begin wdDoModifyView

view.resetView();

IWDAttributeInfo attribute_var = wdContext.getNodeInfo().getAttribute("varname");

ISimpleTypeModifiable fileName_var = attribute_var.getModifiableSimpleType();

Zport_Get_Variant_Input variant_input = new Zport_Get_Variant_Input();

wdContext.nodeZport_Get_Variant_Input().bind(variant_input);

try {

variant_input.setClient(WDClientUser.getCurrentUser().getSAPUser().getJobTitle());

variant_input.setPuser(WDClientUser.getCurrentUser().getSAPUser().getUniqueName().toUpperCase());

variant_input.setRpttype(wdContext.currentContextElement().getReportType() );

variant_input.setTabname(wdContext.currentContextElement().getFileName() );

wdContext.nodeZport_Get_Variant_Input().currentZport_Get_Variant_InputElement().modelObject().execute();

wdContext.nodeVartab().invalidate();

wdContext.nodeOutput_variant().invalidate();

} catch ( Exception e) {

}

fileName_var.setFieldLabel("varname");

IModifiableSimpleValueSet valueSet2 = fileName_var.getSVServices().getModifiableSimpleValueSet();

// IWDInputField fld = (IWDInputField) view.getElement("Variant");

// fld.setValue("");

for (int i = 0; i < wdContext.nodeVartab().size(); i++) {

valueSet2.put(wdContext.nodeVartab().getVartabElementAt(i).getVarname(), "Variant: " + wdContext.nodeVartab().getVartabElementAt(i).getVarname());

}

//valueSet2.sort(true, true , true);

if (firstTime)

{

if (wdContext.currentContextElement().getCSRflag().equalsIgnoreCase("X"))

{

IWDInputField clt = (IWDInputField) view.getElement("Client");

clt.setReadOnly(false);

}

}

//@@end

Regards,