How can I modify a column to a primary key column
Hi,
I've created a table with no primary key. How I can set the primary key column now? The datatype of the "primary key" column is Raw(35).
Thanks,
Mike
Mike,
Issue the following command:
ALTER TABLE table_name
ADD CONSTRAINT constraint_name PRIMARY KEY(column_name);
NOTE: If you want to place the primary key data in a separate tablespace, then you can add the key word USING INDEX TABLESPACE after the column_name.
Regards,
John
Similar Messages
-
How can I modify one column of current and next record depending of some criteria?
Having DDL
CREATE TABLE #ServiceChange(
[ID] [int] identity(1,1),
[SHCOMP] [char](2) NOT NULL,
[SHCRTD] [numeric](8, 0) NOT NULL,
[SHCUST] [numeric](7, 0) NOT NULL,
[SHDESC] [char](35) NOT NULL,
[SHTYPE] [char](1) NOT NULL,
[SHAMT] [numeric](9, 2) NOT NULL,
[CBLNAM] [char](30) NOT NULL,
[GROUPID] [char](2) NULL
And original and desire data in below link
https://www.dropbox.com/sh/bpapxquaae9aa13/AADnan31ZASublDjN7sa2Vvza
I would like to know how can I modify one column of current and next record depending of some criteria using SQL2012?
The criteria is:
Type should always flow F->T
if current abs(amount)> next abs(amount) then groupid = 'PD'
if current abs(amount)< next abs(amount) then groupid = 'PI'
there is no case when those amounts will be equals
where current(custid) = next(custid) and current(service) = next(service) and groupid is null
Any help will be really apreciated.
Thank youI tried that and got this error
'LAG' is not a recognized built-in function name.
You said you were using SQL 2012, but apparently you are not. The LAG function was added in SQL 2012. This solution works on SQL 2005 and SQL 2008:
; WITH numbering AS (
SELECT groupid,
rowno = row_number() OVER (PARTITION BY custid, service ORDER BY date, id)
FROM #ServiceChange
), CTE AS (
SELECT a.groupid,
CASE WHEN abs(a.amount) < abs(b.amount) THEN 'PD'
WHEN abs(a.amount) > abs(b.amount) THEN 'PI'
END AS newgroupid
FROM numbering a
JOIN numbering b ON b.custid = a.custid
AND b.service = a.service
AND b.rowno = a.rowno - 1
UPDATE CTE
SET groupid = newgroupid
Erland Sommarskog, SQL Server MVP, [email protected] -
How can I be able to create a primary key in a Form on a Table with Report?
When I click the "Create" button, a form appears allowing me type in data for those columns. But primary key is not there. I really need to specify my primary key here also. Because the primary key for this table is a Serial Number, not just a sequence number.
I noticed that when I created this page earlier, the primary key was ruled out by default. I wish there is a way to accomplish this. Thanks!Hello,
>> a pk field is not null implicit …
I’m not sure I understand your statement. Every item, including the one holds the primary key, is null for a new form. The question is, when you are filling the form, how to populate this field. The APEX wizard assumes this field will be populated by the system, hence it hides it from the user, however it’s a valid situation where the primary field is filled by the user.
As primary field should not be changed, hence the productive advice by Martin. If the form displays an existing record, the primary field item should be set to Read Only.
Regards,
Arie.
Please remember to mark appropriate posts as correct/helpful. For the long run, it will benefit us all. -
How can we modify the maximum no. of columns in pivot table ?
hi all,
How can we modify the maximum no. of columns in pivot table ?
do i need to change the nqconfig.ini or instanceconfig file or else?
thnx..A little search on the forum :
In the instanceconfig.xml add a <PivotView> element under <ServerInstance> if one does
not exist already.
Within the <PivotView> element add an entry that looks like:
<MaxCells>nnnnnn</MaxCells>
where nnnnnn is your desired limit for the maximum total number of cells allowed
in a pivot.
Warning: an excessively large number will cause more memory consumption and
slower browser performance.The details here :
Oracle BI EE (10.1.3.2): Maximum total number of cells in Pivot Table excee -
How can you modify the displayed columns on a Related Information List?
How can you modify the displayed columns on a Related Information List? For example, how could you add the "Type" column to the List of columns displayed for Service Requests when you are viewing the Contacts Detail page?
ThanksI'd have to say I think this is one of the biggest flaws in the OnDemand system currently. The solution I have come up with is to create reports and put them in webapplets showing the data I want to show. I have then removed the standard Related Info List Objects and added weblinks to create new records as the button on the List object is also gone.
Keep in mind that doing this does slow things down a little, so it may not work if you have a big user base.
RWB. -
I have looked all over to find the "source" for the code produced by this widget. Where is it located, and how can I modify the widget?
Hi,
If you want to add fields to a list, as you have written your form in JavaScript, you can take consideration of using JavaScript Client Object Model to add/delete fields dynamically.
How to: Create, Update, and Delete Lists Using JavaScript
http://msdn.microsoft.com/en-us/library/office/hh185005(v=office.14).aspx
If you want to achieve it with Form7, it is recommended to post the question to its forum to get quick and confirmed answer.
Thanks
Patrick Liang
Forum Support
Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
[email protected]
Patrick Liang
TechNet Community Support -
How can I change excel column header using Labile.
Dear Experts,
How can i change excel column header using LabVIEW.
Thanks for any and all help!
M.S.Sivaraj.
Sivaraj M.S
CLDAs I said in my previous post, column headers in Excel are merely row 1 cells. May be I missing something here, so please be more explicit with your question.
I guess you are using the Excel Report tools, and you want to modify an existing sheet. From my limited experience with the Excel Report tools, it is not possible to open an existing woorkbook (except as template...), so the answer to your question should be "Forget it"...
The work around is to use the example I pointed for you before, and either to write the whole new colum headers as a string array, starting in A1, or to write a single string to a given cell in row 1.
Hope this helps
Chilly Charly (aka CC)
E-List Master - Kudos glutton - Press the yellow button on the left... -
How can we modify alv output list
Hi
this is fazil.
Please tell me any body How can we modify alv output list.
Thanks & Regards
Fazil
[email protected]Fazil,
check the program,
You can find the code in this program 'BCALV_FIELDCAT_TEST'
*& Report BCALV_FIELDCAT_TEST *
This report allows to modify the fieldcatalog of a corresponding
output table and to view the effects of your changes directly.
Note that for some changes you need to newly display the whole
ALV Grid Control, e.g., DDIC-Fields are read only the first time
you call SET_READY_FOR_FIRST_DISPLAY.
Note also that not all scenarios can be tested since the output
table does not comprise all fields to test available features
of the fieldcatalog. Copy this program and extend the output
table accordingly if you want to test such a special feature.
(The field CARRNAME in 'gt_sflight' was added to test field REF_FIELD
and TXT_FIELD of the fieldcatalog - see what happens if you
calculate subtotals by carrier-id).
report bcalvt_fieldcatalog .
data: ok_code type sy-ucomm,
save_ok_code type sy-ucomm,
fieldcatalog for output table
gt_fieldcat type lvc_t_fcat,
fieldcatalog for fieldcatalog itself:
gt_fcatfcat type lvc_t_fcat,
gs_fcatlayo type lvc_s_layo.
Output table
data: begin of gt_sflight occurs 0.
data: carrname type s_carrname.
include structure sflight.
data: end of gt_sflight.
data: g_max type i value 100.
data: g_all type c value SPACE.
Controls to display gt_sflight and corresponding fieldcatalog
data: g_docking type ref to cl_gui_docking_container,
g_alv type ref to cl_gui_alv_grid.
data: g_custom_container type ref to cl_gui_custom_container,
g_editable_alv type ref to cl_gui_alv_grid.
LOCAL CLASS Definition
class lcl_event_receiver definition.
public section.
methods handle_data_changed
for event data_changed of cl_gui_alv_grid
importing er_data_changed.
endclass.
class lcl_event_receiver implementation.
method handle_data_changed.
at the time being, no checks are made...
endmethod.
endclass.
data: event_receiver type ref to lcl_event_receiver.
end-of-selection.
set screen 100.
*& Module STATUS_0100 OUTPUT
text
module status_0100 output.
set pf-status 'BASIC'.
set titlebar 'BASICTITLE'.
create ALV Grid Control in the first run
if g_docking is initial.
perform create_and_init_controls.
endif.
endmodule. " STATUS_0100 OUTPUT
*& Module USER_COMMAND_0100 INPUT
text
module user_command_0100 input.
save_ok_code = ok_code.
clear ok_code.
case save_ok_code.
when 'SUBMIT'.
set the frontend fieldcatalog
ATTENTION: DDIC-Fields are not updated using this method!
(see 'RESTART')
call method g_alv->set_frontend_fieldcatalog
exporting
it_fieldcatalog = gt_fieldcat.
call method g_alv->refresh_table_display.
call method cl_gui_cfw=>flush.
when 'RESTART'.
Destroy the control currently visible and display it again
using the changed fieldcatalog.
perform restart_sflight.
when '&ALL'.
perform switch_visibility.
endcase.
endmodule. " USER_COMMAND_0100 INPUT
*& Form CREATE_AND_INIT_CONTROLS
text
--> p1 text
<-- p2 text
form create_and_init_controls.
create object g_docking
exporting
dynnr = '100'
extension = 150
side = cl_gui_docking_container=>dock_at_bottom.
create object g_alv
exporting
i_parent = g_docking.
create object g_custom_container
exporting
container_name = 'CC_0100_FIELDCAT'.
create object g_editable_alv
exporting
i_parent = g_custom_container.
register events
create object event_receiver.
set handler event_receiver->handle_data_changed for g_editable_alv.
call method g_editable_alv->register_edit_event
exporting
i_event_id = cl_gui_alv_grid=>mc_evt_modified.
perform build_fieldcatalogs changing gt_fieldcat gt_fcatfcat.
perform modify_fieldcatalog changing gt_fcatfcat.
perform select_data. "CHANGING gt_sflight
call method g_alv->set_table_for_first_display
changing
it_outtab = gt_sflight[]
it_fieldcatalog = gt_fieldcat[].
optimize column width of grid displaying fieldcatalog
gs_fcatlayo-cwidth_opt = 'X'.
Get fieldcatalog of table sflight - alv might have
modified it after passing.
call method g_alv->get_frontend_fieldcatalog
importing et_fieldcatalog = gt_fieldcat[].
call method cl_gui_cfw=>flush.
Display fieldcatalog of table sflight:
call method g_editable_alv->set_table_for_first_display
exporting
is_layout = gs_fcatlayo
changing
it_outtab = gt_fieldcat[]
it_fieldcatalog = gt_fcatfcat[].
register events
create object event_receiver.
set handler event_receiver->handle_data_changed for g_editable_alv.
endform. " CREATE_AND_INIT_CONTROLS
*& Form restart_sflight
text
--> p1 text
<-- p2 text
form restart_sflight.
data: ls_fieldcat type lvc_s_fcat.
free g_docking and thus g_alv
call method g_docking->free.
clear g_docking.
clear g_alv.
create new instances
create object g_docking
exporting
dynnr = '100'
extension = 150
side = cl_gui_docking_container=>dock_at_bottom.
create object g_alv
exporting
i_parent = g_docking.
This is an internal method to invalidate all fields in the fieldcat
loop at gt_fieldcat into ls_fieldcat.
clear ls_fieldcat-tech_comp.
modify gt_fieldcat from ls_fieldcat.
endloop.
Newly display the list with current fieldcatalog.
call method g_alv->set_table_for_first_display
changing
it_outtab = gt_sflight[]
it_fieldcatalog = gt_fieldcat.
Get fieldcatalog - it might be changed by ALV in the last call
call method g_alv->get_frontend_fieldcatalog
importing
et_fieldcatalog = gt_fieldcat[].
call method g_editable_alv->refresh_table_display.
call method cl_gui_cfw=>flush.
endform. " restart_sflight
*& Form select_data
text
--> p1 text
<-- p2 text
form select_data.
data: lt_sflight type table of sflight with header line,
ls_scarr type scarr.
select data of sflight
select * from sflight into table lt_sflight up to g_max rows.
copy data to gt_sflight and update CARRNAME
loop at lt_sflight.
move-corresponding lt_sflight to gt_sflight.
select single * from scarr into ls_scarr
where carrid = gt_sflight-carrid.
gt_sflight-carrname = ls_scarr-carrname.
append gt_sflight.
endloop.
endform. " select_data
*& Form BUILD_FIELDCATALOGS
text
<--P_GT_FIELDCAT text
<--P_GT_FCATFCAT text
form build_fieldcatalogs changing p_fieldcat type lvc_t_fcat
p_fcatfcat type lvc_t_fcat.
data: ls_fcat type lvc_s_fcat.
Fieldcatalog for table SFLIGHT: p_fieldcat
generate fieldcatalog automatically
call function 'LVC_FIELDCATALOG_MERGE'
exporting
i_structure_name = 'SFLIGHT'
I_CLIENT_NEVER_DISPLAY = 'X'
changing
ct_fieldcat = p_fieldcat[]
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.
shift all column positions to the right except for MANDT
loop at p_fieldcat into ls_fcat.
if ls_fcat-fieldname ne 'MANDT'.
add 1 to ls_fcat-col_pos.
if ls_fcat-fieldname = 'CARRID'.
ls_fcat-txt_field = 'CARRNAME'."link CARRNAME to CARRID
endif.
modify p_fieldcat from ls_fcat.
endif.
endloop.
create a new line for CARRNAME in p_fieldcat
clear ls_fcat.
ls_fcat-fieldname = 'CARRNAME'.
ls_fcat-ref_table = 'SCARR'.
ls_fcat-col_pos = 1.
insert new line before CARRID (do not forget MANDT!).
insert ls_fcat into p_fieldcat index 1.
Fieldcatalog for table LVC_T_FCAT:p_fcatfcat
Generate fieldcatalog of fieldcatalog structure.
This fieldcatalog is used to display fieldcatalog 'p_fieldcat'
on the top of the screen.
call function 'LVC_FIELDCATALOG_MERGE'
exporting
i_structure_name = 'LVC_S_FCAT'
I_CLIENT_NEVER_DISPLAY = 'X'
changing
ct_fieldcat = p_fcatfcat[]
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.
Hide all fields that are not documented (valid for release 4.6A)
perform hide_fields changing p_fcatfcat.
endform. " BUILD_FIELDCATALOGS
*& Module EXIT_PROGRAM INPUT
text
module exit_program input.
leave program.
endmodule. " EXIT_PROGRAM INPUT
*& Form MODIFY_FIELDCATALOG
text
<--P_GT_FCATFCAT text
form modify_fieldcatalog changing p_fcatfcat type lvc_t_fcat.
data ls_fcat type lvc_s_fcat.
loop at p_fcatfcat into ls_fcat.
ls_fcat-coltext = ls_fcat-fieldname.
ls_fcat-edit = 'X'.
if ls_fcat-fieldname = 'COL_POS' or ls_fcat-fieldname = 'FIELDNAME'.
ls_fcat-key = 'X'.
endif.
modify p_fcatfcat from ls_fcat.
endloop.
endform. " MODIFY_FIELDCATALOG
form hide_fields changing p_fieldcat type lvc_t_fcat.
data: ls_fcat type lvc_s_fcat.
Only show documented fields of fieldcatalog.
For a documentation choose "Help->Application Help" in the menu.
loop at p_fieldcat into ls_fcat.
if not (
ls_fcat-fieldname eq 'CFIELDNAME'
or ls_fcat-fieldname eq 'COL_POS'
or ls_fcat-fieldname eq 'COLDDICTXT'
or ls_fcat-fieldname eq 'COLTEXT'
or ls_fcat-fieldname eq 'CURRENCY'
or ls_fcat-fieldname eq 'DD_OUTLEN'
or ls_fcat-fieldname eq 'DECIMALS_O'
or ls_fcat-fieldname eq 'DECMLFIELD'
or ls_fcat-fieldname eq 'DO_SUM'
or ls_fcat-fieldname eq 'DRAGDROPID'
or ls_fcat-fieldname eq 'EDIT_MASK'
or ls_fcat-fieldname eq 'EMPHASIZE'
or ls_fcat-fieldname eq 'EXPONENT'
or ls_fcat-fieldname eq 'FIELDNAME'
or ls_fcat-fieldname eq 'HOTSPOT'
or ls_fcat-fieldname eq 'ICON'
or ls_fcat-fieldname eq 'INTLEN'
or ls_fcat-fieldname eq 'INTTYPE'
or ls_fcat-fieldname eq 'JUST'
or ls_fcat-fieldname eq 'KEY'
or ls_fcat-fieldname eq 'LOWERCASE'
or ls_fcat-fieldname eq 'LZERO'
or ls_fcat-fieldname eq 'NO_OUT'
or ls_fcat-fieldname eq 'NO_SIGN'
or ls_fcat-fieldname eq 'NO_SUM'
or ls_fcat-fieldname eq 'NO_ZERO'
or ls_fcat-fieldname eq 'OUTPUTLEN'
or ls_fcat-fieldname eq 'QFIELDNAME'
or ls_fcat-fieldname eq 'QUANTITY'
or ls_fcat-fieldname eq 'REF_FIELD'
or ls_fcat-fieldname eq 'REF_TABLE'
or ls_fcat-fieldname eq 'REPREP'
or ls_fcat-fieldname eq 'REPTEXT'
or ls_fcat-fieldname eq 'ROLLNAME'
or ls_fcat-fieldname eq 'ROUND'
or ls_fcat-fieldname eq 'ROUNDFIELD'
or ls_fcat-fieldname eq 'SCRTEXT_L'
or ls_fcat-fieldname eq 'SCRTEXT_M'
or ls_fcat-fieldname eq 'SCRTEXT_S'
or ls_fcat-fieldname eq 'SELDDICTXT'
or ls_fcat-fieldname eq 'SELTEXT'
or ls_fcat-fieldname eq 'SP_GROUP'
or ls_fcat-fieldname eq 'SYMBOL'
or ls_fcat-fieldname eq 'TECH'
or ls_fcat-fieldname eq 'TIPDDICTXT'
or ls_fcat-fieldname eq 'TOOLTIP'
or ls_fcat-fieldname eq 'TXT_FIELD' ).
ls_fcat-tech = 'X'.
endif.
modify p_fieldcat from ls_fcat.
endloop.
endform.
form switch_visibility.
data: lt_fcatfcat type lvc_t_fcat,
ls_fcat type lvc_s_fcat.
call method g_editable_alv->get_frontend_fieldcatalog
importing ET_FIELDCATALOG = lt_fcatfcat.
if not g_all is initial.
perform hide_fields changing lt_fcatfcat.
g_all = SPACE.
else.
loop at lt_fcatfcat into ls_fcat.
if ls_fcat-tech eq 'X'.
ls_fcat-tech = SPACE.
ls_fcat-no_out = 'X'.
modify lt_fcatfcat from ls_fcat.
endif.
endloop.
g_all = 'X'.
endif.
call method g_editable_alv->set_frontend_fieldcatalog
exporting it_fieldcatalog = lt_fcatfcat.
call method g_editable_alv->refresh_table_display.
endform.
Don't forget to rewaard if useful.. -
How can i modify the check constraint in the table
How can i modify the check constraint in the table. This table containts check constraint, condition is code_value between 1 and 4. codevalue is column name.
Please suggest me.Go to tahiti.oracle.com, pick version browse reference manual and see the alter table statement
Also read the goal of this forum.
Your question is more appropriate to Database general forum
General Database Discussions
Gints Plivna
http://www.gplivna.eu -
How can I modify the "right click" menu of a table control?
Hello,
How can I modify the "right click menu" of a table control. I would like to be able to remove the ability to add or delete columns and maybe other selections. I want to keep the ability to
add or delete rowsHi Andy,
Dialog & User Interface VIs -> Menu functions
Never used them, eh? -
How can we get Dynamic columns and data with RTF Templates in BI Publisher
How can we get Dynamic columns and data with RTf Templates.
My requirement is :
create table xxinv_item_pei_taginfo(item_id number,
Organization_id number,
item varchar2(4000),
record_type varchar2(4000),
record_value CLOB,
State varchar2(4000));
insert into xxinv_item_pei_taginfo values( 493991 ,224, '1265-D30', 'USES','fever','TX');
insert into xxinv_item_pei_taginfo values( 493991 ,224, '1265-D30', 'HOW TO USE','one tablet daily','TX');
insert into xxinv_item_pei_taginfo values( 493991 ,224, '1265-D30', 'SIDE EFFECTS','XYZ','TX');
insert into xxinv_item_pei_taginfo values( 493991 ,224, '1265-D30', 'DRUG INTERACTION','ABC','TX');
insert into xxinv_item_pei_taginfo values( 493991 ,224, '1265-D30', 'OVERDOSE','Go and see doctor','TX');
insert into xxinv_item_pei_taginfo values( 493991 ,224, '1265-D30', 'NOTES','Take after meal','TX');
select * from xxinv_item_pei_taginfo;
Item id Org Id Item Record_type Record_value State
493991 224 1265-D30 USES fever TX
493991 224 1265-D30 HOW TO USE one tablet daily TX
493991 224 1265-D30 SIDE EFFECTS XYZ TX
493991 224 1265-D30 DRUG INTERACTION ABC TX
493991 224 1265-D30 OVERDOSE Go and see doctor TX
493991 224 1265-D30 NOTES Take after meal TX
Above is my data
I have to fetch the record_type from a lookup where I can have any of the record type, sometime USES, HOW TO USE, SIDE EFFECTS and sometimes some other set of record types
In my report I have to get these record typpes as field name dynamically whichever is available in that lookup and record values against them.
its a BI Publisher report.
please suggestif you have data in db then you can create xml with needed structure
and so you can create bip report
do you have errors or .... ? -
How Can I get multi column values from dynamic search help?
Hi Gurus;
I'm using dynamic search help in my program.
I want to get multi column values from search help. But I dont know solution for this issue.
I'm using F4IF_INT_TABLE_VALUE_REQUEST FM.
How Can I get multi column values from dynamic search help?
Thanks.Believe it or not, the same FM worked for me in a dynpro. I will try to explain here how it works in custom screen and then you can do your work for other screens or program types. I am not going to write my actual work but will explain in general.
I have 4 fields (FLD1, FLD2, FLD3, FLD4) and i made the search based on FLD2 and when user click on a line (could be any field), then this would bring the line on to the screens.
There are like 3 steps.
You have your value_tab for my fields FLD1, FLD2, FLD3 and FLD4. This is just the data that we pass into the FM. (data: IT_VALTAB type table of ZVAL_TABLE)
Next map the screen fields into an internal table (data: It_dynpfld type table of dselc ). I also have other internal tables defined (just to keep it straight, i will be putting here) data: It_return type standard table of ddshretval.
Next step is to call the function module. Make sure you have values in IT_VALTAB.
call function 'F4IF_INT_TABLE_VALUE_REQUEST'
exporting
retfield = 'FLD2'
value_org = 'S'
tables
value_tab = It_VALTAB
return_tab = It_return
dynpfld_mapping = It_dynpfld
exceptions
parameter_error = 1
no_values_found = 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.
else.
perform get_selected_fields tables It_return.
endif.
The code within the perform GET_SELECTED_FIELDS - We need to map the result fields after user selects it. The code goes like this. This is step is to update the dynpro fields.
I need a internal table as well as a work area here. like,
data: lt_fields type table of dynpread,
la_fields type dynpread.
field-symbols: <fs_return> type ddshretval.
so fill out LT_FIELDS from the IT_RETURN table
loop at lt_return assigning <fs_return>.
la_fields-fieldname = <fs_return>-retfield.
la_fields-fieldvalue = <fs_return>-fieldval.
append la_fields to lt_fields.
clear: la_fields.
endloop.
Call the FM to update the dynpro
call function 'DYNP_VALUES_UPDATE'
exporting
dyname = sy-repid
dynumb = '1002' "This is my screen number. You could use 1000 for selection screen (hope so)
tables
dynpfields = lt_fields
exceptions
invalid_abapworkarea = 1
invalid_dynprofield = 2
invalid_dynproname = 3
invalid_dynpronummer = 4
invalid_request = 5
no_fielddescription = 6
undefind_error = 7
others = 8.
if sy-subrc <> 0.
message id sy-msgid type sy-msgty number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
endif.
good luck -
How can I make a column of sums out of a repeating pattern of 24 changing numbers
How can I make a column of sums out of a repeating pattern of 24 changing numbers in Numbers.
I have a long list of 8760 numbers of which I need to take the sum (and store in a column) of each 24 numbers.Here's one way. I've reduced the example, taking groups of five numbers from a set of 20. I've used 3 as the data number in all cases to make the sum easily recognizable.
Original column of numbers in Data::column A.
Data::B2 (and filled down): =QUOTIENT(ROW()+3,5)
This adds 3 to the row number, then divides by 5, returning the quotient and ignoring the remainder.
The result is a 'group number' for each group of five rows.
Sums of each group are reported in the Sums table.
Sums::A2 (and filled down): =ROW()-1
Sums::B2 (anf filled down): =SUMIF(Data::$B,A2,Data::$A)
For your example, assuming the 8760 numbers are listed in column A of a table named Data, starting at cell A2:
Add a second column to the table (column B).
In B2 enter the QUOTIENT formula above, with these two revisions:
=QUOTIENT(ROW()+22,24)
Fill down to all cells in the column.
Provided you have named the first table "Data", both formulas in the Sums table will be as written above. You will need to extend the Sums table to 366 rows (including the Header row) to accommodate all 365 groups of 24.
Regards,
Barry
PS: For details on the functions used, see the iWork Formulas and Functions User Guide. You can download the guide via the Help menu in Numbers '09. -
How can I modify data from a Transparent Table without ABAP code.
Hi,All
How can I modify data from a Transparent Table (like TCURR), and important thing is I want do all that with no ABAP code here. It is like that we always do that in a Oracle database use TOAD or PLSQL third party tools, with no script code here.
I had fond that there is a way can do that:
1, type 'se11',and Display Database table 'TCURR', click Contents, then click Execute to display all data
2, type '/h' and let debugging on
3, select one of this data then click 'Display',enter in debugging system.
4, then make a breakpoint in the code. But... display a dialog let I type a 'ABAP Cmnds', I want to know what can be type in for that?
and, My system is ECC6.
thank you all
Edited by: xuehui li on Aug 20, 2008 6:30 PMHello,
Your approach (with Vijay's suggestion) MAY work. However, depending on how tight security is at the company that you are working at you may or may not be able to acutaly change the value of the SHOW field to EDIT. This will be especially true if you are working in a Production environment. Vijay's other comment is true as well. This is not a recommended approach to change data (especially data with a financial impact like TCURR) in a production environment. The auditors will not be impressed.
Explore the option of a maintenace view or look at tcode TBDM to upload a file which includes daily rates from providers like Reuters or try tcode s_bce_68000174 which is a maintenance view on TCURR.
Regards
Greg Kern -
How can i change the column label text in a alv table display
how can i change the column label text in a alv table display??
A similar kinda of question was posted previuosly where the requirement was the label text was needed and following below code was given as solution :
<i>* declare column, settings, header object
DATA: lr_column TYPE REF TO cl_salv_wd_column.
DATA: lr_column_settings TYPE REF TO if_salv_wd_column_settings.
DATA: lr_column_header type ref to CL_SALV_WD_COLUMN_HEADER.
get column by specifying column name.
lr_column = lr_column_settings->get_column( 'COLUMN_NAME1' ).
set Header Text as null
lr_column_header = lr_column->get_header( ).
lr_column_header->set_text( ' ' ).</i>
My specific requirement is i have an input field on the screen and i want reflect that value as the column label for one of the column in the alv table. I have used he above code with slight modification in the MODIFYVIEW method of the view since it is a process after input. The component gets activated without any errors but while run time i get an error stating
<i>"The following error text was processed in the system CDV : Access via 'NULL' object reference not possible."</i>
i have checked in debugging and the error occured at the statement :
<i>lr_column = lr_column_settings->get_column( 'CURRENT_YEAR' ).</i>Please can you provide me an alternative for my requirement or correct me if i have done it wrong.
Thanks,
SuriI found it myself how to do it. The error says that it is not able to find the reference object i.e it is asking us to refer to the table. The following piece of code will solve this problem. Have to implement this in WDDOMODIFYVIEW method of the view. This thing works comrades enjoy...
DATA : lr_cmp_usage TYPE REF TO if_wd_component_usage,
lr_if_controller TYPE REF TO iwci_salv_wd_table,
lr_cmdl TYPE REF TO cl_salv_wd_config_table,
lr_col TYPE REF TO cl_salv_wd_column.
DATA : node_year TYPE REF TO if_wd_context_node,
elem_year TYPE REF TO if_wd_context_element,
stru_year TYPE if_alv_layout=>element_importing,
item_year LIKE stru_year-i_current_year,
lf_string TYPE char(x),
DATA: lr_column TYPE REF TO cl_salv_wd_column.
DATA: lr_column_header TYPE REF TO cl_salv_wd_column_header.
DATA: lr_column_settings TYPE REF TO if_salv_wd_column_settings.
Get the entered value from the input field of the screen
node_year = wd_context->get_child_node( name = 'IMPORTING_NODE' ).
elem_year = node_year->get_element( ).
elem_year->get_attribute(
EXPORTING
name = 'IMPORT_NODE-PARAMETER'
IMPORTING
value = L_IMPORT_PARAM ).
WRITE L_IMPORT_PARAM TO lf_string.
Get the reference of the table
lr_cmp_usage = wd_this->wd_cpuse_alv( ).
IF lr_cmp_usage->has_active_component( ) IS INITIAL.
lr_cmp_usage->create_component( ).
ENDIF.
lr_if_controller = wd_this->wd_cpifc_alv( ).
lr_column_settings = lr_if_controller->get_model( ).
get column by specifying column name.
IF lr_column_settings IS BOUND.
lr_column = lr_column_settings->get_column( 'COLUMN_NAME').
set Header Text as null
lr_column_header = lr_column->get_header( ).
lr_column_header->set_text( lf_string ).
endif.
Maybe you are looking for
-
Urgent please -- got error while doing a simple update -- Thanks:)
Hi guys, I have a procedure that updates a table, when I run the update manually from sqlplus it works and when I run the procedure by it self from sqlplus it also works the problem comes when I call that procedure from another procedure that I have
-
I got a 2000 iMac with OS 9.1. I do not have the disks for it. The person who gave it to me could not remember the name and password they gave it. When it comes on it goes to the welcome to Mac OS screen. It has hello Hilda and under that it wants a
-
Cannot install Flash Player ActiveX plugin
It's very interesting that I am able to install Flash Player for Mozilla but not for IE (ActiveX). As I'm a web site designer, I need to surf my design at different browsers to ensure compatibility. I tried many of solutions (such as uninstaller, res
-
Windows Programming with Java??? Is it possible???
I have a small request from a client (Windows User) who wants a really simple POP3 email checker. I basically need to achieve the same thing that many email clients do, where they show some sort of symbol in the System tray when there is new email. I
-
User name as sender in notification workflow
Hi all, My requirement is that when sending the notification to the user from workflow , i need the sender name as initiator of the workflow ???? please help me out ... According to the Design the task SENDTASKDESCRIPTION (background task) is dis