Skip to Content
0
Former Member
Jun 25, 2007 at 03:59 AM

how to read the data for read table statment

41 Views

i am usning work area for all and below select statment now pls SEE QUERY AT END I WANT TO READ THE BPEXT FROM TABLE GT_BUT001 HWO TO READ IT

IF not gt_sagmeld[] is initial.

*

data: gt_sagmeld_temp like gt_sagmeld.

gt_sagmeld_temp[] = gt_sagmeld[].

delete adjacent duplicates from gt_sagmeld_temp[] comparing guid_mobj.

select

  • /sapsll/corpar~guid_mobj

  • /sapsll/corpar~PAFCT

  • but000~bpext

  • but000~partner

/sapsll/corpar~parno

into table gt_corpar

from /sapsll/corpar

  • INNER join but000 on but000partner = /sapsll/corparparno

for all entries in gt_sagmeld_temp

where /sapsll/corpar~guid_mobj = gt_sagmeld_temp-guid_mobj

and /sapsll/corpar~PAFCT = 'SH'.

sort gt_corpar by parno.

delete adjacent duplicates from gt_corpar comparing parno.

select but000~bpext

from but000 into table gt_but001

for all entries in gt_corpar

where but000~partner = gt_corpar-parno.

loop at gt_sagmeld into wa_sagmeld . UPPER LOOP FOR READING ALL DATA

....

.,...

NOW I COE TO READ DATA BPEXT

BUT NOT SURE HWO TO READ IT

read table gt_but001 into wa_but001

*

  • with key guid_mobj = wa_sagmeld-guid_mobj.

*

*wa_sagmeld_outtab-bpext = wa_but001-bpext.

LINK TO TABLE ARE

GT_sAGMELD TO CORPAR IS JOINED BY GUID_MOBJ AS PER THE SELECT STATMENT JOIN CONDITION

AND GT_CORPAR TO GT_BUT001 BY PARNO.

PLS SUGGEST HWO TO READ BPEXT DATA FROM GT_BUT001