I have the following problem...
When SD billing documents (invoices) are created that are delivery related, the FI posting to the AR line item will include the delivery number in the BSEG-XREF2 field.
For this i have to use the following logic..
If VBRK-BURKS = 1000 AND VBRK-FKTYP = A, then go to VBRP using VBRK-VBELN = VBRK-VBELN and VBRP-VGTYP = b or c. Extract value VBRP-VGBEL and populate into BSEG-XREF2 of the AR line item posting. If VBRP pulls back more than one entry (more than only line item in the billing document which will probably be the case most of the time), just use VGBEL of the first entry found.
Can any one please send some similar coding...
Thanks in advance.