IDT - Hierarchical List of Values on an OLAP data model
Hey All,
I am having a problem converting a UNV universe to a UNX version which is based on a SQL SSAS 2012 data source.
In the Information Design tool when I right click and select Preview Values I see the below List of Values as a Hierarchy.
However, when I add this same object into a WebI report the List of Values does not appear anything like the above. How do I set the Business Layer to perform the same way in WebI???
Ok, I have worked out to add prompts for a hierarchical object from an OLAP unx universe the object that needs the prompt added to it must be added in the Result Objects and then using the Member Selector properties to Enable Prompt.
However, now that I do this I am getting a new problem with the following error message appearing when I Run the query...
Similar Messages
-
List of Values in Data foundation Layer Bi 4.0 Issues?
I have an issue surrounding list of values’ created in the data foundation layer created using SQL.
The LOV can be associated with an object within the business layer. The business layer is then saved and closed, however on re-opening the association with the LOV is now displaying an error.
We are currently on patch 15 of sp2, are you aware of any issues using LOV from the data foundation layer.This has now been fixed in sp4.
-
List of Values use Master Data or Trasaction Data?
Hello,
Do anyone of you from where does data in the list of values is populated Transaction data or Master data or combination of both?
I know bex query could be built on a DSO, Info Cube, Info set, Mutiple Provider and Info objects. Is dependent on the type of info provider the query is built on? Could we really control the source in the lov's
Thanks
Ramits based on the data in the InfoProvider.
Ingo -
Hi All,
I have a dimension object in Business Layer which is showing a different values than the original database values. When I right click on the object and select "Show List of Values its showing values which are not related to the original values in the database but if I right click on the same object and select "Preview List of Values" it shows the right values present in the database. Any suggestions on how to rectify. It was working good and many reports have been built using that particular dimension.
Is there any way to fix the problem without the deleting the object or recreating another similar object as the object has been used in several reports, so by deleting or recreating the object may break the reports.
Please help!Hi
A list of values is a list that contains the data values associated with an object, Lists of values inserted in the data foundation are inherited by any business layer based on the data foundation.
Right click on the object and select “Show Values”… Display all the DB values including null
Preview List of Values – also display same values...getting differnece meens...Check weather using any Static List of Values.
If you uncheck the Associated list of values check box "Preview List of Values" options is disabled.
For best practice …LOV is disabled for un-necessary dimension objects
Also If you have Db access check the correct data by
SELECT
Distinct Schema name. Table/View name. Object name
FROM
Schema.name. Table/View name -
Values from alv hierarchical list display
hi all,
i need to display sme values from vbak and vbap tables in ALV hierarchical list display.if i click on the sales order of the header, it should directly go to the second screen of transaction VA03 with the sales details displayed..
i got the parameter id, how can i assign the selected sales order value to this parameter id?...
regards,
Hamsa PriyaHi,
Check this example..Marked in bold..
TYPE-POOLS: slis.
DATA: BEGIN OF itab OCCURS 0,
vbeln TYPE vbeln,
expand,
END OF itab.
DATA: BEGIN OF itab1 OCCURS 0,
vbeln TYPE vbeln,
posnr TYPE posnr,
matnr TYPE matnr,
netpr TYPE netpr,
END OF itab1.
DATA: t_fieldcatalog TYPE slis_t_fieldcat_alv.
DATA: s_fieldcatalog TYPE slis_fieldcat_alv.
s_fieldcatalog-col_pos = '1'.
s_fieldcatalog-fieldname = 'VBELN'.
s_fieldcatalog-tabname = 'ITAB'.
s_fieldcatalog-rollname = 'VBELN'.
s_fieldcatalog-outputlen = '12'.
APPEND s_fieldcatalog TO t_fieldcatalog.
CLEAR: s_fieldcatalog.
s_fieldcatalog-col_pos = '1'.
s_fieldcatalog-fieldname = 'VBELN'.
s_fieldcatalog-tabname = 'ITAB1'.
s_fieldcatalog-rollname = 'VBELN'.
s_fieldcatalog-outputlen = '12'.
APPEND s_fieldcatalog TO t_fieldcatalog.
CLEAR: s_fieldcatalog.
s_fieldcatalog-col_pos = '2'.
s_fieldcatalog-fieldname = 'POSNR'.
s_fieldcatalog-tabname = 'ITAB1'.
s_fieldcatalog-rollname = 'POSNR'.
APPEND s_fieldcatalog TO t_fieldcatalog.
CLEAR: s_fieldcatalog.
s_fieldcatalog-col_pos = '3'.
s_fieldcatalog-fieldname = 'MATNR'.
s_fieldcatalog-tabname = 'ITAB1'.
s_fieldcatalog-rollname = 'MATNR'.
APPEND s_fieldcatalog TO t_fieldcatalog.
CLEAR: s_fieldcatalog.
s_fieldcatalog-col_pos = '4'.
s_fieldcatalog-fieldname = 'NETPR'.
s_fieldcatalog-tabname = 'ITAB1'.
s_fieldcatalog-rollname = 'NETPR'.
s_fieldcatalog-do_sum = 'X'.
APPEND s_fieldcatalog TO t_fieldcatalog.
CLEAR: s_fieldcatalog.
DATA: s_layout TYPE slis_layout_alv.
s_layout-subtotals_text = 'SUBTOTAL TEXT'.
s_layout-key_hotspot = 'X'.
s_layout-expand_fieldname = 'EXPAND'.
SELECT vbeln UP TO 100 ROWS
FROM
vbak
INTO TABLE itab
WHERE vbeln > '0060000040'.
IF NOT itab[] IS INITIAL.
SELECT vbeln posnr matnr netpr
FROM vbap
INTO TABLE itab1
FOR ALL ENTRIES IN itab
WHERE vbeln = itab-vbeln.
ENDIF.
DATA: v_repid TYPE syrepid.
v_repid = sy-repid.
DATA: s_keyinfo TYPE slis_keyinfo_alv.
s_keyinfo-header01 = 'VBELN'.
s_keyinfo-item01 = 'VBELN'.
CALL FUNCTION 'REUSE_ALV_HIERSEQ_LIST_DISPLAY'
EXPORTING
i_callback_program = v_repid
<b> i_callback_user_command = 'USER_COMMAND'</b>
is_layout = s_layout
it_fieldcat = t_fieldcatalog
i_tabname_header = 'ITAB'
i_tabname_item = 'ITAB1'
is_keyinfo = s_keyinfo
TABLES
t_outtab_header = itab
t_outtab_item = itab1
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
<b>FORM user_command USING ucomm LIKE sy-ucomm
selfield TYPE slis_selfield.
IF ucomm = '&IC1' AND selfield-fieldname = 'VBELN'.
READ TABLE itab INDEX selfield-tabindex.
IF sy-subrc = 0.
document
SET PARAMETER ID 'AUN' FIELD itab-vbeln.
CALL TRANSACTION 'VA03' AND SKIP FIRST SCREEN.
ENDIF.
ENDIF.
ENDFORM.</b>
Thanks,
Naren -
List Of Values not getting displayed in BI launchpad
Hello All,
When i am running the report in BI launchpad, List of values are not displaying . throwing below error.
Detail Error:
com.businessobjects.sdk.core.server.CommunicationException$UnexpectedServerException: while trying to invoke the method com.businessobjects.mds.olap.protocol.bics.BICSClient.getCube() of a null object loaded from field com.sap.sl.proxyconsumption.services.olapaccessservice.BICSDiscoverServer.bicsClient of an object loaded from local variable 'this'
@The same report is working fine in WEBI Rich client.
I am using 4.1 SPO3 Patch 2
Please Help on this.
Thanks,
RameshHi,Supriya!
We are having problem looking like that (After report had been made if I click Refresh button and wait for Values for prompts - the same error message appears).
My user is in admin group and if log as Administrator - nothing changes.
Could you give me advice? -
How to edit o/p fields in hierarchical list?
how to make output fields as input enabled, displayed in the hierarchical list?
i.e. to make them as editable?Is it possible in list display?Please refer this....
*& Report ZFIR_WRITE_OFF
REPORT zfir_write_off
NO STANDARD PAGE HEADING
MESSAGE-ID zles.
TYPE-POOLS
TYPE-POOLS:slis.
TABLES
TABLES: kna1, t001, zdunning_data, bsid, t052.
INTERNAL TABLES
To check for bukrs in selection screen
DATA: BEGIN OF t_t001 OCCURS 0,
bukrs TYPE t001-bukrs,
END OF t_t001.
To check for the customer in selection screen
DATA: BEGIN OF t_kna1 OCCURS 0,
kunnr TYPE kna1-kunnr,
name1 TYPE kna1-name1,
END OF t_kna1.
*Data from BSID table
DATA: BEGIN OF t_bsid OCCURS 0,
bukrs LIKE bsid-bukrs,
budat LIKE bsid-budat,
kunnr LIKE bsid-kunnr,
belnr LIKE bsid-belnr,
zfbdt LIKE bsid-zfbdt,
zterm LIKE bsid-zterm,
dmbtr LIKE bsid-dmbtr,
waers LIKE bsid-waers,
vbeln LIKE bsid-vbeln,
END OF t_bsid.
*Data from ZDunning_data
DATA: BEGIN OF t_zdunning OCCURS 0,
belnr LIKE zdunning_data-belnr,
kunnr LIKE zdunning_data-kunnr,
zdef_notice_flg LIKE zdunning_data-zdef_notice_flg,
zterm_notice_flg LIKE zdunning_data-zterm_notice_flg,
END OF t_zdunning.
*Data from t052 for base line days
DATA: BEGIN OF t_t052 OCCURS 0,
zterm LIKE t052-zterm,
ztag1 LIKE t052-ztag1,
END OF t_t052.
*with duedate and date for write off calculation
DATA: BEGIN OF t_data OCCURS 0,
belnr LIKE bsid-belnr,
kunnr LIKE bsid-kunnr,
zterm LIKE bsid-zterm,
zfbdt LIKE bsid-zfbdt,
ztag1 LIKE t052-ztag1,
duedate LIKE bsid-zfbdt,
wdate LIKE bsid-zfbdt,
vbeln LIKE bsid-vbeln,
dmbtr LIKE bsid-dmbtr,
waers LIKE bsid-waers,
budat LIKE bsid-budat,
vbelv like vbfa-vbelv,
Name1 like kna1-name1,
END OF t_data.
*Output display in ALV report
DATA: BEGIN OF t_output OCCURS 0,
Flag type C,
bukrs LIKE bsid-bukrs,
kunnr LIKE bsid-kunnr,
vbeln LIKE bsid-vbeln, "Invoice
posnv like vbfa-posnv,
wdate LIKE bsid-zfbdt,
belnr LIKE bsid-belnr,
dmbtr LIKE bsid-dmbtr,
waers LIKE bsid-waers,
budat LIKE bsid-budat,
vbelv like vbfa-vbelv, "Contract
name1 like kna1-name1,
duedate like bsid-zfbdt,
END OF t_output.
To get contract number for the billing document number
DATA: BEGIN OF t_vbfa OCCURS 0,
vbelv LIKE vbfa-vbelv,
vbeln LIKE vbfa-vbeln,
POSNV like vbfa-POSNV,
END OF t_vbfa.
data: begin of t_cust occurs 0,
KUNNR like kna1-kunnr,
name1 like kna1-name1,
end of t_cust.
data: begin of t_head occurs 0,
VBELv like vbfa-vbelv,
posnv like vbfa-posnv,
VKUEGRU type ZLIST_WO_RCANCEL,
end of t_head.
data: begin of it_veda occurs 0,
VBELn LIKE Veda-VBELN,
POSNR LIKE Veda-VPOSN,
VKUEGRU LIKE Veda-VKUEGRU,
end of it_veda.
VARIABLE DECLARATION
DATA: l_duedate LIKE bsid-zfbdt,
l_wdate LIKE bsid-zfbdt.
VARIABLE FOR ALV DISPLAY
DATA: t_fieldcat TYPE slis_t_fieldcat_alv,
wa_fieldcat TYPE slis_fieldcat_alv.
DATA: t_fieldcat1 TYPE slis_t_fieldcat_alv WITH HEADER LINE,
wa_fieldcat1 TYPE slis_fieldcat_alv.
DATA: t_layout TYPE slis_layout_alv.
DATA: g_repid LIKE sy-repid.
SELECTION-SCREEN
*Selection Screen Parameters for user input
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
PARAMETERS:
*Company Code
p_bukrs LIKE t001-bukrs OBLIGATORY.
SELECT-OPTIONS:
*Customer Number
s_kunnr FOR kna1-kunnr OBLIGATORY DEFAULT '0' TO 'ZZZZZZZZZZ'.
PARAMETERS:
*Write Off Date
p_wodate TYPE sy-datum OBLIGATORY.
SELECTION-SCREEN END OF BLOCK b1 .
AT SELECTION-SCREEN
*Selection Screen validation for Company code
AT SELECTION-SCREEN ON p_bukrs.
SELECT SINGLE bukrs FROM t001 "#EC *
INTO t_t001
WHERE bukrs = p_bukrs.
IF sy-subrc NE 0.
*Error message for Invalid Company Code
MESSAGE e000 WITH text-002.
ENDIF.
*Selection Screen Validation for Customer
AT SELECTION-SCREEN ON s_kunnr.
IF NOT s_kunnr IS INITIAL.
SELECT SINGLE kunnr name1
FROM kna1 "#EC *
INTO t_kna1
WHERE kunnr IN s_kunnr.
IF sy-subrc NE 0.
*Error message for Invalid Customer Number
MESSAGE e000 WITH text-003.
ENDIF.
ENDIF.
AT SELECTION-SCREEN ON p_wodate.
IF p_wodate IS INITIAL.
p_wodate = sy-datum.
ENDIF.
INITIALIZATION
INITIALIZATION.
PERFORM clear_data.
START-OF-SELECTION
START-OF-SELECTION.
*Get the Accounting Document Number and base line date from BSID
SELECT bukrs kunnr belnr budat zfbdt zterm dmbtr waers vbeln
FROM bsid
INTO corresponding fields of TABLE t_bsid
WHERE kunnr IN s_kunnr AND
bukrs = p_bukrs.
IF NOT t_bsid[] IS INITIAL.
*Get the Dunning data based on the Accounting Document Number from BSID
SELECT belnr kunnr zdef_notice_flg zterm_notice_flg
FROM zdunning_data
INTO TABLE t_zdunning
FOR ALL ENTRIES IN t_bsid
WHERE kunnr = t_bsid-kunnr AND
belnr = t_bsid-belnr AND
zdef_notice_flg = 'Y' AND
zterm_notice_flg = 'Y'.
*Get the base line days from t052 table based on BSID data
SELECT zterm ztag1
FROM t052
INTO TABLE t_t052
FOR ALL ENTRIES IN t_bsid
WHERE zterm = t_bsid-zterm.
*Calculate the due date(bse line date BSID-ZFBDT + base line days
*T052-ZTAG )
IF NOT t_zdunning[] IS INITIAL.
Get the customer name
Select KUNNR NAME1 from KNA1
INTO table t_cust
for all entries in t_zdunning
where kunnr = t_zdunning-kunnr.
LOOP AT t_zdunning.
LOOP AT t_bsid.
CLEAR t_zdunning.
READ TABLE t_zdunning WITH KEY belnr = t_bsid-belnr
kunnr = t_bsid-kunnr.
CHECK sy-subrc = 0.
CLEAR t_t052.
READ TABLE t_t052 WITH KEY zterm = t_bsid-zterm.
IF sy-subrc = 0 .
t_data-belnr = t_zdunning-belnr.
t_data-kunnr = t_zdunning-kunnr.
Clear t_cust.
read table t_cust with key kunnr = t_zdunning-kunnr.
if sy-subrc = 0.
t_data-name1 = t_cust-name1.
endif.
t_data-zterm = t_bsid-zterm.
t_data-zfbdt = t_bsid-zfbdt.
t_data-ztag1 = t_t052-ztag1.
t_data-vbeln = t_bsid-vbeln.
t_data-dmbtr = t_bsid-dmbtr.
t_data-waers = t_bsid-waers.
t_data-budat = t_bsid-budat.
*calculate duedate
CLEAR l_duedate.
l_duedate = t_bsid-zfbdt + t_t052-ztag1.
t_data-duedate = l_duedate.
*calculate date for write off
CLEAR l_wdate.
l_wdate = l_duedate + 180.
t_data-wdate = l_wdate.
APPEND t_data.
CLEAR l_wdate.
CLEAR l_duedate.
ENDIF.
ENDLOOP.
ELSE.
MESSAGE s000 WITH text-005.
ENDIF.
*Check the wdate with write off date in the selection screen value.
*If this calculated date is Greater than value enetred in selection
*screen, display the corresponding data in ALV report.
IF NOT t_data[] IS INITIAL.
SELECT vbelv vbeln
POSNV
FROM vbfa
INTO TABLE t_vbfa
FOR ALL ENTRIES IN t_data
WHERE vbeln = t_data-vbeln.
and
VBTYP_V = 'G'.
*If reason for cancelation is there, no writeoff.
Select VBELn VPOSN VKUEGRU from Veda
into table it_veda
for all entries in t_vbfa
where vbeln = t_vbfa-vbelv.
SELECT vbelv
POSNV
FROM vbfa
INTO TABLE t_Head
FOR ALL ENTRIES IN t_data
WHERE vbeln = t_data-vbeln
and
VBTYP_V = 'G'.
loop at t_head.
clear it_veda.
Read table it_veda with key vbeln = t_head-vbelv
posnr = t_head-posnv.
if not it_veda-VKUEGRU is initial.
Delete t_head where vbelv = it_veda-vbeln and
posnv = it_veda-posnr.
endif.
endloop.
LOOP AT t_data.
IF t_data-wdate LE p_wodate.
t_output-bukrs = p_bukrs.
t_output-kunnr = t_data-kunnr.
CLEAR t_vbfa.
READ TABLE t_vbfa WITH KEY vbeln = t_data-vbeln.
read table t_head with key vbelv = t_vbfa-vbelv
posnv = t_vbfa-posnv.
if sy-subrc = 0.
t_output-vbelv = t_vbfa-vbelv.
t_output-posnv = t_vbfa-posnv.
t_output-name1 = t_data-name1.
t_output-wdate = t_data-wdate.
t_output-belnr = t_data-belnr.
t_output-dmbtr = t_data-dmbtr.
t_output-waers = t_data-waers.
t_output-budat = t_data-budat.
t_output-vbeln = t_data-vbeln.
t_output-duedate = t_data-duedate .
APPEND t_output.
ENDIF.
clear t_output.
ENDIF.
ENDLOOP.
ELSE.
MESSAGE s000 WITH text-006.
ENDIF.
*ALV display for the output records
IF NOT t_output[] IS INITIAL.
PERFORM alv_display.
ELSE.
MESSAGE s000 WITH text-006.
ENDIF.
ELSE.
MESSAGE s000 WITH text-004.
ENDIF.
*& Form clear_data
text
--> p1 text
<-- p2 text
FORM clear_data .
CLEAR:t_t001,
t_kna1,
t_bsid,
t_zdunning,
t_t052,
t_data,
t_output,
wa_fieldcat,
t_layout,
t_fieldcat,
t_vbfa.
REFRESH:t_t001,
t_kna1,
t_bsid,
t_zdunning,
t_t052,
t_data,
t_output,
t_fieldcat,
t_vbfa.
clear:t_head,
it_veda.
Refresh:t_head,
it_veda.
Clear T_cust.
Refresh t_data.
ENDFORM. " clear_data
*& Form alv_display
text
--> p1 text
<-- p2 text
FORM alv_display .
*To build the field catalogue
PERFORM build_fieldcatalog1.
PERFORM build_fieldcatalog.
*To build the ALV layout
PERFORM build_layout.
*To displayt the data in ALV report
PERFORM display_alv_report.
ENDFORM. " alv_display
*& Form build_fieldcatalog
text
--> p1 text
<-- p2 text
FORM build_fieldcatalog1 .
REFRESH t_fieldcat1.
CLEAR wa_fieldcat.
wa_fieldcat-col_pos = '1'.
wa_fieldcat-fieldname = 'VBELV'.
wa_fieldcat-tabname = 'T_HEAD'.
wa_fieldcat-seltext_l = 'Contract Number'.
wa_fieldcat-Checkbox = 'X'.
wa_fieldcat-edit = 'X'.
wa_fieldcat-no_out = 'X'.
wa_fieldcat-outputlen = '15'.
APPEND wa_fieldcat TO t_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-col_pos = '2'.
wa_fieldcat-fieldname = 'POSNV'.
wa_fieldcat-tabname = 'T_HEAD'.
wa_fieldcat-seltext_l = 'Item Number'.
wa_fieldcat-outputlen = '15'.
APPEND wa_fieldcat TO t_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-col_pos = '3'.
wa_fieldcat-fieldname = 'VKUEGRU'.
wa_fieldcat-edit = 'X'.
wa_fieldcat-input = 'X'.
wa_fieldcat-tabname = 'T_HEAD'.
wa_fieldcat-drdn_hndl = '1'.
wa_fieldcat-seltext_l = 'Reason for Cancel'.
wa_fieldcat-outputlen = '25'.
APPEND wa_fieldcat TO t_fieldcat.
CLEAR wa_fieldcat.
endform.
FORM build_fieldcatalog .
REFRESH t_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-col_pos = '4'.
wa_fieldcat-fieldname = 'KUNNR'.
wa_fieldcat-tabname = 'T_OUTPUT'.
wa_fieldcat-seltext_l = 'Customer Number'.
wa_fieldcat-outputlen = '15'.
APPEND wa_fieldcat TO t_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-col_pos = '5'.
wa_fieldcat-fieldname = 'NAME1'.
wa_fieldcat-tabname = 'T_OUTPUT'.
wa_fieldcat-seltext_l = 'Customer Name'.
wa_fieldcat-outputlen = '30'.
APPEND wa_fieldcat TO t_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-col_pos = '6'.
wa_fieldcat-fieldname = 'VBELV'.
wa_fieldcat-tabname = 'T_OUTPUT'.
wa_fieldcat-seltext_l = 'Contract Number'.
wa_fieldcat-outputlen = '20'.
APPEND wa_fieldcat TO t_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-col_pos = '7'.
wa_fieldcat-fieldname = 'VBELN'.
wa_fieldcat-tabname = 'T_OUTPUT'.
wa_fieldcat-seltext_l = 'Invoice No.'.
wa_fieldcat-outputlen = '10'.
APPEND wa_fieldcat TO t_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-col_pos = '8'.
wa_fieldcat-fieldname = 'BELNR'.
wa_fieldcat-tabname = 'T_OUTPUT'.
wa_fieldcat-seltext_l = 'Acc doc Number'.
wa_fieldcat-outputlen = '20'.
APPEND wa_fieldcat TO t_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-col_pos = '9'.
wa_fieldcat-fieldname = 'WAERS'.
wa_fieldcat-tabname = 'T_OUTPUT'.
wa_fieldcat-seltext_l = 'Currency'.
wa_fieldcat-outputlen = '15'.
APPEND wa_fieldcat TO t_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-col_pos = '10'.
wa_fieldcat-fieldname = 'DMBTR'.
wa_fieldcat-tabname = 'T_OUTPUT'.
wa_fieldcat-do_sum = 'X'. "SUM UPON DISPLAY
wa_fieldcat-datatype = 'CURR'.
wa_fieldcat-seltext_l = 'Amount'.
wa_fieldcat-outputlen = '15'.
APPEND wa_fieldcat TO t_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-col_pos = '11'.
wa_fieldcat-fieldname = 'DUEDATE'.
wa_fieldcat-tabname = 'T_OUTPUT'.
wa_fieldcat-seltext_l = 'Due Date'.
wa_fieldcat-outputlen = '20'.
APPEND wa_fieldcat TO t_fieldcat.
data: lt_dropdown type lvc_t_drop,
ls_dropdown type lvc_s_drop.
First listbox (handle '1').
ls_dropdown-handle = '1'.
ls_dropdown-value = 'KG'.
append ls_dropdown to lt_dropdown.
ls_dropdown-handle = '1'.
ls_dropdown-value = 'G'.
append ls_dropdown to lt_dropdown.
call method g_grid->set_drop_down_table
exporting it_drop_down = lt_dropdown.
ENDFORM. " build_fieldcatalog
*& Form build_layout
text
--> p1 text
<-- p2 text
FORM build_layout .
t_layout-no_input = 'X'.
t_layout-colwidth_optimize = 'X'.
ENDFORM. " build_layout
*& Form display_alv_report
text
--> p1 text
<-- p2 text
FORM display_alv_report .
g_repid = sy-repid.
data g_keyinfo type SLIS_KEYINFO_ALV.
g_keyinfo-HEADER01 = 'VBELV'.
g_keyinfo-ITEM01 = 'VBELV'.
g_keyinfo-HEADER02 = 'POSNV'.
g_keyinfo-ITEM02 = 'POSNV'.
CALL FUNCTION 'REUSE_ALV_HIERSEQ_LIST_DISPLAY'
EXPORTING
i_interface_check = 'I'
i_callback_program = g_repid
i_callback_pf_status_set = 'SET_STATUS'
i_callback_user_command = 'USER_COMMAND'
is_layout = gs_layout
it_fieldcat = t_fieldcat[]
i_default = ' '
i_save = 'A'
i_tabname_header = 'T_HEAD'
i_tabname_item = 'T_OUTPUT'
i_structure_name_header = v_headers_table
i_structure_name_item = v_items_table
is_keyinfo = g_keyinfo
i_bypassing_buffer = 'X'
TABLES
t_outtab_header = t_head[]
t_outtab_item = i_result
t_outtab_item = t_output[]
EXCEPTIONS
program_error = 1
OTHERS = 2.
REFRESH: t_fieldcat[].
refresh t_fieldcat1[].
ENDFORM. " display_alv_report
form SET_STATUS using extab TYPE slis_t_extab.
SET PF-STATUS 'ZEO_S1' .
endform.
*& Form Top_Of_Page
Top_Of_Page event in ALV
FORM top_of_page .
DATA: t_header TYPE slis_t_listheader,
wa_header TYPE slis_listheader.
Title
wa_header-typ = 'H'.
wa_header-info = ' Write Off Worklist'.
APPEND wa_header TO t_header.
CLEAR wa_header.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = t_header.
ENDFORM. "Top_Of_Page
*User Command for the button
form user_command using r_ucomm type syucomm
ls_selfield type SLIS_SELFIELD.
Break-point.
case r_ucomm.
when 'EXEC'.
data: begin of lt_cancel occurs 0.
include structure ZCANCEL.
data end of lt_cancel.
Clear lt_cancel.
Refresh lt_cancel.
Data: ref1 type ref to cl_gui_alv_grid.
CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
IMPORTING
E_GRID = ref1.
call method ref1->check_changed_data.
loop at t_Head where VKUEGRU is not initial.
if ( t_HEAD-VKUEGRU NE '1' ) or
( t_Head-VKUEGRU NE '2' ) or
( t_head-VKUEGRU NE '3' ).
Clear t_head-vkuegru.
message e000 with text-110.
endif.
lt_cancel-vbeln = t_head-vbelv.
lt_cancel-posnr = t_head-posnv.
lt_cancel-VKUEGRU = t_head-VKUEGRU.
Append lt_cancel.
Clear lt_cancel.
Endloop.
CALL FUNCTION 'ZSD_CNTR_CANCEL'
TABLES
zcancel = lt_cancel.
message s000 .
endcase.
endform.
Regards
vasu -
User command in hierarchical list
hi, i have displayed data in hierarchical list using oo prog.
i made use of classes like cl_salv_herseq_table
i wanted a functionality which in non OO prog using 'REUSE_ALV_HIERSEQ_LIST_DISPLAY' can be done by sending
the parameter in I_CALLBACK_USER_COMMAND.
the function that we send to I_CALLBACK_USER_COMMAND has two parameters of type sy-ucomm and slis_selfield .
using object oriented prog i found a method get_events with the help of which i could trigger the even on mouseclicks
and getting appropriate functionkey in the parameter i_ucomm. But i want the slis_selffield option as well using OO prog
that could get the details of the item clicked.Check out this code:
REPORT ztest_sourav16. TYPE-POOLS: slis. TYPES: BEGIN OF x_mara, matnr TYPE matnr, ersda TYPE ersda, ernam TYPE ernam, laeda TYPE laeda, aenam TYPE aenam, vpsta TYPE vpsta, pstat TYPE pstat_d, lvorm TYPE lvoma, check TYPE char1, END OF x_mara, BEGIN OF x_marc, matnr TYPE matnr, werks TYPE werks_d, END OF x_marc. DATA: i_mara TYPE STANDARD TABLE OF x_mara INITIAL SIZE 0, i_marc TYPE STANDARD TABLE OF x_marc INITIAL SIZE 0, wa_alv_keyinfo TYPE slis_keyinfo_alv, i_fieldcat TYPE slis_t_fieldcat_alv, wa_layout TYPE slis_layout_alv. START-OF-SELECTION. SELECT matnr werks FROM marc INTO TABLE i_marc UP TO 100 ROWS. IF sy-subrc = 0. SELECT matnr ersda ernam laeda aenam vpsta pstat lvorm FROM mara INTO TABLE i_mara FOR ALL ENTRIES IN i_marc WHERE matnr = i_marc-matnr. IF sy-subrc = 0. ENDIF. ENDIF. END-OF-SELECTION. DATA: i_callback_program TYPE syrepid VALUE sy-repid. PERFORM sub_populate_fcat. wa_alv_keyinfo-header01 = 'MATNR'. wa_alv_keyinfo-item01 = 'MATNR'. wa_alv_keyinfo-item02 = 'WERKS'. wa_layout-box_fieldname = 'CHECK'. wa_layout-box_tabname = 'I_MARA'. CALL FUNCTION 'REUSE_ALV_HIERSEQ_LIST_DISPLAY' EXPORTING * I_INTERFACE_CHECK = 'X' i_callback_program = i_callback_program i_callback_pf_status_set = 'SUB_SET_PF_STATUS' i_callback_user_command = 'SUB_USER_COMMAND' is_layout = wa_layout it_fieldcat = i_fieldcat * IT_EXCLUDING = * IT_SPECIAL_GROUPS = * IT_SORT = * IT_FILTER = * IS_SEL_HIDE = * I_SCREEN_START_COLUMN = 0 * I_SCREEN_START_LINE = 0 * I_SCREEN_END_COLUMN = 0 * I_SCREEN_END_LINE = 0 * I_DEFAULT = 'X' * I_SAVE = ' ' * IS_VARIANT = * IT_EVENTS = * IT_EVENT_EXIT = i_tabname_header = 'I_MARA' i_tabname_item = 'I_MARC' * I_STRUCTURE_NAME_HEADER = * I_STRUCTURE_NAME_ITEM = is_keyinfo = wa_alv_keyinfo * IS_PRINT = * IS_REPREP_ID = * I_BYPASSING_BUFFER = * I_BUFFER_ACTIVE = * IR_SALV_HIERSEQ_ADAPTER = * IT_EXCEPT_QINFO = * I_SUPPRESS_EMPTY_DATA = ABAP_FALSE * IMPORTING * E_EXIT_CAUSED_BY_CALLER = * ES_EXIT_CAUSED_BY_USER = TABLES t_outtab_header = i_mara t_outtab_item = i_marc EXCEPTIONS program_error = 1 OTHERS = 2 . IF sy-subrc 0. MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4. ENDIF. *&---------------------------------------------------------------------* *& Form sub_populate_fcat *&---------------------------------------------------------------------* * text *----------------------------------------------------------------------* FORM sub_populate_fcat. DATA: l_wa_fieldcat TYPE slis_fieldcat_alv. l_wa_fieldcat-ref_tabname = 'MARA'. l_wa_fieldcat-tabname = 'I_MARA'. l_wa_fieldcat-fieldname = 'MATNR'. APPEND l_wa_fieldcat TO i_fieldcat. CLEAR l_wa_fieldcat-fieldname. l_wa_fieldcat-fieldname = 'ERSDA'. APPEND l_wa_fieldcat TO i_fieldcat. CLEAR l_wa_fieldcat-fieldname. l_wa_fieldcat-fieldname = 'ERNAM'. APPEND l_wa_fieldcat TO i_fieldcat. CLEAR l_wa_fieldcat-fieldname. l_wa_fieldcat-fieldname = 'LAEDA'. APPEND l_wa_fieldcat TO i_fieldcat. CLEAR l_wa_fieldcat-fieldname. l_wa_fieldcat-fieldname = 'AENAM'. APPEND l_wa_fieldcat TO i_fieldcat. CLEAR l_wa_fieldcat-fieldname. l_wa_fieldcat-fieldname = 'VPSTA'. APPEND l_wa_fieldcat TO i_fieldcat. CLEAR l_wa_fieldcat-fieldname. l_wa_fieldcat-fieldname = 'PSTAT'. APPEND l_wa_fieldcat TO i_fieldcat. CLEAR l_wa_fieldcat-fieldname. l_wa_fieldcat-fieldname = 'LVORM'. APPEND l_wa_fieldcat TO i_fieldcat. CLEAR l_wa_fieldcat. l_wa_fieldcat-fieldname = 'MATNR'. l_wa_fieldcat-ref_tabname = 'MARC'. l_wa_fieldcat-tabname = 'I_MARC'. APPEND l_wa_fieldcat TO i_fieldcat. CLEAR l_wa_fieldcat. l_wa_fieldcat-fieldname = 'WERKS'. l_wa_fieldcat-ref_tabname = 'MARC'. l_wa_fieldcat-tabname = 'I_MARC'. APPEND l_wa_fieldcat TO i_fieldcat. CLEAR l_wa_fieldcat. ENDFORM. "sub_populate_fcat' *&---------------------------------------------------------------------* *& Form SUB_USER_COMMAND *&---------------------------------------------------------------------* * text *----------------------------------------------------------------------* FORM sub_user_command USING rf_ucomm TYPE syucomm rs TYPE slis_selfield. DATA: l_i_mara TYPE STANDARD TABLE OF x_mara INITIAL SIZE 0, l_lines TYPE i, l_wa_mara TYPE x_mara. CASE rf_ucomm. WHEN 'DETA'. l_i_mara[] = i_mara. DELETE l_i_mara WHERE check = space. l_lines = LINES( l_i_mara ). IF l_lines EQ 0. MESSAGE i001(00) WITH 'No lines selected.'. ELSEIF l_lines GT 1. MESSAGE i001(00) WITH 'More than one lines selected.'. ELSEIF l_lines EQ 1. READ TABLE l_i_mara INTO l_wa_mara INDEX 1. IF sy-subrc = 0. MESSAGE i001(00) WITH 'You have selected material:' l_wa_mara-matnr. ENDIF. ENDIF. * WHEN . * WHEN OTHERS. ENDCASE. ENDFORM. "sub_user_command *&---------------------------------------------------------------------* *& Form sub_set_pf_status *&---------------------------------------------------------------------* * text *----------------------------------------------------------------------* * -->RT_EXTAB text *----------------------------------------------------------------------* FORM sub_set_pf_status USING rt_extab TYPE slis_t_extab. SET PF-STATUS 'ZSTANDARD'. ENDFORM. "sub_set_pf_status
Hope this helps -
Get column values from list of values programmatically
hi all
how i get column values from list of values programmatically in the
returnPopupDataListener methodIf this answers your question , please close this thread by marking it as answered.
Thanks -
I need to validate Input List Of Values Field when Inserted From Bean
I've two view object EmployeeView and DepartmentsView
In Employee View I've changed Department_Id to Input List OF Values
I've created a bean to inset data into Employee Table
ApplicationModule am = ADFUtils.getApplicationModuleForDataControl("AppModuleDataControl");
ViewObject importedVO = am.findViewObject("EmployeesView");
try {
newEmp.setEmployeeId(new Number("3424));
newEmp.setFirstName("Test Fname");
newEmp.setLastName("Test Lname");
newEmp.setEmail("[email protected]");
newEmp.setPhoneNumber("4643131345");
newEmp.setJobId("AD_VP");
newEmp.setDepartmentId(new oracle.jbo.domain.Number(999));
} catch (Exception e) {
// TODO: Add catch code
System.out.println("inside Catch");
e.printStackTrace();
}I know that ADF validate Input list of values when inserting new value on it
when I've enabled the debugger I've found that
<ViewObjectImpl><buildQuery> [604] SELECT DepartmentsEO.DEPARTMENT_ID, DepartmentsEO.DEPARTMENT_NAME, DepartmentsEO.MANAGER_ID, DepartmentsEO.LOCATION_ID, DepartmentsEO.ISDELETED FROM DEPARTMENTS DepartmentsEO WHERE ( ( (DepartmentsEO.DEPARTMENT_ID = :vc_temp_1 ) ) )
<ViewObjectImpl><bindParametersForCollection> [605] Bind params for ViewObject: [com.test.model.views.DepartmentsEOView]AppModule.__LOCAL_VIEW_USAGE_com_test_model_views_EmployeesEOView_DepartmentsView_findByVC_12_LOV_DepartmentId_lov__filterlist__vcr___
<OracleSQLBuilderImpl><bindParamValue> [606] Binding param "vc_temp_1": 999
<ViewObjectImpl><processViewCriteriaForRowMatch> [607] VCs converted to RowMatch: ( (DepartmentId = :vc_temp_1 ) )
<ViewRowImpl><handleListBindingMismatch> [608] No matching row found for list binding:LOV_DepartmentId for ViewRow:oracle.jbo.Key[34235 ]
<ViewRowImpl><handleListBindingMismatch> [609] --- filterList ValueMap key:DepartmentId, value:999
<DCBindingContainer><internalRefreshControl> [610] **** refreshControl() for BindingContainer :com_test_view_testInsertPageDef
<JUCtrlHierNodeBinding><release> [611] released: ROOT node binding:noCtrl_oracle_adfinternal_view_faces_model_binding_FacesCtrlHierNodeBinding_2, value:EmployeesViewIterator
<JUCtrlHierNodeBinding><release> [612] released: ROOT node binding:noCtrl_oracle_adfinternal_view_faces_model_binding_FacesCtrlHierNodeBinding_2, value:EmployeesViewIterator
<DCIteratorBinding><releaseDataInternal> [613] Releasing iterator binding:EmployeesViewIterator
<ApplicationPoolMessageHandler><doPoolMessage> [614] **** PoolMessage REQ ATTACH LWS
<ApplicationPoolMessageHandler><doPoolMessage> [615] **** PoolMessage REQ DETACH LWS
<DCJboDataControl><initializeApplicationModule> [616] (oracle.adf.model.bc4j.DataControlFactoryImpl.SyncMode = Immediate
<DCBindingContainer><internalRefreshControl> [617] **** refreshControl() for BindingContainer :com_test_view_testInsertPageDef
<DCBindingContainerState><validateToken> [618] Process BindingContainer state token(decompressed state):BCST:=0%V%=NEmployeesViewIterator=-D-,
<this means that ADF tries to validate the input list of values "Department_Id" and didn't found any match
I need to through exception when I try to set Department_ID with invalid value "value not on range" like
newEmp.setDepartmentId(new oracle.jbo.domain.Number(999));I don't want to validate it manually as I've a lot of fields.
I need to through exception when try to
newEmp.setDepartmentId(new oracle.jbo.domain.Number(999));Thanks Timo
this is the code that I use
ApplicationModule am = ADFUtils.getApplicationModuleForDataControl("AppModuleDataControl");
ViewObject importedVO = am.findViewObject("EmployeesView");
EmployeesEOViewRowImpl newEmp = (EmployeesEOViewRowImpl)importedVO .createRow();
importedVO .insertRow(newEmp);
try {
newEmp.setEmployeeId(new Number("3424));
newEmp.setFirstName("Test Fname");
newEmp.setLastName("Test Lname");
newEmp.setEmail("[email protected]");
newEmp.setPhoneNumber("4643131345");
newEmp.setJobId("AD_VP");
newEmp.setDepartmentId(new oracle.jbo.domain.Number(999));
} catch (Exception e) {
// TODO: Add catch code
System.out.println("inside Catch");
e.printStackTrace();
} -
Problem retrieving a list of values with XPATH
Hi,
I am trying to get a list of all 'Fields' (under the SubscriptionList -> EconomicIndicator -> Code) which have 'Provider' =DJ.
I am using the below xpath expression. But It is not working. I tried other variations but none of them return mulitple items.
Can some one please tell me if Iam missing something.
XPathExpression xPathExpression= xpath.compile("/SubscriptionList/EconomicIndicator[*]/Code[Provider=DJ]/Fields");
NodeList result = (NodeList)xPathExpression.evaluate(doc, XPathConstants.NODESET);
for (int i = 0; i < result.getLength(); i++) {
Element element = (Element)result.item(i);
System.out.println(element.getNodeValue());
<?xml version="1.0" encoding="UTF-8"?>
<SubscriptionList>
<DefaultEconomicIndicatorName>US ADP Employment Change</DefaultEconomicIndicatorName>
<!--GE IFO - Business Climate-->
<EconomicIndicator>
<Name>GE IFO - Business Climate</Name>
<Active>0</Active>
<OutputFormat></OutputFormat>
<OutputUnits>1</OutputUnits>
<StartDate>2007-06-22T03:50:00</StartDate>
<EndDate>2007-06-22T04:10:00</EndDate>
<Code>
<Provider>BB</Provider>
<Service>Index</Service>
<InstrumentCode>GRIFPBUS</InstrumentCode>
<FID>PX_LAST</FID>
<Units>1</Units>
<Fields></Fields>
</Code>
<Code>
<Provider>BB1</Provider>
<Service>Index</Service>
<InstrumentCode>GRIFPBUS</InstrumentCode>
<FID>PX_LAST</FID>
<Units>1</Units>
<Fields></Fields>
</Code>
<Code>
<Provider>BB2</Provider>
<Service>Index</Service>
<InstrumentCode>GRIFPBUS</InstrumentCode>
<FID>PX_LAST</FID>
<Units>1</Units>
<Fields></Fields>
</Code>
<Code>
<Provider>BB3</Provider>
<Service>Index</Service>
<InstrumentCode>GRIFPBUS</InstrumentCode>
<FID>PX_LAST</FID>
<Units>1</Units>
<Fields></Fields>
</Code>
<Code>
<Provider>RFA</Provider>
<Service>IDN_SELECTFEED</Service>
<InstrumentCode>DEBUSS=ECI</InstrumentCode>
<FID>356</FID>
<Units>1</Units>
<Fields></Fields>
</Code>
<Code>
<Provider>DJ</Provider>
<Service></Service>
<InstrumentCode>GM_IFO</InstrumentCode>
<FID></FID>
<Units>1</Units>
<Fields>GM_IFO_BUSSENTIMENT_Cur</Fields>
</Code>
<Code>
<Provider>DJS</Provider>
<Service></Service>
<InstrumentCode>GM_IFO</InstrumentCode>
<FID></FID>
<Units>1</Units>
<Fields>GM_IFO_BUSSENTIMENT_Cur</Fields>
</Code>
</EconomicIndicator>
<!--GE Producer Prices (MoM)-->
<EconomicIndicator>
<Name>GE Producer Prices (MoM)</Name>
<Active>0</Active>
<OutputFormat></OutputFormat>
<OutputUnits>1</OutputUnits>
<StartDate>2007-06-20T01:50:00</StartDate>
<EndDate>2007-06-20T02:10:00</EndDate>
<Code>
<Provider>BB</Provider>
<Service>Index</Service>
<InstrumentCode>GRPFIMOM</InstrumentCode>
<FID>PX_LAST</FID>
<Units>1</Units>
<Fields></Fields>
</Code>
<Code>
<Provider>BB1</Provider>
<Service>Index</Service>
<InstrumentCode>GRPFIMOM</InstrumentCode>
<FID>PX_LAST</FID>
<Units>1</Units>
<Fields></Fields>
</Code>
<Code>
<Provider>BB2</Provider>
<Service>Index</Service>
<InstrumentCode>GRPFIMOM</InstrumentCode>
<FID>PX_LAST</FID>
<Units>1</Units>
<Fields></Fields>
</Code>
<Code>
<Provider>BB3</Provider>
<Service>Index</Service>
<InstrumentCode>GRPFIMOM</InstrumentCode>
<FID>PX_LAST</FID>
<Units>1</Units>
<Fields></Fields>
</Code>
<Code>
<Provider>RFA</Provider>
<Service>IDN_SELECTFEED</Service>
<InstrumentCode>DEPPI=ECI</InstrumentCode>
<FID>356</FID>
<Units>1</Units>
<Fields></Fields>
</Code>
</EconomicIndicator>
<!--UK CBI Industrial Trend-->
<EconomicIndicator>
<Name>UK CBI Trends - Orders</Name>
<Active>0</Active>
<OutputFormat></OutputFormat>
<OutputUnits>1</OutputUnits>
<StartDate>2007-06-21T05:50:00</StartDate>
<EndDate>2007-06-21T06:10:00</EndDate>
<Code>
<Provider>RFA</Provider>
<Service>IDN_SELECTFEED</Service>
<InstrumentCode>GBCBIO=ECI</InstrumentCode>
<FID>356</FID>
<Units>1</Units>
<Fields></Fields>
</Code>
</EconomicIndicator>
<!--UK CBI Industrial Trend-->
<EconomicIndicator>
<Name>UK CBI Distributive - Trades</Name>
<Active>0</Active>
<OutputFormat></OutputFormat>
<OutputUnits>1</OutputUnits>
<StartDate>2007-06-21T05:50:00</StartDate>
<EndDate>2007-06-21T06:10:00</EndDate>
<Code>
<Provider>RFA</Provider>
<Service>IDN_SELECTFEED</Service>
<InstrumentCode>GBCBIS=ECI</InstrumentCode>
<FID>356</FID>
<Units>1</Units>
<Fields></Fields>
</Code>
</EconomicIndicator>
<!--US Unit Labor Costs-->
<EconomicIndicator>
<Name>US Unit Labor Costs</Name>
<Active>0</Active>
<OutputFormat></OutputFormat>
<OutputUnits>1</OutputUnits>
<StartDate>2007-09-06T08:20:00</StartDate>
<EndDate>2007-09-06T08:40:00</EndDate>
<Code>
<Provider>BB</Provider>
<Service>Index</Service>
<InstrumentCode>COSTNFR%</InstrumentCode>
<FID>PX_LAST</FID>
<Units>1</Units>
<Fields></Fields>
</Code>
<Code>
<Provider>BB1</Provider>
<Service>Index</Service>
<InstrumentCode>COSTNFR%</InstrumentCode>
<FID>PX_LAST</FID>
<Units>1</Units>
<Fields></Fields>
</Code>
<Code>
<Provider>BB2</Provider>
<Service>Index</Service>
<InstrumentCode>COSTNFR%</InstrumentCode>
<FID>PX_LAST</FID>
<Units>1</Units>
<Fields></Fields>
</Code>
<Code>
<Provider>BB3</Provider>
<Service>Index</Service>
<InstrumentCode>COSTNFR%</InstrumentCode>
<FID>PX_LAST</FID>
<Units>1</Units>
<Fields></Fields>
</Code>
<Code>
<Provider>RFA</Provider>
<Service>IDN_SELECTFEED</Service>
<InstrumentCode>USLCTS=ECI</InstrumentCode>
<FID>356</FID>
<Units>1</Units>
<Fields></Fields>
</Code>
<Code>
<Provider>DJ</Provider>
<Service></Service>
<InstrumentCode>US_PROD2_REV</InstrumentCode>
<FID></FID>
<Units>1</Units>
<Fields>US_PROD2_REV_UNITLABORCOST_CurQChgPct</Fields>
</Code>
<Code>
<Provider>DJS</Provider>
<Service></Service>
<InstrumentCode>US_PROD2_REV</InstrumentCode>
<FID></FID>
<Units>1</Units>
<Fields>US_PROD2_REV_UNITLABORCOST_CurQChgPct</Fields>
</Code>
</EconomicIndicator>
</SubscriptionList>Hi DrClap,
I have a similar problem again. This time I am trying to extract a list of values from a xsd. Below is the code that I am using.
try{
djxsd = new FileInputStream("djei-3.1.xsd");
XPathFactory factory = XPathFactory.newInstance();
XPath xpath = factory.newXPath();
SimpleNamespaceContext nsContext = new SimpleNamespaceContext();
xpath.setNamespaceContext(nsContext);
nsContext.addNamespace("xs", "http://www.w3.org/2001/XMLSchema");
nsContext.addNamespace("xsi","http://www.w3.org/2001/XMLSchema-instance");
+//String exp = "//xs:element/@name/text()";+
String exp = "/xs:schema/xs:group/xs:sequence/xs:element";
XPathExpression xPathExpression= xpath.compile(exp);
NodeList result = (NodeList)xPathExpression.evaluate(doc, XPathConstants.NODESET);
FileOutputStream outputfile = new FileOutputStream("log.txt");
for (int i = 0; i < result.getLength(); i++) {
Element element = (Element)result.item(i);
String output = element.getTextContent().trim();
if(output.length() > 0)
outputfile.write(output.getBytes());
//System.out.println(output);
Highlighted in Itlalics is the actual expression that I want to use. For some reason this is not working .. it returns nothing.
The other expression works. Please let me know if there is anything wrong with the expression.
THE XSD FILE
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" elementFormDefault="qualified">
<xs:element name="DJEconomicIndicator">
<xs:complexType>
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:group ref="allgroup"/>
</xs:sequence>
<xs:attributeGroup ref="TopGrp-Attributes"/>
</xs:complexType>
</xs:element>
<xs:group name="allgroup">
<xs:sequence>
<!-- ==================== CPI ========================== -->
<xs:element name="US_CPI_CurMonChgPct" minOccurs="0">
<xs:annotation>
<xs:documentation> US Consumer Price Index </xs:documentation>
<xs:appinfo> CPI </xs:appinfo>
</xs:annotation>
<xs:complexType>
<xs:annotation>
<xs:appinfo> MoM Pct Change (Current Period) </xs:appinfo>
</xs:annotation>
<xs:simpleContent>
<xs:extension base="xs:double">
<xs:attributeGroup ref="common-month"/>
<xs:attributeGroup ref="common-attributes"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
<xs:element name="US_CPI_ExpMonChgPct" minOccurs="0">
<xs:annotation>
<xs:documentation> US Consumer Price Index </xs:documentation>
<xs:appinfo> CPI </xs:appinfo>
</xs:annotation>
<xs:complexType>
<xs:annotation>
<xs:appinfo> Forecast MoM Pct Change (Current Period) </xs:appinfo>
</xs:annotation>
<xs:simpleContent>
<xs:extension base="xs:double">
<xs:attributeGroup ref="common-month"/>
<xs:attributeGroup ref="common-attributes"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
<!-- ==================CPI Unrounded==================== -->
<xs:element name="US_CPI_Unrounded_CurMonChgPct" minOccurs="0">
<xs:annotation>
<xs:documentation> US Consumer Price Index </xs:documentation>
<xs:appinfo> CPI UnRounded</xs:appinfo>
</xs:annotation>
<xs:complexType>
<xs:annotation>
<xs:appinfo> MoM Pct Change (Current Period) </xs:appinfo>
</xs:annotation>
<xs:simpleContent>
<xs:extension base="xs:double">
<xs:attributeGroup ref="common-month"/>
<xs:attributeGroup ref="common-attributes"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
<!-- ==================CPI Core Index==================== -->
<xs:element name="US_CPI_Core_CurMonChgPct" minOccurs="0">
<xs:annotation>
<xs:documentation> US Consumer Price Index </xs:documentation>
<xs:appinfo> CPI Core </xs:appinfo>
</xs:annotation>
<xs:complexType>
<xs:annotation>
<xs:appinfo> MoM Pct Change (Current Period) </xs:appinfo>
</xs:annotation>
<xs:simpleContent>
<xs:extension base="xs:double">
<xs:attributeGroup ref="common-month"/>
<xs:attributeGroup ref="common-attributes"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
<xs:element name="US_CPI_Core_ExpMonChgPct" minOccurs="0">
<xs:annotation>
<xs:documentation> US Consumer Price Index </xs:documentation>
<xs:appinfo> CPI Core </xs:appinfo>
</xs:annotation>
<xs:complexType>
<xs:annotation>
<xs:appinfo> Forecast MoM Pct Change (Current Period) </xs:appinfo>
</xs:annotation>
<xs:simpleContent>
<xs:extension base="xs:double">
<xs:attributeGroup ref="common-month"/>
<xs:attributeGroup ref="common-attributes"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element> -
Restrict the list of values retrieved by a model driven LOV
hi all
i'm try to restrict the list of values retrieved by a model driven LOV just like the article in this link
http://www.oracle.com/technology/products/jdev/tips/fnimphius/restrictlovlist/restrictlov.html
and i'm using the jdev11.2 but i always get this error
java.sql.SQLException: parameter IN or OUT is missing at index 1
my code is :
public void SetSchoolLovVar(LaunchPopupEvent launchPopupEvent)
String var_val=getOt7().getValue().toString();
System.out.println("++++++++++++++++++++++++++++++++"+var_val);
BindingContext bctx = BindingContext.getCurrent();
BindingContainer bindings = bctx.getCurrentBindingsEntry();
FacesCtrlLOVBinding lov = (FacesCtrlLOVBinding)bindings.get("DeptCode");
System.out.print("LOVE "+lov);
System.out.println("+_+_+_+_+__+_+_+__+_+_+_+_+_+_+_+_+_+_________+++++_+_+_"+lov.getName());
lov.getListIterBinding().getViewObject().setNamedWhereClauseParam("Rejon_For_Prj_Dept",var_val);
Rejon_For_Prj_Dept is the bind variable of the Lov Query.
any good ideaHi,
The error might be due to making the bind variable as required but not using it in the vo query. Edit the bind variable and make it as optional by unchecking the required checkbox.
Sireesha -
LIST OF VALUES not Populating in BPS WEB INTERFACE ( LAYOUTS )
Hi BI Guru's
I have created a WEB interface for BPS in BI ( version 7.0) . But when i execute this in internet explorer, I do not get the LIST OF VALUES for Material.
When I click on "input help" the system open a new window for "Value selection". When I specify the material code, it gives me blank LIST OF VALUES.
But it is working for other fields like Customer, UOM in the same layout.
Please suggest some solution.
Thanks,
Nilesh Labdehi,
Thanks for the reply.
Master data is avaliable for the Material Code. The problem is in Internet Explorer and not in SAP GUI .
If i run Planning folder for the same layou in SAP GUI it is working fine. -
Compare collection with list of values
Hi
oracle 10.2.0.1.0
I need to compare a collection (Record ) vriable with a list of values from a table .
pseudo code is
if gpid_rec.item_type in ('a','b','c') then
end if ; Now this should be replaced by values retrieved from a table
if gpid_rec.item_type in ( select item_type from dbom_items ) then
end if ;But the query is not allowed in if statement .
please help me in achieving it.Hi,
Something like this
declare
type t_values is table of varchar2(1) index by dbom_items.item_type%type;
v_values t_values;
begin
-- init once
for cur in (select item_type from dbom_items)
loop
v_values(cur.item_type) := '1';
end loop;
-- then use many times
if v_values.exists(gpid_rec.item_type)
then
end if;
end;
/ -
List of values not properly working in the selection screen.
Dear Mates,
In BEx query all the selection parameters are working and showing all the list of values. Created the same report in crystal from BEx query, for one particular selection it is not showing the list of values or drop down. Just showing "DISCRETE VALUES"
Please throw some light on this.
Good day,
Regards
Arun SHi Arun,
I think you have more than one dynamic parameter created in your report. There is a limitation on dynamic parameter list of values. You will have to edit the registery to get all values in dynamic parameters list.
Find below is a knowledgebase article ;
Symptom
For performance reasons, in Crystal Reports XI Release 1 and Release 2 the maximum number of values that are returned for a list of values is set to 1000. If you have a cascading List of Values (for example Country > Region > City), the lowest level (in this case City) will only display a maximum of 1000 values. This means that the higher-level prompts may display far fewer values than you expect. The list of values provides the data for the dynamic parameter list.
How can you modify the maximum number of values available in a dynamic parameter list?
Resolution
To increase the maximum number of values available in a dynamic parameter list, you must add a registry key.
CAUTION
The following resolution involves editing the registry. Using the Registry Editor incorrectly can cause serious problems that may require you to reinstall the Microsoft Windows operating system. Use the Registry Editor at your own risk. For information on how to edit the registry key, view the 'Changing Keys and Values' online Help topic in the Registry Editor (Regedit.exe).
It is strongly recommended that you make a backup copy of the registry files (System.dat and User.dat on Win9x computers) before you edit the registry.
Crystal Reports XI Release 1
Create a registry key HKEY_LOCAL_MACHINE\SOFTWARE\Business Objects\Suite 11.0\Crystal Reports\DatabaseOptions\LOV.
NOTE
Alternatively, you can create the registry key HKEY_CURRENT_USER\SOFTWARE\Business Objects\Suite 11.0\Crystal Reports\DatabaseOptions\LOV and that key will override the settings of the HKEY_LOCAL_MACHINE\SOFTWARE\Business Objects\Suite 11.0\Crystal Reports\DatabaseOptions\LOV key.
Add a string value "MaxRowsetRecords" and set the value to the maximum number of values that you desire for your report. For example, a value of 2000 will return up to 2000 values in the lowest level of a cascading parameter. NOTE: The value 0 (Unlimited) will not work with BusinessObjects Enterprise XI or Crystal Reports Server XI, you must specify another value.
NOTE
The higher the number of values is, the longer it will take the Enter Values dialog box to populate with values.
After making changes to the registry, restart the affected service or application as required.
Crystal Reports XI Release 2
Create a registry key HKEY_LOCAL_MACHINE\SOFTWARE\Business Objects\Suite 11.5\Crystal Reports\DatabaseOptions\LOV.
NOTE
Alternatively, you can create the registry key HKEY_CURRENT_USER\SOFTWARE\Business Objects\Suite 11.5\Crystal Reports\DatabaseOptions\LOV and that key will override the settings of the HKEY_LOCAL_MACHINE\SOFTWARE\Business Objects\Suite 11.5\Crystal Reports\DatabaseOptions\LOV key.
Add a string value "MaxRowsetRecords" and set the value to the maximum number of values that you desire for your report. For example, a value of 2000 will return up to 2000 values in the lowest level of a cascading parameter.
NOTE
The value 0 (Unlimited) will not work with BusinessObjects Enterprise XI or Crystal Reports Server XI, you must specify another value.
After making changes to the registry, restart the affected service or application as required.
Thanks,
Sastry
Maybe you are looking for
-
How do I merge two different libraries, linked to one account? They're on two different computers but I want them to be on one
-
Running Quicktime Plugin for IE as Non-Admin User
I'm trying to run quicktime 7.4 in a student computer lab. All logins are "User" group, non admin accounts. I cannot get the quicktime plugin for IE to work. Any embedded quicktime files on web pages just show the dreaded "Quicktime Question Mark". A
-
Problem setup with DB Live Value and win 9
Hi I try to clean an old PC with win 98 SE and a SB Li've Value (CT4830) but I have lost the original CD but I found the last upgrade on creative site (sblw9xup.exe). But when I launch sblw9xup.exe , it says that it recognizes no sound blaster card a
-
Can i download songs from my computers on itunes & go to a differnet computer with different songs & download the songs from my ipod to the itunes & reupload all the songs from the 2nd computer & the songs from my computer?
-
Could Anyone Help Me Comment This Coding
var loader:URLLoader = new URLLoader(); loader.addEventListener(Event.COMPLETE, onComplete, false, 0, true); loader.addEventListener(IOErrorEvent.IO_ERROR, onIOError, false, 0, true); loader.load(new URLRequest("game.xml")); ii Need To Comment My Cod