05-15-2007 9:21 AM
Hi
Please giv eme some sample programs which involves the data retrival from Q structure.
Thanks & Regards,
Preeti
05-15-2007 10:14 AM
Sorry the field from T522T should have been ATEXT... my apologies...
Sample code as follows...
PARAMETERS: p_pernr TYPE pa0001-pernr.
DATA: anrex TYPE q0002-anrex.
SELECT SINGLE t522t~atext INTO anrex FROM pa0002 INNER JOIN
t522t ON pa0002~anred = t522t~anred WHERE pernr = p_pernr AND
t522t~sprsl = sy-langu.
Regards,
Dushyant Shetty
05-15-2007 9:24 AM
If you don't mind me asking, what exactly is a Q structure ?!?!
Are you talking about Q000... structures, the ones used for infotypes on screen ?
Dushyant Shetty
05-15-2007 9:29 AM
Hi Dushyant,
I have a requirement where i have to pull a record (ANREX) from infotype 0002. In this infotype, field ANREX is getting populated with the data stored in Q0002-ANREX where Q0002 is a structure.
Now i want to know how can i do that.
Rgds
Preeti
05-15-2007 10:01 AM
Like Balaji mentioned, Get ANRED From PA0002, for a PERNR, then use that ANRED to read ANREX from T522T where SPRSL = sy-langu. Simple !
Regards,
Dushyant Shetty
<u><b>P.S. Correction.... field name from T522T should be ATEXT...</b></u>
Message was edited by:
Dushyant Shetty
05-15-2007 9:43 AM
05-15-2007 10:06 AM
HI Preeti,
You are taking about the strutures that begins with 'Q', for retrienving the data for the fields present in that you can see the where used list in the SE11 itself...
Generally data from the field also comes from the PA tables, also first check if there is some check table associated iwth it..if there is then please take the values for the field from there... ot else you have ot go for where used list ..where you will get the appropraitre PA table...
Regards,
Jayant
05-15-2007 10:14 AM
Sorry the field from T522T should have been ATEXT... my apologies...
Sample code as follows...
PARAMETERS: p_pernr TYPE pa0001-pernr.
DATA: anrex TYPE q0002-anrex.
SELECT SINGLE t522t~atext INTO anrex FROM pa0002 INNER JOIN
t522t ON pa0002~anred = t522t~anred WHERE pernr = p_pernr AND
t522t~sprsl = sy-langu.
Regards,
Dushyant Shetty