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 is the difference between user exit and customer exit? what is ment by cusomer exit?and what is the difference between user exit and badi?
Hi, I am a Trainer in SAP ABAP having 2 years of experience in teaching ABAP and having 5 years of real time work experience in industry. If any body is interested email me your contact details to sap.abap9@gmail.com I will provide online training. Excellent material is provided. If any one is interested for training you can contact me for further details. Free demo is provided before joining the course. Excellent Training for reasonable price. SD and MM Concepts will be teached freely. References will be provided upon request.
What are MENUEXITS, SCREENEXITS, FUNCTIONEXITS, FIELDEXITS and what is the difference between them ?
Can we execute the script individually? If yes How? Else what we need to do so?
What are uses of foreign key?
what is bdc?
How to add segments to IDOC?
What is the difference between check table and check field
what is the T.Code to function module?
What are the different types of sapscript symbols?
Can you call a bdc from a report program ?
explains how to handle the table control in bdc