cancel
Showing results for 
Search instead for 
Did you mean: 

Fill of tables and drop-down boxes

BGarcia
Active Contributor
0 Kudos

Hello to everyone,

I'm new at BSP's, and there are certain things that I can't understand about. For example, how a dropdown box or a table, it's gonna be filled. I know languages such as html and javascript but i'm a begginer at ABAP.

I searched a little in this forum for examples, but all the examples that I read, don't use the "flow" that standard BSP crm_ic views use, and I going insane to understand a couple of things. This is my last hope...

For example, at view BuPaDetailB2B.htm, i have a little piece of code that produce a dropdown box:

<crmic:dropdownListBox id = "ContactInfoType"

table = "<%= <ContactInfoType_table> %>"

selection = "<%= ContactInfoType %>"

onSelect = "contactInfoChanged"

width = "100%"

nameOfKeyColumn = "KEY"

nameOfValueColumn = "VALUE" />

</crmic:gridLayoutCell>

What I like to understand is where the code is gonna produce the content of this dropdownlistbox?? I see that it as a parameter table pointing to <%= <ContactInfoType_table> %>, but where normally this tables are builded? I didn't see any SELECT statement on this code, or in researchs to his controller class...

with an table the problem still the same. At viwe BuPaSearchB2B.html, at code:

<crmic:tableView design = "STANDARD"

id = "Basket"

table = "//BTOrder/Table"

fillUpEmptyRows = "true"

visibleFirstRow = "1"

visibleRowCount = "5"

columnWrapping = "false"

footerVisible = "false"

onRowSelection = "onRowSelection"

width = "100%"

selectionMode = "LINEEDIT"

iterator = "<%= btorder->iterator %>" >

<crmic:tableViewCols>

<crmic:tableViewColumn columnName = "ACT_DATE"

title = "<%= otr(crm_ic_appl/irecdate) %>" />

<crmic:tableViewColumn columnName = "ACT_TIME"

title = "<%= otr(crm_ic_appl/irectime) %>" />

<crmic:tableViewColumn columnName = "CATEGORY_TXT"

title = "<%= otr(crm_ic_appl/channel) %>" />

<crmic:tableViewColumn columnName = "DESCRIPTION"

title = "<%= otr(crm_ic_appl/irecdescription) %>"

wrapping = "TRUE"

width = "30" />

<crmic:tableViewColumn columnName = "OBJECT_ID"

title = "<%= otr(crm_ic_appl/irecorder) %>" />

<crmic:tableViewColumn columnName = "STAT_TXT"

title = "<%= otr(crm_ic_appl/irecstatus) %>" />

</crmic:tableViewCols>

</crmic:tableView>

I can figure out that a table is build by pointing the parameter table (again) to "//BTOrder/Table", but where the data is builded?? I searched inside it's classes and iterator, but once more, I didn't find any SELECTS or something configurable, that shouded permit me to change it's content....

Can't anyone help me to understand how the standards BSP's works?

A thousand thanks

Best Regards

Bruno Garcia

Accepted Solutions (0)

Answers (3)

Answers (3)

BGarcia
Active Contributor
0 Kudos

Thank you both for the hints, it were very helpful. I'm really apreciatted and it helps to understand a little more this fascinating world of BSP's.

I have only one more question (maybe Brad can give me some hints, as I think he may haved the same problem)

In interaction record history I have a table with information about the last 5 interactions of the costumer. And there, it have a column table called "status/result".

This column saves the system status. But I need to change it's content to the user status: the status that I choose when I save a Interaction Record, in the dropdownlistbox.

What I'm trying to do in the BSP code,at IRecHistory.htm, I can write code to see the status in correponding index using the method GET_T_TABLE. The problem is when I use the SET_T_TABLE. I thought that this method may change the cotent of a cell, but I can't see any change.

Here some example:

data: obj_id TYPE string.

BTOrder->SET_T_TABLE( ATTRIBUTE_PATH = 'Table[1].STAT_TXT' INDEX = 1 COMPONENT = 'STAT_TXT' VALUE = 'Something else' ).

obj_id = BTOrder->GET_T_TABLE( ATTRIBUTE_PATH = 'Table[1].STAT_TXT' INDEX = 1 COMPONENT = 'STAT_TXT' )

When I read the cotent of obj_id, it have the default value, instead of "Someting else".

I'm I doing something wrong? Why this happens?

Best Regards,

Bruno Garcia

former_member182119
Active Participant
0 Kudos

Hello Bruno!

The SET_T_TABLE method only dispatches the data change to the reponsible SET_STAT_TXT method in the context node.

However in case of IRecHistory.htm this will not work.

STAT_TXT is bound to attribute STAT_TXT of BOL entity BTOrderCustHist, which is a rad-only object.

Best regards,

Uwe

brad_bohn
Active Contributor
0 Kudos

Hi Bruno--

I feel your pain. I have spent the last few weeks setting up the IC WebClient for my company and it's my first crack at BSPs, though I'm good in all other ABAP-related areas. One reference that may help you if you don't already have it is the 'Consultant's Cookbook - IC WebClient'. Sorry, I don't have the link right now, but you can find it in the CRM 4.0 area.

For dropdown box population, it can be done a couple of ways: directly in the page using a locally defined table or using a page attribute and some other source of code like the SET_MODELS method of your implementation class. Look at the top of the your view layout coding and you'll see where the dropdown values are populated:


data:
* fill dropdown for ContactInfo
  lr_contactInfoType = lv_bupacontroller->fill_contactInfoType_tab( ).
  assign lr_contactInfoType->* to <ContactInfoType_table>.

So, in your example, the code to populate the table (a page attribute accessed via a field symbol) is actually in a method of the custom controller implementation class.

Hope this helps.

maximilian_schaufler
Active Contributor
0 Kudos

Hi Bruno,

in addition to HTML and JavaScript you should also be familiar with server-side-scripting (like PHP, ASP, ...), because this is what BSP is.

Read the documentation on this:

<a href="http://help.sap.com/saphelp_webas620/helpdata/en/86/25183a3bef2669e10000000a114084/frameset.htm">Web Application Server Docu on help.sap.com</a>

Understanding the basics is very important, and also a requirement to receive further help. We SDN-Users understand how one feels entering a new field of technology, and we like to help, but only if you show you have done research and learning by yourself as well.

I think your questions would be answered by studying the documentation and going through the example scripts, nevertheless I want to give you short answers as well (but please read the docu before asking follow-up questions!):

Regular BSP-Pages have so-called <b>EventHandler</b>, where you can place your code, and also fill tables and variables, that you can use in your layout code (<b>page attributes</b>).

Additionally, BSP pages can make use of <b>BSP Extensions</b> (like <crmic:dropdownListBox> or similar). These extensions are used to simplify development for you!

When the page gets called, this extension code gets evaluated and the HTML and JavaScript code for this element will get created by the classes for the extension element. (don't worry, reading the docu will shed light on this)

I know that this answer will only be satisfying after you did some basic BSP research, but don't hesitate, everybody started out fresh in the beginning.

Summary - where you should invest some time in:

Read the documentation as a start - you won't get far skipping this part!

Look for all it, sbspext and tutorial* applications in your WebAS System, they contain lots of useful code to learn from.

Copy and modify these example applications and/or create your own test applications, play around with the code.

Read BSP Weblogs, they give extensive information on specific problems.

And last - don't let yourself get down by the amount of new information, fight your way through all of it - it's worth it

Best regards,

Max