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.
Answers were Sorted based on User's Feedback
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 |
Answer / prakash rao
built three diffrent filedcatlogs for three diff conditions
and display output.
if cond x.
perform buildcat1.
perform alv display1.
elseif cond y
perform buildcat2.
perform alv display2.
elseif cond z.
perform buildcat3.
perform alv display3.
endif.
Is This Answer Correct ? | 3 Yes | 0 No |
you can bulid three diffrent catlogues for three conditions.
as
if cond x.
perform build_cat1.
perform alv_display1.
elseif cond y.
perform build_cat2.
perform alv_display2.
elseif cond z.
perform build_cat3.
perform alv_display3.
endif.
Is This Answer Correct ? | 0 Yes | 0 No |
Can I write COMMIT and ROLLBACK in user-exit?
WHAT IS LUW? and the difference between SAP LUW and Database LUW in detail.
Explain the differences between sap memory and abap memory?
Explain the different types of screen keywords?
What is the syntax for ‘call transaction’?
2)what will be the size of transparant table
How many types of size categories and data classes are there? : abap data dictionary
What is Diff b/w Basic type and Message type?
What are the different types of data dictionary objects?
BDC Data which format?
In an Internal Table, I have 1000 records. I have to Retrieve One Record. In Performence wise what is the Best Query?
What is open sql?