Peak search outputs wrong value
I'm using the peak search VI to trend amplitudes from a power spectrum. The peak search VI is not outputing the correct amplitudes. They are off by a little bit everytime. I have looked at the output arrays from the power spectrum, and I have verified the peak search is getting good input data but outputting something unexpected. I have the peak search set for: 1) Single Max Peak, Threshold=0, Start=57.8Hz, Stop=59Hz and 2) Single Max Peak, Threshold=0, Start=61 Hz, Stop=62.2Hz. Neither one is displaying the correct value. I will post my code, but the file I'm opening is a .dat so I can't post that.
Solved!
Go to Solution.
Attachments:
Viewer with 1X MSP and RPM trends- Troubleshooting.vi 850 KB
The spectrum peak search VI is doing a curve fit to identify peaks. The peak search algorithm is described in the help:
SVFA Spectrum Peak Search Details
The SVFA Spectrum Peak Search VI finds all the peaks within the spectrum and performs amplitude/frequency or amplitude/order estimation on each individual peak. The VI operates on magnitude and power spectra.
Usually, the spectrum is computed based on a windowed input signal. The closed form of any cosine window, such as Hanning, Hamming, Blackman-Harris, and so on, is known. The presence of three dominant bins indicates a local maximum on the power spectrum. Therefore, when the SVFA Spectrum Peak Search VI locates three dominant bins, a curve fitting algorithm maps the window shape onto the three bins and estimates the true frequency and amplitude of that particular tone. The following illustration diagrams the concept of the algorithm.
==================
If you want the local maxima of the spectra, you can use the following code:
Doug
NI Sound and Vibration
Similar Messages
-
Webi base on BW query based on Infoset comes back with wrong values
Hello:
I have a Webi report on an OLAP Universe, on Bex Query.
The bex query is based on 1 INFOSET.
When I run the webi report the values that comes back a totally wrong values.
The correct results are not brought back.
When I do a test with crystal reports to the infoset, I can see the correct values. (I'm aware crystal uses different drivers).
The test is BW query designer, and crystal brings back proper values from Infoset based BW query.
Webi on Infoset based BW Query comes back with wrong data.
query is simple.
Pull in 3 attributes, 3 key figures, where componentkey = "111"
I get 36 rows in Crystal and 36 rows in Bex Analyzer, 36 rows in BW query designer (web analyzer).
I get many rows in webi (almost like a CARTENSIAN product).
I search a round this forum but still did not see a conclusive answer to this problem.
But I see another thread that several others faced this same issue without a resolution.
My environment.
BOE XI 3.1 SP2
No fix packs
SAP IK 3.1 SP2
HPUX-IA64
Thanks in advance for any help.
DwayneWas this problem ever solved?
I am having a similar problem with an infoset based query.
I have created the BW infoset, and confirmed that the correct data is returned from the underlying infoproviders. A simple BW query on that infoset yields the same results.
Create the universe, and then the WEBI, and WEBI now shows hundreds of records where I expect 10. Data is being returned in WEBI that definitely shouldn't be there. It's almost like the restrictions applied in the characteristic restriction area of my BW query are being ignored, even if I include them in the WEBI query.
Cheers,
Andrew -
HTMLDB_APPLICATION.G_F01 has wrong value!
HTMLDB_APPLICATION.G_F01 has wrong value!
Hello again,
I have a search page in my app (here the user defines the search criteria) P1.
The page branches to P130, where the result is shown. This second page contains a region of type 'SQL Query (PL/SQL Function Body Returning SQL Query)'. The code for this dynamic query is 231 lines of code, so I want to spare you scrolling through it here . What it basically does is generating SQL QRY's such as the following:
select distinct(sq.SAMPLE_ID) XXX,
'ID: '||sq.SAMPLE_ID||'
' ||'Type: '||sq.SAMPLE_TYPE||'
' ||'Collection Date: '||sq.COLLECTION_DATE SAMPLE_INFO,
'Aliquots (T/A): '||to_char(sq.ALIQUOTS_TOTAL)|| '/' ||to_char(sq.ALIQUOTS_AVAILABLE)||'
' ||'Volume (T/A): '||to_char(sq.VOLUME_TOTAL,'990D00')|| '/' ||to_char(sq.VOLUME_AVAILABLE,'990D00') AVAILABILITY,
'Age: '||sq.PATIENT_AGE||'
' ||'Gender: '||sq.PATIENT_SEX||'
' ||'Bloodtype: '||sq.BLOOD_TYPE||'
' PATIENT_INFO,
DML_SERVICE.get_Diagnoses(sq.SAMPLE_ID) DIAGNOSES,
DML_SERVICE.get_Medications(sq.SAMPLE_ID) MEDICATIONS,
DML_SERVICE.get_Interferences(sq.SAMPLE_ID) INTERFERENCES,
DML_SERVICE.get_LabData(sq.SAMPLE_ID) LABDATA,
decode(to_char(sq.ALIQUOTS_AVAILABLE), '0', null, htmldb_item.text(1, '1', 1, 2)) ORDER_QTY,
decode(to_char(sq.ALIQUOTS_AVAILABLE), '0', null, htmldb_item.checkbox(2,sq.SAMPLE_ID)) ORDER_ME
from SEARCH_V01 sq
where sq.DIAGNOSIS = 'D-Dimer'
order by 1 desc
The DML_SERVICE functions just return a string(Varchar2). At the right side of the report I have two columns, one with a textfield (ORDER_QTY, default: 1) and one with a checkbox (ORDER_ME) for each line.
For each line where the checkbox is checked, a process (On Submit - after Comp and Val) places the order for the requested quantity (this is done by inserting an Order ID into the ALIQUOTS table -> see bold update statement below).
The process follows:
declare
alq_qty number;
alq_id number;
cnt number;
begin
cnt := 0;
for i in 1..HTMLDB_APPLICATION.G_F02.count
loop
select count(*) -- set alq_qty to number of available alq's
into alq_qty
from ALIQUOTS a
where a.SAMPLE_ID = HTMLDB_APPLICATION.G_F02(i)
and a.ORDER_ID = 0;
insert into D_DEBUG (ID, DD) values (1, 'wanted: ' || HTMLDB_APPLICATION.G_F01(i) || ' available: ' || alq_qty); -- REMOVE!!!
if alq_qty > to_number(HTMLDB_APPLICATION.G_F01(i)) then -- if there are enough alq's
alq_qty := to_number(HTMLDB_APPLICATION.G_F01(i)); -- set alq_qty to number of ordered alq's
end if;
for n in 1..alq_qty
loop
select min(ID)
into alq_id
from ALIQUOTS
where sample_id = HTMLDB_APPLICATION.G_F02(i)
and order_id = 0;
insert into D_DEBUG (ID, DD) values (1, 'alq_id: '||alq_id); -- REMOVE!!!
update ALIQUOTS
set order_id = :P130_SELECT_ORDER
where id = alq_id;
cnt := cnt + 1;
end loop;
dml_service.upd_sample_record(HTMLDB_APPLICATION.G_F02(i)); -- refresh data in SAMPLE table
end loop;
:P130_MSG := 'Assigned '||cnt||' aliquots to order: '||:P130_SELECT_ORDER;
end;
Now my problem is that this process does what it should, sometimes. When I enter 6 in one row and check the checkbox and enter 4 in another row and check that checkbox and then press SUBMIT, 10 aliquots are assigned to my order.
Sometimes.... the other times the process just orders 2 aliquots, one of each line and disregards the number entered in the textfield.
Or so it may seem: I added some lines to write debug info into D_DEBUG (see above.) From those entries you can assume that the content of HTMLDB_APPLICATION.G_F01(i) is in fact '1' when the process does its work. So I think the problem lies somewhere in the creation of htmldb_item.text(), (I went through the API of that htmldb_item again and again...)
Also: I can reproduce / recreate this error. It's totally weird: for some rows it (always) works and for some it (always) doesn't !!!
So, any help, any suggestion is really appreciated (I'm currently working on bringing the crucial part of this to marvel.oracle.com)
-David-
[Edited by: sleuniss on Jul 15, 2004 12:18 PM]
Changed subject line.Now the subjectline is right, but the indentation is gone.... :-(
again the SQL query:
select distinct(sq.SAMPLE_ID) XXX,
'ID: '||sq.SAMPLE_ID||'
' ||'Type: '||sq.SAMPLE_TYPE||'
' ||'Collection Date: '||sq.COLLECTION_DATE SAMPLE_INFO,
'Aliquots (T/A): '||to_char(sq.ALIQUOTS_TOTAL)|| '/' ||to_char(sq.ALIQUOTS_AVAILABLE)||'
' ||'Volume (T/A): '||to_char(sq.VOLUME_TOTAL,'990D00')|| '/' ||to_char(sq.VOLUME_AVAILABLE,'990D00') AVAILABILITY,
'Age: '||sq.PATIENT_AGE||'
' ||'Gender: '||sq.PATIENT_SEX||'
' ||'Bloodtype: '||sq.BLOOD_TYPE||'
' PATIENT_INFO,
DML_SERVICE.get_Diagnoses(sq.SAMPLE_ID) DIAGNOSES,
DML_SERVICE.get_Medications(sq.SAMPLE_ID) MEDICATIONS,
DML_SERVICE.get_Interferences(sq.SAMPLE_ID) INTERFERENCES,
DML_SERVICE.get_LabData(sq.SAMPLE_ID) LABDATA,
decode(to_char(sq.ALIQUOTS_AVAILABLE), '0', null, htmldb_item.text(1, '1', 1, 2)) ORDER_QTY,
decode(to_char(sq.ALIQUOTS_AVAILABLE), '0', null, htmldb_item.checkbox(2,sq.SAMPLE_ID)) ORDER_ME
from SEARCH_V01 sq
where sq.DIAGNOSIS = 'D-Dimer'
order by 1 desc
and the process:
declare
alq_qty number;
alq_id number;
cnt number;
begin
cnt := 0;
for i in 1..HTMLDB_APPLICATION.G_F02.count
loop
select count(*) -- set alq_qty to number of available alq's
into alq_qty
from ALIQUOTS a
where a.SAMPLE_ID = HTMLDB_APPLICATION.G_F02(i)
and a.ORDER_ID = 0;
insert into D_DEBUG (ID, DD) values (1, 'wanted: ' || HTMLDB_APPLICATION.G_F01(i) || ' available: ' || alq_qty); -- REMOVE!!!
if alq_qty > to_number(HTMLDB_APPLICATION.G_F01(i)) then -- if there are enough alq's
alq_qty := to_number(HTMLDB_APPLICATION.G_F01(i)); -- set alq_qty to number of ordered alq's
end if;
for n in 1..alq_qty
loop
select min(ID)
into alq_id
from ALIQUOTS
where sample_id = HTMLDB_APPLICATION.G_F02(i)
and order_id = 0;
insert into D_DEBUG (ID, DD) values (1, 'alq_id: '||alq_id); -- REMOVE!!!
update ALIQUOTS
set order_id = :P130_SELECT_ORDER
where id = alq_id;
cnt := cnt + 1;
end loop;
dml_service.upd_sample_record(HTMLDB_APPLICATION.G_F02(i)); -- refresh data in SAMPLE table
end loop;
:P130_MSG := 'Assigned '||cnt||' aliquots to order: '||:P130_SELECT_ORDER;
end;
-David- -
How to search for multiple values with Bex Prompts
Hi,
I would like to know if it is possible to search for multiple values at the same time with Bex Prompts instead of searching one value at a time (please see the screen shot below). I searched the forum couldn't find any relevant answers. please let me know how to achieve?
Thanks,
Charvi.Hi Charvi,
You can use wild card search to ensure you get multiple similar values listed as search output.use * for multiple characters and ? for single character.
For Example, Ravi * would result you all employees with first name as Ravi
You can use various search formats such as * Ravi * and * Ravi and Ra?? etc.
Thanks
Mallik -
WRONG VALUE OF THE parameter file type(bdc-session method)
Hi experts,
when iam uploading vendor details,,,
it is giving above error.
chk the code once.....
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
FILENAME = 'C:/VENDOR1.TXT'
FILETYPE = 'DAT'
TABLES
DATA_TAB = IT_UPLOAD.
CALL FUNCTION 'BDC_OPEN_GROUP'
EXPORTING
CLIENT = SY-MANDT
GROUP = 'SRR'
USER = SY-UNAME.Hi here iam sending the whole code once to you. just chk it once and same error(WRONG VALUE OF THE parameter file type) is coming after the changes.
if i use asc it is giving that no file exists.
Table Declaration
tables :rf02k, "Maintain vendor master record screen and work fields
lfa1, "Vendor Master(general)
lfbk, "Vendor Master (Bank Details)
lfb1, "Vendor Master (Company Code)
lfm1, "Vendor master record purchasing organization data
lfb5. "Vendor master (dunning data)
Data Declaration
data : begin of it_UPLOAD occurs 0,
LIFNR like rf02k-lifnr, "vendor no
BUKRS like rf02k-bukrs, "company code
EKorg like rf02k-ekorg, "purchasing org
KTOKK like rf02k-ktokk, "account group
anred like lfa1-anred, "initial
name1 like lfa1-name1, "name of vendor
sortl like lfa1-sortl, "search term
land1 like lfa1-land1, "country
akont like lfb1-akont, "reconcillation a/c.
fdgrv like lfb1-fdgrv, "planning group
zterm like lfb1-zterm, "terms of payment key
mahna like LFB5-MAHNA, "dunning procedure
waers like lfm1-waers, "Purchase order currency
END OF IT_UPLOAD.
DATA : IT_BDCDATA LIKE BDCDATA OCCURS 0 WITH HEADER LINE.
include bdcrecx1.
start-of-selection.
UPLOADING THE DATA TO IT_UPLOAD
call function 'GUI_UPLOAD'
exporting
filename = 'C:\DASRR\VENDOR1.TXT'
filetype = 'DAT'
has_field_separator = 'X'
HEADER_LENGTH = 0
READ_BY_LINE = 'X'
DAT_MODE = ' '
CODEPAGE = ' '
IGNORE_CERR = ABAP_TRUE
REPLACEMENT = '#'
CHECK_BOM = ' '
IMPORTING
FILELENGTH =
HEADER =
tables
data_tab = IT_UPLOAD
EXCEPTIONS
FILE_OPEN_ERROR = 1
FILE_READ_ERROR = 2
NO_BATCH = 3
GUI_REFUSE_FILETRANSFER = 4
INVALID_TYPE = 5
NO_AUTHORITY = 6
UNKNOWN_ERROR = 7
BAD_DATA_FORMAT = 8
HEADER_NOT_ALLOWED = 9
SEPARATOR_NOT_ALLOWED = 10
HEADER_TOO_LONG = 11
UNKNOWN_DP_ERROR = 12
ACCESS_DENIED = 13
DP_OUT_OF_MEMORY = 14
DISK_FULL = 15
DP_TIMEOUT = 16
OTHERS = 17
if sy-subrc <> 0.
message id sy-msgid type sy-msgty number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
endif.
*CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
FILENAME = 'C:/VENDOR1.TXT'
FILETYPE = 'DAT'
TABLES
DATA_TAB = IT_UPLOAD.
CALL FUNCTION 'BDC_OPEN_GROUP'
EXPORTING
CLIENT = SY-MANDT
GROUP = 'SRR'
USER = SY-UNAME.
POPULATE INTERNAL TABL
LOOP AT IT_UPLOAD.
CLEAR IT_BDCDATA.
REFRESH IT_BDCDATA.
PERFORM POPULATE_DATA.
CALL FUNCTION 'BDC_INSERT'
EXPORTING
TCODE = 'XK01'
TABLES
DYNPROTAB = IT_BDCDATA.
ENDLOOP.
*& Form POPULATE_DATA
text
--> p1 text
<-- p2 text
FORM POPULATE_DATA .
PERFORM GETDATA USING 'X' 'SAPMF02K' '0100'.
perform getdata using ' ' RF02K-LIFNR 'IT_UPLOAD-LIFNR'.
perform getdata using ' ' RF02K-bukrs 'IT_UPLOAD-bukrs'.
perform getdata using ' ' RF02K-EKORG 'IT_UPLOAD-EKORG'.
perform getdata using ' ' RF02K-KTOKK 'IT_UPLOAD-KTOKK'.
PERFORM GETDATA USING 'X' 'SAPMF02K' '0110'.
perform getdata using ' ' LFA1-ANRED 'IT_UPLOAD-ANRED'.
perform getdata using ' ' LFA1-NAME1 'IT_UPLOAD-NAME1'.
perform getdata using ' ' LFA1-SORTL 'IT_UPLOAD-SORTL'.
perform getdata using ' ' LFA1-LAND1 'IT_UPLOAD-LAND1'.
PERFORM GETDATA USING 'X' 'SAPMF02K' '0210'.
perform getdata using ' ' LFB1-AKONT 'IT_UPLOAD-AKONT'.
perform getdata using ' ' LFB1-FDGRV 'IT_UPLOAD-FDGRV'.
PERFORM GETDATA USING 'X' 'SAPMF02K' '0215'.
perform getdata using ' ' LFB1-ZTERM 'IT_UPLOAD-ZTERM'.
PERFORM GETDATA USING 'X' 'SAPMF02K' '0220'.
perform getdata using ' ' LFB5-MAHNA 'IT_UPLOAD-MAHNA'.
PERFORM GETDATA USING 'X' 'SAPMF02K' '0310'.
perform getdata using ' ' LFM1-WAERS 'IT_UPLOAD-WAERS'.
ENDFORM. " POPULATE_DATA
*& Form GETDATA
text
-->P_0213 text
-->P_0214 text
-->P_0215 text
FORM GETDATA USING VALUE(P_0213)
VALUE(P_0214)
VALUE(P_0215).
IF P_0213 = 'X'.
IT_BDCDATA-PROGRAM = P_0213.
IT_BDCDATA-DYNPRO = P_0214.
IT_BDCDATA-DYNBEGIN = P_0215.
ELSE.
IT_BDCDATA-FNAM = P_0214.
IT_BDCDATA-FVAL = P_0215.
ENDIF.
****************any error in coding just chk it***************** -
Source message split into 2 orders - 2nd order populating wrong values
Hi Friends,
I have an issue related to X12 to Orders, X12 file is processed and split into 2 orders/idocs,
1 idoc is outputing the right values, however the 2nd idoc is extracting all wrong values.
According to my observation, there are no values coming in for couple of E1EDKT1 segments (for the second idoc, fyi, there are multiple E1EDKT1 segments with different values).
it seems that values coming after these segments are extracted and filled to these segments. i can see 2 upward shifts in the output.
Any idea how to resolve this issue, i have tried using map with default, split by value, collapse context, remove contexts etc.
Thanks in advance,
Regards,Use mapwithdefault function with a blank character for all the target nodes which ever you think might not get a value from the source. You will see the right results.
VJ -
Entering a Value and Tabbing out of af:inputListOfValues displays the wrong value
Good morning. I am having an issue with the autosubmit and tabbing out of af:inputListOfValues in my code.
Problem: When I type in a valid value and tab out of the field, it ignores the value I entered and displays whatever the first list in the query result instead regardless of the value I typed.
My code snippet. What it does is simply an LoV search of Employee No attached to an entity attribute and depending on selection, it will display the Employee Name within the page. (it also retrieves a table view depending what employee number was entered)
<af:inputListOfValues id="empNoId"
popupTitle="Search and Select: #{bindings.EmpNo.hints.label}"
value="#{bindings.EmpNo.inputValue}"
label="#{bindings.EmpNo.hints.label}"
model="#{bindings.EmpNo.listOfValuesModel}"
required="#{bindings.EmpNo.hints.mandatory}"
columns="#{bindings.EmpNo.hints.displayWidth}"
shortDesc="#{bindings.EmpNo.hints.tooltip}"
binding="#{workLocationBean.txtEmpNo}"
partialTriggers="id1"
valueChangeListener="{bean.onEmpNoChange}"
autoSubmit="true">
<f:validator binding="#{bindings.EmpNo.validator}"/>
</af:inputListOfValues>
Other things to note:
When I enter a valid employee number and click anywhere in the page (not TAB), it behaves correctly.
I have been trying to figure this out for days. Even my valueChangeListener gets the wrong value (when I do System.out) when I tab out so I am not sure where to catch it and replace it with the correct value.
Thank you.This usually happens when primary key is not set in view object used by LOV.
Dario -
ALV grid abort processing, if wrong value
Hello,
i've a editable alv grid.
Is it possible to abort at event data_changed/data_changed_finished, if an value is wrong (f.e. to high < 500), and write the old value back.
Best regards,
TomSdHello Thomas
The sample report <b>ZUS_SDN_ALVGRID_EDITABLE_10</b> provides a possible (perhaps not the most elegant) solution for your problem.
*& Report ZUS_SDN_ALVGRID_EDITABLE_10
*& Description: Reset false values entered in editable ALV list
*& to original values
*& Example: Column SORT_KEY allows values from '000'-'150'
* -> reset if value > '010'
*& Thread: ALV grid abort processing, if wrong value
*& Link: https:||<a class="jive_macro jive_macro_thread" href="" __jive_macro_name="thread" modifiedtitle="true" __default_attr="669430"></a>
REPORT zus_sdn_alvgrid_editable_10.
TYPE-POOLS: abap.
INCLUDE <icon>. " NOTE: replace by TYPE-POOLS: icon. on >= 6.20
DATA:
gd_repid TYPE syrepid,
gd_okcode TYPE sy-ucomm,
gs_layout TYPE lvc_s_layo,
gt_fcat TYPE lvc_t_fcat,
go_docking TYPE REF TO cl_gui_docking_container,
go_grid TYPE REF TO cl_gui_alv_grid.
TYPES: BEGIN OF ty_s_outtab.
INCLUDE TYPE knb1.
TYPES: END OF ty_s_outtab.
TYPES: ty_t_outtab TYPE STANDARD TABLE OF ty_s_outtab
WITH DEFAULT KEY.
DATA:
gt_outtab TYPE ty_t_outtab,
gt_outtab_pbo TYPE ty_t_outtab.
* CLASS lcl_eventhandler DEFINITION
CLASS lcl_eventhandler DEFINITION.
PUBLIC SECTION.
CLASS-DATA:
mo_data_changed TYPE REF TO cl_alv_changed_data_protocol.
CLASS-METHODS:
handle_data_changed
FOR EVENT data_changed OF cl_gui_alv_grid
IMPORTING
er_data_changed
e_onf4
e_onf4_before
e_onf4_after
e_ucomm
sender,
handle_data_changed_finished
FOR EVENT data_changed_finished OF cl_gui_alv_grid
IMPORTING
e_modified
et_good_cells,
handle_user_command
FOR EVENT user_command OF cl_gui_alv_grid
IMPORTING
e_ucomm,
handle_toolbar
FOR EVENT toolbar OF cl_gui_alv_grid
IMPORTING
e_object
e_interactive.
ENDCLASS. "lcl_eventhandler DEFINITION
* CLASS lcl_eventhandler IMPLEMENTATION
CLASS lcl_eventhandler IMPLEMENTATION.
METHOD handle_data_changed.
* define local data
DATA:
ld_idx TYPE i,
ls_cell TYPE lvc_s_modi,
ls_msg TYPE symsg.
FIELD-SYMBOLS:
<lt_outtab> TYPE ty_t_outtab,
<ls_outtab> TYPE ty_s_outtab.
ASSIGN er_data_changed->mp_mod_rows->* TO <lt_outtab>.
LOOP AT er_data_changed->mt_mod_cells INTO ls_cell
WHERE ( fieldname = 'ZUAWA' ).
ld_idx = syst-tabix.
IF ( ls_cell-value <= '010' ).
READ TABLE <lt_outtab> ASSIGNING <ls_outtab> INDEX ld_idx.
MODIFY gt_outtab FROM <ls_outtab> INDEX ls_cell-row_id. " !!!
ELSE.
CLEAR: ls_msg.
ls_msg-msgv1 = 'Value'.
ls_msg-msgv2 = ls_cell-value.
ls_msg-msgv3 = 'too high (> 010)'.
CALL METHOD er_data_changed->add_protocol_entry
EXPORTING
i_msgid = '00'
i_msgty = 'E'
i_msgno = '398'
i_msgv1 = ls_msg-msgv1
i_msgv2 = ls_msg-msgv2
i_msgv3 = ls_msg-msgv3
* I_MSGV4 =
i_fieldname = ls_cell-fieldname
i_row_id = ls_cell-row_id
i_tabix = ls_cell-tabix.
DELETE er_data_changed->mt_mod_cells INDEX ld_idx.
DELETE er_data_changed->mt_good_cells INDEX ld_idx.
ENDIF.
ENDLOOP.
IF ( syst-subrc = 0 ).
er_data_changed->display_protocol( ).
ENDIF.
** cl_gui_cfw=>set_new_ok_code( 'REFRESH' ). " not possible on 4.6c
CALL METHOD cl_gui_cfw=>set_new_ok_code
EXPORTING
new_code = 'DUMMY'
* IMPORTING
* RC =
ENDMETHOD. "handle_data_changed
METHOD handle_data_changed_finished.
* define local data
DATA:
ls_outtab TYPE ty_s_outtab,
ls_cell TYPE lvc_s_modi.
ENDMETHOD. "handle_data_changed_finished
METHOD handle_user_command.
ENDMETHOD. "handle_user_command
METHOD handle_toolbar.
* define local data
DATA:
ls_button TYPE stb_button.
ls_button-function = 'DEFAULT'.
ls_button-icon = icon_mass_change.
ls_button-quickinfo = 'Set default value for column'.
APPEND ls_button TO e_object->mt_toolbar.
ENDMETHOD. "handle_toolbar
ENDCLASS. "lcl_eventhandler IMPLEMENTATION
START-OF-SELECTION.
SELECT * FROM knb1 INTO TABLE gt_outtab UP TO 20 ROWS
WHERE bukrs = '1000'.
gt_outtab_pbo = gt_outtab. " store PBO data
* Create docking container
CREATE OBJECT go_docking
EXPORTING
parent = cl_gui_container=>screen0
ratio = 90
EXCEPTIONS
OTHERS = 6.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
* Create ALV grid
CREATE OBJECT go_grid
EXPORTING
i_parent = go_docking
EXCEPTIONS
OTHERS = 5.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
* Build fieldcatalog
PERFORM build_fieldcatalog.
PERFORM set_layout.
SET HANDLER:
lcl_eventhandler=>handle_toolbar FOR go_grid,
lcl_eventhandler=>handle_data_changed FOR go_grid,
lcl_eventhandler=>handle_data_changed_finished FOR go_grid.
* Display data
CALL METHOD go_grid->set_table_for_first_display
EXPORTING
is_layout = gs_layout
CHANGING
it_outtab = gt_outtab
it_fieldcatalog = gt_fcat
EXCEPTIONS
OTHERS = 4.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
go_grid->set_toolbar_interactive( ).
CALL METHOD go_grid->register_edit_event
EXPORTING
i_event_id = cl_gui_alv_grid=>mc_evt_enter
EXCEPTIONS
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.
* Link the docking container to the target dynpro
gd_repid = syst-repid.
CALL METHOD go_docking->link
EXPORTING
repid = gd_repid
dynnr = '0100'
* CONTAINER =
EXCEPTIONS
OTHERS = 4.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
* ok-code field = GD_OKCODE
CALL SCREEN '0100'.
* Flow logic (no elements on screen):
* PROCESS BEFORE OUTPUT.
* MODULE STATUS_0100.
* PROCESS AFTER INPUT.
* MODULE USER_COMMAND_0100.
END-OF-SELECTION.
*& Module STATUS_0100 OUTPUT
* text
MODULE status_0100 OUTPUT.
SET PF-STATUS 'STATUS_0100'.
* SET TITLEBAR 'xxx'.
CALL METHOD go_grid->refresh_table_display
* EXPORTING
* IS_STABLE =
* I_SOFT_REFRESH =
EXCEPTIONS
finished = 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.
ENDMODULE. " STATUS_0100 OUTPUT
*& Module USER_COMMAND_0100 INPUT
* text
MODULE user_command_0100 INPUT.
TRANSLATE gd_okcode TO UPPER CASE.
* Fetch changes on ALV grid
go_grid->check_changed_data( ).
CASE gd_okcode.
WHEN 'BACK' OR
'END' OR
'CANC'.
SET SCREEN 0. LEAVE SCREEN.
WHEN 'DUMMY'. " do nothing but pass PAI -> list refresh at PBO
WHEN OTHERS.
ENDCASE.
CLEAR: gd_okcode.
ENDMODULE. " USER_COMMAND_0100 INPUT
*& Form BUILD_FIELDCATALOG_KNB1
* text
* --> p1 text
* <-- p2 text
FORM build_fieldcatalog .
* define local data
DATA:
ls_fcat TYPE lvc_s_fcat.
CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
EXPORTING
* I_BUFFER_ACTIVE =
i_structure_name = 'KNB1'
* I_CLIENT_NEVER_DISPLAY = 'X'
* I_BYPASSING_BUFFER =
* I_INTERNAL_TABNAME =
CHANGING
ct_fieldcat = gt_fcat
EXCEPTIONS
inconsistent_interface = 1
program_error = 2
OTHERS = 3.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
" Set required fields editable
LOOP AT gt_fcat INTO ls_fcat
WHERE ( fieldname = 'ZUAWA' OR
fieldname = 'BUSAB' ).
ls_fcat-edit = abap_true.
MODIFY gt_fcat FROM ls_fcat.
ENDLOOP.
DELETE gt_fcat WHERE ( fieldname = 'ZINRT' ).
ENDFORM. " BUILD_FIELDCATALOG
*& Form SET_LAYOUT
* text
* --> p1 text
* <-- p2 text
FORM set_layout .
CLEAR: gs_layout.
gs_layout-cwidth_opt = abap_true.
gs_layout-zebra = abap_true.
** gs_layout-stylefname = 'CELLTAB'.
ENDFORM. " SET_LAYOUT
Regards,
Uwe -
SESSION METHOD( WRONG VALUE OF THE parameter file type)
Hi here iam sending the whole code once to you. just chk it once and same error(WRONG VALUE OF THE parameter file type) is coming after the changes.
if i use asc it is giving that no file exists.
Table Declaration
tables :rf02k, "Maintain vendor master record screen and work fields
lfa1, "Vendor Master(general)
lfbk, "Vendor Master (Bank Details)
lfb1, "Vendor Master (Company Code)
lfm1, "Vendor master record purchasing organization data
lfb5. "Vendor master (dunning data)
Data Declaration
data : begin of it_UPLOAD occurs 0,
LIFNR like rf02k-lifnr, "vendor no
BUKRS like rf02k-bukrs, "company code
EKorg like rf02k-ekorg, "purchasing org
KTOKK like rf02k-ktokk, "account group
anred like lfa1-anred, "initial
name1 like lfa1-name1, "name of vendor
sortl like lfa1-sortl, "search term
land1 like lfa1-land1, "country
akont like lfb1-akont, "reconcillation a/c.
fdgrv like lfb1-fdgrv, "planning group
zterm like lfb1-zterm, "terms of payment key
mahna like LFB5-MAHNA, "dunning procedure
waers like lfm1-waers, "Purchase order currency
END OF IT_UPLOAD.
DATA : IT_BDCDATA LIKE BDCDATA OCCURS 0 WITH HEADER LINE.
include bdcrecx1.
start-of-selection.
UPLOADING THE DATA TO IT_UPLOAD
call function 'GUI_UPLOAD'
exporting
filename = 'C:\DASRR\VENDOR1.TXT'
filetype = 'DAT'
has_field_separator = 'X'
HEADER_LENGTH = 0
READ_BY_LINE = 'X'
DAT_MODE = ' '
CODEPAGE = ' '
IGNORE_CERR = ABAP_TRUE
REPLACEMENT = '#'
CHECK_BOM = ' '
IMPORTING
FILELENGTH =
HEADER =
tables
data_tab = IT_UPLOAD
EXCEPTIONS
FILE_OPEN_ERROR = 1
FILE_READ_ERROR = 2
NO_BATCH = 3
GUI_REFUSE_FILETRANSFER = 4
INVALID_TYPE = 5
NO_AUTHORITY = 6
UNKNOWN_ERROR = 7
BAD_DATA_FORMAT = 8
HEADER_NOT_ALLOWED = 9
SEPARATOR_NOT_ALLOWED = 10
HEADER_TOO_LONG = 11
UNKNOWN_DP_ERROR = 12
ACCESS_DENIED = 13
DP_OUT_OF_MEMORY = 14
DISK_FULL = 15
DP_TIMEOUT = 16
OTHERS = 17
if sy-subrc <> 0.
message id sy-msgid type sy-msgty number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
endif.
*CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
FILENAME = 'C:/VENDOR1.TXT'
FILETYPE = 'DAT'
TABLES
DATA_TAB = IT_UPLOAD.
CALL FUNCTION 'BDC_OPEN_GROUP'
EXPORTING
CLIENT = SY-MANDT
GROUP = 'SRR'
USER = SY-UNAME.
POPULATE INTERNAL TABL
LOOP AT IT_UPLOAD.
CLEAR IT_BDCDATA.
REFRESH IT_BDCDATA.
PERFORM POPULATE_DATA.
CALL FUNCTION 'BDC_INSERT'
EXPORTING
TCODE = 'XK01'
TABLES
DYNPROTAB = IT_BDCDATA.
ENDLOOP.
*& Form POPULATE_DATA
text
--> p1 text
<-- p2 text
FORM POPULATE_DATA .
PERFORM GETDATA USING 'X' 'SAPMF02K' '0100'.
perform getdata using ' ' RF02K-LIFNR 'IT_UPLOAD-LIFNR'.
perform getdata using ' ' RF02K-bukrs 'IT_UPLOAD-bukrs'.
perform getdata using ' ' RF02K-EKORG 'IT_UPLOAD-EKORG'.
perform getdata using ' ' RF02K-KTOKK 'IT_UPLOAD-KTOKK'.
PERFORM GETDATA USING 'X' 'SAPMF02K' '0110'.
perform getdata using ' ' LFA1-ANRED 'IT_UPLOAD-ANRED'.
perform getdata using ' ' LFA1-NAME1 'IT_UPLOAD-NAME1'.
perform getdata using ' ' LFA1-SORTL 'IT_UPLOAD-SORTL'.
perform getdata using ' ' LFA1-LAND1 'IT_UPLOAD-LAND1'.
PERFORM GETDATA USING 'X' 'SAPMF02K' '0210'.
perform getdata using ' ' LFB1-AKONT 'IT_UPLOAD-AKONT'.
perform getdata using ' ' LFB1-FDGRV 'IT_UPLOAD-FDGRV'.
PERFORM GETDATA USING 'X' 'SAPMF02K' '0215'.
perform getdata using ' ' LFB1-ZTERM 'IT_UPLOAD-ZTERM'.
PERFORM GETDATA USING 'X' 'SAPMF02K' '0220'.
perform getdata using ' ' LFB5-MAHNA 'IT_UPLOAD-MAHNA'.
PERFORM GETDATA USING 'X' 'SAPMF02K' '0310'.
perform getdata using ' ' LFM1-WAERS 'IT_UPLOAD-WAERS'.
ENDFORM. " POPULATE_DATA
*& Form GETDATA
text
-->P_0213 text
-->P_0214 text
-->P_0215 text
FORM GETDATA USING VALUE(P_0213)
VALUE(P_0214)
VALUE(P_0215).
IF P_0213 = 'X'.
IT_BDCDATA-PROGRAM = P_0213.
IT_BDCDATA-DYNPRO = P_0214.
IT_BDCDATA-DYNBEGIN = P_0215.
ELSE.
IT_BDCDATA-FNAM = P_0214.
IT_BDCDATA-FVAL = P_0215.
ENDIF.When u use GUI_UPLOAD, U can not assign file type as 'dat'. This must be either ASC or BIN.
Make sure ur flat file path should correct..
This well help u... -
Hello,
I'm trying to test out the functionality of the Spectrum Peak Search VI in the Sound and Vibration Toolset. Please see the attached testing VI which has a simulated spectrum.
For some reason, it can detect the presence of peaks but will not list their frequencies/amplitudes in the peaks array. Any ideas on what is going on?
Thanks for any thoughts, Hunter (LabView 6.1 user)
Attachments:
Test_Peak_Detect.vi 56 KBHmmm.....thanks for highlighting these. Opening up the cluster to view these on the front panel and then rerunning the VI actually produced results...even leaving the values at there defaults.
I had to change the window to Hanning to get accurate results, though. Interestingly, it worked even with window size set to 0.
Anyway, thanks for the help. -
Full Points sure: Wrong values populating in report (BEX)
Hi Gurus,
I got an Issue on CRM Report. Report is populating wrong values.
In the report, We have structure called Opportunity (in that structure fields are New opportunity, Close opportunity, Win opportunity and Open opportunity) in query and One key figure called Revenue.
On revenue we have one condition with variables. But, in that condition everything is fine.
The Condition Screen is like this:
Radio Button: Single characteristic is selected
"Opportunity Sales ID" selected in Characteristics.
Keyfigures:
Revenue New Opp TOP N TOP X OPP
Revenue Open Opp TOP N TOP X OPP
Revenue WINS TOP N TOP X OPP
Revenue Lost TOP N TOP X OPP
everything is right in this: If we select top 10 opportunities. we are getting wrong values
for ex: if we select top 10 Opportunities (in the selection screen) means REVENUES.
We are getting 12 values. 10 values are correct remaining 2 values are wrong..
There is no Update routine for revenue keyfield.
Can please suggest me on this What are possibilities for wrong values ...
FULL POINTS SURE FOR THIS
THANKS,
KNHi All,
Can anybody answer... this...
thanks,
KR -
Updated CODE1 is showing wrong values in 2LIS_05_QE1
Hi all,
I'm using 2LIS_05_QE1 extractor to report over qualitative data in BW. When the code of the characteristics is updated, the extractor takes 2 records, before and after images. The extractor is gathering wrong values for the CODE1 field in the before image.
REQUEST DATAPAKID RECORD ROCANCEL PPLNKN MERKNR CODE1 GRUPPE1 ZHLNSTAT
REQU_4KVR0APSV0RSZ7N70IOR0F95L 1 5120 5 40 0 CIBAU038 1
REQU_4KPIA4UG5G1IKN6DE3XFWKIS9 3 4045 X 5 40 0 CIBAU038 -1
REQU_4KPIA4UG5G1IKN6DE3XFWKIS9 3 4046 5 40 75 CIBAU038 1
REQU_4KYF8YNIEMXNZI7P2Y5BM21W9 3 4045 X 5 40 0 CIBAU038 -1
REQU_4KYF8YNIEMXNZI7P2Y5BM21W9 3 4046 5 40 75 CIBAU038 1
We have changed the characteristic two times, now we can see two of the before images with the ROCANCEL field marked with = 'X'. The problem appears in the second before image which is not taking the actual value of the CODE1 field (75), instead is showing the value in zero. Then, when I report over the key figure in the table above ZHLNSTAT (quantity of values) the results are showing 2 values for CODE1=75 and -1 values for CODE1=0.
Any ideas?I have checked Datasource and CODE1 is not a hidden field...apart from this field there are other fields too which I can see in Datasource in R/3 about dont see them in BW ....
Please let me know what could be wrong.
Thanks,
Murtuza.
Edited by: Murtuza Morwala on Jun 27, 2009 7:36 AM -
In XML Output the values of Number column tags are not displayed properly
Hi,
Our Client have been using AR Invoice Print Program for a long time and it is heavily customized. Also they are using an old version of the RDF. So we have taken the latest version of the RDF (RAXINV.rdf) for Oracle Apps 11.5.10.2 by raising a SR and implement Client's old RAXINV.rdf into it.
All was ok, but when we are running the program, the XML Output did not generate properly. For the Q_INVOICE query (G_ORDER_BY, G_INVOICE and G_INV_TERM group), the value of some of the scaler number columns are not appeared properly. The tags are coming correctly, but the value is appearing as '*', instead of the correct value. We have checked in the RDF Level (By putting srw.message and check in the log file) that those columns are having proper value. So there is no issue with the RDF.
But because of the above mentioned problem, the some of the PDF output field values also is not generated correctly.
I think that because of the lexical parameters which was implementing the Q_INVOICE query (&COMMON_QUERY) this issue is coming. Because the issue is only in the Q_INVOICE query group (G_ORDER_BY, G_INVOICE and in G_INV_TERM group) not in any other query group.
There is no problem with the scaler character columns. The issue is only with the number columns.
Also we have checked that if we hardcode the value of the number columns in the above mentioned lexical parameter, this problem doesn't appear.
If we put TO_CHAR function to those number columns in the lexical parameter (COMMON_QUERY), then this issue get solved. But we can't do it because of performance issue and also Client won't approve it.
Please help.
With Thanks and RegardsI don't know how to read the code you pasted or I would have checked this myself.
Do your fields in the internal table reference dictionary objects or elementary types? If not using dictionary types, the column names will be blank by default. If you can't change your fields to be dictionary types, you can try this to change the column names:
I made a method inside my local class to add the names:
call method set_colname
EXPORTING iv_tab = alv_tab
iv_colid = 'xxxx' "fieldname from the table
iv_stxt = text-t54
iv_mtxt = text-t55
iv_ltxt = text-t55.
METHOD set_colname .
data:
alv_cols type REF TO cl_salv_columns_table,
alv_col type REF TO cl_salv_column.
TRY .
*... Change fieldnames
call METHOD iv_tab->get_columns RECEIVING value = alv_cols.
call method alv_cols->get_column EXPORTING columnname = iv_colid RECEIVING value = alv_col.
IF iv_stxt <> ''.
CALL METHOD alv_col->set_short_text EXPORTING value = iv_stxt.
ENDIF.
IF iv_mtxt <> ''.
CALL METHOD alv_col->set_medium_text EXPORTING value = iv_mtxt.
ENDIF.
IF iv_ltxt <> ''.
CALL METHOD alv_col->set_long_text EXPORTING value = iv_ltxt.
ENDIF.
CATCH cx_salv_not_found.
ENDTRY.
ENDMETHOD. "set_colname -
TDS certificate wrong values down payment clearing
Hi,
we are using 4.7 version with patch level Sap &APPl( accounts &
Logistics) SAPKH47029. we are using extended witholding tax. with three
tax codes. Tds + Surcharge, Ecess , SHEcess
we made vendor downpayment Rs5000/-. at the time my TDS is
TDS+Surcharge= 550, Ecess=11, SHEcess= 6, Total tax= Rs567/-
we made vendor invoice Rs10000/- at the time TDS is
TDS+Surcharge= 1100, Ecess=22, SHEcess= 11, Total tax= Rs1133/-
We cleared downpayment using F-54 aginst invoice.
at the time it has reversed the Downpayment tds entry Rs567/-
i made remittance challan J1INCHLN amount RS 1133/- it is correct.
While generating TDS certificate it is showing wrong values. Rs 1116/-
it is showing two line items.
Amount paid TDS Surcharge Educat cess Total tax
9450.00 500 50 1 549.00
5000.00 500 50 17 567.00
Total 1116.00
But it is showing correct value in Querterly e returns J1INQEFILEHi,
Note Number: 1124300 -
How to search for a value in an iterator in Jdev 10.1.2?
Hi!
I need to search an iterator named "PermitYrIterator1" for a year value (e.g. 2009) that is stored in bindings.Yr in my jsp. How do I do this in my jsp's DataForwardAction Code) in Jdev 10.1.2?
I need this in my "Create page." I need to search for this value because I want to check if I should re-execute the "PermitYrIterator1" so that it shows the newly added year in bindings.Yr or not. If bindings.Yr is found in the iterator then I do not need to re-execute the iterator. But if the newly entered year cannot be found then I need to re-execute the iterator.
I hope you can help me immediately! Thanks!Hi,
Anyone can help me on this please?
Maybe you are looking for
-
Monitor Setup for Intel Platform
I have installed Solaris 8 on Intel Platform. But I am unable to set the Color resolution of my Monitor and it is working in Monochrome mode. How do I set the Monitor back to color ?
-
Create Purchase Order - Account Assignment Category Q
Hi experts, I'm trying to create a purchase order with account assignment category "Q" and the system show me the error message ME083 - Enter GR non-valuated. The material type is HIBE. The Quantity and value updating are flagged. Does anybody can he
-
Hi , ICWC we have a manager portal and Agent portal. If manager attach documents or url to Campaign in marketing planner screen.How agent can view the attachments in Agent portal. In agent portal we dont have any marketing planner screen, whereas it
-
Cannot connect to via wifi after some upgrade...
After updating some package recently, I cannot connect to wifi. Normally, I'd use netcfg (now v2.8.2) to connect thus: ┌─(dan@archbang)────────────(22:35)───┐ └─(~)─> sudo netcfg -u dd-wrt_vap :: dd-wrt_vap up [BUSY] DEBUG: status reported to profile
-
It was working when bought from india mobile with ...
i updated new firmware first as soon as i got 3G internet bought it because it had offers and i am using it on my pc for downloading games movies etc. i updated firmware after 2 days it was working giving me good speeds now after update it does not e