2008 Jun 22 1:00 PM
hi
can any one tell me how can i join mkpf & rbkp table . is i have to use some other table for joining .
its urgent
Regards
Rakesh singh
hi
can any one tell me how can i join mkpf & rbkp table . is i have to use some other table for joining .
its urgent
Regards
Rakesh singh
2008 Jun 22 1:25 PM
2008 Jun 22 2:29 PM
Hello,
To achieve that you'll need an intermediary step.
1 - with your mblnr, use VBFA table (mblnr is vbfa-vbelv field) with vbtyp_n EQ 'J' (delivery) to get the related delivery number. Something like:
SELECT vbeln posnn
FROM vbfa
INTO (w_vbeln, w_posnn)
WHERE vbelv = <mblnr>
AND vbtyp_n = 'J'.
ENDSELECT.
2 - with the delivery number (vbfa-vbeln) and item (vbfa-posnn), use table RSEG, selecting by ebeln (vbfa-vbeln) and ebelp (vbfa-posnn) to get your belnr (RBKP-belnr). Something like:
SELECT belnr
FROM rseg
INTO (w_belnr)
WHERE ebeln = w_vbeln
AND ebelp = w_posnn
ENDSELECT.
Regards.
Valter Oliveira