‎2006 Dec 06 7:19 AM
Hi
Can anybody help me to correct the query.
it is giving me a short dump.
DATA : BEGIN OF t_vbsegk OCCURS 0,
ausbk TYPE ausbk,
belnr TYPE belnr_d,
gjahr TYPE gjahr,
bzkey TYPE buzei,
lifnr TYPE lifnr,
sgtxt TYPE sgtxt,
ebeln TYPE ebeln,
ebelp TYPE ebelp,
buzei TYPE mblpo,
werks TYPE werks_d,
END OF t_vbsegk.
SELECT vbsegk~ausbk
vbsegk~belnr
vbsegk~gjahr
vbsegk~bzkey
vbsegk~lifnr
vbsegk~sgtxt
ekbe~ebeln
ekbe~ebelp
ekbe~buzei
ekbe~werks
FROM vbsegk
JOIN ekbe
ON vbsegkgjahr = ekbegjahr
AND vbsegkbelnr = ekbebelnr
INTO CORRESPONDING FIELDS OF TABLE t_vbsegk
WHERE vbsegk~ausbk IN s_ausbk
AND vbsegk~belnr IN s_belnr
AND vbsegk~gjahr IN s_gjahr
AND vbsegk~lifnr IN s_lifnr
and ekbe~VGABE = P.
Basicallly i want to extract the data fom the above two tables based on user input in selection screen.
Thanks
Any help will not go unmarked.
‎2006 Dec 06 7:31 AM
hi
you can just check whether the value table in the domain VGABE contains the value 'P'.
and you can also make the second trial by declaring the 'P' as a local variable or a constanst and try passing that...
example:
constants: vgabe value 'P'.
--
SELECT vbsegk~ausbk
-
--
-
AND ekbe~vgabe = VGABE.
thanks
pavan
‎2006 Dec 06 7:31 AM
hi
you can just check whether the value table in the domain VGABE contains the value 'P'.
and you can also make the second trial by declaring the 'P' as a local variable or a constanst and try passing that...
example:
constants: vgabe value 'P'.
--
SELECT vbsegk~ausbk
-
--
-
AND ekbe~vgabe = VGABE.
thanks
pavan
‎2006 Dec 06 7:33 AM
Hi,
It working fine for the following code.
constants: c_vgabe type vgabe value 'P'.
DATA : BEGIN OF t_vbsegk OCCURS 0,
ausbk TYPE ausbk,
belnr TYPE belnr_d,
gjahr TYPE gjahr,
bzkey TYPE buzei,
lifnr TYPE lifnr,
sgtxt TYPE sgtxt,
ebeln TYPE ebeln,
ebelp TYPE ebelp,
buzei TYPE mblpo,
werks TYPE werks_d,
END OF t_vbsegk.
SELECT vbsegk~ausbk
vbsegk~belnr
vbsegk~gjahr
vbsegk~bzkey
vbsegk~lifnr
vbsegk~sgtxt
ekbe~ebeln
ekbe~ebelp
ekbe~buzei
ekbe~werks
FROM vbsegk
JOIN ekbe
ON vbsegk~gjahr = ekbe~gjahr
AND vbsegk~belnr = ekbe~belnr
INTO TABLE t_vbsegk
WHERE vbsegk~ausbk IN s_ausbk
AND vbsegk~belnr IN s_belnr
AND vbsegk~gjahr IN s_gjahr
AND vbsegk~lifnr IN s_lifnr
and ekbe~VGABE = c_vgabe.Regards
Bhupal Reddy
‎2006 Dec 06 7:36 AM
‎2006 Dec 06 7:51 AM
Hi Syed, What exactly does the dump states.....the query seems to be correct Some times if u try to access to many records with out proper primary key then the system might give a dump. But in your context all the primary keys are fine but want to check whether r u passing as data in the select options if not then that might be one reason...
Also once check all the data declarations..
Regards,
Swaroop