cancel
Showing results for 
Search instead for 
Did you mean: 

GTS Customs document creation BADI

Former Member
0 Kudos

Hi,

I am creating PO in ECC and corresponding customs document is getting created in GTS. My requirement was to create a PO with text material (without material number) and then i was using ECC BADI   /SAPSLL/IFEX_MM0A_R3 to populate a generic material called 'GENERIC' in Custom document item table (without material number GTS gives error).  'GENERIC' material ID has already created in GTS.


Now, when i am saving PO this BADI is getting called and GENERIC is getting updated into Item table of Cust.Doc, i am getting below message then:

"Legal Control: Custs Prod. Mast. Required

Material GENERIC"


PO saved. When i check Customs document, its created with Incomplete Status and without material number (Generic one).


1. Please suggest what program i should debug in GTS to check if GENERIC ID is getting transfer into GTS or not. (I am also sending vendor material in additional data, it is reflating in GTS customs document).


2. I need to update some information in GTS side just before the creation of customs document. Please suggest BADI/EXIT.



Thanks




Accepted Solutions (0)

Answers (2)

Answers (2)

trish_abap
Discoverer
0 Kudos

Hi,

Were you able to find a solution to this. We have same requirement and trying to change product description in GTS. Thanks!

former_member215181
Active Contributor
0 Kudos

Hi Sumit,

How have you created the GENERIC Product Master record in GTS?  Please note that it will need to be created for the same Logical System Group that you are using in the ERP system.

And where are you seeing that error (or warning) message?  If possible, please let us know the Message Number (click on the "question mark" to find it).

For point 2, please expand - what kind of information would you like to add, and whereabouts in the customs document?

Regards,

Dave

Former Member
0 Kudos

Hello Dave,

Thanks for replying.

Ok, i have created GENERIC material ID in GTS by using a function module /SAPSLL/API_6850_SYNCH_MASS in SE37. After that i can check the product by usinf tcode /n/SAPSLL/PR_PRCONI_02 in Legal control tab. (using Logical System Group   GRP_GTS as i created this in GTS)

Should i create the same material in ECC too?

I am getting this error in ECC while saving PO after create or change.

4500000828                           Blocked - Incomplete
   Legal Control: Custs Prod. Mast. Required
   Material GENERIC

There is no error no on question mark but text "Service for Status Management for Legal Sevices"

I want to add licensing information into classification tab on line item of Customs document.

Thanks,

Sumit

former_member215181
Active Contributor
0 Kudos

Hi Sumit,

As I said before, the GENERIC Product must be created in the ERP Logical System Group, not the GTS one.  That's why the P.O. transfer doesn't find it.

Should you also create that Material in ERP?  I'm not sure, but it would certainly make it easier to create and maintain the GTS Product Master record.

Please get that working first, and then we can think more about the error message, depending on your further findings...

Regards,

Dave

Former Member
0 Kudos

Hello Dave,

You are awesome. This works. Now i am able to update generic material in Customs document. I just change the logical system group as ERP while creating material in GTS and it worked.

Now i need to update some data in on Classification tab in Customs document item. I found class /SAPSLL/CL_CTSGEN and method MAINTAIN_OBJECT to update this by using GTS BADI /SAPSLL/LCC_DOCUMENT, but not sure this will work at the time of Customs document creation (Class method needs GUID of Customs Tariff Number). Also, this BADI item structure is protected and i am not able to make change in it. I need to change product description that is coming from ECC in additional data. If i am changing the description from ECC it is not getting reflated in cust. doc and taking description from GTS product master data. I need to replace it.


Please suggest if some BADI/Exit available just before creation of custom document.


Thanks,

Sumit

former_member215181
Active Contributor
0 Kudos

Hi Sumit,

I'm glad to hear that you're making progress.  But you're still being a bit vague about what you want to change in the customs document, and why.

For the classification data, there is no BAdI or user-exit available during the creation, but if you can be more specific about exactly what you want to change, then I can probably suggest a way forward.

Regarding the Product Description; you can change it in GTS BAdI /SAPSLL/CUHD_PROP, Method ITEM_DATA_PROPOSE.  If you have not used field ADDDA3 for anything else, then you have a 30-character field already available in which you can convey the description from the IFEX_MM0A ERP BAdI.

Hope that helps.

Regards,

Dave

Former Member
0 Kudos

Hi Dave,

I need to update classification data for licensing purpose. We need legal control license determination in case of third party materials where only description available and hence we are populating custom generic material ID. By populating Tariff Numbers (HTS code) in item classification tab, we can determine licensing functionality. I need a place in GTS (BADI/EXIT) where i can modify GTS custom document structure just before this gets created.

BADI /SAPSLL/CUHD_PROP specified by you contains all the Customs document information including classification (Customs Document: Tariff Number Attributes) table. If i could modify this, may be i get what i need.

But for checking this BADI when i set break point in its implementation and add some dummy value in item additional data 2, it is not stopping and not saving this dummy value in Customs document upon modification of PO in ECC. I am not sure this is getting called or not. Please suggest.

Thanks,

Sumit

former_member215181
Active Contributor
0 Kudos

Hi Sumit,

I realise that I gave you wrong information.  The BAdI /SAPSLL/CUHD_PROP runs only during creation of Customs Declarations, not P.O. replica.  BAdI /SAPSLL/BADI_IFMAP_CON_CDOC is available for creation of the P.O. replica, although I'm not sure if it also runs during updates (changes).

The BAdI allows you to change the Customer Append structures for the Header and Items, but not any of the standard fields - the only way to change those is in the ERP "IFEX" BAdI.  So you can pass additional data into the structures, but you won't see it in the dialog unless you implement your own screen - there is also a BAdI for that somewhere.

Sorry for not having better news.

Regards,

Dave

Former Member
0 Kudos

Hi Dave,

Yes you are right, now this new BADI /SAPSLL/BADI_IFMAP_CON_CDOC contains all required item structures including classification (Customs Document: Tariff Number Attributes) table. Debugger also getting stopped here. But when i try to code in its implementation, it don't allow to add any values or change in existing structures.

    wa_hts-itvsy = '0000000010'.
    wa_hts-ccngn = '000002345678000'.
    APPEND wa_hts TO is_api_if-itm_hts_t.

Error on compile:

Method /SAPSLL/IF_BADI_IFMAP_CON_CDOC

The field "IS_API_IF-ITM_HTS_T" cannot be changed. -

Thanks,

Sumit

thomasrausch
Active Participant
0 Kudos

Hello Sumit,

try this, maybe it works

FIELD-SYMBOLS: <ITM_HTS_T> TYPE /SAPSLL/API6800_ITM_HTS_S. 

LOOP at is_api_if-itm_HTS_t ASSIGNING  <ITM_HTS_T>.

*  MODIFY OR INSERT your values 

<ITM_HTS_T>-ITVSY = '0000000010'. 

<ITM_HTS_T> -CCNGN = '000002345678000'.  

ENDLOOP.

Regards, Thomas

former_member215181
Active Contributor
0 Kudos

Hi Sumit,

That's right - you can't change any of the standard fields, only fields in the Customer Append structures.

By convention, the letter 'I' means "input only", so you would never expect to be able to change structure IS_API_IF - you can only change structures like CS_API_IF or ES_API_IF (letter 'E' is "export only", so no data exists originally; letter 'C' is "changeable", so data may already exist and you can change it).

Regards,
Dave

Former Member
0 Kudos

Hi Dave,

Do we have another options to change data in customs document. I need to change material description and insert classification information.

Thanks,

Sumit

former_member215181
Active Contributor
0 Kudos

Hi Sumit,

Please see my answer yesterday at 11:26.  Apart from that, you would need to consider code enhancements.

It would probably be much better to go back to the business and persuade them to set up the Materials properly, to avoid all of this performance!

Regards,

Dave

Former Member
0 Kudos

Hello Dave,

I found another BADI /SAPSLL/LCC_DOCUMENT (method:  CUSTOMS_PRODUCT_MASTER_GET) specifically make changes into custom document classification structure. Here structure CS_PRODUCT is available, so its changeable.


I have made changes into this structure by populating llns_t table with GUID of Customs Tariff Number, Numbering Scheme and CCNGN (HTS code). But some how it is taking original tariff number that was coming by-default. Its not making changes.


Thanks,

Sumit

former_member215181
Active Contributor
0 Kudos

Hi Sumit,

I confess that I don't know anything much about that BAdI.  The IMG documentation suggests that it's used to over-write data for Import and Export List determination.

Did you try changing other fields - for example the Grouping Code - to see if those changes are actually reflected in the Compliance Checks?

I think you might need to get your developer to debug through after the BAdI call, to see what is happening.

Regards,

Dave