‎2013 Jun 25 10:59 AM
Hi all,
i have a smartform, in which below codes are written, but it is not fetching values for some particular data.(for some values of "kunnr")
These fields are there in KNA1 table but for some sales order it is not picking values, please tell me what to do with this code.
(The same code is working properly for other sales order, but not giving output for particular data, eg, sales order no. 3033546)
Please tell me what to change, i am not getting my data in debugging time, so tell me what to change in my code, so that i will get all these data.
select single vbpa~kunnr vbpa~parvw
from vbpa
into corresponding fields of wa_ca2
where vbeln = vbeln
and parvw = 'Z4'.
select single kna1~adrnr knvv~kdgrp knvk~adrnd knvk~adrnp_2
from kna1
inner join knvv on kna1~kunnr = knvv~kunnr
inner join knvk on kna1~kunnr = knvk~kunnr
into corresponding fields of wa_ca2
where kna1~kunnr = wa_ca2-kunnr.
select * from adrc into corresponding fields of wa_pa
where adrc~addrnumber = wa_ca2-adrnr.
endselect.
select * from adrc into corresponding fields of wa_oa
where adrc~addrnumber = wa_ca2-adrnd.
endselect.
select * from adrc into corresponding fields of wa_prm
where adrc~addrnumber = wa_ca2-adrnp_2.
endselect.
‎2013 Jun 25 1:29 PM
Hi,
You are performing an INNER JOIN between 3 tables. This means there should be data for KUNNR in each and every of these 3 tables.
Is this true? For instance, do you have a contact person for every customer in KNVK?
Otherwise, I would suggest to perform OUTER JOIN instead. (e.g. LEFT OUTER JOIN on KNVK)
Best regards,
Guillaume
‎2013 Jun 25 1:29 PM
Hi,
You are performing an INNER JOIN between 3 tables. This means there should be data for KUNNR in each and every of these 3 tables.
Is this true? For instance, do you have a contact person for every customer in KNVK?
Otherwise, I would suggest to perform OUTER JOIN instead. (e.g. LEFT OUTER JOIN on KNVK)
Best regards,
Guillaume
‎2013 Jun 25 2:15 PM
Hi Guillaume,
thanks for your reply, i have fully deleted the inner join and separately written four lines of code in my select option in kna1 table, and my problem get resolved.