How to put constraint for a property in ATG Search
Hi
We are facing an issue with search 10.0.2
We have added a functionality to search promotions along with catalog.
Now, if we search by promo id and if an exact match is found then the results come fine.
like if i search for "promo123" and if there are 5 products associated to promo123 then it displays correctly.
The problem comes when we search for a promo that does not have any product linked to it.
like if i search for "promo456" then there are no results associated with it but the search now brings the search related to "promo" excluding the 456 from it and displays them all.
Is there a way i can tell my search to bring exact match results corresponding to "promo456" and if there is no exact match then display 0?
Thanks
Hello,
You can try this,
If your promotions item descriptor is part of the index then add the following input field in your search form.
Eg:
<dsp:input bean="/atg/commerce/search/catalog/QueryFormHandler.searchRequest.relQuestSettings.activeSolutionZones" type="hidden" value="role:promotionitemdescriptorpropertyname.id"/>
Here the value of this hidden field is
role:promotionitemdescriptorpropertyname.id
You need to change the promotionitemdescriptorpropertyname with your property name in productcatalogoutputconfig and if you search on id then add
whatever is the id name of the property you need to pass that.
Hope this helps...
You can have the documentation at following URL:
http://download.oracle.com/docs/cd/E22630_01/Search.1002/pdf/ATGSearchQuery.pdf
and in that pdf take a look at this chapter "Setting the relQuestSettings Property"
Edited by: 890963 on Oct 12, 2011 1:32 AM
Edited by: 890963 on Oct 12, 2011 1:35 AM
Similar Messages
-
How to Put Legend for Multi Series Stacked Graph...?
Hi Experts,
Please guide me how to put Legend for Multi Series Stacked Graph...?
Its very URGENT...!!!!
Thanks in advance...
Regards,
ManojI searched the forum using "jcombobox multiple columns". The first posting I read had a link to a posting with 4 different solutions.
Why is it so hard to search the forum before posting a question???? -
How to put condition for one date range should not interfear with another ?
hi friends,
how to put condition for one date range should not interfear with another date range.
my data base table has two fields
from date
to date.
when we enter the date range in the data base , new date range means from date and to date should not interfear.
can anybody help me.
thanks &Regards,
Revanth
Edited by: rk.kolisetty on Jul 1, 2010 7:18 PMDo it the SAP way....
First entry...from is today, to is 99991231.
New dates entered, now we have two rows...:
from is original date to becomes yesterday.
From is today to is 99991231 -
How to put constraint??
hi,
1st case
i have a table ABC , in this i have 3 columns col1 col2 col3
now i want to put constraint on table level that col1 n col2 always b unique together like
col1 col2 col3
100 1 item
100 2 item
100 3 item
200 1 item
200 2 item
2nd case
i have a table XYZ contains columns col1 col2 col3.. here i want col3 should be unique as per col1 and col2 like
col1 col2 col3
100 1 10
100 1 11
100 1 12
100 1 13
100 1 14
i know that unique can b possible in for every column individually but considering more than one column dont know...
please tell how to resolve??
thanksHi FRNzzz!! wrote:
2nd case
i have a table XYZ contains columns col1 col2 col3.. here i want col3 should be unique as per col1 and col2 like
col1 col2 col3
100 1 10
100 1 11
100 1 12
100 1 13
100 1 14
Create a unique constraint on (col1, col2, col3).
test@ORA11G>
test@ORA11G> --
test@ORA11G> create table xyz (col1 number, col2 number, col3 number);
Table created.
test@ORA11G> alter table xyz add constraint xyz_u1 unique (col1, col2, col3);
Table altered.
test@ORA11G> --
test@ORA11G> insert into xyz (col1, col2, col3) values (100, 1, 10);
1 row created.
test@ORA11G>
test@ORA11G> -- try inserting a repetition of col3 for the same combination of (col1, col2)
test@ORA11G> insert into xyz (col1, col2, col3) values (100, 1, 10);
insert into xyz (col1, col2, col3) values (100, 1, 10)
ERROR at line 1:
ORA-00001: unique constraint (TEST.XYZ_U1) violated
test@ORA11G>
test@ORA11G> -- doesn't work !
test@ORA11G> -- now try with a different value of col3; col1 and col2 remaining the same
test@ORA11G> insert into xyz (col1, col2, col3) values (100, 1, 11);
1 row created.
test@ORA11G>
test@ORA11G> -- works now
test@ORA11G>isotope -
How to put tab for alignment using out.println?
can anyone tell me how to put something like \t in out.println of JSP/
out.println("<blockquote>your text</blockquote>");
-
Q: how to put values of two VO in a search table that is dependent
Hi
my requirement is somehow complicated, it is as follows:
i have an employeeEO and a DirectorEO with the corresponding employeeVO and DirectorVO i want to make a search on the two VOs but with one search table and one go button.
I have put a query region then region using wisard for the EmployeeVO then add an item for the director with no view instance and no view attribute, now i don't know how to put the name of the director in DirectorVO according to the empID in EmployeeVO
any help would be appriciated
Thanksi have also put the following in the processRequest
OATableBean employeeTable = (OATableBean)webBean.findChildRecursive("EmployeesVO1");
OAMessageChoiceBean directorIdList = (OAMessageChoiceBean)employeeTable.findChildRecursive("Director");
OAMessageStyledTextBean empIdList = (OAMessageStyledTextBean)employeeTable.findChildRecursive("EmpId");
directorIdList.setListVOBoundContainerColumn(0, employeeTable,"empIdList");
OAApplicationModule am = pageContext.getApplicationModule(webBean);
am.invokeMethod("putDirector");
but the problem is how then i can put the empId in the Am without a specific reference ?? -
How to put colours for a column in ALV
Dear All,
I need to put green colour for 1 column in an ALV report.
Can anybody tell me how we can do that ...
Thanking you in advance,
ShankarHere's a little sample program..... this illistrates coloring at the column, row, and cell level.
report zrich_0002 .
* Use of colours in ALV grid (cell, line and column) *
* Table
tables : mara.
* Type
types : begin of ty_mara,
matnr like mara-matnr,
matkl like mara-matkl,
counter(4) type n,
free_text(15) type c,
color_line(4) type c, " Line color
color_cell type lvc_t_scol, " Cell color
end of ty_mara.
* Structures
data : wa_mara type ty_mara,
wa_fieldcat type lvc_s_fcat,
is_layout type lvc_s_layo,
wa_color type lvc_s_scol.
* Internal table
data : it_mara type standard table of ty_mara,
it_fieldcat type standard table of lvc_s_fcat,
it_color type table of lvc_s_scol.
* Variables
data : okcode like sy-ucomm,
w_alv_grid type ref to cl_gui_alv_grid,
w_docking_container type ref to cl_gui_docking_container.
parameters : p_column as checkbox,
p_line as checkbox,
p_cell as checkbox.
at selection-screen output.
perform get_data.
perform fill_catalog.
if w_docking_container is initial.
perform create_objects.
endif.
*& Form create_objects
form create_objects.
create object w_docking_container
exporting
ratio = 60
exceptions
cntl_error = 1
cntl_system_error = 2
create_error = 3
lifetime_error = 4
lifetime_dynpro_dynpro_link = 5
others = 6.
create object w_alv_grid
exporting
i_parent = w_docking_container.
* Field that identify color line in internal table
move 'COLOR_LINE' to is_layout-info_fname.
* Field that identify cell color in inetrnal table
move 'COLOR_CELL' to is_layout-ctab_fname.
call method w_alv_grid->set_table_for_first_display
exporting
is_layout = is_layout
changing
it_outtab = it_mara
it_fieldcatalog = it_fieldcat
exceptions
invalid_parameter_combination = 1
program_error = 2
too_many_lines = 3
others = 4.
endform.
*& Form get_data
form get_data.
select * from mara up to 5 rows.
clear : wa_mara-color_line, wa_mara-color_cell.
move-corresponding mara to wa_mara.
add 1 to wa_mara-counter.
move 'Blabla' to wa_mara-free_text.
if wa_mara-counter = '0002'
and p_line = 'X'.
* Color line
move 'C410' to wa_mara-color_line.
elseif wa_mara-counter = '0004'
and p_cell = 'X'.
* Color cell
move 'FREE_TEXT' to wa_color-fname.
move '6' to wa_color-color-col.
move '1' to wa_color-color-int.
move '1' to wa_color-color-inv.
append wa_color to it_color.
wa_mara-color_cell[] = it_color[].
endif.
append wa_mara to it_mara.
endselect.
endform.
*& Form fill_catalog
form fill_catalog.
* Colour code : *
* Colour is a 4-char field where : *
* - 1st char = C (color property) *
* - 2nd char = color code (from 0 to 7) *
* 0 = background color *
* 1 = blue *
* 2 = gray *
* 3 = yellow *
* 4 = blue/gray *
* 5 = green *
* 6 = red *
* 7 = orange *
* - 3rd char = intensified (0=off, 1=on) *
* - 4th char = inverse display (0=off, 1=on) *
* Colour overwriting priority : *
* 1. Line *
* 2. Cell *
* 3. Column *
data : w_position type i value '1'.
clear wa_fieldcat.
move w_position to wa_fieldcat-col_pos.
move 'MATNR' to wa_fieldcat-fieldname.
move 'MARA' to wa_fieldcat-ref_table.
move 'MATNR' to wa_fieldcat-ref_field.
append wa_fieldcat to it_fieldcat.
add 1 to w_position.
clear wa_fieldcat.
move w_position to wa_fieldcat-col_pos.
move 'MATKL' to wa_fieldcat-fieldname.
move 'MARA' to wa_fieldcat-ref_table.
move 'MATKL' to wa_fieldcat-ref_field.
* Color column
if p_column = 'X'.
move 'C610' to wa_fieldcat-emphasize.
endif.
append wa_fieldcat to it_fieldcat.
add 1 to w_position.
clear wa_fieldcat.
move w_position to wa_fieldcat-col_pos.
move 'COUNTER' to wa_fieldcat-fieldname.
move 'N' to wa_fieldcat-inttype.
move '4' to wa_fieldcat-intlen.
move 'Counter' to wa_fieldcat-coltext.
append wa_fieldcat to it_fieldcat.
add 1 to w_position.
clear wa_fieldcat.
move w_position to wa_fieldcat-col_pos.
move 'FREE_TEXT' to wa_fieldcat-fieldname.
move 'C' to wa_fieldcat-inttype.
move '20' to wa_fieldcat-intlen.
move 'Text' to wa_fieldcat-coltext.
append wa_fieldcat to it_fieldcat.
endform.
Regards,
Rich HEilman -
How to put parameter for object/table ID in BW Web Report
Hi All,
In my BW Web report, i want to get my object TABLE_1 but the code below seems not to work.
var mytable = document.getElementsByTagName("table");
Checking on it, i think IE recognize only document.getElementsByID. ( I tested it by manually creating a table in my template and putting a tag for table ID) But BW does not generate the Object ID in the parameters below, only the name.
<param name="OWNER" value="SAP_BW"/>
<param name="CMD" value="GET_ITEM"/>
<param name="NAME" value="TABLE_1"/>
<param name="ITEM_CLASS" value="CL_RSR_WWW_ITEM_GRID"/>
<param name="DATA_PROVIDER" value="DATAPROVIDER_1"/>
<param name="GENERATE_CAPTION" value=""/>
<param name="CAPTION" value="jezel"/>
<param name="ONLY_HIERARCHY_NAVIGATION" value="X"/>
<param name="BLOCK_SIZE" value="0"/>
<param name="SHOW_PAGING_AREA_BOTTOM" value=""/>
ITEM: TABLE_1
do you know how i can add a parameter for object ID? do you know any steps how i can retrieve my table using javascript?
Thanks in advance.Hi JTi,
what i have understood from your requirement is that you want to access the web item table_1 in javascript, you can get that as below:
Add
<span>
tag before your web item and set its id to table.
<span id = "table">
<param name="OWNER" value="SAP_BW"/>
<param name="CMD" value="GET_ITEM"/>
<param name="NAME" value="TABLE_1"/>
<param name="ITEM_CLASS" value="CL_RSR_WWW_ITEM_GRID"/>
<param name="DATA_PROVIDER" value="DATAPROVIDER_1"/>
<param name="GENERATE_CAPTION" value=""/>
<param name="CAPTION" value="jezel"/>
<param name="ONLY_HIERARCHY_NAVIGATION" value="X"/>
<param name="BLOCK_SIZE" value="0"/>
<param name="SHOW_PAGING_AREA_BOTTOM" value=""/>
ITEM: TABLE_1
</span>
In javascript access it as :
var mytable = document.getElementsById("table");
Hope this helps
Thanks
Dipika -
How to put Reason for rejection to line item level?
Hi
I am updating the Sales order at line item and putting the reason for rejection but it didnt updates the database. Below is the code.
LOOP AT LT_VBUP1 INTO WA_VBUP1.
ON CHANGE OF WA_VBUP1-VBELN.
CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
EXPORTING
SALESDOCUMENT = WA_VBUP1-VBELN
ORDER_HEADER_INX = LV_ORDER_HEADER_INX
TABLES
RETURN = IT_RETURN
ORDER_ITEM_IN = IT_ORDER_ITEM_IN
ORDER_ITEM_INX = IT_ORDER_ITEM_INX.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = 'X'.
CLEAR WA_TY_SOCLOSE.
IF SY-SUBRC EQ 0.
LT_TY_SOCLOSE-VBELN = LV_SALESDOCUMENT.
LT_TY_SOCLOSE-STCLOSE = 'Y'.
ELSE.
LT_TY_SOCLOSE-VBELN = LV_SALESDOCUMENT.
LT_TY_SOCLOSE-STCLOSE = 'N'.
ENDIF.
APPEND LT_TY_SOCLOSE.
ENDON.
CLEAR: WA_ORDER_ITEM_IN,WA_ORDER_ITEM_INX.
WA_ORDER_ITEM_IN-ITM_NUMBER = WA_VBUP1-POSNR.
WA_ORDER_ITEM_IN-REASON_REJ = 'Y1'. " Putting order of rejection for the archiving
WA_ORDER_ITEM_INX-ITM_NUMBER = WA_VBUP1-POSNR.
WA_ORDER_ITEM_INX-UPDATEFLAG = 'U'.
WA_ORDER_ITEM_INX-REASON_REJ = 'X'.
APPEND WA_ORDER_ITEM_IN TO IT_ORDER_ITEM_IN.
APPEND WA_ORDER_ITEM_INX TO IT_ORDER_ITEM_INX.
CLEAR WA_VBUP1.
ENDLOOP.
Correct me where I am putting wrong.
Regards
MohinderLOOP AT LT_VBUP1 INTO WA_VBUP1.
ON CHANGE OF WA_VBUP1-VBELN.
CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
EXPORTING
SALESDOCUMENT = WA_VBUP1-VBELN
ORDER_HEADER_INX = LV_ORDER_HEADER_INX
TABLES
RETURN = IT_RETURN
ORDER_ITEM_IN = IT_ORDER_ITEM_IN
ORDER_ITEM_INX = IT_ORDER_ITEM_INX.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = 'X'.
CLEAR WA_TY_SOCLOSE.
IF SY-SUBRC EQ 0.
LT_TY_SOCLOSE-VBELN = LV_SALESDOCUMENT.
LT_TY_SOCLOSE-STCLOSE = 'Y'.
ELSE.
LT_TY_SOCLOSE-VBELN = LV_SALESDOCUMENT.
LT_TY_SOCLOSE-STCLOSE = 'N'.
ENDIF.
APPEND LT_TY_SOCLOSE.
ENDON.
CLEAR: WA_ORDER_ITEM_IN,WA_ORDER_ITEM_INX.
WA_ORDER_ITEM_IN-ITM_NUMBER = WA_VBUP1-POSNR.
WA_ORDER_ITEM_IN-REASON_REJ = 'Y1'. " Putting order of rejection for the archiving
WA_ORDER_ITEM_INX-ITM_NUMBER = WA_VBUP1-POSNR.
WA_ORDER_ITEM_INX-UPDATEFLAG = 'U'.
WA_ORDER_ITEM_INX-REASON_REJ = 'X'.
APPEND WA_ORDER_ITEM_IN TO IT_ORDER_ITEM_IN.
APPEND WA_ORDER_ITEM_INX TO IT_ORDER_ITEM_INX.
***********************************************************************<<<<do this bit here
CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
EXPORTING
SALESDOCUMENT = WA_VBUP1-VBELN
ORDER_HEADER_INX = LV_ORDER_HEADER_INX
TABLES
RETURN = IT_RETURN
ORDER_ITEM_IN = IT_ORDER_ITEM_IN
ORDER_ITEM_INX = IT_ORDER_ITEM_INX.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = 'X'.
CLEAR WA_VBUP1.
ENDLOOP. -
How to put total for a column at the end of the report
I have a field called requests. at the end of every print page i want the total no. of requests to be printed. how can i do that? please help urgent
If your querying requests, and your query pulls back 50 rows of data, would you say that is 50 requests in total?
A summary column is quite simple - it counts the number of rows in a given report group. If the number of rows brought back is the total number of requests, than just create it to count some column in that group (request num..etc). If you set it to reset at the report level, it should just work fine -
How to manage Constraints for Non-Composition Associations?
Hi
Assuming the following Situation:
Company - Entity with Primary Key Attribute CompId
Person - Entity which is associated to Company as a detail via a NON-composition association ("employedAssoc") using Attribute CompId.
PERS_COMP_FK - a database foreign key between the tables of Company (master) and Person (detail) making sure Person is not employed at a non-existing company.
Now I want to implement a code which sets the FK-Attribute CompId in Person to <null> (unemployed) if Company is deleted (bankrupt). I tried the following code, implemented in Company: public void remove()
// set Attribute CompId in Person to null
RowIterator iter = getPersons();
while (iter.hasNext())
PersonImpl person = (PersonImpl) iter.next();
person.setCompId(null);
// remove Company
super.remove();
}Unfortunately this code throws oracle.jbo.DMLConstraintException: "Constraint PERS_COMP_FK violated during post operation: "DELETE FROM Company WHERE COMP_ID = :1" "What's going wrong here?
Any hints are welcome
Thanks
Frank BrandstetterWell, I don't think it is a bug.
When you set the foreign key to null, you are already INSIDE the postChanges process. I don't really see what the framework should do. Stop the post on one entity and take another one? No idea...
If you perform a custom action BEFORE triggering commit/post where you set the foreign keys to null, this might work properly (if compositions are present). Though...
HTH,
Adrian -
How to put validations for Bank Gl accounts
Dear Gurus,
I have a requirement, where i want to make Profit center mandatory for the Bank Debits only.
Can you please suggest if my below written Validation would be useful in this respect.
Please correct my coding also. As i am doing validation for first time.
My working in Validation at line item level is :
Prerequisite: BKPF-BURKS = "ABCD"
Check : BSEG-BSCHL = 40 and BSEG-HKONT = "xxxxxx" to "yyyyyy"
Message: Please enter profit center.
regards
NJPHi,
You can acheive it in 2 ways.
1. (GL account >= xxxxx AND <= yyyyy)
or
2. Create a set for GL account using t-code GS03 and use as -
GL Account in <set name>
Regards,
Sridevi -
How to put a dictionary field into an existing Search Help by calling FM
Hi All
I'm facing a problem when using an existing search help in a screen input field. I'm not directly mentioning search help to that screen field. Instead of this i'm calling Function Module F4IF_FIELD_VALUE_REQUEST like
lv_tabname = 'Z_FBSTM_SHLP_EXIT'.
lv_fieldname = 'SALES_AREA_CODE'.
lv_searchhelp ='ZCP_SUBAREA_HELP'.
lv_shlpparam = 'SALES_AREA_CODE'.
ALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
EXPORTING
tabname = lv_tabname
fieldname = lv_fieldname
searchhelp = lv_searchhelp
shlpparam = lv_shlpparam
dynpprog = sy-cprog
dynpnr = sy-dynnr
In this way i'm not getting proper output.
can you help me out.....
help will be rewarded.I am giving the code als for the F4 help just change you fields and and table of tha field you will get it .... and see the module in which place i had write in the screen
<b>PROCESS ON VALUE-REQUEST( F4 ) statement</b>
Code to demonstrate how to perform a manual value help(F4) on a particular field using the PROCESS ON VALUE-REQUEST statement and how to return values back to a table control on the screen. For standard screen fields simply move the value to the appropriate screen field name
Screen flow logic........
PROCESS BEFORE OUTPUT.
*MODULE PBO_MODULE.
PROCESS AFTER INPUT.
*MODULE PAI_MODULE.
PROCESS ON VALUE-REQUEST. "F4
FIELD EKPO-EBELP MODULE help_ekpo.
* populate screen field from within PROCESS ON VALUE-REQUEST(F4) call
*& Module help_responsibility INPUT
* text
MODULE help_ekpo INPUT.
**Transport values to table dynpro/screen table control
DATA: l_stepl LIKE sy-stepl,
l_indx LIKE sy-stepl.
DATA: dynpfields LIKE dynpread OCCURS 5 WITH HEADER LINE.
* Adjust for scroling within table control
CALL FUNCTION 'DYNP_GET_STEPL'
IMPORTING
povstepl = l_stepl
EXCEPTIONS
stepl_not_found = 0
OTHERS = 0.
l_indx = tc_ekpotable-top_line + l_stepl - 1.
"tc_ekpotable should already have been declared
REFRESH dynpfields.
CLEAR dynpfields.
dynpfields-fieldname = 'EKPO-EBELN'.
dynpfields-fieldvalue = '00010' "wa_ekpo-ebeln.
dynpfields-stepl = l_stepl.
APPEND dynpfields.
dynpfields-fieldname = 'EKPO-EBELP'.
dynpfields-fieldvalue = '00020' "wa_ekpo-ebelp.
dynpfields-stepl = l_stepl.
APPEND dynpfields.
CALL FUNCTION 'DYNP_VALUES_UPDATE'
EXPORTING
dyname = 'SAPLZZ_EKKO' "Program name
dynumb = '0100' "Screen number
TABLES
dynpfields = dynpfields
EXCEPTIONS
OTHERS = 0.
ENDMODULE. " help_ekpo INPUT
reward points if it is usefull ....
Girish -
How to create index for articles&products in ATG+Endeca application?
Hi.
I'm novice in Endeca.
How to create ATG+Endeca application in which exists search by articles (created in Experience Manager) and by products (from BCC ATG).
And how to index together products and articles?
Where can I read about it?
Thanks.Are you planning to create articles in ExpManager OR the content will come from some other system and you just want to manage the pages to display the content in Exp Manager?
On a high level:
If it is case #1 you have to integrate ATG & Endeca and write some cartridges for managing the content.
If it is case #2 you have to integrate ATG & Endeca and modify the auto generated pipeline to pull in your content from the other system.
Pankaj. -
How to put text line just for a moment ?
Hi,
Do you know how to put a text line just for one photo? I mean I have more photos in one portfolio but i need the text line to be seen just for one photo for the others no.
Thank you in advance.You can use composition for this , where you can insert text frame for that specific photo where you want to add some description and for rest dont use text frame.
Thanks,
Sanjit
Maybe you are looking for
-
I have LR 5.4 running on a mac OS 10.7.5. I am having problems with the software locking up in the Develop module. Sometimes a new image won't open and the preview screen stays black. I go back to the Library module and try to reneter the Develop mod
-
Changing the filenames using unix script
Hi, I have a scenario where I have to change the file names on the Receiver CC using a unix script and add date and timestamp to the file name this is what I'll be writing to filename_01.xml I need to change that to newfilename_01_MMDDYYYY_HHMISS.xml
-
Hi all, I am getting this error when i try to include xbean.jar. The error is: The project was not built since its build path is incomplete. Cannot find the class file for javax.xml.stream.XMLStreamReader. Fix the build path then try building this pr
-
Dear All, Is anybody preparing for the OCM exam? I am preparing for OCM exam and would like to invite all to share the knowledge. I know there are many groups on the net but I did not find any group which is really active or seriously interested in O
-
Dear all, SimpleDateFormat simpleDate = new SimpleDateFormat("dd-MMM-yyyy"); Calendar calendar = Calendar.getInstance(); int month = calendar.get(Calendar.MONTH); calendar.set(Calendar.MONTH, month-1); calendar