‎2010 Feb 12 11:11 AM
Hello everyone,
Guys I have some doubts about this:
1- when you say dymanic programming is all about create dynamic tables? , what does it exactly mean ? what for do you need create data object in run time. ??.
2. what does the symbol ->* means , i saw it in a example :
** Assign the dynamic table reference to a field-symbol
ASSIGN dy_line->* TO <dyn_wa>.but is only used for that ?? .
thank very much from someone who really want to understand this stuff.
‎2010 Feb 12 11:25 AM
Hi,
1- When you don't know the table name or structure name unless run time at that time you required dynamic tables.
Ex. Suppose you have one selection screen parameter -->table name, and you want to upload the tables from the any file path..
In this case you don't know the exact table name unless run time.
2. Field Symbols: It is a data type which don't have any existence unless run time or alone. It just pointing to the memory address of any other variables.
3. ASSIGN dy_line->* TO <dyn_wa>.
Here dy_line 's data type is DATA. DATA is any one kind of data type which can store any kind values. Sign ->* means transfer properties of one variable to other variable .
Thanks '
Subhankar
‎2010 Feb 12 11:20 AM
Hi,
Check out the code :
DATA:
linetype TYPE string,
itabref TYPE REF TO data,
lineref TYPE REF TO data.
FIELD-SYMBOLS:
<fs> TYPE STANDARD TABLE,
<fs1> TYPE ANY.
PARAMETER tbl LIKE rsrd1-tbma_val.
linetype = tbl.
CREATE DATA itabref TYPE STANDARD TABLE OF (linetype).
ASSIGN itabref->* TO <fs> .
CREATE DATA lineref LIKE LINE OF <fs>.
ASSIGN lineref->* TO <fs1>.
SELECT * FROM (tbl) INTO <fs1>.
WRITE <fs1>.
ENDSELECT.
SELECT * FROM (tbl) INTO TABLE <fs>.
Cheers,
Remi
‎2010 Feb 12 11:32 AM
ASSIGN dy_line->* TO <dyn_wa>.
The meaning of the above line that you are assigning all the componants of dy_line to field symbol,
like dy_line may be a structre and structre has componants.....!
for eg. ASSIGN dy_line->field1 TO <dyn_wa>. hear...only field one componant of the line type or structre is assigned to teh field symbol...!
and dynamic programming is not always building internal tables runtime in the the example by Remi Kaimal
you had the DDIC ref. of the table entered by the user...but it may not be the case always...for more complex dynamicity you use RTTS ...ie. runtime type services...just search on SDN
‎2010 Feb 12 11:25 AM
Hi,
1- When you don't know the table name or structure name unless run time at that time you required dynamic tables.
Ex. Suppose you have one selection screen parameter -->table name, and you want to upload the tables from the any file path..
In this case you don't know the exact table name unless run time.
2. Field Symbols: It is a data type which don't have any existence unless run time or alone. It just pointing to the memory address of any other variables.
3. ASSIGN dy_line->* TO <dyn_wa>.
Here dy_line 's data type is DATA. DATA is any one kind of data type which can store any kind values. Sign ->* means transfer properties of one variable to other variable .
Thanks '
Subhankar