cancel
Showing results for 
Search instead for 
Did you mean: 

GTS Custom Document Point of Destination & Departure

Former Member
0 Kudos

Hi all,

I'm creating Pro-forma invoice in ECC in VF01 and as a result Custom Declaration is getting created in GTS. In GTS the Point of Destination and the ‘Custom Office of Departure’ is coming as empty. So I implemented the BADI /SAPSLL/IF_EX_IFEX_SD0C_R3 and tried to pass the data. But I’m unable to find the table field in which I need to pass the data for those 2 fields. Note that the country for destination and departure is already showing. Can anyone please advice?

Thanks,

Sariful

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member215181
Active Contributor
0 Kudos

Hi Sharif,

It's not usual to pass those data from the feeder system; normally they are entered or determined in GTS.

You can add the Customs Office to the partner table in the BAdI, provided you add the mapping in the GTS configuration, but I don't think the Destination Point is part of the data set.  Why do you need that field?

Regards,

Dave

Former Member
0 Kudos

Hi Dave,

Thanks for replying.

This is the requirment that I got from my functional colleagues. I have 11 fields for which value is not automatically generated in GTS so I need to fill them programmticaly.

For Customs Office:

I thought if we add anything in the partner table for header, it will come under the partner tab. Also what should be the other fields like Partner function, type, ID and how to check if the mapping is done in the GTS configuration?

Thanks again for your time,

Sarif

former_member215181
Active Contributor
0 Kudos

Hi Sarif,

I get the feeling that your functional colleagues are not very familiar with GTS .

If, for some strange reason, you really do need to transfer the Office of Departure, then the relevant Office must first be created as a customer in the ERP system and transferred to GTS as Master Data.  Then, in your BAdI code, proceed as follows:

  • Set field PARTNER_FUNCTION to any 2-character code that you choose for that purpose (for example 'ZZ').
  • Set field PARTNER_TYPE to value '02' (customer).
  • Set field PARTNER_ID to the customer number of the Office of Departure.
  • Set field COUNTRY to the country of the Office of Departure.
  • Set field COUNTRY_ISO to the corresponding ISO code for that country.

The mapping may be defined in GTS configuration tables /SAPSLL/TLERVS (by Logical System) or /SAPSLL/TLERGS (by Group of Logical Systems).  You would want to map from whatever 2-character code you choose, to the standard Partner Function 'CUSAZS'.

Alternatively, if your functional colleagues would care to use the "Office of Exit" field in the Foreign Trade header, no coding is necessary.  That field is automatically mapped to the "Office of Departure" in GTS, but the Customs Office must exist in the GTS client.  You can find the mapping code in GTS Form CSD_FTD_HEADER_MAP (/SAPSLL/LAPI_6800_CSDF01) around line 1236, in case you need to debug.

Hope that helps.

Regards,

Dave

Former Member
0 Kudos

Hi Dave,

I made my functional colleagues aware of the situation. Now I have to wait for their reply. Will definitely get back to you .

Thanks,

Sariful

Former Member
0 Kudos

Hi Dave,

We are not using the "Office of Exit" from the Foreign Trade header. The custom offices are created as Business Partner in GTS, they are not available in ECC. So if I use the GTS BADI /SAPSLL/CUHD_PROP - method HEADER_DATA_PROPOSE, can I directly fill the Office of Exit(CUSAZS) and Point of Destination(/SAPSLL/NODAR) here?

Thanks,

Sarif

former_member215181
Active Contributor
0 Kudos

Hi Sarif,

I think I already answered that above.  The Customs Office should be ok, but as far as I know no field is available for the Point of Destination.

But however you intend to determine the Destination in ERP can probably be done in GTS instead.

Regards,

Dave

Former Member
0 Kudos


Hi Dave,

Is it possible to make configuration in GTS so that the Point of Destination is determined based on the country of departure and destination(or may be some other field)? If yes will you please let me know how?

Thanks,

Sarif

thomasrausch
Active Participant
0 Kudos

Hello Sarif,

see the discussion with sitanshu panigrahi "GTS Transportation routing" from Nov 12, 2014.

http://scn.sap.com/message/15545337#15545337

Regards,

Thomas

Former Member
0 Kudos

Hi Thomas,

In the given link the issue was how to fill the Transport Route. But in my case I want the fields 'Point of Destination' and 'Customs office of Exit' automatically filled. Is it possible to make the configuration for these 2 fields?

Thanks,

Sarif

former_member215181
Active Contributor
0 Kudos

Hi Sarif,

Standard configuration can be used for this data proposal.  Your functional consultant should know how to do it.  I'm not prepared to give on-line training courses, but others may be able to help.

Regards,

Dave

thomasrausch
Active Participant
0 Kudos

  Hello Sarif,

sorry, my fault. The fields are Identification of Connection Point at Departure    - /SAPSLL/NODDP

and Identification of Connection Point at Destination - /SAPSLL/NODAR.

Both are connected by the domainI dentification of Transportation Connection Point - /SAPSLL/NODE with the Value Table /SAPSLL/CMDNOD. The  View name for the table is /SAPSLL/V_CMDNOD Transportation Connection Point and can be maintained via TC SM30.

E.g.

Then go to customizing

You find the fields in Extend Field List for Data Proposal

Define Default Data for Document…add the two new rules and define an accesses.

For example: Rules

Accesses

Don't forget to activate you rules.

When it's done go to Customs Management Master Data. Here you can define you settings

Example

Then pick up your declartion and press F9

 

Situation before pressing F9

Situation after pressing F9

Maybe this helps a little.

Regards;

Thomas

Former Member
0 Kudos

Hi,

Thanks a lot for the detail explanation. But unfortunately it seems that default data proposing through configuration will not suit our requirment. So I was planning to fill the 2 fields in the BADI implementation: /SAPSLL/CUHD_PROP. But the problem I'm facing is that the BADI isn't called when the pro-forma invoice is created in ECC. That means it's not called during automatic creation of Export Declaration in GTS. But it's called when I'm creation Export Declaration manually in GTS. Any idea what might cause this issue?

Thanks,

Sarif

Former Member
0 Kudos

Hi Sarif,

Default data BADI is triggered during Automatic creation of Export declarations. I think you are missing something while you debug.

Regards

Dhilipan

thomasrausch
Active Participant
0 Kudos

Hello Sarif,


we work with the BADI /SAPSLL/CUHD_PROP too and we process normal and proforma invoices from ERP to GTS and it works well. We have implemented your own implementation via TC SE19. 

Have you defined an own Implemantation?

Regards,

Thomas

Former Member
0 Kudos

I am guessing that you expect the control to stop in your breakpoint in the default data BADI while you create a proforma in ECC.

That's not gonna happen. /SAPSLL/CD_SD0C_R3 calls GTS FM /SAPSLL/API_6800_CSD_SYNCH as a background task in asynchronous mode.

You may have to setup a breakpoint in /SAPSLL/CD_SD0C_R3 in ECC and skip the background transfer mode to take your control to GTS in the below mentioned include.

Include          /SAPSLL/LCD_PI_R3F00, FORM api6800_csd_synchronize

Once you are into RFC debugging, then setup a breakpoint in your default data BADI in GTS.

Regards

Dhilipan

thomasrausch
Active Participant
0 Kudos

Hallo Sarif,

on the ERP side;

go to function module /SAPSLL/CD_SD0C_R3 and search for Form api6800_csd_synchronize.
Here you have  lv_rfc_mode = gc_rfc_mode-asynchronously, switch the value of the
field lv_rfc_mode to 'S'.

On the GTS side:

Make sure that the used CPIC User has the User Type DIALOG.

When you process you invoice the system will stop at

coding:
data: lv_rfc_mode type c.

  lv_rfc_mode = gc_rfc_mode-asynchronously.  <---here is your breakpoint

  if lv_rfc_mode = gc_rfc_mode-asynchronously.     <---switch to 'S'

Further with F5 and you in the GTS system (in debugging mode). Here you can define your break

via F9 and ... see picutre

Regards,

Thomas

Former Member
0 Kudos

Hi,

Thanks to both of you. I was facing the issue due to a silly mistake. I had put a check for my username before the BADI is triggered - so that others don't face any issue while I'm working on the BADI.

Now when I'm creating new Export Document in GTS the check is satisfied and the BADI is excuted.

But when it's coming from ECC the user is changing to 'RFCUSER' while while calling GTS. So the BADI isn't called. Since F8 doesn't work in RFC(it doesn't, right?) debugging it was hard to find the issue.

Thanks,

Sarif

thomasrausch
Active Participant
0 Kudos

Hello Sarif,

can you please check the following:

 

TC SPRO go to: Sales and Distribution --> ForeignTrade/Customs -->SAPGlobal Trade Services - Plug-In -->Configure Control Settings for Document Transfer

  

Select: SD0C Dispatch/Export: Billing Document & Document Types

  

Check for the billing Type F8 "Call up SAPCustoms Management Sercives" is marked.

Regards,

Thomas

thomasrausch
Active Participant
0 Kudos

Hello Sarif,

can you also check the following on the GTS side:

SPRO go to: General Settings  --> Document Structure --> Assignment of Document Types from Feeder
Systems --> Assign Document Type at Feeder System Level or
Assign Document Type at Feeder System Group
Level (depends on your design)

Choose Automatically Transfer Document Type or Manually Assign Document Type (depends on your design)and check if your Document Type ID from Feeder System F8 is associated with Document Type CULOEX Customs Declaration: Export.

Regards,

Thomas

Former Member
0 Kudos

Hi Thomas,

My functional team decided that they don't want the 2 fields 'Point of Destination' and 'Customs office of Exit' to be populated automatically. They will fill these manually. For other fields my BADI implementation in ECC is working properly. Thanks a lot for your help

Regards,

Sarif