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 |
What are the attributes of the data? : abap data dictionary
difference between application, presentation servers in sap and servers or layers both are same or not
What are dml commands in abap?
Wh bapi u have used in rfc?
What are the buffering types?
What is updated Function Module.
i have ztable for that i had created screen in that screen i had designed tablecontrol and save button calling ztable fields thorugh tablecontrol i have to insert the data in ztable if i press save button the data which i had enter in table control that should b save in ztable can any one send me the code for this for this. example is sm30 there we can directly insert the values directly in a single shot right?. urgent
what is meant stacked list?
What should be the approach for writing a bdc program? : abap bdc
What happens AT SELECTION SCREEN events?
How to write long-text in SAP scripts? EX: I want to write text like below: * Terms and Conditions: 1>.... 2>.... 3>....
What is the use of AT Selection Screen output when we have At selection screen?Can u explain?