Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

table view

Former Member
0 Likes
549

hi all,

i created a table and table view,no im supposed to create a filed only in the table vuew from another table,i.e there is a filed called user id in the table and table view,now after i fill the filed userid the user wants to see the name of the user in another filed.the name filed should not be in the table it should be only at view level.where i have to do coding to fill this name filed,either in PBO or PAI,plz help me with some code.TYhank u

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
526

Hi Babita,

First write a select query with join on both the tables containign userid and username and fetch the entire details into an internal table.

Now If u r using table control(module pool programming) to display the contents of the table and u want to display results as soon as user runs the transaction, then write the code in PBO (like MODULE display).

But if u want to display details after a user selects one particular record then write the code in PAI.

hope this solves your problem

Lakshmi

3 REPLIES 3
Read only

Former Member
0 Likes
526

Hi babita,

1. if u created a view using se11,

then there

u can add one more table USR01

2. then u can link the fields

with

MANDT

BNAME (user id)

3. In field list, add username from usr01 table.

4. Then in your code, just select

select * from myview.

5. Thats all

regards,

amit m.

Read only

Former Member
0 Likes
527

Hi Babita,

First write a select query with join on both the tables containign userid and username and fetch the entire details into an internal table.

Now If u r using table control(module pool programming) to display the contents of the table and u want to display results as soon as user runs the transaction, then write the code in PBO (like MODULE display).

But if u want to display details after a user selects one particular record then write the code in PAI.

hope this solves your problem

Lakshmi

Read only

Former Member
0 Likes
526

Hello Babita,

What u need to do is decide when u want to display the name. If it directly when user enter the transaction or after user selects certain transaction. But based on what u have described it seems the view has this additional field which gets displayed when the user enters the transaction. For this u have to code follwoing in PBO.

U have user field in ur table, use this field to access table USR21. get person_number field. Use this field to call FM ADDR_SELECT_ADRP_SINGLE. This FM will give u the necessary info which u to move to the screen field.