Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Logic for display column on condition

Former Member
0 Likes
417

HI Experts,

I need to make report in which on User input in check boxes the desired colums will display. This report is Customer aging. I have 4 check boxes.

1. 0-60 days

2. 61-90 days.

3. 91-120 days

4. 121-180 days.

User can check any check box wether it is single or 1 & 3 or 2 & 4 or 2 & 3 etc. to see the desired coloum. wHAT WILL BE THE logic and code to display the clicked colums. if it is difficult then u can display all colums but the data shuld b in clicked columns. iTs urgent.

Thanks.

Khan

1 ACCEPTED SOLUTION
Read only

former_member189059
Active Contributor
0 Likes
357

Hello Khan,

I dont know about displaying only those columns, you may have to put different write statements for each possible case

for getting blank values to be displayed in unchecked columns, you can use this

(since i dont know your field names, i have given my own names)


if p_sixty = ''.
 loop at itab.
	itab-sixty = ''.
	modify itab.
 endloop.
endif.

if p_ninety = ''.
 loop at itab.
	itab-ninety = ''.
	modify itab.
 endloop.
endif.

if p_onety = ''.
 loop at itab.
	itab-onety = ''.
	modify itab.
 endloop.
endif.

if p_oneey = ''.
 loop at itab.
	itab-oneey = ''.
	modify itab.
 endloop.
endif.

loop at itab.
 write:/ itab-sixty , itab-ninety, itab-onety, itab-oneey.
endloop.

HI Experts,

I need to make report in which on User input in check boxes the desired colums will display. This report is Customer aging. I have 4 check boxes.

1. 0-60 days

2. 61-90 days.

3. 91-120 days

4. 121-180 days.

User can check any check box wether it is single or 1 & 3 or 2 & 4 or 2 & 3 etc. to see the desired coloum. wHAT WILL BE THE logic and code to display the clicked colums. if it is difficult then u can display all colums but the data shuld b in clicked columns. iTs urgent.

Thanks.

Khan

1 REPLY 1
Read only

former_member189059
Active Contributor
0 Likes
358

Hello Khan,

I dont know about displaying only those columns, you may have to put different write statements for each possible case

for getting blank values to be displayed in unchecked columns, you can use this

(since i dont know your field names, i have given my own names)


if p_sixty = ''.
 loop at itab.
	itab-sixty = ''.
	modify itab.
 endloop.
endif.

if p_ninety = ''.
 loop at itab.
	itab-ninety = ''.
	modify itab.
 endloop.
endif.

if p_onety = ''.
 loop at itab.
	itab-onety = ''.
	modify itab.
 endloop.
endif.

if p_oneey = ''.
 loop at itab.
	itab-oneey = ''.
	modify itab.
 endloop.
endif.

loop at itab.
 write:/ itab-sixty , itab-ninety, itab-onety, itab-oneey.
endloop.