2006 Feb 27 10:39 AM
hi all, this is very urgent, could you guys have a look at my SELECT statement?
SELECT vk~kunnr "customer no
vk~vbeln "sales order no
vk~audat "date
vk~vbtyp "SD DOCUMENT CATEGORY
vk~knumv "lwk
vp~kwmeng "qty
vp~matnr "material no
vp~posnr "LINE ITEM
vd~bstkd "PURCHASE ORDER NO
* kv~kwert "lwk
FROM vbak AS vk
INNER JOIN vbap AS vp
ON vk~vbeln = vp~vbeln
INNER JOIN vbkd AS vd
ON vk~vbeln = vd~vbeln
* INNER JOIN konv AS kv
* ON kv~knumv = vk~knumv
INTO CORRESPONDING FIELDS OF TABLE it_so
WHERE vk~vkorg IN s_vkorg
AND vk~audat IN s_date
AND vk~kunnr IN s_kunnr
AND vp~matnr IN s_matnr
AND vd~bstkd IN s_bstkd
AND vk~vbeln IN s_vbeln
* AND kv~kschl = 'ZP00'
AND vk~vbtyp = 'C'.
The commented lines are the new additions that i want to add to the SELECT statement. But when i un-comment them, i get an error while activating my program. Error is as follows:
For pooled tables, cluster tables, and project views, JOIN is not allowed: "KONV".
Is there a way i can go around it?
hi all, this is very urgent, could you guys have a look at my SELECT statement?
SELECT vk~kunnr "customer no
vk~vbeln "sales order no
vk~audat "date
vk~vbtyp "SD DOCUMENT CATEGORY
vk~knumv "lwk
vp~kwmeng "qty
vp~matnr "material no
vp~posnr "LINE ITEM
vd~bstkd "PURCHASE ORDER NO
* kv~kwert "lwk
FROM vbak AS vk
INNER JOIN vbap AS vp
ON vk~vbeln = vp~vbeln
INNER JOIN vbkd AS vd
ON vk~vbeln = vd~vbeln
* INNER JOIN konv AS kv
* ON kv~knumv = vk~knumv
INTO CORRESPONDING FIELDS OF TABLE it_so
WHERE vk~vkorg IN s_vkorg
AND vk~audat IN s_date
AND vk~kunnr IN s_kunnr
AND vp~matnr IN s_matnr
AND vd~bstkd IN s_bstkd
AND vk~vbeln IN s_vbeln
* AND kv~kschl = 'ZP00'
AND vk~vbtyp = 'C'.
The commented lines are the new additions that i want to add to the SELECT statement. But when i un-comment them, i get an error while activating my program. Error is as follows:
For pooled tables, cluster tables, and project views, JOIN is not allowed: "KONV".
Is there a way i can go around it?
2006 Feb 27 10:43 AM
Hi,
For pooled tables, cluster tables, and project views,
JOIN is not allowed:
Select from that table and Use For all entries instead.
This is the only way to do it.
Regards,
GSR.
2006 Feb 27 10:44 AM
u cant use join statements for pooled and cluster tables. instead split and use different selects
or use for all entries
2006 Feb 27 10:44 AM
Hi Loh,
You cannot use JOINs with cluster tables.
KONV is a cluster table.
Thanks,
Abdul Hakim
2006 Feb 27 10:45 AM
2006 Feb 27 10:44 AM
2006 Feb 27 10:46 AM
Hi bernad
For that you have to use Read Statement for getting data from the KNOV table.
<b>select * into table it_konv from konv.
sort it_konv by knumv.
loop at it_so.
read table it_knov with key knumv = it_so-knumv.
<get the contents of knumv>
endloop.</b>
regards
ksihore
2006 Feb 27 10:54 AM
so how should i define it_konv?
since i have some conditions (KONV-KNUMV = IT_SO-KNUMV and KONV-KSCHL = 'ZP00'), where do i put them?
2006 Feb 27 10:54 AM
Hi Bernard,
Select the data from VBAK, VBAP using join, after that use for all entries and get the data from KONV, and KNUMV
finally loop the vbak, vbap and try to read the data which you got from KONV and KNUMV.
Regards
vijay
2006 Feb 27 11:00 AM
Hi , If u will use konv table in join it will give error as it is cluster table otherwise if will use transparent table it will work.
2006 Feb 27 11:15 AM
Hi
this is the code
<b>select * into table it_konv from konv for all entries in it_sa where knumv = it_sa-knumv and KSCHL = 'ZP00'.
sort it_konv by knumv.
loop at it_so.
read table it_knov with key knumv = it_so-knumv.
<get the contents of knumv>
endloop.</b>
Message was edited by: Harikishore Sreenivasulu
2006 Feb 27 11:19 AM
I've added the following statements and when i looked in debug mode, it looks like its working...the right values were retrieved...so how do i do a MOVE statement for the IT_KONV-KWERT values into IT_SO?
DATA: BEGIN OF IT_KONV OCCURS 0,
KNUMV TYPE KONV-KNUMV,
KWERT TYPE KONV-KWERT,
END OF IT_KONV.
SELECT KNUMV KWERT
FROM KONV
INTO TABLE IT_KONV
FOR ALL ENTRIES IN IT_SO
WHERE KSCHL = 'ZP00' AND
KNUMV = IT_SO-KNUMV.
LOOP AT IT_SO.
READ TABLE IT_KONV WITH TABLE KEY KNUMV = IT_SO-KNUMV.
ENDLOOP.
2006 Feb 27 11:24 AM
Hi bernard
LOOP AT IT_SO.
READ TABLE IT_KONV WITH TABLE KEY KNUMV = IT_SO-NUMV.
<b>*it_so-kwert = it_knov-kwert.
modify table it_so from it_knov transporting kwert.</b>
ENDLOOP.
regards
kishore
Message was edited by: Harikishore Sreenivasulu
2006 Feb 27 11:26 AM
Hi,
LOOP AT IT_SO.
READ TABLE IT_KONV WITH TABLE KEY KNUMV =
IT_SO-KNUMV.
<b> if sy-subrc = 0.
it_so-KWERT = IT_KONV-KWERT.
modify it_so index sy-tabix.
endif.</b>
ENDLOOP.
2006 Feb 27 11:26 AM
Hi,
data: l_tabix type sy-tabix.
LOOP AT IT_SO.
<b>l_tabix = sy-tabix.</b>
READ TABLE IT_KONV WITH TABLE KEY KNUMV = IT_SO-KNUMV.
<b>if sy-subrc = 0.
move-corresponding it_konv to IT_SO.
modify it_so index l_tabix.
endif.</b>
ENDLOOP.Regards
vijay
2006 Feb 27 12:16 PM
Thanks guys, i'm almost done now...when i checked through debug mode, its all working in order, but once i press F8, i did not go straight to my ALV list to display my results...instead it created a short dump and made a runtime error called "MESSAGE_TYPE_X"...any ideas?
2006 Feb 27 12:24 PM
Hi,
look at this SAP note : 550043
Symptom
KEPM: dump 'MESSAGE_TYPE_X' during automatic planning method execution.
Other terms
KEPM MESSAGE_TYPE_X transform characteristic value
Reason and Prerequisites
This note is related only to cases, if dump 'MESSAGE_TYPE_X' is raising
during execution of planning method, for which is possible to define
transformation of characteristics values i.e. Copy, Forecast, Top-Down
distribution, Ratios and Customer Enhancement.
Dump is raising in case, if there was defined transformation of char.
values in parameter set definition for some characteristic. Later on,
this characteristic was removed from planning level definition but
characteristic wasn't removed from relevant customizing of transform
characteristic values before.
Solution
Please apply attached program correction.
Regards,
GSR.
2006 Feb 27 12:36 PM
Hi,
can you show the parameters what you are passing , alomg with their declarations..
Regards
vijay
2006 Feb 27 12:48 PM
it's ok...i just had to make some ammendments to the ALV coding part...