cancel
Showing results for 
Search instead for 
Did you mean: 

Views wdDoInit()

Former Member
0 Kudos

Generally what is the correct Coding within Views wdDoInit()

for an Input Field which is bounded with the Views Context.

Please notice it is a Model Node and there is an Element.

And in this element is an anttribute named ialrepid.

ialrepid in bounded with this mentioned Inputfield.

But it is disabled when I run the application.

Custom Controller's wdDoInit()
  public void wdDoInit()
  {
    //@@begin wdDoInit()
    //$$begin Service Controller(-774299147)
    wdContext.node__DataBecker__I_Rf02_Ial_Query_Input().bind(new __DataBecker__I_Rf02_Ial_Query_Input());


	__DataBecker__I_Rf02_Ial_Query_Input input = new __DataBecker__I_Rf02_Ial_Query_Input();
	wdContext.node__DataBecker__I_Rf02_Ial_Query_Input().bind(input);
	input.setI_Iepva_Selcrit(new Cciht_Ipeva());
	input.setI_Incident_Selcrit(new __DataBecker__Is_Rfc_Iasel());
		 

    //$$end
    //@@end
  }

Views wdDoInit()
    public void wdDoInit()
  {
    //@@begin wdDoInit()
	wdContext.current__DataBecker__I_Rf02_Ial_Query_InputElement().setI_Valdat(wdThis.getCurrentDate());
	wdContext.currentContextElement().setOrgUnitSearchCalled(false);	
	
	
	__DataBecker__I_Rf02_Ial_Query_Input input = new __DataBecker__I_Rf02_Ial_Query_Input();
	
	input.setI_Iepva_Selcrit(new Cciht_Ipeva());
	input.setI_Incident_Selcrit(new __DataBecker__Is_Rfc_Iasel());
	
	wdContext.node__DataBecker__I_Rf02_Ial_Query_Input().bind(input);
	
	wdContext.current__DataBecker__I_Rf02_Ial_Query_InputElement().modelObject().setI_Iepva_Selcrit(new Cciht_Ipeva());
	II_Iepva_SelcritElement ipe = wdContext.currentI_Iepva_SelcritElement();	

 
		
    //@@end
  }

Regards

erdem

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi erdem,

For showing data on the table you need to follow the given steps:

Select the view where you want to show the table, select Layout tab, In the Outline, click with the right mouse key on RootUIElementContainer and choose Apply Template. A Dialog box will open up, select table, click next, select the fields that you wish to display on table, click Next, click Finish.

You can refer to the following tutorial PDF for furthur clarification:

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/user-interface-tec...

Answers (8)

Answers (8)

Former Member
0 Kudos

hi

go through this link.Hope it will be helpful for you

Regards

Ruturaj

Former Member
0 Kudos

hi,

no it is set to true .

Regards

sas

Former Member
0 Kudos

Hi Raghunandan,

I am binding my Input UI element to a attribute which is under Input

node.

You are saying:
If you are binding your input UI element to an attribute under Input Node then 
you will be having the problem of cardinality.

Which cardinality has to be taken ?

I already have tried all cardinalities and nothing was solved.

Regards

sas

Former Member
0 Kudos

Hi,

Is the enabled property for this inputfield set to false?

Regards

Ayyapparaj

Former Member
0 Kudos

Hi erdem sas,

If i am not wrong, your problem is your input field is disabled, which is binded to a cotext attribute right? Then forgett all about your DoInit.

1) When you import your Bapi to context, you can see two types of nodes one is Input node and the other is Output node. Input nodes are for giving input parameters(mandatory/optional)for a Bapi to execute and Output Node is for to hold values after executing the Bapi.

a) if you are binding your Input UI element to a attribute which is under Output node then that UI will be automatically disabled. If you want that UI enabled then you should execute your Bapi in the wdInit only.

b)If you are binding your input UI element to a attribute under Input Node then you will be having the problem of cardinality.

So first clear to which attribute you are binding your UI element, that should not be under Output Node of BAPI.

Revert me if you have any clarifications.

Regards

Raghu

former_member192434
Active Contributor
0 Kudos

Hi Erdem,

To show data in table you need to import table by using following steps

Right click on OutlineApply Templates then select table  nextSelect all required field click finish.

Your table will be imported on view.

It will solve your problem.

Thanks

Anup

Former Member
0 Kudos

Anand

you are writing:

please try to first run your application by applying form template and dont do anything in wddoinit of view controller .take a table to see the output

How can take a table to see the output

Regards

sas

Former Member
0 Kudos

if you want i can give you step by step procedure to apply templates but i guess after developing so many application its not needed but my suggestion for you is go from the scratch and create a new project and a new model then import that model and do all the mappings and then see whether it is running or not then proceed with your requirement.

thanks

vishal

Former Member
0 Kudos

hi!

please try to first run your application by applying form template and dont do anything in wddoinit of view controller .take a table to see the output by again applying a table template.apply service controller template in your component controller and map your view with the model(not with com[ponent controller).

and in the wddoinit of component controller just execute your bapi .

thanks

vishal