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

Selecting data dynamically

Former Member
0 Likes
487

Hi all,

I have a table ZADDRESS which has fields like MOLGA,FIELD1, FIELD2, FILED3, FIELD4, FIELD5---FIELD8. Based on MOLGA, the values stored in the table would be names of the fields of infotype 6. Say STRAS is sotred in FIELD1, LOCAT in FIELD2. For every different MOLGA i would get different values of the field in the table ZADDRESS. I need to get the data from infotype 6 for only those fields mentioned for that MOLGA in ZADDRESS. Can any one help how this can be done?

Thanks in advance.

Warm regards,

Harshad.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
457

Hi,

You can programatically concatenate the fields you want to be selected into a variable say - lv_select_clause.

Then use that variable in the select clause:

SELECT (lv_select_clause) from ....

Hope this helps,

Wenonah

3 REPLIES 3
Read only

Former Member
0 Likes
458

Hi,

You can programatically concatenate the fields you want to be selected into a variable say - lv_select_clause.

Then use that variable in the select clause:

SELECT (lv_select_clause) from ....

Hope this helps,

Wenonah

Read only

Former Member
0 Likes
457

http://help.sap.com/saphelp_nw04/helpdata/en/66/f9545ed3654bd4b55bf7a5b9953a53/frameset.htm

please go through this link. and search sdn, you will get a lot of wikis and blogs on this

Read only

Former Member
0 Likes
457

solved