Sunday, 15 June 2014

How to create Financial Reports by States for Tax Purposes

We are using logic in the tax jurisdiction code to USTX77705XXXXX. We are going to use Left(Right(Tax Jurisdiction,2),4) to get TX.

Step 1:
Enhance extractor with functional module 0FI_GL_40 enhancement
1. Go to RSA6.
2. Select your data Source 0FI_GL_40.
3. Select the "Enhance Extraction structure"
4. Give the Append Structure name. In our example we used ZZFIGL40APPEND. Note: you will need new append structure for each extractor.
5. Append the fields to extract structure (ZZ*). In our example we use ZZTXJCD. Note: use se11 to check the component type of the fields you are trying to append.
6. Goto CMOD
7. Give the project name-->Display. In our example we used ZBWEX


 8. Click Create à Component à enter RSAP0001
 9. Double Click on EXIT_SAPLARSAP_001 since we are enhancing transaction data extractor
EXIT_SAPLRSAP_001 -> Transaction Data
EXIT_SAPLRSAP_002 -> masterdata attributes
EXIT_SAPLRSAP_003 -> Master data Texts
EXIT_SAPLRSAP_004 -> Masterdata Hirarchies.
10. Double click on ZXRSAU01
11. You can write the code under the exist.

***Enhance 0FI_GL_40 Extract with Functional Location

DATA:  l_tabix like sy-tabix,

      L_S_FAGL_S_SREP_LINE_ITEMS like FAGL_S_SREP_LINE_ITEMS.

CASE I_DATASOURCE.



WHEN '0FI_GL_40'.

    LOOP AT C_T_DATA INTO L_S_FAGL_S_SREP_LINE_ITEMS.
   l_tabix sy-tabix.
   SELECT SINGLE TXJCD From Bseg into L_S_FAGL_S_SREP_LINE_ITEMS-ZZTXJCD
     WHERE BELNR L_S_FAGL_S_SREP_LINE_ITEMS-BELNR
           AND
           BUZEI L_S_FAGL_S_SREP_LINE_ITEMS-BUZEI.
     MODIFY c_t_data From L_S_FAGL_S_SREP_LINE_ITEMS INDEX l_tabix.
     Endloop.
ENDCASE.


12. Save and activate the Code
13. go to Rsa3 select 0FI_GL_40--> unselect the ZZTXJCD under Hide column (by defalult new added fields goes under HIDE)
14. Save the datasource à generate Data Source
15. Check the data in RSA3.




Step 2: 
Enhance BW 0FIGL_D40

1. Replicate the datasource into BI side.
2. Go to BW, Create Xregion  and add to 0FIGL_D40. In the transformation edit the rule. Create a substring formula. Note you can not use Left(right) logic because the value is text. In this case we have to use substring forumla. 



3. Now you should be able to write  a bex report on GL based on States.

No comments:

Post a Comment