03-24-2006 1:37 PM
Hello,
i want to assign a unstructured string to a dynamic generated structure, sp that i have acsess to the specific fields. How to do that?
Best regards,
TomSd
03-24-2006 2:04 PM
Hi Thomas,
You can use Field Symbols for that purpose.
Use the following syntax:
ASSIGN unstructured string TO <fs_table> CASTING TYPE (INT_TBL_NAME).
Where <fs_table> can be declared as follows:
FIELD-SYMBOLS: <fs_table> TYPE ANY.
And INT_TBL_NAME is a variable that holds the name of the dynamic structure.
Regards,
Urmila
03-24-2006 2:17 PM
03-24-2006 3:03 PM
Hi,
the (INT_TBL_NAME) is generated dynamic by the method CL_ALV_TABLE_CREATE=>CREATE_DYNAMIC_TABLE. there i get a table RESULTDATA but i can't use this here.
after that i do following:
So RESULTDATA now points to our dynamic internal table.
ASSIGN RESULTDATA->* TO <FS_RESULTDATA_TABLE>.
Next step is to create a work area for our dynamic internal table.
CREATE DATA RESULTDATA_LINE LIKE LINE OF <FS_RESULTDATA_TABLE>.
A field-symbol to access that work area
ASSIGN RESULTDATA_LINE->* TO <FS_RESULTDATA_LINE>.
Best regards,
Thomas Strehle
03-24-2006 4:05 PM
Thomas,
ASSIGN LS_RESULTDATA-DATA TO <FS_RESULTDATA_LINE>
Looking at it closely, you are already assigning a specific column of LS_RESULTDATA to the field synbol. So, the field symbols will point only a column of the work area. Why would DATA column again other columns like BASE_UOM?
Regards,
Ravi