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 |
Explain the difference between domain and data element?
14) Purpose of the statemement TABLE in a report?
How can you see the errors displayed in IDOC?
What is the typical structure of an ABAP/4 program?
An ABAP program creates a batch input session. We need to submit the program and the batch session in back ground. How to do it?
any 1 having notes on SAP-ABAP certification, or even if any 1 could provide the url for getting notes on SAP-ABAP certification, would be appreciated.
What is meant by hide area?
What is the advantage of structures? How do you use them in the ABAP programs?
How can an internal table with header line and one without header line bedistinguished when passed to a subroutine?
what is diffrence between table control and alv grid in dialog programming in abap.
Can you delete data element, which is being used by table fields. : abap data dictionary
What is the difference between pnp and pnpce? : abap hr