‎2007 Nov 29 1:32 AM
Hi Guys,
What is the difference between the following statements? In what scenarios should we use these?
a. CREATE DATA data_ref LIKE LINE OF xth_data.
ASSIGN data_ref->* TO <ls_data>.
b. LOOP AT xth_data ASSIGNING <ls_data>.
c. LOOP AT xth_data INTO <ls_data>.
Regards
‎2007 Nov 29 1:45 AM
‎2007 Nov 29 2:57 AM
Hello Maha,
Thanks for the documents. One of the document (Cyanard's BPS programming document) was informative to some extent.Still, nothing was mentioned about the differences between the 3 statements I mentioned about. Are there any How-To guides or links that can explain these concepts properly.
Thank You.
‎2007 Nov 29 3:22 AM
a. You are creating a variable data_ref which is a workarea of the type xth_data
and assigning that structure type to the field symbol <ls_data>
b. the field Symbol <ls_data> does not need to be assigned to any datatype
It will get assigned to the structure of xth_data
c. It is assumed that your field-symbol <ls_data> has already been assigned to the xth_data type
this code simply loops into the table
note that if your field symbol is not assigned as yet, it will result in a GETWA_NOT_ASSIGNED short dump