Skip to Content
avatar image
Former Member

HI PLZ URGENT

HI ALL

SELECT SINGLE knumh FROM a081 INTO wf_knumh WHERE datbi < idate AND

datab > idate AND KONT_PACK = WF-PCKG_NO AND KONT_ZEILE = WF-LINE_NO

.

INPUT IS IDATE,THERE is one record in datbase table for this condtion.

but i am not getting. i dont how the dates r compared?

plz give me ur suggestions

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

5 Answers

  • avatar image
    Former Member
    Oct 10, 2007 at 11:23 AM

    Hi,

    Just an idea - DATBI is "date to" and DATAB is "date from" so you are checking whether your date is later than "date from" <i>and</i> earlier than "date to". Are you sure that's correct and not the other way around?

    Regards, Joerg

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 10, 2007 at 11:23 AM

    suppose begin date is p_begda and end date is p_endda

    then genrally to get records we use....

    begda le p_endda

    and

    endda ge p_begda

    But it will be according to ur requirement....

    try using....

    SELECT SINGLE knumh FROM a081 INTO wf_knumh WHERE datbi le idate AND

    datab ge idate AND KONT_PACK = WF-PCKG_NO AND KONT_ZEILE = WF-LINE_NO.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 10, 2007 at 11:27 AM

    Hi

    try this and see

    SELECT SINGLE knumh FROM a081 INTO wf_knumh

    WHERE KONT_PACK = WF-PCKG_NO AND KONT_ZEILE = WF-LINE_NO

    and ( datbi le idate AND datab ge idate ).

    Regards

    ANJI

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 10, 2007 at 11:28 AM

    Hi

    you had created one internal table in that please remove unwanted fields

    just keep knumh filed then it will retrive the data

    i had faced same problem once at that time my internal table contains unnessary fields

    my logic is correct but i am not getting any output at that time i had declared my internal table with what values i want

    then it had executed sucessfully

    do like that

    <b>Reward if usefull</b>

    Add comment
    10|10000 characters needed characters exceeded

  • Oct 10, 2007 at 11:45 AM

    Hi kartikeyan,

    can you tell the requirement clearly.,.

    as If u need the Record with Validity end date Less than idate(Not even sure whether idate is parameter or wht)

    Wht code you have writen wont work

    Try using.,.

    SELECT SINGLE knumh

    FROM a081 INTO wf_knumh

    WHERE datbi > idate (instead of datbi < idate) AND

    datab < idate( instead of datab > idate)

    AND KONT_PACK = WF-PCKG_NO

    AND KONT_ZEILE = WF-LINE_NO.

    Try using this as startdate can not be less than end date.

    DATBI KODATBI Validity end date of the condition record

    DATAB KODATAB Validity start date of the condition record

    Add comment
    10|10000 characters needed characters exceeded