Moving data from internal table to Dynamic internal table
Hello All,
I am facing a problem i moving the data from a internal table data to Dyn. internal table.
My code is as follows
*******Declartion**************************************
DATA: IT_FIELDCAT TYPE LVC_T_FCAT,
IS_FIELDCAT LIKE LINE OF IT_FIELDCAT.
DATA: IT_OUTTAB TYPE STANDARD TABLE OF ZVTEST.
DATA: WA_OUTTAB TYPE ZVTEST.
DATA: LV_LINE LIKE SY-TABIX,
COUNT TYPE I.
FIELD-SYMBOLS: <NEW_TABLE> TYPE REF TO DATA.
FIELD-SYMBOLS: <L_TABLE> TYPE ANY TABLE,
<L_LINE> TYPE ANY.
FIELD-SYMBOLS: <L_FIELD> TYPE ANY.
FIELD-SYMBOLS: <FS_DATA> TYPE REF TO DATA,
<FS_1> TYPE ANY TABLE,
<FS_2>,
<FS_3>.
DATA: NEW_LINE TYPE REF TO DATA.
DATA: LT_DATA TYPE REF TO DATA.
ASSIGN LT_DATA TO <FS_DATA>.
Create a new Table
CALL METHOD CL_ALV_TABLE_CREATE=>CREATE_DYNAMIC_TABLE
EXPORTING
IT_FIELDCATALOG = IT_FIELDCAT
IMPORTING
EP_TABLE = <FS_DATA>
EXCEPTIONS
GENERATE_SUBPOOL_DIR_FULL = 1
OTHERS = 2.
IF SY-SUBRC = 0.
ASSIGN <FS_DATA>->* TO <FS_1>.
CREATE DATA NEW_LINE LIKE LINE OF <FS_1>.
A field-symbol to access that work area
ASSIGN NEW_LINE->* TO <FS_2>.
LOOP AT IT_OUTTAB INTO WA_OUTTAB.
MOVE-CORRESPONDING WA_OUTTAB TO <FS_1>.
ENDLoop.
But when I am using MOVE-CORRESPONDING WA_OUTTAB TO <FS_1>.
I am getting the error like
"<FS_1>" is not a structure or internal table with header line.
Please check the code and tell where I am making the mistake.
Regards,
Vasanth
Hello Rich ,
My is code is as below..
Declaration:
DATA: IT_FIELDCAT TYPE LVC_T_FCAT,
IS_FIELDCAT LIKE LINE OF IT_FIELDCAT.
DATA: BEGIN OF IT_OUTTAB OCCURS 0,
PSPID LIKE PROJ-PSPID, "Projektdefinition
POSID LIKE PRPS-POSID, "PSP-Element
POST1 LIKE PRPS-POST1, "Kurzbeschreibung
STTXT_INT LIKE CNJ_STAT-STTXT_INT, "Systemstatus
STTXT_EXT LIKE CNJ_STAT-STTXT_EXT, "Anwenderstatus
END OF IT_OUTTAB.
DATA: WA_OUTTAB LIKE IT_OUTTAB.
DATA: LV_LINES LIKE SY-TABIX,
COUNT TYPE I.
FIELD-SYMBOLS: type any.
DATA: NEW_LINE TYPE REF TO DATA.
DATA: LT_DATA TYPE REF TO DATA.
G_R_DISP_VARIANT-REPORT = SY-REPID.
G_R_DISP_VARIANT-VARIANT = PA_VAR.
CALL FUNCTION 'REUSE_ALV_VARIANT_SELECT'
EXPORTING
I_DIALOG = 'N'
I_USER_SPECIFIC = 'A'
I_DEFAULT = 'X'
IT_DEFAULT_FIELDCAT = G_T_FIELDCAT
I_LAYOUT = G_R_LAYOUT
IMPORTING
ET_FIELDCAT = G_T_FIELDCAT
et_sort = l_tab_sort
et_filter = l_tab_filter
ES_LAYOUT = G_R_LAYOUT
CHANGING
CS_VARIANT = G_R_DISP_VARIANT
EXCEPTIONS
ERROR_MESSAGE = 4
OTHERS = 4.
LOOP AT G_T_FIELDCAT INTO G_R_FIELDCAT WHERE NO_OUT IS INITIAL
AND TECH IS INITIAL.
MOVE-CORRESPONDING G_R_FIELDCAT TO IS_FIELDCAT.
IS_FIELDCAT-FIELDNAME = G_R_FIELDCAT-FIELDNAME.
IS_FIELDCAT-INTTYPE = G_R_FIELDCAT-INTTYPE.
IS_FIELDCAT-OUTPUTLEN = G_R_FIELDCAT-OUTPUTLEN.
IS_FIELDCAT-REF_FIELD = G_R_FIELDCAT-FIELDNAME.
IS_FIELDCAT-REF_TABLE = G_R_FIELDCAT-REF_TABNAME.
APPEND IS_FIELDCAT TO IT_FIELDCAT.
ENDLOOP.
DATA: WA_LISTE LIKE P_T_LISTE.
CLEAR:IT_OUTTAB.
REFRESH: IT_OUTTAB.
LOOP AT P_T_LISTE INTO WA_LISTE.
WA_OUTTAB-PSPID = WA_LISTE-PSPID .
WA_OUTTAB-POSID = WA_LISTE-POSID.
WA_OUTTAB-POST1 = WA_LISTE-POST1.
WA_OUTTAB-STTXT_INT = WA_LISTE-STTXT_INT.
WA_OUTTAB-STTXT_EXT = WA_LISTE-STTXT_EXT.
APPEND WA_OUTTAB TO IT_OUTTAB.
ENDLOOP.
**dynamic table creation for data
ASSIGN LT_DATA TO .
Create a new Table
CALL METHOD CL_ALV_TABLE_CREATE=>CREATE_DYNAMIC_TABLE
EXPORTING
IT_FIELDCATALOG = IT_FIELDCAT
IMPORTING
EP_TABLE = .
A field-symbol to access that work area
ASSIGN NEW_LINE->* TO = WA_OUTTAB-PSPID.
ASSIGN COMPONENT 'POSID' OF STRUCTURE WA_OUTTAB TO <FS_3>.
ASSIGN COMPONENT 'POSID' OF STRUCTURE = WA_OUTTAB-POSID.
ASSIGN COMPONENT 'POST1' OF STRUCTURE WA_OUTTAB TO <FS_3>.
ASSIGN COMPONENT 'POST1' OF STRUCTURE .
<FS_5> = <FS_3>.
= WA_OUTTAB-POST1.
ASSIGN COMPONENT 'STTXT_INT' OF STRUCTURE WA_OUTTAB TO <FS_3>.
ASSIGN COMPONENT 'STTXT_INT' OF STRUCTURE TO P_FILE.
ENDLOOP.
ELSE.
MESSAGE E041(S9) WITH P_FILE.
ENDIF.
CLOSE DATASET P_FILE.
Here my problem is ´´, I am not able to use move corresponding statement.
So I am not getting the exact values to the fields of the dynamic table...
Please check it and give me a solution,
Regards,
Vasanth
Similar Messages
-
How to Copy data from field symbol to Dynamic Internal Table
Hi,
I want to copy the data between two dynamic Internal tables . Following is the code were I have data in the field symbol wanted to transfer it to the other Internal table :
REPORT ztest.
DATA:
gd_dref TYPE REF TO data,
gd_dref1 TYPE REF TO data.
FIELD-SYMBOLS: <fs1> TYPE any,
<fs_wa> TYPE any,
<field> TYPE any,
<fs_wa1> TYPE ANY TABLE. * Contains data from p_src
*Copy data from p_src to p_dest*
PARAMETERS: p_src LIKE dd02l-tabname . * Name of Dynamic Internal table *
p_dest LIKE dd02l-tabname . * Name of Dynamic Internal table*
*DATA : lt_csks LIKE p_dest WITH HEADER LINE.
START-OF-SELECTION.
CREATE DATA gd_dref TYPE (p_src).
CREATE DATA gd_dref1 TYPE TABLE OF (p_src).
ASSIGN gd_dref->* TO <fs_wa>.
ASSIGN gd_dref1->* TO <fs_wa1>.
SELECT * FROM (p_src) INTO TABLE <fs_wa1>.
*Write out data from FIELD SYMBOLS TO Table.
loop at <fs_wa1> into <fs_wa>.
do.
assign component sy-index
of structure <fs_wa> to <field>.
if sy-subrc <> 0.
exit.
endif.
if sy-index = 1.
write:/ <field>.
else.
write: / <field>.
endif.
enddo.
endloop.
*Need Logic To Copy the Data to p_dest table from <fs_wa1>.
*p_dest is a table having a similar structure to table p_src .
*Need Logic To Copy the Data to p_dest table from <fs_wa1>.
EXIT.
Thanks in Advance.try this...
I have extended your source code and just used vbak/vbap as an example as they have some common fields like vbeln/erdat etc which corresponds with your requirement of 'similar structure' i.e. shared/common fields in both.
Cheers...
report ztest.
data:
gd_dref type ref to data,
gd_dref1 type ref to data,
gd_dref_str type ref to data,
gd_dref_tab type ref to data.
field-symbols:
<fs1> type any,
<fs_wa> type any,
<fs1_dest_str> type any,
<fs_dest_tab> type any table,
<field> type any,
<fs_wa1> type any table.
* contains data from p_src
*Copy data from p_src to p_dest*
parameters: p_src like dd02l-tabname default 'vbak',
* name of dynamic internal table *
p_dest like dd02l-tabname default 'vbap'.
* name of dynamic internal table*
*data : lt_csks like p_dest with header line.
start-of-selection.
create data gd_dref type (p_src).
create data gd_dref1 type table of (p_src).
assign gd_dref->* to <fs_wa>.
assign gd_dref1->* to <fs_wa1>.
select * from (p_src) into corresponding fields of table <fs_wa1>
up to 3 rows
where vbeln ne space.
create data gd_dref_str type (p_dest).
create data gd_dref_tab type standard table of (p_dest).
assign gd_dref_str->* to <fs1_dest_str>.
assign gd_dref_tab->* to <fs_dest_tab>.
*write out data from field symbols to table.
loop at <fs_wa1> into <fs_wa>.
" break-point here - can see vbeln/waers/create date/ etc move over to new structure
" the 'common' fields of your structures - the same will happen. if they not the same name you will have to do an
" explicit move i.e. if fieldname = xyz ....move fieldxyz to new field123....after the move-corre
break-point.
move-corresponding <fs_wa> to <fs1_dest_str>.
insert <fs1_dest_str> into table <fs_dest_tab>.
** do.
** assign component sy-index
** of structure <fs_wa> to <field>.
** if sy-subrc <> 0.
** exit.
** endif.
** if sy-index = 1.
** write:/ <field>.
** else.
** write: / <field>.
** endif.
** enddo.
endloop.
" write out some dest data from the dest table build from previous loop
loop at <fs_dest_tab> assigning <fs1_dest_str>.
do.
assign component sy-index of structure <fs_wa> to <field>.
if sy-subrc <> 0.
exit.
endif.
if sy-index = 1.
write:/ <field>.
else.
write: / <field>.
endif.
enddo.
endloop. -
How to extract data from info cube into an internal table using ABAP code
HI
Can Anyone plz suggest me
How to extract data from info cube into an internal table using ABAP code like BAPI's or function modules.
Thankx in advance
regds
AJAYHI Dinesh,
Thankq for ur reply
but i ahve already tried to use the function module.
When I try to Use the function module RSDRI_INFOPOV_READ
I get an information message "ERROR GENERATION TEST FRAME".
can U plz tell me what could be the problem
Bye
AJAY -
Join data from a file with an internal table
Hi to everybody!!
I need help, I don't know how to join two differents data, one of them is internal...
This select fill my itab
SELECT PERNR PERID VORNA NACHN FROM PA0002 APPENDING TABLE itab_tabla
WHERE
PA0002~BEGDA <= SY-DATUM AND
PA0002~ENDDA >= SY-DATUM AND
PERID = G_PERID.
ENDLOOP.
Now I have to insert inside the table more data that pass from a file...but I don't know how to join this... can anybody help me?
Thanks a lot
Regards,
RebecaHI,
you will need to upload the file by Using the FM GUI_UPLOAD.
this will take the data from the file to an internal table that you will have to declare.
once you get the data in to your table,you can merge both the tables in to another final table or in the 1st internal table if all the fields are there and modify the table.so the table will have the records of both the tables.
after you get the data in your second table"
loop at itab2.
move: <field 1> to itab1.
<field 2> to itab1.
modify itab1.
endloop. -
Moving Data from Normal table to History tables
Hi All,
I'm in the process of moving data from normal tables to
History tables.
It can be some sort of a procedure which should be a cron job running at night.
My aim is to move data say 1.5 yrs or 2yrs old data to History tables.
What aspects i need to check when moving data. And how can i write a procedure for this requirement.
The schema is same in both the normal table and history table.
It has to be a procedure based on particular field RCRE_DT.
If the rcre_dt is above 2 yrs the data needs to be moved to HIS_<table>.
I have to insert record in to HIS_table and simultaneously delete record from the normal table.
This is in Production system and the tables are quite big.
Pls do find enclosed the attached sample schema for Normal table and HIS_<table>.
If i want to automate this script as a Cron job for similarly other History tables
how am i to do it in a single procedure assuming the procedure for moving the data is the same procedure.
Thanks for ur help in advance.
SQL> DESC PXM_FLT;
Name Null? Type
RCRE_USER_ID NOT NULL VARCHAR2(15)
RCRE_DT NOT NULL DATE
LCHG_USER_ID VARCHAR2(15)
LCHG_DT DATE
AIRLINE_CD NOT NULL VARCHAR2(5)
REF_ID NOT NULL VARCHAR2(12)
BATCH_DT NOT NULL DATE
CPY_NO NOT NULL NUMBER(2)
ACCRUAL_STATUS NOT NULL VARCHAR2(1)
FLT_DT NOT NULL DATE
OPERATING_CARRIER_CD NOT NULL VARCHAR2(3)
OPERATING_FLT_NO NOT NULL NUMBER(4)
MKTING_CARRIER_CD VARCHAR2(3)
MKTING_FLT_NO NUMBER(4)
BOARD_PT NOT NULL VARCHAR2(5)
OFF_PT NOT NULL VARCHAR2(5)
AIR_CD_SHARE_IND VARCHAR2(1)
UPLOAD_ERR_CD VARCHAR2(5)
MID_PT1 VARCHAR2(5)
MID_PT2 VARCHAR2(5)
MID_PT3 VARCHAR2(5)
MID_PT4 VARCHAR2(5)
MID_PT5 VARCHAR2(5)
PAX_TYPE VARCHAR2(3)
PAY_PRINCIPLE VARCHAR2(1)
SQL> DESC HIS_PXM_FLT;
Name Null? Type
RCRE_USER_ID NOT NULL VARCHAR2(15)
RCRE_DT NOT NULL DATE
LCHG_USER_ID VARCHAR2(15)
LCHG_DT DATE
AIRLINE_CD NOT NULL VARCHAR2(5)
REF_ID NOT NULL VARCHAR2(12)
BATCH_DT NOT NULL DATE
CPY_NO NOT NULL NUMBER(2)
ACCRUAL_STATUS NOT NULL VARCHAR2(1)
FLT_DT NOT NULL DATE
OPERATING_CARRIER_CD NOT NULL VARCHAR2(3)
OPERATING_FLT_NO NOT NULL NUMBER(4)
MKTING_CARRIER_CD VARCHAR2(3)
MKTING_FLT_NO NUMBER(4)
BOARD_PT NOT NULL VARCHAR2(5)
OFF_PT NOT NULL VARCHAR2(5)
AIR_CD_SHARE_IND VARCHAR2(1)
UPLOAD_ERR_CD VARCHAR2(5)
MID_PT1 VARCHAR2(5)
MID_PT2 VARCHAR2(5)
MID_PT3 VARCHAR2(5)
MID_PT4 VARCHAR2(5)
MID_PT5 VARCHAR2(5)
PAX_TYPE VARCHAR2(3)
PAY_PRINCIPLE VARCHAR2(1)Hi All,
Thanks for ur valuable suggestion.But can u explain me bit more on this as i'm still confused about switching between partitoned tables and temporary table.Suppose if i have a table called PXM_FLT and an correspoding similar table named HIS_PXM_FLT.How can i do the partitioning shd i do the partitioning on the normal table or HIS_PXM_FLT.i do have a date field for me to partition based on range.Can u pls explain why shd i again create a temp.table.What's the purpose.Now the application is designed in such a way that old records have to be moved to HIS_PXM_FLT.can u pls highlight more on this.Your suggestions are greatly appreciated.As i'm relatively new to this partitioning technique i'm bit confused on how it works.But i came to understand Partitioning is a better operation than the normal insert or delte as it is more data intensive as millions of record need to be moved.Thanks for feedback and ur precious time. -
Hi,
Today one my task in the DAC Etl failed and when I opened the DAC log file of it. I saw the error description as below
Error while contacting Informatica server for getting workflow status for PLP_SRC_WH_AP_Invoice_Reconciliation
Error Code = 36331:Unknown reason for error code 36331
Since there is no much information in DAC log file about the failure, I opened the PLP_SRC_WH_AP_Invoice_Reconciliation session log file.
The error description in the session log file says.
There is an error in the port [NEXTVAL]: The default value for the port is set to: ERROR(<<Expression Error>> [ERROR]: transformation error
... nl:ERROR(u:'transformation error')).
2014-01-14 08:00:45 : ERROR : (582188 | TRANSF_1_1_1) : (IS | Oracle_BI_DW_Server) : node01_ : TT_11023 : An error occurred converting data in the port [NEXTVAL]. The row was dropped.
2014-01-14 08:00:45 : ERROR : (582188 | TRANSF_1_1_1) : (IS | Oracle_BI_DW_Server) : node01_ : TT_11021 : An error occurred moving data from the transformation RECON_SEQ_GEN: to the transformation FILTRANS.
2014-01-14 08:00:45 : ERROR : (582188 | TRANSF_1_1_1) : (IS | Oracle_BI_DW_Server) : node01 : CMN_1086 : RECON_SEQ_GEN: Number of errors exceeded threshold [1].
2014-01-14 08:00:45 : INFO : (582188 | TRANSF_1_1_1) : (IS | Oracle_BI_DW_Server) : node01_ : CMN_1053 : : Rowdata: ( RowType=-4(error but dropped due to abort) Src Rowid=1186281 Targ Rowid=1186281
NEXTVAL (ROW_WID:Int:): "(NULL)"
I am not sure of this error and I have never seen before. Can any one share some ideas on how to tackle this error and make the task execute successfully.
Many Thanks.Hi,
fist check weather any special characteristics if not
check in data source under this we have fields tab check the format of a particular field format internal/external/check u choose internal format, if any check routine once
use Semantic Groups in the DTP.
Try it
Thanku
lokeeshM
Edited by: lmedaSAP_BI on Oct 20, 2010 6:44 AM -
Which CKM is used for moving data from Oracle to delimited file ?
Hi All
Please let me know Which CKM is used for moving data from Oracle to delimited file ?
Also is there need of defining each columns before hand in target datastore. Cant ODI take it from the oracle table itself ?Addy,
A CKM is a Check KM which is used to validate data and log errors. It is not going to assist you in data movement. You will need an LKM SQL to File append as answered in another thread.
Assuming that you have a one to one mapping, to make things simpler you can duplicate the Oracle based model and create a file based model. This will take all the column definitions from the Oracle based model.
Alternatively, you can also use an ODI tool odiSQLUnload to dump the data to a file
HTH -
Moving data from an array to a JTable
Hi,
I am facing some problems with handling array data to JTable.
My objective is moving data from a 10X5 data array to a JTable.
I am using the following code:
String columnNames = { "Col 1", "Col 2", "Col 3", "Col 4", "Col 5" };
for(int j=0; j<10; j++)
data[ j ] = array1[ j ] + array2[ j ] + array3[ j ] + array4[ j ] + array5[ j ];
JTable table = new JTable( data, coulmnNames);
Can you please help me with the error in tha above code.My array1 is a String array and the other four arrays are of Integer data type.
Thanks!!!hi,
The actual error message is:
[root@localhost java]# javac GUI.java
GUI.java:144: incompatible types
found : int
required: java.lang.Object
data [j] [1] = array1[j];
^
GUI.java:145: incompatible types
found : int
required: java.lang.Object
data [j] [2] = array2[j];
^
GUI.java:146: incompatible types
found : int
required: java.lang.Object
data [j] [3] = array3[j];
^
GUI.java:147: incompatible types
found : int
required: java.lang.Object
data [j] [4] = array4[j];
^
4 errors
My code segment with line no goes as follows:
private static JTable createTable() {
String[] columnNames = { "Col 1", "Col 2", "Col 3", "Col 4"' "Col 5" };
Object data [ ] [ ] = new Object [10] [5];
for( int j=0; j<10; j++)
data [j] [0] = array1[j]; ...................Line:144
data [j] [1] = array2[j]; ..................Line 145
data [j] [2] = array3[j]; ....................Line 146
data [j] [3] = array4[j]; .................Line 147
data [j] [4] = array5[j];
final JTable table = new JTable(data, columnNames);
return table;
[code/]
Array 1 is declared as String array and Array 2,3,4,5 are declared as Integer arrays.The error is coming from the Integer arrays only.
Java version running on my machine is: 1.4.2
Please help!!!
Thanks!!! -
Hi,
I am moving data from flat file to oracle table. while populating the oracle table if I get any errors in flat file those errors should populate in ODI error table.
Is this is possible? if yes. Could you please let me know the set up in ODI.CKM is the dedicated for checking the constraints while doing transformation. The constraints includes, PK,FK, conditions etc.,
There are two types/ways of checking the constraints.
Flow Control: Triggered CKM after data is loaded in to I$.
Static Control : Triggered CKM after data is loaded in to target table.
If you opt for any one the above ODI will create E$ and SNP_CHECK_TAB (summary table for logging the errors) and load the error records.
ODI will also provide you an option of loading the corrected error records by RECYCLE ERROR feature. In this phase/run ODI will load ONLY the error records in to target table (assuming its been corrected/cleaned).
**how to set up flow control could you please provide steps**
**Appreciate your help** -
How to extract data from xml and insert into Oracle table
Hi,
I have a large xml file. which will have hundreds of the following transaction tags having column names and there values.
There is a table one of the schema with coulums "actualCostRate","billRate"....etc.
I need to extract the values of these columns and insert into the table
<Transaction actualCostRate="0" billRate="0" chargeable="1" clientID="NikuUK" chargeCode="LCOCD1" externalID="L-RESCODE_UK1-PROJ_UK_CNT_GBP-37289-8" importStatus="N" projectID="TESTPROJ" resourceID="admin" transactionDate="2002-02-12" transactionType="L" units="11" taskID="5017601" inputTypeCode="SALES" groupId="123" voucherNumber="ABCVDD" transactionClass="ABCD"/>
<Transaction actualCostRate="0" billRate="0" chargeable="1" clientID="NikuEU" chargeCode="LCOCD1" externalID="L-RESCODE_US1-PROJ_EU_STD2-37291-4" importStatus="N" projectID="TESTPROJ" resourceID="admin" transactionDate="2002-02-04" transactionType="L" units="4" taskID="5017601" inputTypeCode="SALES" groupId="124" voucherNumber="EEE222" transactionClass="DEFG"/>Re: Insert from XML to relational table
http://www.google.ae/search?hl=ar&q=extract+data+from+xml+and+insert+into+Oracle+table+&btnG=%D8%A8%D8%AD%D8%AB+Google&meta= -
How to read data from a CLUSTER STRUCTURE not cluster table.
Hi,
how to read data from a CLUSTER STRUCTURE not cluster table.
regards,
Usha.Hello,
A structre doesnt contain data.. so u cannot read from it. U need to find out table of that structure and read data from it.
Regards,
Mansi. -
How to delete data from single field in a database table?
Hi guys,
Plz suggest me How to delete data from single field in a database table?
thnks,
pavanhi
in addition to abv details..chk this:
http://help.sap.com/saphelp_nw2004s/helpdata/en/fc/eb3aef358411d1829f0000e829fbfe/content.htm
http://dev.mysql.com/doc/maxdb/en/34/ee7fbd293911d3a97d00a0c9449261/content.htm
regards,
madhu -
How to retrieve data from domain(Value Range) of the table
hi
how to retrieve data from domain(Value Range) of the table
thanksHello,
You can try using the FM: DOMAIN_VALUE_GET TB_DOMAINVALUES_GET.
BR,
Suhas
Edited by: Suhas Saha on Mar 24, 2009 10:08 AM -
Moving DATA from Internal Table to Ranges
Hi All,
I have an Internal table and a range variable both contain one field. Internal table is having only one table. I am populating the table data from a select query. Now I want to transfer the data to a range field. The internal table is having thousands of records so I want to do this <b>without LOOP</b>. Can anybody suggest the efficient way to achieve this?
Any help would be appreciated.
Thanks so much.
Jignesh.... the sump with too big range tables is a pure oracle sickness. AFAIK the size limit for the select statement has been extended from 16k to 32k, so this danger is smaller than it used to be.
Anyway you can use the FOR ALL ENTRIES IN clause and the ABAP-SQL-interface will handle the package size very efficienly. There was a time I believed that FOR ALL ENTRIES IN should not be used because it would slow down the data selection. I have learned that this is not true at all because of the package technique.
And now for everyone who wants to built ranges of any size (no limit for internal tables):
Call this like (just as an example for initializing select-options:
PERFORM append_range USING:
'IEQ' sy-datum(4) '' CHANGING s_gjahr[],
'IBT' 1 'ZZZZZZZZZZ' CHANGING s_prctr[],
'IBT' 1 16 CHANGING s_monat[].
Note that SIGN and OPTION are combined into one parameter saving time and gaining overview (?).
I created the FORM once and used it so many times...
Actually you don't need so many "CHECK sy-subrc = 0" if you know how to use the form.
*& Form append_range
append selection range
FORM append_range USING p_signopt TYPE c
p_low TYPE any
p_high TYPE any
CHANGING pt_range TYPE table.
FIELD-SYMBOLS:
<range> TYPE ANY,
<sign> TYPE ANY,
<option> TYPE ANY,
<low> TYPE ANY,
<high> TYPE ANY.
DATA:
l_ref TYPE REF TO data.
CREATE DATA l_ref LIKE LINE OF pt_range.
ASSIGN l_ref->* TO <range>.
CHECK sy-subrc = 0.
ASSIGN COMPONENT 'SIGN' OF STRUCTURE <range> TO <sign>.
CHECK sy-subrc = 0.
ASSIGN COMPONENT 'OPTION' OF STRUCTURE <range> TO <option>.
CHECK sy-subrc = 0.
ASSIGN COMPONENT 'LOW' OF STRUCTURE <range> TO <low>.
CHECK sy-subrc = 0.
ASSIGN COMPONENT 'HIGH' OF STRUCTURE <range> TO <high>.
CHECK sy-subrc = 0.
<sign> = p_signopt(1).
<option> = p_signopt+1(2).
<low> = p_low.
<high> = p_high.
APPEND <range> TO pt_range.
ENDFORM. " append_range
Enjoy your ranges,
Clemens -
Sample pgm for moving data from table control to internal table
Hi Experts,
I am newbi to ABAP. I don't have good material for Table control . Appreciate if you direct me to some good source of knowledge on Table control.
The problem at hand : I am trying to move info/data from table control (in screen painter/ input and output mode ) to ITAB but couldn't . Sample pgm if possible.
<b>Modify ITAB index TC-Current_Line .</b>
The above statement is not inserting new lines to ITAB . Help me!
Thanks for your timehi,
do like this...
<b>PROCESS AFTER INPUT.</b>
*&SPWIZARD: PAI FLOW LOGIC FOR TABLECONTROL 'TAB1'
LOOP AT itab_det.
CHAIN.
FIELD itab_det-comp_code.
FIELD itab_det-bill_no.
FIELD itab_det-bill_date.
FIELD itab_det-vend_cust_code.
FIELD itab_det-bill_amt.
MODULE <b>tab1_modify</b> ON CHAIN-REQUEST.
ENDCHAIN.
FIELD itab_det-mark
MODULE tab1_mark ON REQUEST.
ENDLOOP.
<b>MODULE tab1_modify INPUT.</b>
APPEND itab_det.
<b>ENDMODULE. "TAB1_MODIFY INPUT</b>
Maybe you are looking for
-
FBL5 FIAR - exception aggregation - count customers with open items at key
Hello gurus, I have read the information about counting all values in reference to a characteristic. I manage to count how many customers have a FIAR open item 'billing status' = Open in my FIAR cube. Now I am asked to replicate transaction FBL5 of R
-
Mandrake 8.0 & Oracle 8.1.7 install - seems OK
After much pains I seemed to have been able to install Oracle 8.1.7 and create a database. Have not tested anything else. 1- I have a fresh install of Mandrake 8.0 2- I follow instruction at http://www.linux-mandrake.com/en/updates/2001/MDKA-2001-006
-
my system was working fine and I could watch my netflix on my pc using the current version of firefox to watch instantly it goes through starlight when I turned on my pc firefox udated now I,m unable to watch netflix on my pc I would like to be told
-
When I try to burn a CD from a playlist. I get Error Message 2122. I haven't tried un-purchased music. Just Music purchased from iTunes Music Store.
-
HP Deskjet D2330 Response Error
My HP Deskjet 2330 printer will not respond to anything. Someone else hooked up their laptop to the printer, and ever since it has not worked at all. I have downloaded new drivers, uninstalled and reinstalled, and I am getting to the end of my rope