cancel
Showing results for 
Search instead for 
Did you mean: 

Link tables between Daily tax statement DST and monthly Tax statement PMS

Former Member
0 Kudos

Hi Team,

       I am working on some enhancements in GTS to generate some report/ Query. Now am in need of getting the table relation ship to derive the monthly statement from the daily statement.

  We have a report in customs module which shows the monthly statement, where in the related daily statements are also shown, so I believe that at table level also it should have some relationship.

     Can any one help me on this, by giving me the table relation ship or guide me how I can derive this at table level?

Thanks in Advance.

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member215181
Active Contributor
0 Kudos

Hi Devanand,

Where have you seen the "Daily Tax Statement"?  Which report are you talking about?

And are you simply wanting to create an aggregated report - in other words, obtaining a similar statement for a range of dates, or something else?

Regards,

Dave

Former Member
0 Kudos

Hi Dave,

     Yes exactly. I am trying to create a summary report including both this detail with some additional information basically a downloadable format which gives all this info in a single row, daily stmt no, reg no , monthly stmt no, reg no. , internal numbers etc.

    The report which shows the daily statement / monthly are :

/SAPSLL/MENU_LEGAL ->Customs Management ->Imports-> Tax statement (Tab) -> Display tax statement for monthly statement and Display Tax statement for daily statement (refer attachment)

Regards

Dev

former_member215181
Active Contributor
0 Kudos

Hi Dev,

Probably the table you're missing is /SAPSLL/CUPEDRI.  That links the Individual Declarations to the Periodic Declaration.

The program code for the two reports is very similar, but the Monthly report refers to Periodic Declarations that have been created from the individual ones.

Hope that helps.

Regards,

Dave

Former Member
0 Kudos

Hi Dave,

     Thanks for the input.

     Currently what I am doing is, Am getting the daily statement from the table /sapsll/tshd by passing  the register number or internal number, Then I pass the GUID_TSHD into /sapsll/tsthd as GUID_TSHD to get the GUID_MOBJ which when passed back to /sapsll/tshd gives me the monthly statement number.

     Can you help me build the logic including /SAPSLL/CUPEDRI. and is this approach right?

Regards

Dev

former_member215181
Active Contributor
0 Kudos

Hi Dev,

Ok, then you probably need to query table /SAPSLL/CUPEDRH with the Monthly Statement number to get the GUID of the Periodic Declaration.

Unfortunately (for you) I don't offer free consulting, so won't be able to help you to build the logic .

Regards,

Dave

Former Member
0 Kudos

Hi Dave,

     Thanks for the Input Dave.

    The logic I explained works for most of the cases and helps me derive monthly statement from the daily statement Reg.No. But for some cases the relation is broken.So wanted to know the credibility of the logic...

     I believe Dave can help Dev (himself-Sounds similar) for Free... .

Regards

Dev

Former Member
0 Kudos

Hello,

Yes, that correct you can view the tax statement via standard transactions However you need to configure the respective inbound messages and Tax statement number ranges and the way how you want to display them like tax statement header / item etc..

Standard allows you to display the tax statements by declaration and line item wise and you might have a requirement to display all them at once.

Atleast I had that requirement before so created a SQ01 report.

Below is the report main query which tells you which all tables I have used on which fields.

this will fetch you all the tax statement information for all line items.

Please do let me know if you run into any issues and please be sure you have the necessary configuraiton in place otherwise you will not see any entries in the tax statement tables. thanks.

select /SAPSLL/TSHD~TSNMBR /SAPSLL/TSHD~TSYEAR /SAPSLL/TSHD~CRTSP /SAPSLL/TSHD~LGREG /SAPSLL/TSHD~REGNR /SAPSLL/TSHD~TSEID

            /SAPSLL/TSHD~TSCDT /SAPSLL/TSHD~TSHDA /SAPSLL/TSHD~TSDDT /SAPSLL/TSHD~TSTY /SAPSLL/TSHD~DOCNUM /SAPSLL/TSHD~PYTYP

            /SAPSLL/TSHD~STPTS /SAPSLL/TSHD~DUTTY /SAPSLL/TSHD~TSFPR /SAPSLL/TSHD~TSFPS /SAPSLL/TSHD~TSFPD /SAPSLL/TSPIT~AARTY

            /SAPSLL/TSPIT~AMNT_CUS /SAPSLL/TSPIT~CUR_CUS /SAPSLL/TSPIT~GUID_MOBJ /SAPSLL/TSCHD~TSEID /SAPSLL/TSCHD~REGNR

            /SAPSLL/TSCHD~GUID_MOBJ /SAPSLL/CUHD~CORDER /SAPSLL/CUHD~COYEAR /SAPSLL/CUHD~NETVAL_FLT /SAPSLL/CUHD~NTCUR

            /SAPSLL/CUHD~GROVAL_FLT /SAPSLL/CUHD~GRCUR /SAPSLL/CUHD~TAXVAL_FLT /SAPSLL/CUHD~QUAUM /SAPSLL/CUHD~QUANT_FLT

            /SAPSLL/CUHD~WEIGRO_FLT /SAPSLL/CUHD~WEINET_FLT /SAPSLL/CUHD~WEIDIM /SAPSLL/CUHD~CTYPL /SAPSLL/CUHD~CTYDP

            /SAPSLL/CUHD~CTYAR /SAPSLL/CUHD~CTYIV /SAPSLL/CUHD~INCOT /SAPSLL/CUHD~INCOLO /SAPSLL/CUHD~ADDDA1 /SAPSLL/CUHD~ADDDA2

            /SAPSLL/CUHD~ADDDA3 /SAPSLL/CUHD~INCOKY /SAPSLL/CUHD~GUID_CUHD

     from ( /SAPSLL/TSHD

            inner join /SAPSLL/TSPIT

            on  /SAPSLL/TSPIT~GUID_MOBJ = /SAPSLL/TSHD~GUID_TSHD

            inner join /SAPSLL/TSCHD

            on  /SAPSLL/TSCHD~GUID_MOBJ = /SAPSLL/TSHD~GUID_TSHD

            inner join /SAPSLL/CUHD

            on  /SAPSLL/CUHD~GUID_CUHD = /SAPSLL/TSCHD~GUID_CUHD )

          where /SAPSLL/TSHD~CRTSP in S_CRTSP .