2008 Feb 05 7:11 AM
hi every one
in my report i have written like this
report zxxx.
.........
data: begin of itab occurs 0
.... .....
.........
vtext4 like tpart-vtext
.........
end of itab.
data: begin t_tpart occurs 0.
......
.......
vtext4 like tpart-vtext
end of t_tpart.
SELECT vbeln
posnr
kunnr
adrnr
parvw
FROM vbpa
INTO CORRESPONDING FIELDS OF TABLE t_vbpa
where vbpa~vbeln eq s_vbeln.
.....
.....
SELECT SPRAS PARVW VTEXT
FROM TPART
INTO CORRESPONDING FIELDS OF TABLE T_TPART
FOR ALL ENTRIES IN T_VBPA
WHERE SPRAS = SY-LANGU
AND PARVW = T_VBPA-PARVW.
IF SY-SUBRC EQ 0.
SORT T_TPART BY PARVW.
......
......
loop at t_tpart.
READ TABLE t_tparT WITH KEY PARVW = t_vbpa-PARVW BINARY SEARCH.
itab-parvw = t_tpart-parvw.
itab-VTEXT3 = t_tparT-VTEXT4.
endloop.
Here while printing at loop at itab i am gettng different partner type but not able to fetch data from vtext of table tpart i.e partner type description......plz help
before looping sort the both tables by reading key, if you are using the Binary Search as addition
to the read statement u have to sort the tables with key, its a mandatory and use sy-subrc,
if sy-subrc eq 0, then only display the value else leave it blank or write the appropriate statement over there.
Regards
Praveen
2008 Feb 05 7:15 AM
Hi,
Either remove the "BINARY SEARCH" addition, or make sure PARVW is the first element of structure T_TPART.
Regards,
John.
2008 Feb 05 7:19 AM
Hi... write logic as below..
loop at t_vbpa.
READ TABLE t_tpart WITH KEY PARVW = t_vbpa-PARVW BINARY SEARCH.
itab-parvw = t_tpart-parvw.
itab-VTEXT3 = t_tparT-VTEXT4.
append itab.
clear itab.
endloop.
Reward me.. if i helps you.
Thanks,
Murali.
2008 Feb 05 7:21 AM
Hi,
Either you can remove the 'BINARY SEARCH' addition from READ TABLE or sort the t_tpart table by parvw.
Rgds,
Bujji
2008 Feb 05 7:23 AM
loop at t_vbpa instead of t_tpart. Clear the work area at the end of the loop :
loop at t_vbpa.
READ TABLE t_tparT WITH KEY PARVW = t_vbpa-PARVW BINARY SEARCH.
itab-parvw = t_tpart-parvw.
itab-VTEXT3 = t_tparT-VTEXT4.
append itab to itab.
clear: t_tpart, itab, t_vbpa.
endloop.
Edited by: Abhishek Sarkar on Feb 5, 2008 8:23 AM
2008 Feb 05 7:41 AM
2008 Feb 05 8:11 AM
Hi,
Remove the Binary search addition in the code and append to itab as below:
loop at t_tpart.
READ TABLE t_tparT WITH KEY PARVW = t_vbpa-PARVW.
itab-parvw = t_tpart-parvw.
itab-VTEXT3 = t_tparT-VTEXT.
append itab.
endloop.
reward if helpful,
cs
2008 Feb 05 9:05 AM
before looping sort the both tables by reading key, if you are using the Binary Search as addition
to the read statement u have to sort the tables with key, its a mandatory and use sy-subrc,
if sy-subrc eq 0, then only display the value else leave it blank or write the appropriate statement over there.
Regards
Praveen
| User | Count |
|---|---|
| 6 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |