Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Create variables dynamically

Former Member
0 Likes
619

Hi friends! I'm need to create an variable for ech line of internal table to build xml file, but i have a problem. How can I create variables dynamically in abap?

Thanks for any help!!

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
582

Be more specific with your problem.

I don't think you need to create variables, but just assign the fields in the table to a field-symbols to achieve what you want.

4 REPLIES 4
Read only

Former Member
0 Likes
583

Be more specific with your problem.

I don't think you need to create variables, but just assign the fields in the table to a field-symbols to achieve what you want.

Read only

Former Member
0 Likes
582

You can achive this by using field-symbols.

There will be no need to create variables for each line of internal table.

Search SDN for the use of same.

Read only

kesavadas_thekkillath
Active Contributor
0 Likes
582

Please explain the scenario correctly.

what about moving the internal table line to a string.

Read only

Former Member
0 Likes
582

Thanks for reply...I made a mistake. I tought would need this, but only one variable for each tag works 'cause every XML element is created in a base document.

The code I'm used:

LOOP AT xml_item_tab INTO wa_xml_item_tab.

*Numero item

CLEAR value.

TRANSLATE wa_xml_item_tab-nitem USING '0 '.

value = wa_xml_item_tab-nitem.

CONDENSE value NO-GAPS.

g_rc = i_det->set_attribute(

name = 'nItem'

value = value ).

Edited by: Fulvio Valente on Dec 17, 2009 6:56 PM