cancel
Showing results for 
Search instead for 
Did you mean: 

Logic for a report with check boxes

naren112
Explorer
0 Kudos
97

Hi All ,

I m writting a report , I need to put FOUR check box in this report ,

For example you can say Check1 ( material1)

Check2 ( material2)

Check3 ( material3)

Others

In selection critriea I defined one select option ( eg materail )

Now I have to diplay data accordingly checkboxes

If Check box '<b>check1'</b> is selected -list must contains only material1

If Check box '<b>check2'</b> is selected -list must contains only material2

If Check box '<b>check3</b>' is selected -list must contains only material3

If Check box '<b>check1</b>' or any other one is selected -list must contains material1 and other materail as per other selected check box .

If Check box<b> others</b> is selected then all other fields ( except the selected check box ) are the out put of this report .

IF you need more explaination of my query , plz let me know .

Regards ,

Narender

View Entire Topic
Former Member
0 Kudos

Hi,

Tables : mara.

PARAMETERS: S_fi AS CHECKBOX.

PARAMETERS: S_se AS CHECKBOX.

PARAMETERS: S_th AS CHECKBOX.

PARAMETERS: S_fo AS CHECKBOX.

SELECT-OPTIONS: S_MATNR FOR MARA-MATNR.

CAN you elaborate your req

If Check box 'check1' is selected -list must contains only material1 -- can you elaborate this

you mean to say checkbox has fixed material or what.

if that the case

SELECT * from mara into itab WHERE MATNR IN S_MATNR.

if checkbox1 ne 'X'.

delete itab where matnr ne CHECK-MATERIAL NUMBER.

ELSEIF CHECKBOX NE 'X'.

DELE

ENDIF.

tHANKS

naren112
Explorer
0 Kudos

<b>Dear Venki ,

Yes , Checkboes have the fixed data( materials) .

I have to select accordingly Check boxes ..

eg. select-options Mara-Matnr ( say range is 10 -1000 )

now I defined four C.Box , C1, C2 , C3 and Others .

For C1 say materail is 30 , for C2 -40 , C3 - 100 .

when I'll select C1 material 30 will be in the list , for C2 material 40 will be in the list ( If both selected both will be in the list ) if I select C3 - materail 100 will be in the list ( if all of three selected all three materials will be in the list )

if any combination of above are selcted that will be in the output .

IF I select others only ,materials from 10 - 1000 ( excluding materials 10, 20 and 100 ) will be in the output .

Again if you make the combination of these four data will be selected as per combination ( as I mentioned for three checkboxes )

Please ask for your query ..

Regards ,

Narender</b>

Former Member
0 Kudos

Hi Narendar,

Tables : mara.

PARAMETERS: S_fi AS CHECKBOX. "MAT C1

PARAMETERS: S_se AS CHECKBOX. "MAT C2

PARAMETERS: S_th AS CHECKBOX. "MAT C3

PARAMETERS: S_OT AS CHECKBOX. "OTHERS

SELECT-OPTIONS: S_MATNR FOR MARA-MATNR.

get all the data INTO ITAB.

then

if s_fi NE 'X'..

DELETE ITAB WHERE MATNR NE C1.

ELSEIF s_se ne 'X'.

DELETE ITAB WHERE MATNR = C2.

ELSE if s_th ne 'X'.

DELETE ITAB WHERE MATNR = C3..

ELSE if s_OT EQ 'X'.

DELETE ITAB WHERE MATNR = C1..

DELETE ITAB WHERE MATNR = C2..

DELETE ITAB WHERE MATNR = C3..

endif.

tHIS SHOULD SOLVE YOUR ISSUE

Thanks

venki

now your itab has records only with material based on the check box selected

reward points if helpful

thanks

venki