cancel
Showing results for 
Search instead for 
Did you mean: 

Packaging data not populated in customs declaration

Former Member
0 Kudos

Hi all,

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.

        CLEAR lwa_itmpge.

      ENDLOOP.

I'm taking the value of <lfs_vepo> from the standard table vepo. Can anybody please tell me what I'm doing wrong?

Thanks,

Sarif

Accepted Solutions (1)

Accepted Solutions (1)

former_member215181
Active Contributor
0 Kudos

Hi Sarif,

The field ITEM_NUMBER should refer to the Billing Item (i.e. same as CS_CDOC_ITM_GEN-ITEM_NUMBER).  In that way, the packaging data is linked to the relevant Declaration Item.

But you shouldn't have to implement the BAdI unless the Packaging is carried out somewhere other than the outbound Delivery - the standard code should include the Packaging automatically.

Regards,

Dave

Former Member
0 Kudos

Thanks Dave, but I don't know why the package data isn't getting populated in the item level. Even after I changed ITEM_NUMBER = CS_CDOC_ITM_GEN-ITEM_NUMBER, it's not working.

Regards,

Sarif

former_member215181
Active Contributor
0 Kudos

Hi Sarif,

So, are you saying that the Customs Declaration IS now being created in GTS?

Where is the packing taking place?  In the Delivery, in the Shipment, or some other place?  That's to say, what code are you using to populate table LIT_VEPO?

Regards,

Dave

Former Member
0 Kudos

Hi Dave,

I’m new to GTS. I’ll list the steps here which I’m following-

1.       1. In ECC, In tcode VF01, put Billing Type = ‘F8’ and Document = Outbound Delivery ID

2.       2. Click Save, the billing document in ECC will be saved

3.       3. In GTS, go to tcode /sapsll/menu_legal

4.       4. Go to Customs Management->Export->Display Customs Declarations.

5.       5. You’ll see a new document has been created with reference to the billing document in ECC.

6.       6. Open the document. Go to Item Details->Packaging Data.

7.       7.  The packaging details is empty.

This is the current default behavior. Now my job as an ABAPer is to fetch the packaging data from VEPO table and fill it in the BADI /SAPSLL/IF_EX_IFEX_SD0C_R3 so that it gets reflected in GTS.

But when I’m trying to do it the custom document in GTS isn’t getting created at all. Note that it’s getting created properly when I’m removing the coding related to the packaging data. So obviously I’m doing something wrong here. Do I need to fill the packaging data for  header as well? Also the field for container is currently empty, do I need to fill it? If yes, where shall I get the data?

Thanks,

Sariful

former_member215181
Active Contributor
0 Kudos

Hi Sarif,

Where is the packing taking place?  In the Delivery, in the Shipment,  or some other place?  That's to say, what code are you using to populate table LIT_VEPO?

Regards,

Dave

Former Member
0 Kudos

Hi Dave,

I don't know where the packing is taking place. Is there any way to check it? The transaction I'm using is VF01.

Thanks,

Sarif

former_member215181
Active Contributor
0 Kudos

Hi Sarif,

Saving the Billing Document makes an RFC to /SAPSLL/API_6800_CSD_SYNCH in the GTS client.  That code calls Function Module /SAPSLL/6800_TO_CSD_MAP, where (at line 303) you can find the call to Form CSD_PACKING_DATA_MAP (/SAPSLL/LAPI_6800_CSDF01).  To answer your question; yes, you will need to provide the header packing data in addition to the item data.

Provided the RFC user is type 'Dialog', you should be able to debug through the RFC to find out what's going wrong.

I don't understand why you can't answer my question about the Packaging source.  Surely you must be selecting from table VEPO with some WHERE clause?  Anyway, take a look at the ERP code that runs during the Billing Document save.  That is Function Module /SAPSLL/CD_SD0C_R3, where you can find (at line 121) the call to Form SD0C_PACKING_DATA.  The code runs Function Module /SAPSLL/PGE_DATA_READ_R3.  You might want to debug to see why that isn't working, and/or talk to your functional consultant to find out where the Packing is being carried out.

I hope the above information proves helpful and will enable you to make progress.

Regards,

Dave

Former Member
0 Kudos

Hi Dave,

the packaging data is selected from VEPO table using the delivery ID.
=> Select VEPOS from VEPO into LIT_VEPO where VBELN = <Delivery_ID>.

Does that mean that the packaging data should generate automatically?

Thanks,

Sarif

P.S: Happy new year!

former_member215181
Active Contributor
0 Kudos

Yes.

Former Member
0 Kudos

Hi Dave,

I'm having a strange problem. The Customs Doument is getting created in GTS only if no packaging data is associated with the delivery - i.e no entry is avaialble in VEPO table. But if the packaging information is filled in the header and item level table either by the standard function module /SAPSLL/PGE_DATA_READ_R3
or manually in the BADI - the billing document is created in ECC but no corresponding Customs Document is created in GTS. Can you please advice?

Thanks,

Sarif

former_member215181
Active Contributor
0 Kudos

Hi Sarif,

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.

Regards,
Dave

Former Member
0 Kudos

Hi Dave,

You are absolutely right! The package Type is not mapped, it's showing error "Package material type xxxx cannot be converted to package type". I've informed my functional colleague to make the configuration. Will let you know the result.

Thanks,

Sarif

Former Member
0 Kudos

Is it mandatory that the Package material type has to be mapped to the package type 'CN' only?

Thannks,

Sarif

former_member215181
Active Contributor
0 Kudos

No, of course not.  Not everything is shipped in a Container.

Regards,

Dave

Former Member
0 Kudos

Hi Dave,

It's working. Thanks!

Regards,

Sariful

Answers (1)

Answers (1)

thomasrausch
Active Participant
0 Kudos

Hello Sarif,

if you have an OSS access look at the OSS Note 1284334. Maybe this helps.

Regards

Thomas