cancel
Showing results for 
Search instead for 
Did you mean: 

Function Module to Retrieve License Masters Assigned to Customs Declarations

Former Member
0 Kudos

Hi,

Is there a function module in GTS to determine which license masters have been created to release the blocked document?

My requirement is that I need to determine if there is a license master created to release a blocked document. If there is, I need to retrieve the text entered in the "External License Number" field.

Thanks.

Accepted Solutions (1)

Accepted Solutions (1)

former_member215181
Active Contributor

Hi Chris,

I'm confused...  Surely if a license master already existed, the blocked document wouldn't still be blocked?

What am I missing?  Please explain a little more - thanks.

Regards,

Dave

Former Member
0 Kudos

Hi Dave,

Yes, if there is a license master, the document is unblocked. However, how can I determine what license master led to the document being unblocked using a function module?

Thanks.

former_member215181
Active Contributor
0 Kudos

Hi Chris,

In the Customs Document item, you can see which Licence is assigned.  Why are you looking for a Function Module?  Are you intending to develop a report of some sort?

Regards,

Dave

Former Member
0 Kudos

Hi Dave,

What I'm trying to do is add an entry to the "Documents" tab on the item level of the Customs Declaration with the External License Number from the license master that was created to unblock the delivery used to create the invoice (customs declaration). This External License Number is required to by Customs Authorities in the "Documents" tab.

If a function module is not a viable solution, what solution would you propose?

Thanks.

Former Member
0 Kudos

Hi Chris,

If your requirement is to transfer the License to documents tab on the item level of Customs declaration, why not try the option "Default Data for SAP Customs Management" in License type definition.

You will see this under Define License type(compliance section)

Depending on the license type you need to be adopted to declaration, provide the Default Document type. system will adopt that License number from the legal control tab of your declaration to Documents tab.

Regards

Dhilipan

former_member215181
Active Contributor
0 Kudos

Dhilipan just beat me to the same response: what you're looking for is standard functionality, and it's there for exactly that reason.  The configuration works well, and should solve your problem.  Please let us know how you get on with it.

Regards,

Dave

Former Member
0 Kudos

Dave / Dhilipan,

Thanks for the suggestion. This entry on the "Documents" tab will not always appear -- only sometimes depending on the chemical composition. So, I need to apply logic to determine when it should/should not appear.

Thanks.

Former Member
0 Kudos

Hi Chris,

If that's the case, you can try using Default Data FMs to clear/default data in Documents tab of your declaration, if the chemical composition hadn't met the criteria.

I am not sure if the Declarations are automatically created in your case.

(or)

If the above doesn't work, you can make sure this license data is not sent in the Outbound IDoc to Customs when your chemical composition criteria is not met. You just need to ignore this in the declaration code. You will need enhancement again.

I'll let you know if i can think of any other options.

Regards

Dhilipan

former_member215181
Active Contributor
0 Kudos

Hi Chris,

You mean that in some situations you DO need a Licence, but DON'T need to send an associated Document in the Declaration message?  If so, a little code in BAdI /SAPSLL/CUS_ECC Method MODIFY_IDOC_VIEW should take care of it.

Regards,

Dave

Former Member
0 Kudos

Thanks for the responses so far. I don't understand the linkage between maintaining "Default Document for SAP Customs Management" in "Define License Types" configuration activity and having the respective legal regulation / license master appear on the "Documents" tab of the Customs Declaration.

For instance, if I have a legal regulation / license master that was used to unblock the delivery prior to the invoice / customs declaration being created, it will appear on the "Control" tab of the "Customs Declaration"

  • Legal Reg: LEGR1
  • License Type: LIC
  • License Master: 100000
    • External License Number: EXT123

... how can I get the External License Number from the license above to appear on the "Documents" tab of the Customs Declaration.

I need an entry on the "Documents" tab that contains the following:

  • Category: CUII
  • Type: X035
  • Number: <External License Number>
    • This will be pulled from license master 100000 created above. There will only ever be 1 license master.

Thanks for your explanations and help so far.

Former Member
0 Kudos

Hi Chris,

I believe the standard logic is already capable of pulling the external license# to Documents/Evidence tab. You need not worry on that part.

Regarding the linkage, you are instructing system to consider a particular license type/license as Default Data in Customs declaration if there is a valid license of same type in your declaration.

You just have to specify Category as CUII, Doc. type as X035 at License type level. One thing to be noted, you might not find Doc. type X035 under your compliance legal regulation. You would have defined it for your Customs legal regulation already. But you will have to define the same X035 document type for your compliance legal regulation as well. For this you need to do some additional settings at Customs Code list level

SAP GTS-->Customs Mgt->Customs Code Lists.

Regards

Dhilipan

Former Member
0 Kudos

Thanks. This is clear to me now.

How does the system know which External License Number to apply to the "Documents" tab? I'm still not clear on this part.

Former Member
0 Kudos

Ok - I figured it out. The "External License Number" is appearing now.

Now that i see it working, I understand the linkage between it.


Thanks again, Dave and Dhilipan!!

Answers (0)