Skip to Content

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.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    author's profile photo Former Member
    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.