# Query

Hi all

I am preparing a report. I am facing this problem

when i give input ( Say sales order no. ).it gives basic list ( Sales Order no , erdat , division etc) & basic list has checkboxes. when i check single check box it gives another list with Salels O no, erdat , division ,price ). but when i check more than one checlbox then list give all fields with repeated values of prevoius row( first row) & some times it gives some fields & donot display price field & date particularly. I have used clear checkbox & clear wa.

Any body can give me suggestions.

Thanks.

10|10000 characters needed characters exceeded

### Related questions

Former Member
Posted on Sep 19, 2007 at 02:59 PM

hi,

logic is simple:

1) after giving the input u will display outout in alv list using reuse_alv_list_display.

2) in line items(output) u will display checkboxes at first colomn.

3)at the same time create two button called X and Y

4) write the logic like as follow...

if we select single checkbox then click on X button then program should give sec list. if u select more than one checkbox and click X button then give pop up message like please select single row or single checkbox. ---> this logic is for single checkbox

if u select multiple checkboxes reverse the logic...

i hope u understand.

thanks,

maheedhar.t

10|10000 characters needed characters exceeded
• Former Member
Posted on Sep 19, 2007 at 02:27 PM

Hi

Se this sample code and do accordingly

TABLES:MARA.

DATA:BEGIN OF GT_MARA OCCURS 0,

MATNR LIKE MARA-MATNR,

END OF GT_MARA,

GV_CB,

GV_CBV,

GV_LINES TYPE I,

INDEX TYPE I,

SY_INDEX TYPE I,

GV_LINES1 TYPE I,

MATNR LIKE MARA-MATNR.

SELECT-OPTIONS:S_MATNR FOR MARA-MATNR.

SELECT

MATNR FROM MARA

INTO TABLE GT_MARA

WHERE MATNR IN S_MATNR.

IF SY-SUBRC = 0.

DESCRIBE TABLE GT_MARA LINES GV_LINES.

ENDIF.

LOOP AT GT_MARA.

WRITE:/ GV_CB AS CHECKBOX,

GT_MARA-MATNR.

ENDLOOP.

CLEAR GT_MARA.

WRITE:'Total num of records is ',GV_LINES.

SET PF-STATUS 'DEL'.

AT USER-COMMAND.

IF SY-UCOMM = 'DEL' OR SY-UCOMM = 'PICK'.

DO 50 TIMES.

SY_INDEX = SY-INDEX.

READ LINE SY_INDEX FIELD VALUE GV_CB

GT_MARA-MATNR INTO MATNR.

IF GV_CB = 'X'." AND MATNR IS NOT INITIAL.

• LOOP AT GT_MARA." WHERE MATNR = MATNR.

• DELETE GT_MARA.

• CLEAR GT_MARA.

• ENDLOOP.

delete gt_mara index sy_index.

ENDIF.

ENDDO.

DESCRIBE TABLE GT_MARA LINES GV_LINES1.

WRITE:'Total num of records is ',GV_LINES1.

CLEAR:GV_LINES .

LOOP AT GT_MARA.

WRITE:/ GT_MARA-MATNR.

ENDLOOP.

ENDIF.

Reward if useful

Regards

Anji

10|10000 characters needed characters exceeded
• Former Member
Posted on Sep 19, 2007 at 02:28 PM

hi

internal table execuiting again and again rather where u checked the check box

and getting the all the row

pls check the condition

if checkbox1 eq 'X'

write :/

endif