cancel
Showing results for 
Search instead for 
Did you mean: 

when giving customer no , address details have to show in same view

Former Member
0 Kudos

hi sap gurus,

in webdynpro java in one view when i give customer no , in the same view based on customer no , the address details have to show in table .

i take standerd bapi ( bapi_customer_display), i create one customer_info view. in this view when i give customer no in input field and press action button , i have to see the customer information in table ui element in the same view.

after press the action button , after onwards i can not move to further for developing the application.

How can i do this application . I am new to webdynpro java. please suggest me.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

HI,

under the onAction<Actionname> method, what have you written?

Regards,

Satya.

Former Member
0 Kudos

hi Mr.Satya,

after pressing the action button i need to send input to the BAPI bapi_customer_display and execute it. after then only i am getting data through export paramters .

But in the same view only the output i need . how it is

1) i am giving customer no as input in input field

2) after then press the action button, i have to get the customer address information through export parametrs in to table ui element that too in same view only under the input field and action button .

here how can i develop the application that means , i create one input field and bind with customer no contect attriute. and create one button. from here onwards i cant understand how to develop the application.

please reply me how to develop this application totally as per my requirement., step by step total application.

Former Member
0 Kudos

Hi sujana mullapudi,

Follow the procedure.

Go to layout of the view >right click on thr root UI container->Apply template>Table->select the appropriate output node from which u r getting the o/p.>finish.

Map the i/p field(u already did).

Create button and in the action ,execute the Bapi.

Now ur customer details will be displayed in the table in the same view.

Regards,

srikanth

former_member40425
Contributor
0 Kudos

Hi Sujana,

Firstly insert input field, Button and table UIs in your view.

Now create a value attribute suppose va_Tablevisibility of type Visibility and bind the visibile property of your table with attribute va_TableVisibility.

To create one value attribute "va_TableVisibility" --> Go to the properties tab --> Select the type --> click on lookup button --> Choose Dictionary Simple Type --> Expand Local Dictionary > Expand com.sap.ide.webdynpro.uielementdefinitions>Select Visibility

Now In WDDoInit make this table invisible by writing following code.

wdContext.currentContextElement().setVa_TableVisibility(WDVisibility.NONE);

And in the onAction of Button make that table visible, for that write following code.

wdContext.currentContextElement().setVa_TableVisibility(WDVisibility.VISIBLE);

I hope it helps.

Regards,

Rohit

Former Member
0 Kudos

HI Mr.Sri Kanth,

yes. i did like what you said , But in action button to execute the bapi, please can you reply the code.

Reply will highly appreciated

Former Member
0 Kudos

hi satya,

in action button to execute the bapi , i have no idea to write the code, please can you reply what i have to write the code to execute the code. reply will highly appreciated

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi sujana mullapudi ,

When you map the context of component controller to Model Service Controller is created and it generates the method in component controller to execute the bapi with the name executeBapi_customer_display_Input( );

Just call this method in the action of the button ,

wdThis.wdGet<name of component controller>.executeBapi_customer_display_Input( );

or

Just write the code in action

IWDMessageManager manager = wdComponentAPI.getMessageManager();
    try
    {
      wdContext.bapi_customer_display_InputElement().modelObject().execute();
      wdContext.nodeOutput().invalidate();
    }
    catch(WDDynamicRFCExecuteException e)
    {
      manager.reportException(e.getMessage(), false);
    }

Regards,

srikanth

Former Member
0 Kudos

Hi Mr Sri kanth,

I did model binding ( comp controller ---> model),, and context binding ( view ---> component controller).

but there is no execute method generated. i can not understand why execute medthod is not generated.

in comp controller --- in wddoinit() method -


i intialize also like

wdContext.node zbapi_cust_addr_fm_input().bind(new zbapi_cust_addr_fm_input());

please give reply for this.

Former Member
0 Kudos

Hi,

I think u have not done properly.

1)open Data modeler

2)Right click on the Component Controller-->Apply Template-

click Next-->select the model Bapi_customer_detail_input >next>here it shows the execute method-->click finish.

Then the method will be created in component controller.

Regards,

srikanth

Former Member
0 Kudos

HI Srikanth,

Thank you very much , i got the solution through your guidence. upto now i did model binding through delta link . As so it did not showing the execute method. Thank You very much for your help with so much patience.

former_member197348
Active Contributor
0 Kudos

Hi Ms. Sujana,

If you are not able to understand what went wrong still, try this:

Open the component controller -> Context tab -> Delete the node zbapi_cust_addr_fm_input

Select and right click on the component controller -> Apply template -> Wizard opens

Select Service controller -> Select zbapi_cust_addr_fm_input ->Select the context you required for input and output ->

Check "generate method model execution" -> Change method name if you have the method already -> Finish

Still if you have any problems, feel free to revert.

Regards

Siva

former_member197348
Active Contributor
0 Kudos

Hi Sujana,

Welcome to SDN!

As for as I understand your requirement,after pressing the action button you need to send input to the BAPI bapi_customer_display and execute it. Since you are new to webdynpro java, Check this [link |/docs/DOC-8061#15 [original link is broken]]

Regards,

Siva