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

Getting fields from Layout Variant ?

Former Member
0 Likes
988

Hello All,

I have created a Report using ALV OOPS.

This report has a Layout Variant as a SSCRN Parameter.

Say I've 10 fields in my internal table.

The STANDARD Layout Variant has been created with all the 10 fields.

A user-specific layout variant has been created with 3 fields out of 10 fields.

Now I want to know which 3 fields have been used in that layout variant so that I can use that date for further processing .

Regrads,

Deepu.K

.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
891
      CALL METHOD G_GRID->GET_FRONTEND_FIELDCATALOG
        IMPORTING
          ET_FIELDCATALOG = TEMP_FCAT .

Call this method after SET_TABLE_FOR_FIRST_DISPLAY.

4 REPLIES 4
Read only

Former Member
0 Likes
892
      CALL METHOD G_GRID->GET_FRONTEND_FIELDCATALOG
        IMPORTING
          ET_FIELDCATALOG = TEMP_FCAT .

Call this method after SET_TABLE_FOR_FIRST_DISPLAY.

Read only

0 Likes
891

Hello Andrey,

I used this method earlier.

But I'm getting all the fields into the fieldcatalog .(as per my example all 10 fields ).

But I need only those fields which are being displayed as part of the layout variant selected.

I used the FM 'LT_DBDATA_READ_FROM_LTDX' to which I can pass the Layout Variant Name .

But even this FM is returning me all the 10 fields.

Any other clues ?

Regards,

Deepu.K

Read only

0 Likes
891

FM worked correct. You always get 10 fields from there. But if you look at fieldcatalog after FM, you can see that filed NO_OUT on 3 fileds has value 'X'.

Try to loop at fieldcatalog table with NO_OUT IS INITIAL with append lines into new fieldcatalog table.

PS: First method is worked too.

Good luck.

Read only

0 Likes
891

Hello Andrey,

Thanks for ur reply.

Yes, I too checked the same before u replied to me .

Neways full points for ur clarification.

Regards,

Deepu.K