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

Fieldnames for structure

Former Member
0 Likes
686

Hello All,

I am downloading some data into xls sheet. In that sheet first row is heading. I have some 140 fields structure to be downloaded. How can I get filednames of fields in structure? I cant hard code it, program has to retrive it dynamically.

regards,

abhijeet mOre

Hello All,

I am downloading some data into xls sheet. In that sheet first row is heading. I have some 140 fields structure to be downloaded. How can I get filednames of fields in structure? I cant hard code it, program has to retrive it dynamically.

regards,

abhijeet mOre

4 REPLIES 4
Read only

RemiKaimal
Active Contributor
0 Likes
649

Hello,

Check the FM : DDIF_FIELDINFO_GET

dfiestab-fieldname_ will have the list of fields.

You will have to loop this table and use your logic.

Cheers,

Remi

Read only

0 Likes
649

Hi Remi,

str is defined in program,

e.g.

TYPES : BEGIN OF t_wa_data,

lifnr TYPE lfa1-lifnr, "Vendor Account Number

bukrs TYPE lfc1-bukrs, "Company Code

ekorg TYPE lfm1-ekorg, "Purchasing Organisation

ktokk TYPE lfa1-ktokk, "Vendor account group

end OF t_wa_data.

in above str I want to get field text for lifnr bukrs, ekorg, ktokk at runtime in some internal table in same sequence, so that if tomorrow a field get added it should get name of that field too into the internal table.

ur FM give output of std str defined in system.

Read only

Former Member
0 Likes
649

Hi,

Check with the following link [Field names for structure|;

Hope this helps you.

Regards,

Rajani

Read only

kesavadas_thekkillath
Active Contributor
0 Likes
649