Skip to Content
avatar image
Former Member

The value is not coming in the work area

hello,

i had written this code in the smartform

SELECT SINGLE * FROM KNA1

INTO CORRESPONDING FIELDS OF WA_KNA1

WHERE KUNNR EQ WA_SHIP-KUNNR.

In this code the WA_SHIP-KUNNR is coming from driver program and the records are coming in WA_KNA1.

But the records are not coming in WA_KNA1.

Please Help me to resolve this problem.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Best Answer
    avatar image
    Former Member
    Aug 16, 2007 at 12:26 PM

    Hi,

    Make sure that workarea(header) of WA_SHIP is not blank.

    Enjoy SAP.

    Pankaj Singh

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 16, 2007 at 12:27 PM

    Go to transaction SE16 and check if that customer number is there in the table KNA1. If so, check if the SELECT statement is getting executed. I.e. It is not under any IF condition or something like that.

    Please mark points if the solution was useful.

    Regards,

    Manoj

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hello Manoj,

      the value is present in the datatabase table KNA1.

      i am passing from the driver program to the smartform is wa_ship-kunnr as 1800 and it is coming right in the smartform. the only problem is after executing the select query a record is not coming the wa_kna1(work area of KNA1).

      Please help me.

  • avatar image
    Former Member
    Aug 16, 2007 at 12:30 PM

    Hi,

    tye this

    datA: itab like kna1.

    select single * from kna1 into itab where kunnr = '0000000001'.

    if sy-subrc eq 0.

    endif.

    check WA_SHIP-KUNNR. is having value or not

    SELECT SINGLE * FROM KNA1

    INTO CORRESPONDING FIELDS OF WA_KNA1

    WHERE KUNNR EQ WA_SHIP-KUNNR.

    thanks & regards,

    Venkatesh

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 16, 2007 at 12:50 PM

    hi

    check wa_kna1 is having filelds declaration correctly the name same as kna1 fileds names because u have used the into corresponding fields option,it requires field names similar to data base filelds

    and clear work area before select

    Regards

    sandhya

    Add comment
    10|10000 characters needed characters exceeded