cancel
Showing results for 
Search instead for 
Did you mean: 

Horizontal and vertical columns in table-Problem

Former Member
0 Kudos

Hi,

I have came across a requirement where i have to show data in tabular form but it will have both vertical as well as horizontal columns.

Let us suppose vertically we will have 2 cloumns : Employee Name , Salary drawn

and horizontally 4 cloumns for 4 months or more.

I want to show multiple employees and what is the salary by each of them in 4 months or more.

           Employee Name Salary Drawn

Jan          Mr. X                   1000

Feb          Mr. X                    2000

Mar           Mr.Y                   3000

Apr            Mr.Y                  4000

How can this be achieved?

Thanks and Regards,

Saikat.

Accepted Solutions (1)

Accepted Solutions (1)

former_member199125
Active Contributor
0 Kudos

Its very simple saikat,

make three column tables, and make sure first column will be month

2nd column wil be empoyee number

3rd column will be salary.

and dont give column heading for first column.

create a node with three attributes, say AMONTH, APERNR, ASALARY

CREATE A TABLE WITH THIS NODE. AND GIVE COLUMN HEADING FOR 1ST AND 2ND COLUMN.

and I hope you know how to fetch and display the data in table.

if you want to dispaly only january month first, then sort the month column.

Regards

Srinivas

Answers (1)

Answers (1)

sahai
Contributor
0 Kudos

hi saikat,

1) go to the view and then click on the "context" tab .

2) create the context by right clicking on the context . make the cardiality 0:n

3) now after creating the context write click on the conetxt just created and create attributes in the node...remember to give the data types of same kind as required in your scenario

as far as i can guess...you nee three attributes

a) Month

b) employee name

c)salary

4) now go to the layout tab ..

right click on the rootuielementcontainer and chose table .

5) right click on the table and browse the name of the node just created.

6) press the tick mark sign..

7) now you will see a table getting created in the layout just check the right panel on the screen you give the column name as required by you.

😎 write logic for fetching the data. as you have not mentioned this part i hopeyou know it

dnt forget to bind the table with the node .in the elogic.

😎 excecute the program.

for any further query ask.

regards,

Shitanshu Sahai.

Former Member
0 Kudos

Hi All.

Thank you for your replies.

@Srinivas -your approach is correct.But in that way the months will be coming like records in the table. I want them to appear like fixed columns.

@Shitanshu- i think i didnt get you. The solution you are saying is for normal vertical columns. I want fixed columns vertically and horizontally.Months will coming horizontally even if deres no record for that particular employee. Its somewhat like a graph with x and y axis.

Thanks,

Saikat

saravanan_narayanan
Active Contributor
0 Kudos

Hello Saikat,

I doubt whether you can achieve vertical static column. As suggested by others you can display all the months in the first column ( you can display the months even if there are no records available for that month).

BR, Saravanan

Former Member
0 Kudos

Hi Saravanan,

Thanks for your input.

Yes,i have also looked at options but not getting useful.But the problem is that even if I make the months appear in the first columns then also i have to make it a bit different from the other records. Make the months appear like a column headings.

Any idea on that?

Thanks,

Saikat

saravanan_narayanan
Active Contributor
0 Kudos

Hello Saikat,

It is possible to display the month column in different color but the not the same color as the column header. Have a look at the following link

http://help.sap.com/saphelp_nw2004s/helpdata/en/b5/ac884118aa1709e10000000a155106/frameset.htm

BR, Saravanan