Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Get the Field Name of a internal table or structure using field symbols .

Hi Experts,

How to find out the field name of a internal table during the run time.

FIELD-SYMBOLS : <wa> TYPE ANY,

<comp> TYPE ANY.

FIELD-SYMBOLS : <wa1> TYPE ANY,

<comp1> TYPE ANY.

ASSIGN gs_old_document TO <wa>.

ASSIGN gs_new_document TO <wa1>.

DO 15 TIMES.

ASSIGN COMPONENT sy-index OF STRUCTURE <wa> TO <comp>.

ASSIGN COMPONENT sy-index OF STRUCTURE <wa1> TO <comp1>.

IF <comp> NE <comp1>.

ls_intellilog-slno = 1.

ls_intellilog-changedon = sy-datum.

ls_intellilog-changedby = sy-uname.

  • ls_intellilog-fldname

ls_intellilog-old_value = <comp>.

ls_intellilog-new_value = <comp1>.

APPEND ls_intellilog TO lt_intellilog.

enddo.

Here i want the field name of the <comp> . can u help to solve the issue.

Thanbks and regards

Renjith MP

Tags:
Former Member
Not what you were looking for? View more on this topic or Ask a question