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 are the attributes of a field that can be activated or deactivated during runtime?
Can a constructor be redefined?
What is the use of 'for all entries'?
How to call transaction in session method without recording?
What is direct input method ?
Does sap handle multiple currencies?
How do you set up background jobs in sap? What are the steps?
How many types of views are there ?
what next in SAP-ABAP/4 is it going to be change?
Advantages and disadvantages of different types of bdc's?
Power is interrupted while transferring data from internal table to application server. How will you determine many records are transferred in session method and call transaction method? : abap bdc
What are the types of indexes in abap?
What does the insert statement in extract datasets do? : abap modularization
When a function module is activated syntax checking is performed automatically. State yes or no. : abap modularization
What are Pull and Push Methods?