Hi Jörg,
We had a similar requirement for german customs where the delivery number (not invoice) was required to be submitted in the item section of the customs declaration, Documents Tab with qualifier PDOC and type N271.
The code we followed is as below:
Interface : /SAPSLL/IF_EX_CUHD_PROP
Method: ITEM_DATA_PROPOSE
1. Get the item number from sy-tfill
2. Get teh delivery number from is_cdoc-corref with refapp = 'SD0B'
3. Read table is_cdoc-cuit into local variable with item number from step 1
4. Assign qaldoc = 'PDOC', papty = 'N271', flvdo = 'X', papno = delivery number, launr = sequence number
5. Append the line to cs_item-document_t.
Post this, the delivery number appeared in the item section, tab Documents with qual PDOC.
Do let me know if this works for you.
Regards,
Tirthankar