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 |
In SE11 we created two database tables say some 1000 fields each.Now f we want both the tables combined into one table, how do we do that?
Reuse-ALV-grid control?
What is the difference between sy-tabix and sy-index? Where it is used?
Explain what are the different functions used in sap script? What are the parameters used in each function?
What does hide statement do?
What is the BAPI_CUSTMATINFO_GETDETAILM used for? what is the input and output of this bapi.
the sap standard SAPSCRIPT for picking a list ?
What do you do when the system crashes in the middle of batch session?
Why is pretty printer user in abap?
what is the main difference between headerline and workarea??
What is value table? : abap data dictionary
what is sales order confirmation and how can do design it in webdynpro. what is Tcode for the same?