cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Assign Legal Unit to the Foreign Trade Organization

Former Member
0 Likes
2,911

Hello,

I have a particular export scenario where sale in is one country (X) but product is in country (Y). Based on mapping, company code x is assigned FTOX. The product is located in another country (Y), different company code (Y). So , I mapped the plant/storage location to a legal unit associated with the plant in country Y that will be shipping the product. Then I mapped that legal unit to FTOY. In ERP, the plant shipping the product is mapped to company code Y. Company Code Y mapped to FTOY.

However, when the document to created in GTS, FTOX is assigned instead of FTOY. So, I am assuming that the Assign Legal Unit to the Foreign Trade Organization doesn't work.  Has anyone encountered this as well?

Regards, Dean.

Accepted Solutions (1)

Accepted Solutions (1)

former_member215181
Active Contributor
0 Likes

Hi Dean,

Just another thought...  in that situation, surely you also have inter-company billing from the supplying Company Code to the Sales Company?  If so, could it better to produce the Export Declaration from the I/C point of view?  As far as I know, that can be achieved by simple configuration - in the Billing Type definition, just set the SD Document Category to '5' and the Transaction Group to '8'.

You might also need to adjust the Pricing Procedure so that the Sales pricing is used for the GTS value.

Regards,

Dave

Former Member
0 Likes

Hello Dave,

Yep, this is exactly inter-company billing scenario.  I am not going to tell about the #@%& regarding how pricing is done.  I am just trying to correctly assign the FTO at this point.

From my earlier question, if the Assign Legal Unit to the Foreign Trade Organization does assign the FTO, what does this IMG activity do? It would be great if it did work.

Regards, Dean.

Former Member
0 Likes

Hello Dave,

I found in INCLUDE /SAPSLL/LAPI_6800_CUWLF06 this code...

*---- Unbestimmter WE: 501 FTOrg über FTVBS ermitteln
       if ls_cuswlo-iblis eq gc_iblis-undefined.
         perform ftorg_from_orgst_det using    lv_parno_ftvbs
                                      changing ls_cuswlo-guid_ftorg
                                               lv_parno_ftorg.


However, the Category of Goods Movement must be undefined for this routine to be performed.  I will dig some more, but why for onlt 'Undefined'.


Regards, Dean.

former_member215181
Active Contributor
0 Likes

Hi Dean,

My point was; if it's an I/C situation, using the I/C billing document neatly avoids the problem that you're facing, since the supplying company code and Plant will both be used; thus correctly generating an Export Declaration with FTO Y and Legal Unit Y.

Your question about the benefit of linking the FTO and Legal Unit is interesting - I never previously thought about it.  I suppose, if nothing else, it feeds the Search Help for reports that enables you to choose Legal Units relevant to the chosen FTO.

I'll think some more about it, and about the code snippet you referred to above.

Regards,

Dave

Former Member
0 Likes

Hello Dave,

After some additional research, it seems that this code is only used in import, at least based on the comments in the code. I agree that the ERP should be sending GTS the proper data.

So, I have decided to drop the GTS interface code and IMG issue. I think I will raise issue with the business and the IT department that supports the GTS interface from the ERP-side.

Thank you for your continuing support.

Regards, Dean.

Answers (1)

Answers (1)

former_member215181
Active Contributor
0 Likes

Hi Dean,

The GTS interface code derives the FTO from the Company Code in the feeder system.  You might reasonably expect that it would derive it from the mapped Legal Unit, but it doesn't.  In case you're interested, the relevant code is in Function Module /SAPSLL/6800_TO_CSD_MAP, in Form HEADER_DATA_MAPPING.

So the trick will be to determine Company Code Y in the feeder system BAdI /SAPSLL/IFEX_SD0C_R3.  Your logic will need to determine the Company Code from the Plant, and over-write the value if needed.  But beware that Plant is at the item level, so consider whether or not there is any possibility that different items in the Billing Document could have Plants from different Company Codes.

Hope that helps,

Regards,

Dave

lozanov-a
Participant
0 Likes

Hi,

you will need in the badi to replace cocode X by cocode Y.

You want to report the customs declaration in the country

of cocode Y, right?

kind regards

Assen

unless you use Bonded whse or IPR, you can assign your whole

plant to the legal unit, not on sloc level

Former Member
0 Likes

Hello Dave,

So what is Assign Legal Unit to the Foreign Trade Organization good for?  Is this a bug or just a validation?

You know a company code mapped to FTO1 but the Assign Legal Unit to the Foreign Trade Organization says Legal Unit is only allowed for FTO9, then would a compliance error be raised?

I was hoping this would solve my issue, but it seems this IMG activity has no purpose... or does it?

Regards, Dean.

Former Member
0 Likes

Hello Assen,

True, but what about distribution centers? When many divisions use the same warehouse.  Each responsible for their activities? You still want to assign the correct FTO because each may have different Tax Id for Customs.

That is why I was hoping that the Assign Legal Unit to the Foreign Trade Organization would be of benefit, But it seems to be a dysfunctional IMG activity.

What does Assign Legal Unit to the Foreign Trade Organization do in GTS?

Regards, Dean.

lozanov-a
Participant
0 Likes

Hi Dean,

its a dysfunctionality.

The Customs declaration have to be done in the country where the goods physically are shipped from. While the Company code that deals with the Sales can be in different country.

I had often the Plant abroad scenario where a company code possess a Plant in different country.

my understanding is that you need to twick the Co code in the badi in order to clear the goods in the country of the delivering plant (corresponding Legal unit). Because - in standard GTS - it is the FTO and its country which determines the Legal reg and country of clearance.

thanks for the constructive discussion

Assen