Packaging data not populated in customs declaration
I'm creating Pro-forma invoice in ECC and as a result Custom Declaration is getting created in GTS. In GTS the Packaging data in item level is coming as empty. So I implemented the BADI /SAPSLL/IF_EX_IFEX_SD0C_R3 and tried to pass the packaging data. But as a result the custom document stopped getting created in GTS.
I'm using the below code to populate the fields of the table cs_itm_cdoc-pge-
LOOP AT lit_vepo ASSIGNING <lfs_vepo>.
lwa_itmpge-item_number = <lfs_vepo>-posnr.
lwa_itmpge-int_id = <lfs_vepo>-vepos.
lwa_itmpge-quantity = <lfs_vepo>-vemng.
lwa_itmpge-dim_uom = <lfs_vepo>-vemeh.
APPEND lwa_itmpge TO cs_itm_cdoc-pge.
I'm taking the value of <lfs_vepo> from the standard table vepo. Can anybody please tell me what I'm doing wrong?
Dave Willis replied
So are you now saying that the standard Function Module is populating the packaging tables ok?
If so, then the error is occurring in GTS, and you should be able to see an error log there (System Monitoring > Logs > Transfer Log for Export).
Please make sure that you have mapped the Packaging Type(s) in configuration, and that you have set a Number Range for Internal Package Numbers.