Dynamic Tables Problem
Hi,
I have this code:
FIELD-SYMBOLS: <ltable> TYPE ANY TABLE,
<ltable1> TYPE ANY TABLE,
<l_line> TYPE ANY,
<l_field> TYPE ANY.
And I fill the <ltable> with dynamically data and I want to assign this data to a Z structure that's a return table of my function.
If I try to do this code below, this doesnt work fine but when I enter in the loop, this appends all fields concatenated in the first field.
DATA: BEGIN OF t_mystructure.
include STRUCTURE Z_MYSTRUCTURE.
data end of t_mystructure.
loop at <ltable> into t_mystructure.
move <ltable>-field to t_mystructure-field.
append t_mystructure.
endloop.
Z_MYSTRUCTURE have:
Field1 type char50
Field2 type char50
Field3 type char50
How can I do to transfer the data of <table> moving corresponding fields to my structure?
Thanks,
loop at <ltable> assigning <l_line>.
move-corresponding <l_line> to t_mystructure .
append t_mystructure .
endloop .
Regards
Raja
Similar Messages
-
Hi,
I am working with Interactive Form in (Webdynpro Java). In that form i am having Dynamic table. For that Table datas are comes from Bapi.
In that table i have ADD button to add a row. If i add a row and enter datas in that row means were it should be stored?
How can i send those added datas to Bapi? There is any possible way in SP12?
Please let me know if any way is there?
Thanks,
Senthil prabhuIn the first case Every time the arraList object was initialized when you changed it to request scope. I hope you got it.
-
Problem with Dynamic Table Name
Hello all,
I am having trouble using a dynamic table name. I have the following code.....
declare l_cur sys_refcursor;
l_ID int;
l_tableName varchar(30);
BEGIN
open l_cur for
select hkc.ColumnID, mapping from &HKAPPDB_Schema_Name..doctablemapping ddm
inner join &HKDB_Schema_Name..HKColumns hkc on hkc.doctablemappingid = ddm.id
where ddm.id > 0;
LOOP
FETCH l_cur into l_ID, l_tableName;
EXIT WHEN l_cur%notfound;
-- update missing VerbID in DocumentDocMapping table
UPDATE &HKAPPDB_Schema_Name..IndexedDocument
SET VerbID = (SELECT t.VerbID
FROM (SELECT DocRef, VerbID, DateUpdated
FROM &HKAPPDB_Schema_Name..l_tableName dd - this is where the dynamic table name is used
WHERE dd.VerbID is not NULL))
WHERE HKColumnID = l_ID AND VerbID is NULL;
END loop;
end;
/When I try to execute this i get an error
ORA-00942: table or view does not exist
What am I doing wrong?
Regards,
Tobyredeye wrote:
I only started about 6 weeks ago, with no tutorials and learning it on the fly; Same here.. only my introduction was to a 12 node Oracle OPS cluster all those years ago.. and required a whole new mind set after using SQL-Server extensively. But it was fun. Still is. :-)
but thats what you get when a company throws you in at the deep end with a ridiculous time constraint to migrate a whole MSSQL DB.Migrating SQL-Server to Oracle is not a simple thing. A lot of best practices in SQL-Server are absolutely worse practices in Oracle - they are that different. Simple example is lock escalation - an issue in SQL-Server. In Oracle, the concept of a lock being escalated into a page lock simply does not exist.
In terms of getting the migration done as quickly and painlessly as possible I try to reuse all the logic as it appears in the MSSQL code - in this case it was using dynamic table names. I do not doubt that i am probably shooting myself in the foot in the long run.....As long as you do not splatter too much blood on us here.. not a problem :D
Seriously though - just keep in mind that what works in SQL-Server may not work as well (or even at all) in Oracle. So do not hesitate to refactor (from design to code to SQL) mercilessly when you think it is warranted. -
Dynamic internal table problem in FM - HR_INFOTYPE_OPERATIONS
Dear All,
I have a problem when I use a Dynamic internal table in FM - HR_INFOTYPE_OPERTATION..
Please suggest me on the way to overcome this problem..
We wanted to have a dynamic Program for Info type operations which can be used for any info types as we are changing only BEGDA and the related actions
So in my program I have the parameters to accept
P_BEGDA - 01.10.2007
P_INFTY - P0008
P_ACTIO - COPY
I am able to create a dynamic table based on the parameters P_INFTY and able to read it also using the FM - HR_READ_INFOTYPE
BUT when I pass the dynamic internal table to a FM - HR_INFOTYPE_OPERTATION I am getting a DUMP
The DUMP is at the below statement from FM - HR_INFOTYPE_OPERTATION
ASSIGN record TO <record> CASTING TYPE (tabname). "XDP UniCode
It gives the below possiblities
"ASSIGN_BASE_TOO_SHORT" C
"SAPLHRMM" or "LHRMMU03"
"HR_INFOTYPE_OPERATION"
But If I use the below internal table
Data : g_t_0008 like P0008 occurs 0 with header line.
And If I use the internal table g_t_0008 instead of dynamic tables then it works. So I strongly feel it's due to not having a header in the dynamic table below see below the sample code on how I am generating a dynamic internal table
field-symbols: <dyn_table> type standard table.
data: dy_table type ref to data,
dy_line type ref to data,
xfc type lvc_s_fcat,
ifc type lvc_t_fcat.
to get the srurcute
perform get_structure using l_f_table.
perform create_dynamic_itab .
assign dy_table->* to <dyn_table>.
perform get_data tables <dyn_table01>
using pernr-pernr p_infty.
below are the forms routine .
form get_structure using p_table.
data : idetails type abap_compdescr_tab,
xdetails type abap_compdescr.
data : ref_table_des type ref to cl_abap_structdescr.
clear : ifc[], dy_table.
Get the structure of the table.
ref_table_des ?=
cl_abap_typedescr=>describe_by_name( p_table ).
idetails[] = ref_table_des->components[].
loop at idetails into xdetails.
clear xfc.
xfc-fieldname = xdetails-name .
xfc-datatype = xdetails-type_kind.
xfc-inttype = xdetails-type_kind.
xfc-intlen = xdetails-length.
xfc-decimals = xdetails-decimals.
append xfc to ifc.
endloop.
endform.
form create_dynamic_itab.
Create dynamic internal table and assign to FS
call method cl_alv_table_create=>create_dynamic_table
exporting
it_fieldcatalog = ifc
importing
ep_table = dy_table.
endform.
*& Form get_data
form get_data tables p_table
using p_pernr
p_infty.
clear : p_table, p_table[].
CALL FUNCTION 'HR_READ_INFOTYPE'
EXPORTING
PERNR = P_PERNR
INFTY = p_infty
BEGDA = p_datum
ENDDA = p_datum
TABLES
INFTY_TAB = p_table
EXCEPTIONS
INFTY_NOT_FOUND = 1
OTHERS = 2.
CHECK SY-SUBRC EQ 0.
IF lines( p_table ) GT 0.
*write :/'Record exist' , 'IT', p_infty.
clear p_table.
PERFORM hr_operation tables p_table
using g_t_t588d-actio g_t_t588d-INFTY
g_t_t588d-SUBTY.
else.
PERFORM append_status using g_t_itab-pernr p_infty ' '
'Error' 'No records'.
ENDIF.
endform. " get_data
form hr_operation tables p_table
using p_actio P_INFTY P_SUBTY.
data: l_f_return LIKE bapireturn1.
ASSIGN COMPONENT 'BEGDA' OF STRUCTURE p_table TO <l_field>.
<l_field> = p_begda.
CALL FUNCTION 'HR_INFOTYPE_OPERATION'
EXPORTING
infty = P_infty
number = G_T_ITAB-PERNR
subtype = P_subty
validityend = g_f_endda
validitybegin = P_datum
record = P_TABLE
operation = p_actio
IMPORTING
return = l_f_return.
IF sy-subrc NE 0.
ENDIF.
ENDFORM.try
using field symbol for a wrk area instead of Field symbol for a table
loop your inernal table (again a field symbol) assigning to <fs_wrkarea>
in loop call HR_INFO.._OP..
reward if helpful -
Dynamic tables on one page - overflow problem with repeating header/footer
Hi,
with the help of the user RADZMAR I was able to create dynamic tables..
But now, I have got the next problem.
2 different tables are placed on 1 page.Each of them should be dynamic.
Please let me list what is working, and what not:
each textfield should be expandable (-> working)
Table 01 should be overflowing to page 02 (-> working)
Table 02 should be overflowing to page 02 (->working)
Table 02 should be scrolling to page 02 if tabele 01 is growing (->working)
Table 01 and Table 02 should be splittable (->working)
header 02 + the footer 02 ( from table 02) should be repeated on every page (->working)
header 02 + the footer 02 ( from table 02) should not be stand alone, indepentenly on which page (-> NOT WORKING)
In other words:
How can I reach, that the header and the footer enclose at least ONE textfield-row ?
The setting "keep with previous / following" did not helped me.
If the text in table 02 is large, the settings "keep with..." cause some layout destructions.
This is the screenshot of the problem:
Here you can download my doc:
https://acrobat.com/#d=V*HZAV8VILZarp6gF0B3nw
Thanks and Greetings
NuriYour question was "... but the font on the footer is much larger than that of the template", yes?
I only can repeat, look at the difference of:
1. index.html (Font-size > medium) >
2. Calendar.html (Font-size > no entry):
> "... font on the footer is much larger than that of the template",
Hans-Günter
P.S.
See us again - maybe - at Monday > we will do a nice little trip to Austria. -
Problem with editable combo box and creating dynamic table values using js
Hai
I have used jquery.jec.js to make my dropdown list as editable... I need to create dynamic table values on the onChange event of dropdown using javascript.
Now am facing the problem in it...
I am getting duplicate rows in the table... think(assumption) this jquery.jec.js is calling the dropdown again creating duplicate values...
Please help me out.... Any help is appreciable... Thanks in advanceThanks elOpalo, for your valuable response....
I have found the correct way of doing.
Before i had my code like this,
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>test</title>
<script type="text/javascript" src="js/jquery-latest.js"></script>
<script type="text/javascript" src="js/jquery.jec.js"></script>
<script type="text/javascript">
$(function(){
$('#list').jec();
function giveAlert(){
alert('hello');
</script>
</head>
<body>
<form>
Combo Box:
<select id="list" name="list" onChange="giveAlert();">
<option value="1">one</option>
<option value="2">two</option>
</select>
</form>
</body>
</html>
Now i have changed as the following,
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>test</title>
<script type="text/javascript" src="js/jquery-latest.js"></script>
<script type="text/javascript" src="js/jquery.jec.js"></script>
<script type="text/javascript">
$(function(){
$('select.combo').jec();
$('select.combo')
.change(function() {
alert($(this).val());
}).change();
</script>
</head>
<body>
<form>
<table>
<tr>
<td>Combo Box:</td>
<td><select class="combo"><option value="b">banana</option><option value="a">apple</option></select></td>
</tr>
</table>
</form>
</body>
</html>
The problem is with the function i have called on the onChange Event.. Now i have defined it inside the jquery function of dropdown to make it as editable... -
Problem setting the fillColor on dynamic tables using javascript
I try to set the background color on some text fields that I put in a dynamic table. When I set the border color, everything works fine, but not with the fillColor. If I set the fillColor for the enter event for example, the field will only get a colored border, and when I click another field, the field turns completely colored. If I set an exit event with a different color, the field flickers before changing back to white. This happens in dynamic tables only. I am using Designer 8 on Windows XP. This problem has been confirmed by others, and in different forms.
this.border.fill.color.value = "value" works for me
value is in 255,255,255 rgb format -
CREATE DYNAMIC TABLE ERROR (CACHE PROBLEM ?)
Hi,
i have to create dynamic table. The Report is running. But i get Problem by next Programstart. It's showing the Message : This Table is ready exist! Can anyone help me?
Thanks!
CLEAR gt_fieldcatalog.
CLEAR gz_tab.
lv_index = 1.
gs_fieldcatalog-tabname = 'test'.
gs_fieldcatalog-fieldname = 'field_0'.
gs_fieldcatalog-reptext = 'field_0'.
gs_fieldcatalog-col_pos = lv_index.
gs_fieldcatalog-outputlen = 10.
APPEND gs_fieldcatalog TO gt_fieldcatalog.
lv_index = 2.
gs_fieldcatalog-tabname = 'test'.
gs_fieldcatalog-fieldname = 'TEXT'.
gs_fieldcatalog-reptext = 'TEXT'.
gs_fieldcatalog-col_pos = lv_index.
gs_fieldcatalog-outputlen = 50.
APPEND gs_fieldcatalog TO gt_fieldcatalog.
Do 10 times.
lv_index = lv_index + 1.
CONCATENATE field '_' lv_index INTO lv_fieldname.
gs_fieldcatalog-tabname = 'TEST'.
gs_fieldcatalog-fieldname = lv_fieldname.
gs_fieldcatalog-reptext = lv_fieldname.
gs_fieldcatalog-col_pos = lv_index.
gs_fieldcatalog-outputlen = 10.
APPEND gs_fieldcatalog TO gt_fieldcatalog.
CLEAR lv_fieldname.
ENDDO.
"Converting the Fieldcatalog for ALV Grid showing
LOOP AT gt_fieldcatalog INTO gs_fieldcatalog.
ls_fcat-col_pos = gs_fieldcatalog-col_pos.
ls_fcat-fieldname = gs_fieldcatalog-fieldname.
ls_fcat-seltext_l = gs_fieldcatalog-reptext.
ls_fcat-tabname = gs_fieldcatalog-tabname.
ls_fcat-datatype = gs_fieldcatalog-datatype.
ls_fcat-outputlen = gs_fieldcatalog-outputlen.
APPEND ls_fcat TO lt_fcat.
ENDLOOP.
" Creating internal Table
CALL METHOD cl_alv_table_create=>create_dynamic_table
EXPORTING
it_fieldcatalog = gt_fieldcatalog
IMPORTING
ep_table = gz_tab
EXCEPTIONS
generate_subpool_dir_full = 1
OTHERS = 2.
ASSIGN gz_tab->* TO <ft_tab>.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = ls_variant-report
it_fieldcat = lt_fcat
i_grid_title = 'Test'
is_layout = alv_layout
i_save = 'A'
is_variant = gx_variant
TABLES
t_outtab = <ft_tab>
EXCEPTIONS
program_error = 1
OTHERS = 2.
CLEAR <ft_tab>.
UNASSIGN <ft_tab>.
CLEAR lt_fcat.
Edited by: Hoang Lam Vu on Aug 25, 2008 11:18 AMHi Maroz,
I know this is not best practise to post my question in some others, but i have posted it separately earlier
Dynamic ITAB from Excel
I have created a dynamic ITAB from 1 Row of Excel Sheet
LOOP AT ist_excel INTO w_excel WHERE row = 2. " Contains the Values provided in 2nd row of Excel
APPEND w_excel TO row1.
ENDLOOP.
LOOP AT ist_excel INTO w_excel WHERE row = 3. " Contains the Values provided in 3rd row of Excel
APPEND w_excel TO row2.
ENDLOOP.
LOOP AT ist_excel INTO w_excel WHERE row = 4." Contains the Values provided in 4th row of Excel Etc
APPEND w_excel TO row3.
ENDLOOP.
LOOP AT row1 INTO w_excel.
CLEAR wa_it_fldcat.
wa_it_fldcat-fieldname = w_excel-value .
wa_it_fldcat-datatype = 'C'.
wa_it_fldcat-inttype = wa_details-type_kind.
wa_it_fldcat-intlen = 40.
* wa_it_fldcat-decimals = wa_details-decimals.
APPEND wa_it_fldcat TO it_fldcat .
ENDLOOP.
* Create dynamic internal table and assign to FS
CALL METHOD cl_alv_table_create=>create_dynamic_table
EXPORTING
it_fieldcatalog = it_fldcat
IMPORTING
ep_table = new_table.
ASSIGN new_table->* TO <dyn_table>.
* Create dynamic work area and assign to FS
CREATE DATA new_line LIKE LINE OF <dyn_table>.
ASSIGN new_line->* TO <dyn_wa>.
I followed the Link provided by to create a Dynamic ITAB
Please guide me how to pass these Value from excel to Dynamic Internal Table
Warm Regards
Ramchander -
Problem in displaying dynamic table placed in master page
Hi all,
I have placed a dynamic table in my master page. When the page overflows the dynamic table is shown only in 1st page. I want this table to be shown in every page. Please help me solve this.
Regards,
Devaiahhi,
Thank you all for your reply. But i cannot keep the table in body page as i want this table to be displayed in every page in the header. Actually i am displaying an address through this table.
I have moved the content area in master page to center and reduced its size and in the body page i have placed a table which will display the report. When this table overflows to next page all the contents in master page are shown except for the address table in master page. I am not sure whether i am doing it the right way as i am bit new to adobe forms.
Please let me know where am i going wrong. Also please suggest me some alternative method ( if any ) to display the address in every page if the above method is not feasible.
Regards,
Devaiah -
Dynamic Internal Table problem
Hello all,
I have created a Dynamic ALV using RTTS classes like cl_abap_structdescr,cl_abap_tabledescr and cl_abap_datadescr.
The number of columns to be displayed is dynamic and i am able to display the same.
Now i need to perform SUBTOTAL on few of the columns.
In dynamic table how do i assign those columns as Type 'I' so that i can perform DO_SUM.
I used the method GET_I of class cl_abap_elemdescr but unable to achive the same.
Kindly suggest.
Regards,
ArunI know when I need to create a dynamic alv I use the following (plumbing code removed).
DATA: it_field_catalog TYPE lvc_t_fcat.
DATA: dyn_table TYPE REF TO data.
FIELD-SYMBOLS: <dyn_table> TYPE table.
create your alv as normal. Or auto create the entries based on the tables, whatever conditions you use to determine the structure of the table at run time.
ls_fcat-fieldname = '???'.
ls_fcat-inttype = '?' .
ls_fcat-outputlen = '?' .
ls_fcat-coltext = '?' .
ls_fcat-seltext = '?' .
ls_fcat-f4availabl = '?'.
ls_fcat-edit = '?'.
ls_fcat-key = '?'.
APPEND ls_fcat TO it_field_catalog .
CALL METHOD cl_alv_table_create=>create_dynamic_table
EXPORTING it_fieldcatalog = it_field_catalog
IMPORTING ep_table = dyn_table
EXCEPTIONS
generate_subpool_dir_full = 1.
ASSIGN dyn_table->* TO <dyn_table>.
This field symbol to the table can then be passed in place of the table when calling your alv and performing operations on it. -
Dynamic table with header locked and vertical scrollbar problem.
Hi,
I have created a dynamic table with header locked.The sample code is as below.
<div style="width:910px ; overflow-x : scroll">
<h:panelgrid ...for header populated by binding to pagecode/>
<div style="width:910px ; height:200px ; overflow-y : scroll">
<h:panelgrid ...for data populated by binding to pagecode/>
</div>
</div>
The above piece of code serves the purpose.
There is an overflow in both x as well as y directions and scrollbars appear.But the y scrollbar can be seen only when the x-scrollbar is moved to the extreme right.
Does anyone have a solution so that both the scrollbars can be seen as soon as the table loads without the need to move x to the extreme right to see y?wa_layout-grid_title = text-039.
wa_layout-sel_mode = 'A'.
APPEND wa_layout TO gs_layout.
wa_layout-grid_title = text-039.
wa_layout-sel_mode = 'A'.
APPEND wa_layout TO gs_layout.
wa_layout-grid_title = text-039.
wa_layout-sel_mode = 'A'.
APPEND wa_layout TO gs_layout.
CALL METHOD gr_alvgrid1->set_table_for_first_display
EXPORTING
is_layout = gs_layout
CHANGING
it_fieldcatalog = it_fieldcatalog1[]
it_outtab = <l_table>.
i am using like but its not accepting more than one line header in is_layout, is there any possibility to take like this.
Regards,
Mallikarjuna. -
Problem during Download of Dynamic Table Data
Hello All,
I have data in a dynamic internal table.
When I'm trying to download the content onto my Presentation Server and Application Server, the data corresponding to the CURRENCY and QUANTITY fields are getting ROUNDED to the nearest whole number value.
How to resolve this issue ?
Any clues ?
Regards,
Deepu.KHello Gautham,
Thanks for ur reply.
But I debugged the code of BUILDING a Dynamic Internal Table and I could find that while building the Dynamic Internal Table SAP Is checking the field attributes from the fieldcatalog.
The Method I debugged is :
* Create Dynamic Table
call method cl_alv_table_create=>create_dynamic_table
exporting
it_fieldcatalog = gt_dyn_fcat[]
importing
ep_table = dy_table.
assign dy_table->* to <dyn_table>.
So for my requirement I passed the REFERENCE FIELDNAMES and REF. TABLENAMES for the corresponding fields in the fieldcatalog and so I could resolve the issue.
Regards,
Deepu.K -
Problem using DELETE ADJACENT DUPLICATES with dynamic table
Hello All,
In my program i have to delete duplicate records from dynamic table.
I tried using DELETE ADJACENT DUPLICATES FROM <DYN_TABLE> COMPARING <fieldname1> <fieldname2> but it fails in syntax check, then i tried like below:
DATA string type string.
string = '<fieldname1> <fieldname2>.........'.
DELETE ADJACENT DUPLICATES FROM <DYN_TABLE> COMPARING (string).
It also got failed at runtime.
Please suggest how can i achieve this....
Regards
Munish GargHi,
this code is worked truly.
You can try this.
Regards.
DATA itab LIKE STANDARD TABLE OF mard.
SELECT * FROM mard INTO TABLE itab UP TO 100 ROWS.
* You define max number of the field that you need
data : cmp01 TYPE string,
cmp02 TYPE string,
cmp03 TYPE string,
cmp04 TYPE string,
cmp05 TYPE string.
* You fill the fields that you need, others is clear.
cmp01 = 'MATNR'.
cmp02 = 'WERKS'.
CLEAR : cmp03,cmp04,cmp05.
SORT itab BY (cmp01) (cmp02) (cmp03) (cmp04) (cmp05).
DELETE ADJACENT DUPLICATES FROM itab COMPARING (cmp01) (cmp02) (cmp03)
(cmp04) (cmp05). -
Error while insert data using execute immediate in dynamic table in oracle
Error while insert data using execute immediate in dynamic table created in oracle 11g .
first the dynamic nested table (op_sample) was created using the executed immediate...
object is
CREATE OR REPLACE TYPE ASI.sub_mark AS OBJECT (
mark1 number,
mark2 number
t_sub_mark is a class of type sub_mark
CREATE OR REPLACE TYPE ASI.t_sub_mark is table of sub_mark;
create table sam1(id number,name varchar2(30));
nested table is created below:
begin
EXECUTE IMMEDIATE ' create table '||op_sample||'
(id number,name varchar2(30),subject_obj t_sub_mark) nested table subject_obj store as nest_tab return as value';
end;
now data from sam1 table and object (subject_obj) are inserted into the dynamic table
declare
subject_obj t_sub_mark;
begin
subject_obj:= t_sub_mark();
EXECUTE IMMEDIATE 'insert into op_sample (select id,name,subject_obj from sam1) ';
end;
and got the below error:
ORA-00904: "SUBJECT_OBJ": invalid identifier
ORA-06512: at line 7
then when we tried to insert the data into the dynam_table with the subject_marks object as null,we received the following error..
execute immediate 'insert into '||dynam_table ||'
(SELECT887684 wrote:
ORA-00904: "SUBJECT_OBJ": invalid identifier
ORA-06512: at line 7The problem is that your variable subject_obj is not in scope inside the dynamic SQL you are building. The SQL engine does not know your PL/SQL variable, so it tries to find a column named SUBJECT_OBJ in your SAM1 table.
If you need to use dynamic SQL for this, then you must bind the variable. Something like this:
EXECUTE IMMEDIATE 'insert into op_sample (select id,name,:bind_subject_obj from sam1) ' USING subject_obj;Alternatively you might figure out to use static SQL rather than dynamic SQL (if possible for your project.) In static SQL the PL/SQL engine binds the variables for you automatically. -
HR Logical database PNP. OO to fill table dynamic table from PNP ?
Hi all
I want to get some stuff from the HR logical database into a dynamic table
Here's a real simple example that writes info out to a normal list.
(report is based on using Logical DB PNP)
tables: pernr.
INFOTYPES: 0001, "Organizational Assignment
0002. "Personal Data
SELECT-OPTIONS: language FOR p0002-sprsl.
INITIALIZATION.
pnptimed = 'D'.
GET pernr.
PROVIDE * FROM p0002 BETWEEN pn-begda AND pn-endda.
CHECK language.
WRITE: / p0002-pernr,
sy-vline,
p0001-ename,
sy-vline,
p0002-sprsl,
sy-vline,
p0002-gbdat.
ENDPROVIDE.
endform.
Now what I want to do is replace the write stuff by appending the entries into a dynamic table which I will display as an ALV Grid.
so I add my structure in the data declarations
types: begin of s_elements,
pernr type p0002-pernr,
ename type p0001-ename,
sprsl type p0002-sprsl,
gbdat type p0002-gbdat.
drop_down_handle type int4.
types: end of s_elements.
include zz_jimbo_incl.
build the dynamic table
create data dref type s_elements.
assign dref->* to <fs>.
i_routine = 'POPULATE_DYNAMIC_ITAB'.*
i_names = 'NAME_COLUMNS'.
i_gridtitle = 'HR TEST'.
invoker = sy-repid.
i_zebra = 'X '.
i_edit = ' '.
call function 'ZZ_CALL_SCREEN'
exporting
invoker = invoker
my_line = <fs>
i_gridtitle = i_gridtitle
i_edit = i_edit
i_zebra = i_zebra
i_names = i_names
i_routine = i_routine
importing
z_object = z_object
dy_table = dy_table.
Now to populate the dynamic Itab the routine below is entered.
form populate_dynamic_itab changing dy_table.
assign dy_table->* to <dyn_table>.
create data dy_line like line of <dyn_table>.
assign dy_line->* to <dyn_wa>.
However I can't use GET / PROVIDE / ENDPROVIDE in a Form.
Anyway round this ---seems HR has an aversion to OO.
Cheers
jimboHi,
well, GET_PERNR is a so called event_statement. It has nothing to do with ABAP 00.
Normally it will be like this:
START-OF-SELECTION.
GET_PERNR.
PROVIDE ....
END-OF-SELECTION.
-> and here the CALL SCREEN NNNN for ALV-Display.
Provide-statements you can use in forms of course, and as many times you want during GET and END-OF-SELECTION.
But as I understood : you just want to save the write-statements?
I always develop a DDIC-Structure, declarate the data objects in the programm, read the data via Provide into the infotypes, and then make a move-corresponding to my structure. and display it.
Normally no problem.
kind regards
maik
Maybe you are looking for
-
I can't see the library option in the window drop down in photoshop cc
I'm trying to use the new Libraries panel in Photoshop CC (Window > Library) For some reason it it isn't showing in the drop down Any ideas why not
-
Installation Fails :/ yxefkoe does not exist on the 'localhost' host
Hi Guys, I am trying to install NetWeaver 7.0 SR1 including Enhancement Package 1 > SAP Application Server ABAP > MaxDB > Central System > Central System on my pc. But I`m getting following error. The subkey 'HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlS
-
Hi Experts I need to insert values in a oracle database could u please give me the EJB code for it
-
How to creat a Dialer Program in Java
Help me in creating a Dialer program which dials to a specifie ISP.It should work like the Dialer provided in windows.Help!! Can we code such a program in JAVA.If yes, HOW!!!! Abhishek([email protected])
-
Photosmart B8550 - photo printing problems
Has anyone else had the problem of photo printing perfectly on all papers except HP Photo paper? I loose all my black tones when I print on the photo paper, but I bought Kodak paper and it worked.