Quantcast
Channel: SCN : Document List - ABAP Development
Viewing all articles
Browse latest Browse all 935

Table in smart form and header column name with colours

$
0
0

Table in smart form and header column name with colours:

 

Create a local type in the global definition


SF1.png

Declare internal tables and work area in the global data:

SF2.png

 

 

Initialise the internal table with some initial values:

 

 

 

SF3.png

 

 

 

 

 

 

Create a table under the main window:

In the table tab create a line type by right Clicking as shown below.

 

SF4.png


SF5.png

To colour the particular line type :

Click and select the line type and go to shading , below shading select the colour as you want.

 

SF6.png

After selecting the colour the particular line type will be on the colour which we have selected:

SF7.png


After creating the line type and the columns according to the requirement:

In this case there are 2 colums.

Here we create 2 line types:

1st line type is for header, that is for the column name.

2nd line type is for the column values which comes during the run time.

 

 

Now go to the Data tab:

And declare the internal table and work area.


SF8.png

 

Now go to header:

Right click and create a table line:


SF9.png

Now in the table line it will ask for line type: since its header we are choosing it as line type 1.

Since we have 2 columns which we have defined in the line type , 2 cells will be created. Under the line type.


SF10.png

 

Now go to the cell and right click on it and create a text for it:


SF11.png

After creating in general attributes tab, give the column name as shown below.


SF12.png

 

Similarly do it for cell 2 as well.

 

Then now lets go the Main area:

 

As we have done in the header lets create a table line and here we are giving as line type 2 for the data parts:


SF13.png

 

Since the line type 2 has 2 columns, 2 cells are created under.

IN the 2 cells right click on it and create text for it:

Since its main area, here we will be giving the work area values , which comes on the run time.

 

SF14.png

Similarly do the same for cell 2:

 

SF15.png

Here we are creating 2 line types in the table :

Because the line type 1 is used for header purpose , that is for displaying the column name in colour and its being used in the header part.

 

 

The second line type is used to display the internal table values and its being used in the main area part.

 

 

 

 

 

 

 

Now the output is:

 

SF16.png


Viewing all articles
Browse latest Browse all 935

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>