cancel
Showing results for 
Search instead for 
Did you mean: 

Modifying the column header

Former Member
0 Kudos

how to modify the column header in the table...

MATNR, WERKS, DESC1, LGORT, MAKTX, LGOBE,LABST

is not meaningful to the user....

this is defined in the meRepMeta.xml

how do i modify the column header

Accepted Solutions (1)

Accepted Solutions (1)

former_member304703
Contributor
0 Kudos

Hi Yzme,

Just to let you know, if you customize an SAP application the moment you use merep_sbuilder transaction you create a customer SyncBo. That means that you loose SAP support as well as create a big overhead for upgrades, appliing SRs, hotfixes, etc.

When you do customer enhancemenets you should stay away from changing SyncBos as much as you can.

Renaming fields is definetely NOT worth it.

Field names being not very user friendly, that's life. An end user who uses it every day to enter data should not see it, jsps should take care of it.

The only person who will see it is application administrator and that's the way it is.

If you create your own application, then it is the other matter, you can do what you want. But if you customize SAP application I strongly encourage you to look through SAP enhancements guideline documenation to see what and how it should be done.

Regards,

Larissa Limarova

Former Member
0 Kudos

actually the information is display on the jsp

the following code will list the headername as describe in the xml

see this :

http://i192.photobucket.com/albums/z231/yzme/page2.jpg

how do i modify it...

the code is automatically generated when i import the xml to create MI Smart sync projetc


<tr class="miHeader" >
<% for(int col=0; col < colCount; col++) { %> 
<td class="1stCellHeader" ><theader><%=tableViewBean.getTableContent(0,col)></theader></td>
<% } // end of a row %> 
</tr>

public String getTableContent(int row, int column) {
Vector data = (Vector) tableContent.elementAt(row);
//Check for end of Vector
if (row >= tableContent.size()) {
return "";
}
return data.elementAt(column).toString();
}

Message was edited by:

yzme yzme

Message was edited by:

yzme yzme

sandeep_rs
Advisor
Advisor
0 Kudos

Hi Yzme,

I guess you will have to hold the mapping somewhere. Maybe an hashmap holding the SAP provided names and the names that you want to display to the user. The getTableContent() would then check from the hashmap and return the user friendly names instead of the SAP provided name.

Best Regards,

Sandeep

Former Member
0 Kudos

Hi Yzme,

You are looking for changes in Header Text. you can do it by custumizing your application. Since the changes are pertaining to UI, you can write your code in .jsp files.

<tr class="miHeader"><td><font size="2"> Assignment ID:

<%=myHeaderText.getTableContent(1, 1) %> </font></td>

where in the function myHeaderText you can write a code to replace the Header Text with your relevent Text. you can write something like this to suit your need,

eg:

myHeaderText(int r, int c) {

if(col == 1)

hdr = "Mandatory";

if(col == 2)

hdr = "Description";

...

...

...

}

Hope this helps

Divya

Message was edited by:

Divya Sarraju

Former Member
0 Kudos

The header problem already solved..thanks..

http://i192.photobucket.com/albums/z231/yzme/page2.jpg

from this you can see that the primary key is SYNC_KEY..

how do i move the this to another column in JSP

the concept is to bind the SYNC_KEY value to the column for eg: "WERKS"

Message was edited by:

yzme yzme

Former Member
0 Kudos

Hi Yzme,

I cannot open the link you provided. i am not sure of the way you can add files in this forum.

is that you want to change the name of the SYNC_KEY to WERKS or what do you mean by binding here.

Divya

Former Member
0 Kudos

it is weird that you cannot open the link..

Not Change the name of SYNC_KEY to WERKS

as i said, it is weird to shows the ppl SYNC_KEY as primary key,

if the table have eg : product id, customer id,

but the xml will threat the sync_key as primary key ..right...

1)IN JSP , WERKS as primary key , and user click , he is actually clicking passing the value of SYNC_KEY.....

2)and i how i hide the SYNC_KEY field ?

Message was edited by:

yzme yzme

Former Member
0 Kudos

Hi Yzme,

Sync Key is generated in the middleware to identify each row uniquely. you can certainly morphe it for a better User Interace or understandability.

1. first the header name would be SYNC_KEY, you Change it to WERKS, with previous process.

2. then you will want to replace the SyncKey data with some sequence number. say, 3123224 with 1 3123225 with 2... so on.

for this you can do changes in relevent .jsp page.

in the Primary key Col(WERK in ur case) try to print the row number instead of the SyncKey.Else you can keep your own counter variable. Ensure that you dont lose the hyperlink..

you can do something like this:

if(col == 0)

value = row+"";

// Value for table field is HTML encoded to prevent display errors because of special HTML characters (e.g. <)

value = com.lrn.pkg.TaskMgtSys.encodeForHtml(value);

....

...

...

Hope this helps

Divya

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Yzme,

You can change the column headers in the MEREP_SBUILDER transaction, you can enter the synboname in the input field and click on the modify button.

After the modification you will have to regenerate the meRepMeta xml file.

Best Regards,

Karthik