‎2005 Jun 21 10:55 PM
hi folks,
Anyone who can help me in this query?? Thanks a lot in advance.
I have two tables
Table 1 : jhak
Table 2 : Konv (cluster table)
The selection is based on the field customer number -(kunnr) in jhak table The common field between the two tables is 'knumv' and I need to extract data fields kwert,kawrt, kbetr from konv for the customer (the customer number data will be entered by the end user in the parameter-options field p_custid.
I cannot create views or use join statement to create the query. How can I create a linke between the two tables and extract data?
Thank you very much in advance.
santhosh
‎2005 Jun 22 4:59 AM
Hi,
Try the following.
declare i_konv ,i_jhak,i_output according to your requirement.
select knumv kwert kawrt kbetr into table i_konv from konv where kunnr = p_custid.
if sy-subrc ne 0.
select knumv kunnr ..... into table i_jhak from jhak for all entries in i_konv where knumv = i_konv-knumv and kunnr = p_custid.
endif.
loop at i_konv into w_konv.
move-corresponding w_konv to w_output.
...
loop at i_jhak into w_jhak where knumv = w_konv-knumv.
move-corresponding w_jhak to w_output.
append w_output to i_output.
endloop.
endloop.
Hoipe this helps.If so,reward points.Otherwise get back.
‎2005 Jun 22 9:01 PM
thanks Jayanti.
I really appreciate your help. The requirements have changed but it certianly helps I will implement it. If I have any questions I will get back to you on that.
I will reward the points to it.
But the field issue in the form is not solved yet.
Santhosh