Based on certain condition how can we show different columns in output of ALV?? For Ex if Condition A is met we need to show 1 5 and 7 column , If condition B is met we need to show 1 2 and 4 and if condition C is met we need to show 1 3 and 6.
Answer Posted / ambareesh.j28
Everything what you asked for lies in the field catalog. Let us assume there are totally 7 fields (A to G) , and 3 conditions (X,Y,Z). So your code should be something like this:
If X, Pass A,C,D fields to field catalog.
elseif Y, Pass B,C,G fields to field catalog.
elseif Z, Pass E,F,G fields to field catalog.
endif.
Use the function modules REUSE_ALV_LIST_DISPLAY / REUSE_ALV_GRID_DISPLAY to execute the output and view it.
Is This Answer Correct ? | 7 Yes | 0 No |
Post New Answer View All Answers
What is a fall back class?
Some Realtime Examples on Exits .
What is the differences between structure and table in the data dictionary in abap?
How will you find manager of an employee
What are the different types of data dictionary objects? : abap data dictionary
Can a filed occur in several field groups? : abap modularization
Which infotype records can not be deleted ? : abap hr
What is a subroutine?
Setting up a BDC program where you find information from?
What are the different types of luws. What are they?
What is a size category?
What are the components of selection table?
what next in SAP-ABAP/4 is it going to be change?
What are the differences between a database index and a match code? : abap data dictionary
In which time constraint does the infotype records depend on the subtype ? : abap hr