08-16-2007 1:24 PM
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.
08-16-2007 1:26 PM
Hi,
Make sure that workarea(header) of WA_SHIP is not blank.
Enjoy SAP.
Pankaj Singh
08-16-2007 1:26 PM
Hi,
Make sure that workarea(header) of WA_SHIP is not blank.
Enjoy SAP.
Pankaj Singh
08-16-2007 1:44 PM
Hello Pankaj,
the field WA_SHIP is not blank, the value is coming correctly what i am passing from the program.
08-16-2007 1:47 PM
Use this code:
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = wa_ship-kunnr
IMPORTING
output = wa_ship-kunnr.
SELECT SINGLE * FROM kna1
INTO CORRESPONDING FIELDS OF wa_kna1
WHERE kunnr EQ wa_ship-kunnr.
Please mark points if the solution was useful.
Regards,
Manoj
08-16-2007 1:51 PM
08-16-2007 1:52 PM
Ok.. So we see you are using smartform... So i guess you have return
your code in program logic ...
On the top of program logic there is input and output parameters. please pass your workarea wa_kna1 in both the output and input .
Let us know ur results.
Enjoy SAP.
Pankaj Singh
08-16-2007 1:53 PM
08-16-2007 1: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
08-16-2007 1:47 PM
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.
08-16-2007 1: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
08-16-2007 1: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