04-18-2006 6:53 AM
Hello All,
Based on the Selection screen criteria i am accessing Data from BSAD (FI, specifically for Document Type DA and RV).
If the Document type is 'DA' its a Finance document and all the information can be obtained from BSAD itself.
If the Document type is 'RV' its a SD document and the rest of the information is received from VBRK and VBRP.
Would like to have the Linking fields between BSAD and VBRK/VBRP and
VBRK and VBRP being Header an Line Item data do you think that its the right way to access this data within the Loop of BSAD.
Step1 - Select the Data from BSAD (DA and RV).
Step2 - Loop at BSAD and based on Document type go to VBRK/VBRP
Step3 - loop at VBRK within the Loop at BSAD
Is there an more appropriate way to approach this.
Regards,
- PSK
04-18-2006 7:01 AM
Hi,
BSAD is the Customer index for cleared items.
With this accounting doc number u can go to table <b>BSID</b>.
This is the general index. Here u will find the sales document numbers <b>BSID-VBEL2 and BSID-POSN2</b>.
You will also find the billing doc number which is <b>BSID-VBELN</b>.
You can use these to get the sales documents.
Thanks,
Rashmi.
Message was edited by: Rashmi Joshi
04-18-2006 7:03 AM
Hi Sravan,
From BSAD you can get the billing document number VBELN and from this you can lookup directly into vbrk/vbrp.
Try avoiding writing a select within a loop.
Hope this helps.
Cheers
VJ
04-18-2006 7:04 AM
Hi Sravan,
From BSAD you can get the billing document number VBELN and from this you can lookup directly into vbrk/vbrp.
Regards,
Suresh
04-18-2006 7:12 AM
04-18-2006 7:24 AM
Hi,
if Document type is 'pv' , in this case bill document no same as finance document no.
So From BSAD you can get the finance document number belnr and from this you can lookup directly into vbrk/vbrp where vbeln = bsad-belnr.
regards,
srinivasarao oleti