cancel
Showing results for 
Search instead for 
Did you mean: 

Plz Help me regarding creating tables on WDynpro

Amarnath210
Explorer
0 Kudos

Hi SDN's, plz help me. its very urgent. plz. my query is....

I m Having EMP ID and EMP NAME in first screen.

EMP ID should fetch da data frm backend(R/3) by using a table employee_getlist(say) so, when i select a perticular EMPID frm drop down list box, i wants to display EMPNAME in the corresponding inputfield. All this stuff i wants to create on Webdynpro's using Java. Not on PDK. So, plz could u findout the answer and reply me. Here i found a concept called Value Help, but that was not fetching da data frm backend. dat data was providing manually. so, plz guys, i hope i will get a positive response.

Thanks in Advance.

Regards,

Rajesh Reddy S

Accepted Solutions (1)

Accepted Solutions (1)

sid_sunny
Contributor
0 Kudos

Hi Rajesh,

Create an action -> bind it to the onSelect property of the dropdown and in that action write the code to fetch the data from the backend and display it in the input field.

Do reward points if helps

Regards

Sid

Amarnath210
Explorer
0 Kudos

siddharth, could u plz give me a sample code how to fetech data frm backend to these fields.

plz

sid_sunny
Contributor
0 Kudos

Hi Rajesh,

The two BAPIs suggested by chintan will suffice your requirements. In case you dont know the usage of BAPIs you can go through the following tutorials on usage of BAPIs.

<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webdynpro/creating%20a%20web%20dynpro%20application%20accessing%20abap%20functions.pdf">Application Accessing ABAP Functions</a>

<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/d352a790-0201-0010-5082-b1a608d22b6c">Handling Transactions with BAPIs in Web Dynpro</a>

<b>Do reward points if it helps.</b>

Regards

Sid

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi rajesh,

To use the BAPI's in your webdypro, you have to use Adaptive RFC model.

in webdypro explorer-> right click on models, select create new model

then select the radio button Adaptive RFC, select your BAPI.

while binding to context you can select the fields you want to use. select Id and Name.

take a drop down UI and bind it to the Id context.

In onSelect property of dropdown just display the name.

in implementation * get the value from current now and set it to the UI *

0 Kudos

Hi Rajesh.

just create one drop down field  with supply function and bind the node as 0:N field EMP ID.

Create one action field inside action just read the drop down value .

use one select query  in where condition give readed value and bind the value to EMP name field.

Regards

jayaprakash T

chintan_virani
Active Contributor
0 Kudos

Rajesh,

U will need to BAPIs which server your purpose first.For eg:-

1)BAPI_EMPID_GETLIST

2)BAPI_EMPNAME_GETLIST (This BAPI should take EMPID as input parameter and give EMPNAME as output paramter.

After that create Adaptive RFC model in WebDynpro.

Create views in WebDynpro with EmpId as DropDownByIndex and Empname as Inputfield.

In view intialization you can call the BAPI_EMPID_GETLIST to fill the empid values.

There is <i>onSelect</i> event for the DropDownByIndex element.

Create a new custom action and pass the selected empid and call the BAPI_EMPNAME_GETLIST.

This would give you the empname. Store in context or map the context element to EmpName Inputfield context.

Hope this helps.

<b>- Chintan</b>