Skip to Content
author's profile photo Former Member
Former Member

select query

hi friends,

i want to select the billing document no vbrk-vbeln from vbrk

acording to condition type kschl = 'JCST'.

how to write the query.

thanks.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Posted on Sep 11, 2007 at 07:39 AM

    types:begin of it,

    zknumh type konv-knumh,

    end of it.

    data it1 type table of it with header line.

    types:begin of itb,

    vbeln type vbrk-vbeln,

    end of itb.

    data it2 type table of itb with header line.

    select knumh from konv into it1-zknumh where kschl = 'JCST'.

    append it1.

    endselect.

    loop at it1.

    select vbeln from vbrk into it2-vbeln where knumh = it1-knumh.

    append it2,

    endselect.

    endloop.

    loop at it2.

    write/ it2-vbeln.

    endloop.

    Message was edited by:

    abapuser

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 11, 2007 at 07:40 AM

    HI,

    write like this.

    data:bill_doc type vbrk-vbeln.

    select single vbeln from vbrk into bill_doc where kschl = 'JCST'.

    write:/ bill_doc.

    <b>reward if helpful</b>

    rgds,

    bharat.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Sep 11, 2007 at 07:57 AM

    try dis....

    TYPES:begin of it,

    knumh type konv-knumh,

    end of it.

    TYPES:begin of it1,

    vbeln TYPE vbrk-vbeln,

    END OF it1.

    data:itab TYPE TABLE OF it WITH HEADER LINE.

    DATA itab1 TYPE TABLE OF it1 WITH HEADER LINE.

    SELECT knumh FROM konv into itab-knumh WHERE kschl = 'JCST'.

    APPEND itab.

    ENDSELECT.

    LOOP at itab.

    SELECT vbeln from vbrk into itab1-vbeln WHERE knumv = itab-knumh.

    append itab1.

    ENDSELECT.

    ENDLOOP.

    LOOP at itab1.

    WRITE / itab1-vbeln.

    ENDLOOP.

    plz reward points if dis helps

    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.