2007 Sep 10 8:11 AM
SELECT SINGLE posnv INTO v_posnv FROM vbfa WHERE vbeln = tvbdpl-vbeln AND
posnn = tvbdpl-posnr.
table:
MANDT
VBELV
POSNV
VBELN
POSNN
VBTYP_N
RFMNG
MEINS
RFWRT
WAERS
VBTYP_V
SELECT SINGLE posnv INTO v_posnv FROM vbfa WHERE vbeln = tvbdpl-vbeln AND
posnn = tvbdpl-posnr.
table:
MANDT
VBELV
POSNV
VBELN
POSNN
VBTYP_N
RFMNG
MEINS
RFWRT
WAERS
VBTYP_V
2007 Sep 10 8:52 AM
2007 Sep 10 9:36 AM
usually select single means that you read one line because you specify a complete unique key. Sometimes it is used to read only one record of several fulfilling the where condition.
Is there a secondary key on on VBFA with VBELN and POSNN?
2007 Sep 10 10:37 AM
2007 Sep 11 5:45 AM
Hi
yes you had writen the code in correct way
select single *
from table
into table
where condition
2007 Sep 10 2:46 PM
It's not incorrect, just slow. You are trying to get the preceding document from the subsequent document using document flow. VBFA is generally used the other way around. You may be able to get the preceding document number from the table you get tvbdpl-vbeln.
Rob
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |