You are on page 1of 4

Advance Return for Tax on Sales/Purchases

NOTE: The code provided in this document is only meant for


reference.You are advised to formulate your own code as per your
business requirement .

SAP will not be providing sample code/enhancements for any other


report(s) than RFUMSV00.

Program: RFUMSV00
Tcode: F.12

This enhancement is for the displaying tax code description while displaying invoices using transaction
MIR4.

1. Execute transaction SE38 and enter RFUMSV00 and select Display.


2. Place cursor on the FORM READ_T007A.

3. Select the spiral icon from the application toolbar.


4. From the menu bar, Select Edit - > Enhancement operations -> Show Implicit Enhancement Options
5. Place the cursor on the highlighted row as shown below.

6. From the menu bar, Select Edit -> Enhancement Operations -> Create

7. Select Code in the pop-up window.


8. Enter desired name and short text for your enhancement implementation.

9. Enter the required logic within the implementation. You can refer the following sample code.
This code needs to be enhanced/adjusted according to your needs.

Sample code:
ENHANCEMENT 1 ZTAX_MIGRATION. "active version
DATA: lv_kalsm TYPE kalsm VALUE 'TAXINJ', "Enter TAXINJ based ta
x procedure
lv_mgdat TYPE dats VALUE '20151029', "Enter the migration
date
wa_tax_item TYPE rfums_tax_item.

CALL FUNCTION 'J_1BSA_COMPONENT_ACTIVE'


EXPORTING
bukrs = t001-bukrs
component = 'IN'
* COUNTRY =
* IMPORTING
* ACTIVE_COMPONENT =
* OUT_COUNTRY =
EXCEPTIONS
COMPONENT_NOT_ACTIVE = 1
OTHERS = 2 .

IF sy-subrc = 0.
* Initial data selection
IF gt_alv IS INITIAL.
IF bkpf-budat LT lv_mgdat OR
( bkpf-budat GE lv_mgdat AND bkpf-awtyp = 'RMRP' AND
bkpf-stgrd IS NOT INITIAL ).
kalsm = lv_kalsm.
ENDIF.

ELSE.
* Input Tax Line Item Information
IF gt_alv-t_voste_ep IS NOT INITIAL.
LOOP AT gt_alv-
t_voste_ep INTO wa_tax_item WHERE budat LT lv_mgdat
AND mwskz =
mwskz.
kalsm = lv_kalsm.
EXIT.
ENDLOOP.
*Output Tax Line Item Information
ELSE.
LOOP AT gt_alv-
t_auste_ep INTO wa_tax_item WHERE budat LT lv_mgdat
AND mwskz =
mwskz.
kalsm = lv_kalsm.
EXIT.
ENDLOOP.
ENDIF.
ENDIF.
ENDIF.

You might also like