Renumbering table containing high numeric values
Hi guys,
I have a table containing millions of records but there's a numeric gap in the auto-generated id's for the ID column (primary key). I want to ALIGN the numbering for this table so that it doesn't jump from 7 to 100000008... but instead continues with 8, 9, 10, 11, 12 .... and so on. Any ideas/scripts which could help?
ID
1
2
3
4
5
6
7 (I want the next value to be 8 but due to sequencing issue it went to 1000000008 ... I want to bring everything back in line).
100000008
100000009
100000010
100000011
>
there is no update cascade feature in oracle
http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:5773459616034
Ooops - my bad.
Quite frankly, I'm flabbergasted though. Firebird has this feature - it's a server
with a footprint about 1/200th that of Oracle - though maybe I shouldn't be all
that surprised - Firebird has other features only recently introduced in Oracle,
i.e. CREATE DOMAIN.
As you may have guessed, I am a fan of Firebird - it's feature set per MB is
way superior to that of Oracle - As Antoine de Saint Exupéry said:
"La perfection est atteinte, non pas lorsqu'il n'y a plus rien à ajouter,
mais lorsqu'il n'y a plus rien à retirer".
("Perfection is achieved, not when there is nothing more to add,
but when there is nothing left to take away").
Thanks for the heads up. There are workarounds for the updating
of a PRIMARY KEY, though as Tom Kyte says, you should never
update them.
Paul...
Martin
Similar Messages
-
Which table contains net book value for Assets created with AS91.
Which table contains net book value for Assets created with AS91.
I have a problem locating where the net book value is stored in SAP. Is it simply calculated and not stored in any one place? I am trying to predict how SAP will calculate the net book value for some assets we plan on converting, but my formula doesn't always work consistently and I have not idea what is going on. If it is stored in a table some place, can anyone please let me know!
Thank you allHi anar.samadzade & Michael Stewart
It is not possible to directly get net book value of an any Table. You must migrate the gross book value (acquisition cost) and the accumulated depreciation. SAP will then calculate the NBV.
Gross Block & Accumulate Dep you will get from Table: ANLC
http://fixedassetsaccounting.net/migrating-fixed-assets-into-sap-a-harlex-guide/
Dear anar.samadzade Ask Questions politely
Regards
Viswa -
How to get rows where a varchar column contain pure numeric value
hi,
i have to make a query from a table that return only the rows where the occurrences of a string column contain a pure numeric value
for example my table MYTABLE have the column COL1 varchar2(100)
with values
row 1 : '100'
row 2 : '101 dalmatiens'
row 3 : '102'
row 4 : 'anything'
i want to get only the rows 1 and 3 which are pure integer so i can sort and compare them like number.
thanksSQL> with rt as
2 (select '100' str from dual union all
3 select '101 dalmatiens' from dual union all
4 select '102' from dual union all
5 select '103 #$&''() 456' from dual union all
6 select 'anything' from dual)
7 /* End of sample data (rt) */
8 select str
9 ,trim(translate(str,'1234567890'||str,'1234567890')) num
10 from rt
11 where trim(translate(str,'1234567890'||str,'1234567890')) is not null;
STR NUM
100 100
101 dalmatiens 101
102 102
103 #$&'() 456 103456
-- Oooooops, I misread and now have corrected it
SQL> with rt as
2 (select '100' str from dual union all
3 select '101 dalmatiens' from dual union all
4 select '102' from dual union all
5 select '103 #$&''() 456' from dual union all
6 select 'anything' from dual)
7 /* End of sample data (rt) */
8 select str
9 ,trim(translate(str,'1234567890'||str,'1234567890')) num
10 from rt
11 where trim(translate(str,'1234567890'||str,'1234567890')) = str;
STR NUM
100 100
102 102Message was edited by:
ushitaki -
Searching a Table field with multiple values using a shuttle item
Hello All,
I have a shuttle item whhich of course users can select multiple values:
eg: Orange:Pear:Banana
Now I have a table where I want to get the Crate Numbers where these fruit items reside.
The Fruit field has multiple stored values
eg:
Crate Fruits
=== ====
12487 Apple:Orange:Pear:Banana
17653 Orange:Pear:Grapes
12874 Apple:Banana
13655 Grapes:Watermelon:Pineapple
87643 Pear:Banana
53626 Strawberries:Apple
I would like to see a final report similiar to this
Crate Fruit
=== ===
12487 Orange
12487 Pear
12487 Banana
17653 Orange
17653 Pear
12874 Banana
87643 Pear
87643 Banana
I thought maybe this needs to be done using collections but I am not familiar with this function, if their is another way I would appreciate it
Hope u can help
FrankHi Frank,
I find that in this sort of case, it is easier to create a link table containing the individual values rather than lumping them into one column.
so the data is stored in the 'Crate, Fruit' format, rather then the 'Crate Fruits' format.
It is a bit more work maintaining the link table when the values are amended and populating the shuttle, but it is a 'proper' relational table then.
Regards
Michael -
Function module to validate numeric values
Hi all.
Can some one please tell me Is there any Function Module to validate only numeric values?
Like in year variable, it can never contain alphanumeric values or special symbols?
Is there any function module to check, wheather the variable contains only numeric values, no alphanumeric value or special symbol?
If there is no as such function module then what is the alternative approach we can take?
Plz help me .
Regards
DipankarFunction Module NUMERIC_CHECK for Editing and checking numeric fields ( i.e. Num validations)
Check using the Function Module "NUMERIC_CHECK".
CALL FUNCTION 'NUMERIC_CHECK'
EXPORTING
STRING_IN = X
IMPORTING
STRING_OUT = X
HTYPE = H_TYPE.
if h_type = 'CHAR'.
WRITE:/ 'Not Numeric'.
else.
write:/ 'Numeric'.
ENDIF.
REWARDS IF USEFUL
GAURAV J.
Edited by: GAURAV on Feb 3, 2008 2:19 PM -
Hello,
is ist possible to check if a column/row contains a numeric value?
Type= varchar2(30)
thanks
PhilIn a case of formating number value...this function will work (look for formating type...and modify to your need):
FUNCTION is_number_fmt (
char_in VARCHAR2
) RETURN BOOLEAN
IS
n NUMBER;
BEGIN
IF LENGTH (char_in) > 0 THEN
n := TO_NUMBER(char_in,'999G999G999G999G990D00',' NLS_NUMERIC_CHARACTERS = '',.''');
RETURN TRUE;
ELSE
RETURN FALSE;
END IF;
EXCEPTION
WHEN OTHERS THEN
RETURN FALSE;
END is_number_fmt;Checking code:
begin
if is_number_fmt('1.234,98') THEN
dbms_output.put_line ('OK');
ELSE
dbms_output.put_line ('BAD');
END IF;
END;I was working on several migration projects and it is not that easy to check numbers... -
Script to replace non-numeric value of column to blank
Hi
I want to replace non-numeric value of column to blank. Can any one help me out.
For example:
column1
234 kjnkj 12e
555565asd44
1232334343
Now I want to that update cloumn with blank value which contains non-numeric value in itTry the following
select translate(column1,translate(column1,' +-123456789',' '), ' ') b from dual; -
Temperatur​e values at high fixed values
I have two 1102/1302 with 6363 that has worked fine in the past. After some down time I ran the vi and did not get correct values. I investigated the virtual channels in MAX and the table has high fixed values for all channels (218-219 C) at room temperature and they are static values. It would seem these values are not being read from any connected TCs. Any idea as to what could cause this behavior?
Solved!
Go to Solution.teslac,
How long has the system been sitting?
Make sure that the hardware is physically set up correctly. Also, make sure that the correct thermocouple type is selected on your Virtual channel.
Do you get the same values if you run the MAX Test panels?
Do you get the same values if you run the example LabVIEW Program “Thermocouple - Continuous Input”
Rob W. -
Convert numeric value to display as text based on record in another table? ASP/VB
I have an orders table:
orderID (PK)
pickupname
pickupaddress
pickupregion (numeric)
pickuppostcode
deliveryname
deliveryaddress
deliveryregion (numeric)
deliverypostcode
I also have a regions table:
regionID
regionname
On my ASP page, I would like to display the pickup and
delivery addresses as
follows, but also need this to be within a repeat region as I
am displaying
a number of orders on the page (I have wrapped what I want in
the repeat
region in dashes, below):
---------Repeat Region Start-----------
Pickup Address:
Name
Address
Region (pickupregion)
Postcode
Delivery Address:
Name
Address
Region (deliveryregion)
Postcode
--------Repeat Region End------------
As it displays at the moment, I get this (using sample data):
---------Repeat Region Start-----------
Pickup Address:
Joe Bloggs
High Street
12
HT12 5TY
Delivery Address:
Jane Bloggs
The Mall
33
DT6 5TG
--------Repeat Region End------------
Is there any way to convert these numeric values to the
actual region name
but to keep it within one recordset so that I can use the
repeat region? I
tried creating a recordset for regions (SELECT regionID,
regionname FROM
tblRegions WHERE regionID = pickupregion OR regionID =
deliveryregion), but,
because I'm not repeating this region, it just displays the
same regional
name for every order, albeit the first record returned does
contain the
correct values! :o)
I was thinking about some kind of inner join, but it's having
two numeric
region fields in the orders table that is causing me
headaches! PS. I need
to keep the two addresses within one orders table - I had
thought of that!
Got me a bit stumped, I have to say. Any help would be
greatly appreciated.
Thanks.
Regards
Nath.I've tried this one already.
I tried to leave it blank, & nbsp ; , text,... but the problem is that our lov is build by a function and it always returns a query, so the LOV is never null.
I figured something out: made a process after header that has some cursors to get the values from the database and changed the item to a simple display as text-field. There were only 4 that were wrong, so it wasn't to much work. -
Retrieving numeric values of a column from another table..
Hi there, so i have the following query that returns a label and a value from a database table:
select key_field,value_field from table1 where some_id = 'id1' and key_field is not null;
This will return a result in which the key_field may or may not be numeric, which is fine:
key_field | value_field
2 | street
6 | dog
car | mazda
5 | tea
1 | unknown
I have another table table_num_vals where the value for those numeric fields are stored:
key_field | display_field
2 | address
6 | animal
5 | drink
I want to be able to return the non-numeric fields as they were, all numeric fields translated if it can be found, and if not then leave the original number, desired result:
key_field | value_field
address | street
animal | dog
car | mazda
drink | tea
1 | unknown
I tried doing the following:
select display_field from table_num_vals where key_field in (
with numericCol as (
select key_field from table1 where some_id = 'id1' and key_field is not null;
) select case when regexp_like(key_field,'^[[:digit:]]') then key_field else '' end from numericCol
It gives me the labels for the ids that it can find.. (address, animal, drink) but then I can't seem to put it all together with the original query.. could someone please help?
Thanks in advance,Yes you are right .. Thank you so much
I let it work using
select student_ID, Level from Student where Level ='Graduate'
But when i run different kind of form to Graduate_Student table and try to create a new row , I cant see the Student_ID ! I see it only if I use Form using SQL but this one doesn't add/delete/update record.
I am new to oracle apex, sorry for that. -
SAP-R/3- In which table, numeric values stored in equipment characteristis
SAP-R/3- In which table, numeric values stored in equipment characteristis are captured.
In AUSP table Char values in equipment characteristics are captured against object number.But this table does not cappture numeric characteristics.
Are these numeric values captured in any function module?Hi
check the BAPI for characteristics
BAPI_OBJCL_GETDETAIL
BAPI_OBJCL_CHANGE
or use the fun module:
CLAF_CLASSIFICATION_OF_OBJECTS.
You can use the tables
CAWN,INOB and AUSP to get the characteristics
Regards
Anji -
OO ALV displaying without Values despite Internal table contains
My below OO ALV displaying without Values despite Internal table contains the values ...
Help please ...
REPORT zsd_concession1 NO STANDARD PAGE HEADING
LINE-SIZE 285
LINE-COUNT 64
MESSAGE-ID zz.
Program Description ******************************
This report is to Calculate consession against Quotations
complying standards for enhanced Performance, Readability &
Maintenance.
Change Log *********************************
Remedy # / Who When Why / What
Transport #
CLASS lcl_event_handler DEFINITION DEFERRED.
*& Data Definitions .
DATA: BEGIN OF vbap_wa,
vbeln TYPE vbak-vbeln, "Quotation#
erdat TYPE vbak-erdat, "Quot date
knumv TYPE vbak-knumv, "Cond Rec#
posnr TYPE vbap-posnr, "Line Item
matnr TYPE vbap-matnr, "Mat#
zansicat TYPE zmarall-zansicat, "AnsiCat#
zansigrd TYPE zmarall-zansigrd, "Grade
zcurrvaltnarea TYPE zco002-zcurrvaltnarea,"Val Area
zcurrcstusd TYPE zco002-zcurrcstusd, "Cost$
zzbrndnm TYPE mara-zzbrndnm, "Brand
zqedscgrp TYPE zglbprc-zqedscgrp, "QE Disc Grp
mstav TYPE mara-mstav, "Status
kwmeng TYPE vbap-kwmeng, "Qty
lprc TYPE konv-kbetr, "List Price ZBP1
sprc TYPE konv-kbetr, "Std Pric ZNAA,ZNAX
netpr TYPE vbap-netpr, "Quot price
mrgn TYPE konv-kbetr, "margin%
END OF vbap_wa,
BEGIN OF konv_wa,
knumv TYPE konv-knumv, "Cond#
kposn TYPE konv-kposn, "Cond Item#
kappl TYPE konv-kappl, "Applic
kschl TYPE konv-kschl, "Cond Typ
kbetr TYPE konv-kbetr, "Price ZBP1,ZNAA,ZNAX
END OF konv_wa,
BEGIN OF vbpa_wa,
vbeln TYPE vbpa-vbeln, "Quot#
posnr TYPE vbpa-posnr, "Item#
parvw TYPE vbpa-parvw, "Prt Fn
kunnr TYPE vbpa-kunnr, "Cust#
END OF vbpa_wa,
BEGIN OF result_wa,
posnr TYPE vbap-posnr, "Line Item
matnr TYPE vbap-matnr, "Mat#
zansicat TYPE zmarall-zansicat, "AnsiCat#
zansigrd TYPE zmarall-zansigrd, "Grade
zcurrvaltnarea TYPE zco002-zcurrvaltnarea,"Val Area
zcurrcstusd TYPE zco002-zcurrcstusd, "Cost$
zzbrndnm TYPE mara-zzbrndnm, "Brand
zqedscgrp TYPE zglbprc-zqedscgrp, "QE Disc Grp
mstav TYPE mara-mstav, "Status
kwmeng TYPE vbap-kwmeng, "Qty
lprc TYPE konv-kbetr, "List Price ZBP1
sprc TYPE konv-kbetr, "Std Pric ZNAA,ZNAX
netpr TYPE vbap-netpr, "Quot price
mrgn TYPE konv-kbetr, "margin%
END OF result_wa.
DATA: ikonv LIKE STANDARD TABLE OF konv_wa,
ivbap LIKE STANDARD TABLE OF vbap_wa,
ivbpa LIKE STANDARD TABLE OF vbpa_wa,
iresult LIKE STANDARD TABLE OF result_wa.
*Work storage
DATA: BEGIN OF ws,
vbeln TYPE vbak-vbeln,
ok_code TYPE sy-ucomm,
alv_save TYPE c, "ALV save
alv_variant TYPE disvariant, "ALV Variant
alv_sort TYPE lvc_t_sort, "Sort table
END OF ws.
*Data declarations for ALV Main list
DATA : ty_lay1 TYPE lvc_s_layo,
it_fieldcat TYPE lvc_t_fcat ,
ty_fieldcat TYPE lvc_s_fcat ,
l_smenu TYPE REF TO cl_ctmenu,
c_alv1 TYPE REF TO cl_gui_alv_grid,
c_cont1 TYPE REF TO cl_gui_custom_container,
e_dclick TYPE REF TO lcl_event_handler.
*Data declarations for ALV Interactive list
DATA : ty_lay2 TYPE lvc_s_layo,
it_fcat TYPE lvc_t_fcat ,
ty_fcat TYPE lvc_s_fcat ,
c_alv2 TYPE REF TO cl_gui_alv_grid,
c_cont2 TYPE REF TO cl_gui_custom_container.
*Field-Symbols
FIELD-SYMBOLS:
<konv> LIKE konv_wa,
<vbap> LIKE vbap_wa.
*Constants
CONSTANTS:
c_end_row TYPE i VALUE 65000.
*CLASS lcl_event_receiver DEFINITION
CLASS lcl_event_handler DEFINITION.
PUBLIC SECTION.
METHODS:
handle_double_click
FOR EVENT double_click OF cl_gui_alv_grid IMPORTING e_row.
ENDCLASS. "lcl_event_handler DEFINITION
*CLASS lcl_event_receiver IMPLEMENTATION
CLASS lcl_event_handler IMPLEMENTATION.
METHOD handle_double_click.
DATA: sec_wa LIKE LINE OF iresult.
*Reading the selected data into a variable
READ TABLE iresult INDEX e_row-index INTO sec_wa.
*Select the field details of the selected table
SELECT * FROM dd03l INTO CORRESPONDING FIELDS OF TABLE it_dd03l
WHERE tabname EQ ls_dd02l-tabname.
*Calling the ALV containing the field values
CALL SCREEN 101.
ENDMETHOD. "handle_double_click
ENDCLASS. "lcl_event_handler IMPLEMENTATION
*& SELECTION-SCREEN.
SELECTION-SCREEN BEGIN OF BLOCK a WITH FRAME TITLE text-001.
SELECT-OPTIONS:
s_vbeln FOR ws-vbeln DEFAULT '2002354788' OBLIGATORY.
SELECTION-SCREEN END OF BLOCK a.
INITIALIZATION.
PERFORM setup_screen_defaults.
START-OF-SELECTION.
PERFORM gather_report_data.
END-OF-SELECTION.
PERFORM create_output.
*& Form initialization
FORM setup_screen_defaults.
CLEAR: ws, konv_wa, vbap_wa, vbpa_wa.
REFRESH: ivbpa, ikonv, ivbap, iresult.
ENDFORM. " setup_screen_defaults
*& Form gather_report_data
FORM gather_report_data.
SELECT vbeln posnr parvw kunnr
INTO TABLE ivbpa
FROM vbpa
WHERE vbeln IN s_vbeln
AND ( parvw = 'SP' OR "SoldTO
parvw = 'WE' OR "ShipTo
parvw = 'ZT' ). "Top Parent
SELECT vkvbeln vkerdat vkknumv vpposnr vp~matnr
z1zansicat z1zansigrd z2~zcurrvaltnarea
z2zcurrcstusd m1zzbrndnm zg~zqedscgrp
m1mstav vpkwmeng vp~netpr
INTO CORRESPONDING FIELDS OF TABLE ivbap
FROM vbak AS vk
INNER JOIN vbap AS vp
ON vpvbeln = vkvbeln
INNER JOIN zmarall AS z1
ON z1matnr = vpmatnr
INNER JOIN zco002 AS z2
ON z2matnr = vpmatnr
INNER JOIN zglbprc AS zg
ON zgmatnr = vpmatnr
INNER JOIN mara AS m1
ON m1matnr = vpmatnr
WHERE vk~vbeln IN s_vbeln
AND vk~auart = 'AG'."AG = Quot
SORT ivbap BY posnr matnr.
SELECT kvknumv kvkposn kvkappl kvkschl kv~kbetr
INTO TABLE ikonv
FROM konv AS kv
FOR ALL ENTRIES IN ivbap
WHERE kv~knumv = ivbap-knumv
AND kv~kposn = ivbap-posnr
AND kv~kappl EQ 'V'
AND ( kv~kschl EQ 'ZBP1'
OR kv~kschl EQ 'ZNAX'
OR kv~kschl EQ 'ZNAA' ).
SORT ikonv BY knumv kposn.
LOOP AT ivbap ASSIGNING <vbap>.
CLEAR konv_wa.
READ TABLE ikonv INTO konv_wa WITH KEY
knumv = <vbap>-knumv
kposn = <vbap>-posnr
kschl = 'ZBP1'
BINARY SEARCH.
IF sy-subrc EQ 0.
<vbap>-lprc = konv_wa-kbetr.
ENDIF.
READ TABLE ikonv INTO konv_wa WITH KEY
knumv = <vbap>-knumv
kposn = <vbap>-posnr
kschl = 'ZNAX'
BINARY SEARCH.
IF sy-subrc EQ 0.
<vbap>-sprc = konv_wa-kbetr.
ENDIF.
READ TABLE ikonv INTO konv_wa WITH KEY
knumv = <vbap>-knumv
kposn = <vbap>-posnr
kschl = 'ZNAA'
BINARY SEARCH.
IF sy-subrc EQ 0.
<vbap>-sprc = konv_wa-kbetr.
ENDIF.
ENDLOOP.
SORT ivbap BY posnr matnr.
LOOP AT ivbap INTO vbap_wa.
MOVE-CORRESPONDING vbap_wa TO result_wa.
APPEND result_wa TO iresult.
CLEAR: vbap_wa, result_wa.
ENDLOOP.
ENDFORM. " gather_report_data
*& Form create_output
FORM create_output.
CALL SCREEN 100.
FREE: iresult.
ENDFORM. " create_output
*& Module PBO_0100 OUTPUT
text
MODULE pbo_0100 OUTPUT.
SET PF-STATUS '0100'.
SET TITLEBAR '0100'.
IF c_cont1 IS INITIAL.
*Creating object of container
CREATE OBJECT c_cont1
EXPORTING
container_name = 'CCONT1'.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
*Creating object of alv
CREATE OBJECT c_alv1
EXPORTING
i_parent = c_cont1.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
*Alv layout
PERFORM alv_100_layout.
PERFORM save_alv_layout.
*Alv field catalogue
PERFORM alv_100_fieldcat.
*Displaying the ALV grid
CALL METHOD c_alv1->set_table_for_first_display
EXPORTING
is_layout = ty_lay1
i_save = ws-alv_save
is_variant = ws-alv_variant
CHANGING
it_outtab = iresult[]
it_sort = ws-alv_sort
it_fieldcatalog = it_fieldcat[].
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 object of the event class
*and setting handler for double click
CREATE OBJECT e_dclick.
SET HANDLER e_dclick->handle_double_click FOR c_alv1.
ENDIF.
ENDMODULE. " PBO_0100 OUTPUT
*& Module PAI_0100 INPUT
text
MODULE pai_0100 INPUT.
ws-ok_code = sy-ucomm.
CASE ws-ok_code.
WHEN 'BACK'.
CALL SELECTION-SCREEN 1000.
CLEAR ws-ok_code.
WHEN 'EXIT'.
LEAVE TO SCREEN 0.
CLEAR ws-ok_code.
EXIT.
WHEN 'CANCEL'.
LEAVE TO SCREEN 0.
CLEAR ws-ok_code.
EXIT.
WHEN OTHERS.
ENDCASE.
ENDMODULE. " PAI_0100 INPUT
*& Form alv_100_layout
text
--> p1 text
<-- p2 text
FORM alv_100_layout.
ty_lay1-numc_total = 'X'. " Numc total line
ty_lay1-cwidth_opt = 'X'. " Optimal column width
ty_lay1-detailinit = 'X'. " Show values that are initial in
ty_lay1-sel_mode = 'A'. " Column selection mode
ty_lay1-no_merging = 'X'. " No merging while sorting columns
ty_lay1-keyhot = 'X'.
ty_lay1-grid_title = 'SD Concessions'.
ty_lay1-zebra = 'X'.
ty_lay1-no_toolbar = ' '.
ENDFORM. " alv_100_layout
*& Form alv_100_fieldcat
text
--> p1 text
<-- p2 text
FORM alv_100_fieldcat.
CLEAR ty_fieldcat.
ty_fieldcat-row_pos = 1.
ty_fieldcat-col_pos = 1.
ty_fieldcat-fieldname = 'posnr'.
ty_fieldcat-tabname = 'iresult'.
ty_fieldcat-coltext = 'Item#'.
ty_fieldcat-outputlen = 10.
APPEND ty_fieldcat TO it_fieldcat.
CLEAR ty_fieldcat.
ty_fieldcat-row_pos = 1.
ty_fieldcat-col_pos = 2.
ty_fieldcat-fieldname = 'matnr'.
ty_fieldcat-tabname = 'iresult'.
ty_fieldcat-coltext = 'Mat#'.
ty_fieldcat-outputlen = 10.
APPEND ty_fieldcat TO it_fieldcat.
CLEAR ty_fieldcat.
ty_fieldcat-row_pos = 1.
ty_fieldcat-col_pos = 3.
ty_fieldcat-fieldname = 'zansicat'.
ty_fieldcat-tabname = 'iresult'.
ty_fieldcat-coltext = 'AnsiCat#'.
ty_fieldcat-outputlen = 10.
APPEND ty_fieldcat TO it_fieldcat.
CLEAR ty_fieldcat.
ty_fieldcat-row_pos = 1.
ty_fieldcat-col_pos = 4.
ty_fieldcat-fieldname = 'zansigrd'.
ty_fieldcat-tabname = 'iresult'.
ty_fieldcat-coltext = 'Grade'.
ty_fieldcat-outputlen = 10.
APPEND ty_fieldcat TO it_fieldcat.
CLEAR ty_fieldcat.
ty_fieldcat-row_pos = 1.
ty_fieldcat-col_pos = 5.
ty_fieldcat-fieldname = 'zcurrvaltnarea'.
ty_fieldcat-tabname = 'iresult'.
ty_fieldcat-coltext = 'Val Area'.
ty_fieldcat-outputlen = 10.
APPEND ty_fieldcat TO it_fieldcat.
CLEAR ty_fieldcat.
ty_fieldcat-row_pos = 1.
ty_fieldcat-col_pos = 6.
ty_fieldcat-fieldname = 'zcurrcstusd'.
ty_fieldcat-tabname = 'iresult'.
ty_fieldcat-coltext = 'Cost $'.
ty_fieldcat-outputlen = 15.
APPEND ty_fieldcat TO it_fieldcat.
CLEAR ty_fieldcat.
ty_fieldcat-row_pos = 1.
ty_fieldcat-col_pos = 7.
ty_fieldcat-fieldname = 'zzbrndnm'.
ty_fieldcat-tabname = 'iresult'.
ty_fieldcat-coltext = 'Brand'.
ty_fieldcat-outputlen = 15.
APPEND ty_fieldcat TO it_fieldcat.
CLEAR ty_fieldcat.
ty_fieldcat-row_pos = 1.
ty_fieldcat-col_pos = 8.
ty_fieldcat-fieldname = 'zqedscgrp'.
ty_fieldcat-tabname = 'iresult'.
ty_fieldcat-coltext = 'QE'.
ty_fieldcat-outputlen = 15.
APPEND ty_fieldcat TO it_fieldcat.
CLEAR ty_fieldcat.
ty_fieldcat-row_pos = 1.
ty_fieldcat-col_pos = 9.
ty_fieldcat-fieldname = 'mstav'.
ty_fieldcat-tabname = 'iresult'.
ty_fieldcat-coltext = 'Status'.
ty_fieldcat-outputlen = 15.
APPEND ty_fieldcat TO it_fieldcat.
CLEAR ty_fieldcat.
ty_fieldcat-row_pos = 1.
ty_fieldcat-col_pos = 9.
ty_fieldcat-fieldname = 'kwmeng'.
ty_fieldcat-tabname = 'iresult'.
ty_fieldcat-coltext = 'Qty'.
ty_fieldcat-outputlen = 15.
APPEND ty_fieldcat TO it_fieldcat.
CLEAR ty_fieldcat.
ty_fieldcat-row_pos = 1.
ty_fieldcat-col_pos = 10.
ty_fieldcat-fieldname = 'lprc'.
ty_fieldcat-tabname = 'iresult'.
ty_fieldcat-coltext = 'List Price'.
ty_fieldcat-outputlen = 15.
APPEND ty_fieldcat TO it_fieldcat.
CLEAR ty_fieldcat.
ty_fieldcat-row_pos = 1.
ty_fieldcat-col_pos = 11.
ty_fieldcat-fieldname = 'sprc'.
ty_fieldcat-tabname = 'iresult'.
ty_fieldcat-coltext = 'Discount'.
ty_fieldcat-outputlen = 15.
APPEND ty_fieldcat TO it_fieldcat.
CLEAR ty_fieldcat.
ty_fieldcat-row_pos = 1.
ty_fieldcat-col_pos = 12.
ty_fieldcat-fieldname = 'netpr'.
ty_fieldcat-tabname = 'iresult'.
ty_fieldcat-coltext = 'Quot Price'.
ty_fieldcat-outputlen = 15.
APPEND ty_fieldcat TO it_fieldcat.
CLEAR ty_fieldcat.
ty_fieldcat-row_pos = 1.
ty_fieldcat-col_pos = 13.
ty_fieldcat-fieldname = 'mrgn'.
ty_fieldcat-tabname = 'iresult'.
ty_fieldcat-coltext = 'Margin%'.
ty_fieldcat-outputlen = 15.
APPEND ty_fieldcat TO it_fieldcat.
ENDFORM. " alv_100_fieldcat
*& Module PBO_0101 OUTPUT
text
MODULE pbo_0101 OUTPUT.
*Check if the Custom container exists.
IF c_cont2 IS INITIAL.
*Creating container object
CREATE OBJECT c_cont2
EXPORTING
container_name = 'CCONT2'.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
*creating ALV grid for interactive list
CREATE OBJECT c_alv2
EXPORTING
i_parent = c_cont2.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
*ALV layout
PERFORM alv_101_layout.
*ALV fieldcatalogue
PERFORM alv_101_fieldcat.
*Sorting the output by field position
SORT iresult BY posnr.
*ALV for display field details
CALL METHOD c_alv2->set_table_for_first_display
EXPORTING
is_layout = ty_lay2
CHANGING
it_outtab = iresult[]
it_fieldcatalog = it_fieldcat.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDIF.
ENDMODULE. " PBO_0101 OUTPUT
*& Module PAI_0101 INPUT
text
MODULE pai_0101 INPUT.
ENDMODULE. " PAI_0101 INPUT
*& Form alv_101_layout
text
--> p1 text
<-- p2 text
FORM alv_101_layout.
ty_lay2-grid_title = 'Line Details'.
ty_lay2-zebra = 'X'.
ty_lay2-no_toolbar = 'X'.
ENDFORM. " alv_101_layout
*& Form alv_101_fieldcat
text
--> p1 text
<-- p2 text
FORM alv_101_fieldcat.
REFRESH it_fieldcat.
REFRESH it_fcat.
CLEAR ty_fcat.
CLEAR ty_fieldcat.
ty_fieldcat-row_pos = 1.
ty_fieldcat-col_pos = 1.
ty_fieldcat-fieldname = 'posnr'.
ty_fieldcat-tabname = 'iresult'.
ty_fieldcat-coltext = 'Item#'.
ty_fieldcat-outputlen = 10.
APPEND ty_fieldcat TO it_fieldcat.
CLEAR ty_fieldcat.
ty_fieldcat-row_pos = 1.
ty_fieldcat-col_pos = 2.
ty_fieldcat-fieldname = 'matnr'.
ty_fieldcat-tabname = 'iresult'.
ty_fieldcat-coltext = 'Mat#'.
ty_fieldcat-outputlen = 10.
APPEND ty_fieldcat TO it_fieldcat.
CLEAR ty_fieldcat.
ty_fieldcat-row_pos = 1.
ty_fieldcat-col_pos = 3.
ty_fieldcat-fieldname = 'zansicat'.
ty_fieldcat-tabname = 'iresult'.
ty_fieldcat-coltext = 'AnsiCat#'.
ty_fieldcat-outputlen = 10.
APPEND ty_fieldcat TO it_fieldcat.
CLEAR ty_fieldcat.
ty_fieldcat-row_pos = 1.
ty_fieldcat-col_pos = 4.
ty_fieldcat-fieldname = 'zansigrd'.
ty_fieldcat-tabname = 'iresult'.
ty_fieldcat-coltext = 'Grade'.
ty_fieldcat-outputlen = 10.
APPEND ty_fieldcat TO it_fieldcat.
CLEAR ty_fieldcat.
ty_fieldcat-row_pos = 1.
ty_fieldcat-col_pos = 5.
ty_fieldcat-fieldname = 'zcurrvaltnarea'.
ty_fieldcat-tabname = 'iresult'.
ty_fieldcat-coltext = 'Val Area'.
ty_fieldcat-outputlen = 10.
APPEND ty_fieldcat TO it_fieldcat.
ENDFORM. " alv_101_fieldcat
*& Form save_alv_layout
text
--> p1 text
<-- p2 text
form save_alv_layout.
ws-alv_save = 'A'.
ws-alv_variant-report = sy-repid.
endform. " save_alv_layoutHello
Creating fieldcatalogs manually is one of the major error sources in ALV programming.
There is hardly any reason why NOT to use the standard-fm LVC_FIELDCATALOG_MERGE in order to create a proper fieldcatalog.
If you need some modification of the standard fieldcatalog (e.g. renaming of columns, etc.) just do your post-processing after calling the fm.
Regards
Uwe -
Add numeric value to Table Column
Hello,
my problem:
I have a VO with a numeric attribute (Sal). This VO is shows in a table in a JSF Page.
I need to add to the column value a numeric value.
I try with #{row.bindings.Sal.attributeValue*2} or #{row.Sal+2} or #{row.Sal.inputValue+2} But I get an error.
Can someone help me ?
Thank You
JDev 11.1.3Hi,
an option would be to use a transient attribute in the VO to compute the maths or to populate the column field from a managed bean. You can point the column field to a managed bean property (say sumSal). In this method getSumSal() you
1. Use ELContext, ValueExpression, and ExpressionFactory to resolve the #{row} reference (you can cast it to oracle.jbo.domain.Row
2. call row.get("attribute_name") to access the field value
3. Perform the computation and return the value to display in the table
Note that using a transient attribute may be easier to achieve and easier to reuse in other usages of the VO. However, you have to options
Frank -
Using the values in the Nested table container
Hi All,
I have a requirement where the values present in the nested table container should be used in the item text(send mail step).
I have tried using like &req.itemtab.att [ 10 ]& as i want to display 10 element in the table att which is nested in table itemtab. Still its not working.
provide solution how to use valued in nested tables.
Thanks,
Preethi.I really doubt , wheter you will be able to use the syntaxt which you have mentioned here.
Another thing I could not get which have mentioned as atts 10 ??
Earlier I was under assumption that your multiline element has only one field.
however in your case , I think you should put a logic in workflow and separate the date values in multiline container element, and then use this container element directly in mail step.
Regds,
Akshay
Edited by: Akshay Bhagwat on Feb 7, 2008 10:53 AM -
how to transfer database table contain null values, primary key, and foreign key to the another database in same server. using INSERT method. thanks
INSERT targetdb.dbo.tbl (col1, col2, col3, ...)
SELECT col1, col2, col3, ...
FROM sourcedb.dbo.tbl
Or what is your question really about? Since you talke about foreign keys etc, I suspect that you want to transfer the entire table definition, but you cannot do that with an INSERT statement.
Erland Sommarskog, SQL Server MVP, [email protected]
Maybe you are looking for
-
CONNECT TRAINING how many users in one license can enroll?
Hi, I have a regular license of Adobe Connect Name Host 100 Participants, It's work excellent for meetings. I want to know if I buy one license of CONNECT TRAINING it's going to work in my current license of Adobe Connect , how many students can enro
-
Acrobat 9 inserting vertical lines after Optimize - Deskew
Hi, Acrobat 9 Standard, Vista x64, 4gb ram. Creating a PDF from a series of Tiff images. All is fine so far. I run the "Optimized Scanned PDF", choose only option as Deskew (all others off), highest-quality setting. Then, I see several pages where
-
Is it possible to view time and date, to see when you have entered your contacts?
I have this kinda odd problem Because of the christmas holidays, there has been quite a lot of parties to attend to! My problem is that, I have realised i have gotten a number for a girl i like quite a bit, but cant recall when i have met her during
-
Javac error during compilation
I am using j2sdk1.4.2_08 with ant and get following error on solaris 8 (I have installed J2SE Solaris 8 Recommended Patch Cluster): An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 10 occurred at PC=0xFE7A2
-
Photoshop CC Download for Trial
I am not able to download Photoshop CC in order to try it b'se when i click "Try", I get a blank screen and nothing more. Please help!!