Passing of internal table values to the select statement as SETS
Hi All,
Is there any way that i can restrict the values of a internal table to be passed to a select statement set by set..
say for eg: if a itab has 1000 entries i want the first 500 to be going out in a select statement as a comparision for all entries and then the next set of 500 to go out..
Please let me know.. this is very urgent..
<b>Appending Several Lines</b>
You can also append internal tables to index tables using the following statement:
APPEND LINES OF <itab1> TO <itab2>.
This statement appends the whole of ITAB1 to ITAB2. ITAB1 can be any type of table, but its line type must be convertible into the line type of ITAB2.
When you append an index table to another index table, you can specify the lines to be appended as follows:
APPEND LINES OF <itab1> [FROM <n1>] [TO <n 2>] TO <itab2>.
<n 1 > and <n 2 > specify the indexes of the first and last lines of ITAB1 that you want to append to ITAB2.
This method of appending lines of one table to another is about 3 to 4 times faster than appending them line by line in a loop. After the APPEND statement, the system field SY-TABIX contains the index of the last line appended. When you append several lines to a sorted table, you must respect the unique key (if defined), and not violate the sort order. Otherwise, a runtime error will occur.
Then u can use <b> FOR ALL ENTRIES</b> in select query.
regards
vinod
Similar Messages
-
Passing Dynamic Internal Table values to another program
Hi,
I have a program ZSAPNEW.
In this I have created a Dynamic internal table <fs_emp>. The number of fields differ for each run. The values are passed into <fs_emp> in this program. Now I need to submit thsi program from a main program ZHEAD and then display the values got from ZHEAD. For this I need to access the values retrieved from ZSAPNEW in <fs_emp> in ZHEAD. I cant figure out how to do this. I tried IMPORT ing the reference of teh field symbol too/ But its not allowing references in IMPORT/EXPORT. And since the table is of type ANY( as structure varies) I cant assign it to an internal table and then pass. Can some one suggest a solution please.
SuzieHi
You need to know how the strcture of your table is generated In both programm:
- Calling program:
DATA: LR_VALUE_DESCR TYPE REF TO CL_ABAP_ELEMDESCR,
COMPONENT TYPE CL_ABAP_STRUCTDESCR=>COMPONENT,
LT_COMPONENTS TYPE CL_ABAP_STRUCTDESCR=>COMPONENT_TABLE.
DATA: LT_STRUC TYPE REF TO CL_ABAP_STRUCTDESCR,
LT_TAB TYPE REF TO CL_ABAP_TABLEDESCR.
DATA: L_INDEX TYPE C.
DATA: W_LINE TYPE REF TO DATA,
INT_TABLE TYPE REF TO DATA.
FIELD-SYMBOLS: <WA> TYPE ANY,
<ITAB> TYPE TABLE,
<VALUE> TYPE ANY.
DO 4 TIMES.
CLEAR COMPONENT.
MOVE SY-INDEX TO L_INDEX.
CONCATENATE 'FIELD' L_INDEX INTO COMPONENT-NAME.
MOVE CL_ABAP_ELEMDESCR=>GET_C( P_LENGTH = 4 ) TO LR_VALUE_DESCR.
COMPONENT-TYPE = LR_VALUE_DESCR.
INSERT COMPONENT INTO TABLE LT_COMPONENTS.
ENDDO.
* Workarea
LT_STRUC = CL_ABAP_STRUCTDESCR=>CREATE( P_COMPONENTS = LT_COMPONENTS
P_STRICT = 'X' ).
CREATE DATA W_LINE TYPE HANDLE LT_STRUC.
ASSIGN W_LINE->* TO <WA>.
* Table
LT_TAB = CL_ABAP_TABLEDESCR=>CREATE( P_LINE_TYPE = LT_STRUC ).
CREATE DATA INT_TABLE TYPE HANDLE LT_TAB.
ASSIGN INT_TABLE->* TO <ITAB>.
DO 3 TIMES.
CLEAR <WA>.
DO 4 TIMES.
MOVE SY-INDEX TO L_INDEX.
CONCATENATE 'FIELD' L_INDEX INTO COMPONENT-NAME.
ASSIGN COMPONENT COMPONENT-NAME OF STRUCTURE <WA> TO <VALUE>.
MOVE SY-INDEX TO <VALUE>.
ENDDO.
APPEND <WA> TO <ITAB>.
ENDDO.
DATA: WA_INDX TYPE INDX.
WA_INDX-USERA = SY-UNAME.
WA_INDX-PGMID = 'MAXMAX'.
EXPORT TAB = <ITAB>
TO DATABASE INDX(XY)
FROM WA_INDX
CLIENT SY-MANDT
ID 'TABLE'.
Called program:
DATA: LR_VALUE_DESCR TYPE REF TO CL_ABAP_ELEMDESCR,
COMPONENT TYPE CL_ABAP_STRUCTDESCR=>COMPONENT,
LT_COMPONENTS TYPE CL_ABAP_STRUCTDESCR=>COMPONENT_TABLE.
DATA: LT_STRUC TYPE REF TO CL_ABAP_STRUCTDESCR,
LT_TAB TYPE REF TO CL_ABAP_TABLEDESCR.
DATA: L_INDEX TYPE C.
DATA: W_LINE TYPE REF TO DATA,
INT_TABLE TYPE REF TO DATA.
FIELD-SYMBOLS: <WA> TYPE ANY,
<ITAB> TYPE TABLE,
<VALUE> TYPE ANY.
DO 4 TIMES.
CLEAR COMPONENT.
MOVE SY-INDEX TO L_INDEX.
CONCATENATE 'FIELD' L_INDEX INTO COMPONENT-NAME.
MOVE CL_ABAP_ELEMDESCR=>GET_C( P_LENGTH = 4 ) TO LR_VALUE_DESCR.
COMPONENT-TYPE = LR_VALUE_DESCR.
INSERT COMPONENT INTO TABLE LT_COMPONENTS.
ENDDO.
* Workarea
LT_STRUC = CL_ABAP_STRUCTDESCR=>CREATE( P_COMPONENTS = LT_COMPONENTS
P_STRICT = 'X' ).
CREATE DATA W_LINE TYPE HANDLE LT_STRUC.
ASSIGN W_LINE->* TO <WA>.
* Table
LT_TAB = CL_ABAP_TABLEDESCR=>CREATE( P_LINE_TYPE = LT_STRUC ).
CREATE DATA INT_TABLE TYPE HANDLE LT_TAB.
ASSIGN INT_TABLE->* TO <ITAB>.
DATA: WA_INDX TYPE INDX.
WA_INDX-USERA = SY-UNAME.
WA_INDX-PGMID = 'MAXMAX'.
IMPORT TAB = <ITAB>
FROM DATABASE INDX(XY)
TO WA_INDX
CLIENT SY-MANDT
ID 'TABLE'.
LOOP AT <ITAB> ASSIGNING <WA>.
WRITE: / <WA>.
ENDLOOP.
The sample above use IMPORT/EXPORT from database: if the called program can't know the structure of the dynaic table, you need to transfer it by the same way you transfer the data
Max -
How can i pass a variable instead of a table name in the Select statement.
Dear all
how can i pass a variable instead of a table name in a select statement ?
Example :-
Begin
P_get_procedure_tname (aap_name,otable_name);--It will take an application name and will return a table name
Select col1 into ocol1
from ---- here i want to pass the variable OTABLE_NAME
End;How can i pass this ?Hi,
You can use dynamic sql.
EXECUTE IMMEDIATE 'SELECT COL1 INTO ' || OCOL1 || ' FROM " || OTABLE_NAME;
{code}
cheers
VT -
* table name in the select statements
Hi,
I have come across a select Statement as below.
Select * into *nast from nast where <conditions>.. End select.
what does this *nast represents and when is it used. why do we need to call a Table with *<Table Name>
Kind Regards,
Ushahi,
select statement will always points to a database table so we have to give database table name and it gets data from that table. for storing that data we have to use internal tables must have same structure of database table.
so select statement has the following form as........
select * from [dbtable] into table [internal table]
endselect.
in sap select will act as a loop so that we hav to use end sleect. select has different varities in sap. for some types no need of end select.
for ex:
select single *
select * ..................... into table [internal table name].....
if helpful reward some points.
with regards,
suresh. -
Selecting values into same internal table from 2 differrnt select statement
Hi Friends,
code :
types :
begin of ty_bsad,
augbl type bsad-augbl,
end of ty_bsad.
begin of ty_bsad1,
augbl type bsad-augbl,
belnr type bsad-belnr,
end of ty_bsad1.
select augbl
from bsad
into table it_bsad
where belnr = l_vbeln and
bukrs = l_bukrs and
kunnr = l_kunrg.
if sy-subrc = 0 .
select belnr
into table lt_bsad1
from bsad
for all entries in lt_bsad
where augbl = lt_bsad-augbl and
kunnr = l_kunnr and
burks = l_bukrs and
blart = 'xy'.
now my requiremnt is i need to get both the augbl and belnr in single internal table but not in differnrnt internal table.
how can i get it.
Regards,
Priyanka.
Code Formatted by: Alvaro Tejada Galindo on Jan 8, 2009 10:53 AMHI.
No Need to create two internal table because your feyching values from same table BSAD with diffrent where condition.try this code.it s work.
select augbl
from bsad
into table it_bsad
where belnr = l_vbeln and
bukrs = l_bukrs and
kunnr = l_kunrg and
blart = 'xy'.
else Refer this code.
LOOP AT it_bill_data INTO wa_bill_data.
MOVE-CORRESPONDING wa_bill_data TO wa_final_data.
READ TABLE it_material_data INTO wa_material_data
WITH KEY matnr = wa_bill_data-matnr.
IF sy-subrc = 0.
wa_final_data-meins_mara = wa_material_data-meins.
ENDIF.
APPEND wa_final_data TO it_final_data.
ENDLOOP.
Regards.
Jay
Edited by: Jay on Jan 8, 2009 2:53 PM
Edited by: Jay on Jan 8, 2009 2:57 PM
Code Formatted by: Alvaro Tejada Galindo on Jan 8, 2009 10:56 AM -
Reg : Passing two internal table values in to final internal table
Dear Experts,
My first internal table looks like this,
Customer Name O/S
A Anu 5000
B Beema 2000
C Chitu 3000
My Second Internal table looks like this,
Customer InvNo InvDate Due
A 001 1/1/09 500
A 002 2/2/09 100
B 004 4/4/09 50
B 003 4/5/09 100
My final Internal table should be,
Customer Name O/s InvNo InvDate Due
A Anu 5000 001 1/1/09 500
002 2/2/09 100
B Beema 2000 004 4/4/09 50
003 4/5/09 100
Please help me with the code...Hai,
Thanks...
I need to get the O/P like this,
Customer Name O/S InvNo Inv Date Due
A Anu 3000 001 1/11/09 50
002 2/2/09 100
003 3/3/09 30
Plz help -
How to use a table name in the select statement using a variable?
Hi Everybody,
I got a internal table which has a field or a variable that gets me some tables names. Now I need to retrieve the data from all these tables in that field dynamically at runtime. So could you suggest me a way out to use the select query which uses this variable as a table ?
Regards,
Mallik.Hi all,
Actually i need some more clarification. How to use the same select statement, if i've to use the tabname in the where clause too?
for ex : select * from (tab_name) where....?
Can we do inner join on such select statements? If so how?
Thanks & Regards,
Mallik. -
Create Dynamic table name in the select statement.
I use oracle reports 6i to make myrep.rdf , this report created using certain select query Q1, I created a formula column in this report,
in the formula column I write pl/sql block statements to select the data from certain table depends on the output of a column in Q1,
I want to make the pl/sql block dynamically enough to change the user which I select the data from depends on the connected user
Ex: if I connected with user = 'KAM14'
the pl/sql block will be
select x into v_value from kam13.bil_file where .....;
and if I connected with user = 'KAM13'
the pl/sql block will be
select x into v_value from kam12.bil_file where .....;
and so on
how can I do this in the pl/sql block ...
Thanks in Advance.I am not sure I understood properly, but I think you should create bil_file table under a different user and create synonyms under KAM1x users.
Regards -
Passing a internal table from method
Hi All,
I am using Object Oriented Programming in my program.
I want to pass a Internal Table from a method calling statement written in a start-of-selection.
Can any one give me the syntax for
1. Declaring a method with importing parameter as internal table.
2. Syntax for Method Implementation
3. Syntax for calling the method from start-of-selection.
helpful answers are rewarded.
Regards,
Azaz Ali.Hi,
Calling Method is similar to calling function Module.
CALL METHOD cl_gui_frontend_services=>gui_download
exporting
filename =
IMPORTING
FILELENGTH =
changing
data_tab = <b>( this is ur internal table name )</b>* EXCEPTIONS
FILE_WRITE_ERROR = 1.
<b>In OO ABAP u avoid creating table with header line</b>
Best way to call method is to use <b>PATTERN</b> Button
1) Click Pattern Button
2) Select Abap Object Pattern
3) Enter
4) Select Call Method
5) Enter instance name ( i. e used for create object ) ( No need for static method like gui_download )
6) Enter Class / Interface name
7) Enter Method Name
done.
<b>passing value to method is similar to FM.
Creating internal table for Method
any TYPE ........SAY TY_Intern
Then Syntax Should Be
DATA : OO_INTERNAL_TABLe type table of TY_Intern.
pass this to the Method.
Hope This will solve ur problem.
Please Mark Helpful Answers</b>
Message was edited by: Manoj Gupta -
How to bind internal table values with RootUIElement(Table) from select Que
Hello Friends,
In my view Layout,there r two Input fields ,Submit button and Table... My concept is when user posting values in two input fields and clicking submit button means the result(more than one values) should be displayed in Table...
I written coding also but i dont know to bind internal table values with Table... My code as follows,
method onactionsearch .
data:
Node_Node_Flight type ref to If_Wd_Context_Node,
Elem_Node_Flight type ref to If_Wd_Context_Element,
Stru_Node_Flight type If_View1=>Element_Node_Flight ,
itab TYPE STANDARD TABLE OF sflight.
navigate from <CONTEXT> to <NODE_FLIGHT> via lead selection
Node_Node_Flight = wd_Context->get_Child_Node( Name = IF_VIEW1=>wdctx_Node_Flight ).
@TODO handle not set lead selection
if ( Node_Node_Flight is initial ).
endif.
get element via lead selection
Elem_Node_Flight = Node_Node_Flight->get_Element( ).
@TODO handle not set lead selection
if ( Elem_Node_Flight is initial ).
endif.
alternative access via index
Elem_Node_Flight = Node_Node_Flight->get_Element( Index = 1 ).
@TODO handle non existant child
if ( Elem_Node_Flight is initial ).
endif.
get all declared attributes
Elem_Node_Flight->get_Static_Attributes(
importing
Static_Attributes = Stru_Node_Flight ).
select * from sflight into CORRESPONDING FIELDS OF TABLE itab
WHERE carrid = Stru_Node_Flight-carrid and connid = Stru_Node_Flight-connid.
Node_Node_Flight->bind_table( new_items = itab ).
endmethod.
Plz reply me asap...!Hi,
What I understood from your coding is...
* navigate from <CONTEXT> to <NODE_FLIGHT> via lead selection
Node_Node_Flight = wd_Context->get_Child_Node( Name = IF_VIEW1=>wdctx_Node_Flight ).
You are reading values from the above node and binding the values to the same node.Am i right?
Did you take seperate context node for your input fields or binded the above context to the fields.If not then read the context attribute values which are binded to the carrid and connid then pass these values to select query.
One more thing is select cardinality 1..n for node NODE_FLIGHT since you are displaying more than one record.
Go through the some basic tutorials.Search in sdn you will it get.Already there is a tutorial in sdn which explains exactly what do you require.
Go throgh this link
Web Dynpro for ABAP: Tutorials for Beginners
Web Dynpro for ABAP: Tutorials for Beginners [original link is broken]
Edited by: suman kumar chinnam on Mar 26, 2009 10:50 AM -
Value help for select options (pass the selected values to the select opt)
Hi everyone,
I created a custom value help for my select options.
It works fine, when the user clicks on the value help, my own view is displayed, and the user can select the required values:
lt_range_table =
wd_this->m_handler->create_range_table(
i_typename = 'ORGEH' ).
* add a new field to the selection
wd_this->m_handler->add_selection_field(
i_id = 'ORGEH'
i_value_help_id = 'MYSO'
i_value_help_type = IF_WD_VALUE_HELP_HANDLER=>CO_PREFIX_APPLDEV
it_result = lt_range_table
i_read_only = read_only ).
The problem is, how can I pass the values to the select option? When the user selects the values in my view, I have them in an internal table. But how can i pass these values to the select option? I suppose there is declared method for this... but which one?
Thanks
N.Sorry for the stupid question, but it seems I can't acces my attribute:
I create it in the component controller
NODE: 'APP_DATA'
Attribute: M_HANDLER TYPE IF_WD_SELECT_OPTIONS
Cardinality 1..1
Selection 1..1
Singleton = 'X'
I pass the values int he EDOINIT method of MAIN view:
* Get compnent controller API
lo_component = wd_comp_controller->wd_get_api( ).
lo_controller ?= lo_component.
* Get the controler context node
CALL METHOD LO_CONTROLLER->GET_CONTEXT
RECEIVING
CONTEXT = lo_context.
*Get the root node
lo_node = lo_context->root_node.
*Get the child node
lo_child = lo_node->get_child_node( 'APP_DATA' ).
ls_app_data-m_handler = wd_this->m_handler.
lo_child->bind_structure( ls_app_data ).
After this code I test it if the binding is correct:
DATA: ls_test TYPE wd_comp_controller->element_app_data.
CALL METHOD LO_CHILD->GET_STATIC_ATTRIBUTES
IMPORTING
STATIC_ATTRIBUTES = ls_test.
The lstest is correct_. It has the reference for the SelectOption
Now, in the SEL_TREE View:
* Get compnent controller API
lo_component = wd_comp_controller->wd_get_api( ).
lo_controller ?= lo_component.
* Get the controler context node
CALL METHOD LO_CONTROLLER->GET_CONTEXT
RECEIVING
CONTEXT = lo_context.
*Get the root node
lo_node = lo_context->root_node.
*Get the child node
lo_child = lo_node->get_child_node( 'APP_DATA' ).
*Get the data from the node
CALL METHOD LO_CHILD->GET_STATIC_ATTRIBUTES
IMPORTING
STATIC_ATTRIBUTES = ls_app_data.
wd_this->m_handler = ls_app_data-m_handler.
The ls_app_data-m_handler is INITIAL. There is no value in it.
What did I do wrongly?
Please help
Thanks
N. -
Hi All,
I have written BDC, in which when i pass value for second screen "Description type field" it's passing '*************************' instead of internal table value.
It's picking correct value for first internal table value. Could anyone please give an idea why it's happening?
Please find the code:
LOOP AT it_record.
header data for BDC
AT NEW CLASS.
IF sy-tabix <> 1.
perform bdc_dynpro using 'SAPLCLMO' '7777'.
perform bdc_field using 'BDC_OKCODE'
'=SAVE'.
CALL TRANSACTION 'CLWM' USING bdcdata
MODE p_mode
UPDATE 'S'
MESSAGES INTO messtab.
clear : bdcdata[],bdcdata.
ENDIF.
perform bdc_dynpro using 'SAPLCLMO' '0200'.
perform bdc_field using 'BDC_CURSOR'
'RMCLM-CLASS'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'RMCLM-CLASS'
it_record-class.
perform bdc_dynpro using 'SAPLCLMO' '7777'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'BDC_CURSOR'
'RMCLM-KLBEZ'.
perform bdc_field using 'RMCLM-KLBEZ'
it_record-klbez.
perform bdc_field using 'RMCLM-STATU'
'1'.
perform bdc_dynpro using 'SAPLCLMO' '7777'.
perform bdc_field using 'BDC_OKCODE'
'=MERK'.
perform bdc_field using 'BDC_CURSOR'
'RMCLM-KLBEZ'.
perform bdc_field using 'RMCLM-KLBEZ'
it_record-klbez.
perform bdc_field using 'RMCLM-STATU'
'1'.
MOVE 1 TO IDX.
ENDAT.
line item data for BDC
perform bdc_dynpro using 'SAPLCLMO' '7777'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'BDC_CURSOR'
'RMCLM-RELEV(02)'.
CONCATENATE 'RMCLM-MERKMA(' IDX ')' INTO FNAM.
perform bdc_field using FNAM
it_record-merkma.
CONCATENATE 'RMCLM-RELEV(' IDX ')' INTO FNAM.
perform bdc_field using FNAM
it_record-relev.
IDX = IDX + 1.
ENDLOOP.
Thanks,
UjjwalHi Ujjwal
The reason behind this is that you are using AT NEW.... ENDAT block in your coding.
When you use AT NEW field statements, the fields in the work area after the field get converted into ********.
Check values in your work area I_RECORD in debugging inside AT NEW statement and you will understand what I am saying.
In your case all the fields from header line of I_RECORDS which come after field CLASS are getting converted into *******,
hence the error.
Try using a temporary work area, say w_record. Pass value of I_record to w_record before AT NEW statement.
And use w_record-fields instead of I_record-fields. And your program should work. -
Submititng the program to another program using internal table values
Hi All,
How to Submit from one program to another program using internal table values minimum 7 int tables without using the seletion screen
thanks
rajHi All,
Thank you very much for your inputs.
i am facing another issue:
For each 10,000 records it should trigger a job (we are trying to call a program) were the validation will be done only through the other program.
please find the code mentioned below :
TABLES : but000.
DATA: int_bp LIKE but000 OCCURS 0 WITH HEADER LINE.
data released like BTCH0000-CHAR1.
DATA: jobnumber LIKE tbtcjob-jobcount, " Job ID and
jobname LIKE tbtcjob-jobname, " job name.
startdate LIKE tbtcjob-sdlstrtdt, " Start-time
starttime LIKE tbtcjob-sdlstrttm, " window specs.
laststartdate LIKE tbtcjob-laststrtdt,
laststarttime LIKE tbtcjob-laststrttm,
job_released LIKE btch0000-char1. " JOB_CLOSE: Was job released?
DATA : l1 TYPE i,
b_size TYPE i,
b_cursor TYPE cursor.
INITIALIZATION.
b_size = 5000.
START-OF-SELECTION.
OPEN CURSOR WITH HOLD b_cursor
FOR
SELECT *
FROM but000
WHERE bpkind = 'AA'.
IF sy-subrc = 0.
DO.
FETCH NEXT CURSOR b_cursor INTO TABLE int_bp
PACKAGE SIZE b_size.
Note : here in this point we are getting a dump for the second job trigger.
IF sy-subrc = 0.
CLEAR jobname.
CONCATENATE sy-repid sy-datum sy-uzeit INTO jobname.
export int_bp to memory id 'ABC'.
CALL FUNCTION 'JOB_OPEN'
EXPORTING
jobname = jobname
IMPORTING
jobcount = jobnumber.
EXCEPTIONS
cant_create_job = 1
invalid_job_data = 2
jobname_missing = 3
OTHERS = 4
CALL FUNCTION 'JOB_SUBMIT'
EXPORTING
authcknam = sy-uname
jobname = jobname
jobcount = jobnumber
report = 'YTEST_RRR'.
variant = lv_variant.
SUBMIT ytest_rrr
VIA JOB jobname NUMBER jobnumber
AND RETURN.
CALL FUNCTION 'JOB_CLOSE'
EXPORTING
event_periodic = 'X'
jobcount = jobnumber
jobname = jobname
strtimmed = 'X'
IMPORTING
job_was_released = released
else.
EXIT.
ENDIF.
ENDDO.
calling program :
REPORT YTEST_RRR .
data itab1 like but000 occurs 0 with header line.
data l type i.
import itab1 from memory id 'ABC' .
describe table itab1 lines l.
free memory id 'ABC'.
write:/ 'total records are:', l.
Please give your suggestion why its going for dump in the second iteration.
thanks in advance. -
How to pass internal table values to parameter
hi,
how to pass internal table values to parameter in selection screen.if is it possible means please sent codeings.
thanks.
stalin.hi,
tables : mara.
data : begin of itab_mara occurs 0,
matnr like mara-matnr,
ernam like mara-ernam,
end of itab_mara.
selection-screen : begin of block blk1 with frame title text-001.
parameters : p_matnr like mara-matnr.
selection-screen : end of block blk1.
select matnr ernam from mara into corresponding fields of itab_mara
where matnr = p_matnr.
loop at itab_mara.
write :/ itab_mara-matnr,
itab_mara-ernam.
endloop.
<b><REMOVED BY MODERATOR></b>
Message was edited by:
Alvaro Tejada Galindo -
Passing an Internal table to the Smartform
Hi Experts,
I have build an internal table in the driver program with some (20 fields) now I need to pass the same internal table to Smartform as importing parameter or Tables Parameter so that I can use the table data for my further processing.
I have searched the forums and its look like I can't pass an Internal table to the smartform unless and until it is defined in the DDIC with the table types.
FYI...
I can't create the DDIC table type as it needs lot of approvals to get it created.
Please help me on how to proceed further.
Thanks in advance.
Regards,
SrinivasI can't create the DDIC table type as it needs lot of approvals to get it created.
It's a shame you need approval for this.
Anyway can you overcome this with field symbols:
- type parameter in Smartform FM with TYPE STANDARD TABLE (or INDEX/SORTED/HASHED - depending which one you use)
- pass your locally typed table
- in SF create the same data type
- declare field symbol with this type
- assign the table from the parameter to this field symbol - this way you can work with the table via field symbol as it would be of the table type
"in SF
TYPES: tt_my_type TYPE TABLE OF my_type..
FIELD-SYMBOLS <tab> TYPE tt_my_type .
"itab is parameter table
ASSIGN itab TO <tab>.
"now you can even address its components
<wa_tab>-field1 = ...
Although FM parameters in general should be typed with DDIC types only, this way you can cheat the system a little bit;)
Regards
Marcin
Maybe you are looking for
-
ROS Email to vendor not created
Hello experts, We are facing some issue while configuring ROS. We are using SRM 5.0. We are using two client strategy one for EBP and another for SUS. We are configuring ROS on the SUS client. We are able to launch the self registration link and the
-
In my application I need to capture a set of data for every day for as many days as needed, based on information already entered. In other words I do not know how many days I need to capture data for until runtime. I need to be able to dynamically re
-
I think i faced a great problem please help me immediately
when i update my iPAD mini with i'tunes there shows an error code 3014 for update. how i solve it????????
-
Hi all, i dont know why the sql statement insert it works. insert into table A but when i select from all_tab_cols i cant find this table . is that another way i can find this table under which owner ? tks.
-
OR mapping one-to-many with the movie EJB application
Hi, I have downloaded from Orion the Movie EJB application with OR mapping one-to-many. When I ran it, it's fine. But I have spurious messages on my OC4J LOG: Oracle9iAS (9.0.2.0.0) Containers for J2EE initialized java.lang.Exception at MovieHome_Ent