When working with SAP invoice SmartForms, you will soon become familiar with the LBBIL_INVOICE structure. The print driver program populates this deep structure with lots of data associated with the invoice document being processed.
The LBBIL_INVOICE-HD_REF structure contains information on the various reference documents of the invoice – delivery, sales doc, etc. However, there were a couple of fields in the structure that I was not sure of their usage: VBELN_VAG, VBELN_VKT, and VBELN_VG2 . So, I did a little research, and am documenting my findings here. (more…)