2016 Feb 09 6:10 AM
Hi Sap Gurus,
I have one query hope you people give the path. I created a internal table dynamically using parameter passed value like ( kna1 )
CALL METHOD CL_ALV_TABLE_CREATE=>CREATE_DYNAMIC_TABLE
EXPORTING
IT_FIELDCATALOG = IT_FIELDCAT
IMPORTING
EP_TABLE = NEW_TABLE.
ASSIGN NEW_TABLE->* TO <L_TABLE>.
CREATE DATA NEW_LINE LIKE LINE OF <L_TABLE>.
ASSIGN NEW_LINE->* TO <L_LINE>.
Every thing is fine But the confusion is i want to read fieldsymbol's ( <l_table> ) fieldname. Is it Possible???
Thanks in Advance.
2016 Feb 09 7:29 AM
Try an COMPONENT fieldname OF STRUCTURE <L_LINE>, look at the sample code in this documentation document.
(Also don't hesitate to use search help or google site:help.sap.com)
Regards,
Raymond
2016 Feb 09 7:18 AM
USE THIS CLASS: CL_ABAP_DATADESCR
METHOD : DESCRIBE_BY_DATA OR DESCRIBE_BY_DATA_REF
U WILL GET FIELDS OF THAT TABLE STRUCTURE.
2016 Feb 09 7:41 AM
i will get structure in other way but want to move some data to field-symbol which have exact field name.
2016 Feb 09 7:28 AM
2016 Feb 09 7:29 AM
Try an COMPONENT fieldname OF STRUCTURE <L_LINE>, look at the sample code in this documentation document.
(Also don't hesitate to use search help or google site:help.sap.com)
Regards,
Raymond
2016 Feb 09 7:38 AM
Hi Srinivas ,
Try something like this :
DATA: field_key TYPE char100.
field_key = 'KUNNR'.
READ TABLE <L_TABLE> ASSIGNING <L_LINE> WITH KEY (field_key) = '0000123456'.
Regards
Yogendra Bhaskar
2016 Feb 09 7:43 AM
Thank you so much for replay to all.I want to move data to field-symbol from work area for this i want to access field names which are in field-symbol because of move proper data to field-symbol.
2016 Feb 09 7:49 AM
If both your table and work area share the same fields' name, move-corresponding still works
2016 Feb 09 8:06 AM
I am Moving data to field-symbol from excel file. Excel file have value based on row and col but field-symbol have actual fields so my move corresponding not works.
2016 Feb 09 8:08 AM
Then both Raymond and Elzkie already gave you all the hints/info you need to complete