Skip to Content

Hello SAPers!

Here is an article that provides an overview of transaction S_ALR_87012357 – Advance Return for Tax on Sales/Pur. On the first glance, this is a standard and well-known transaction, but in my opinion there are a lot of aspects about it, which are not straight forward and deserve a good explanation. Besides, I plan a couple more posts on taxation-related issues, which would cover more technical issues, so I decided that this most might be considered as a good starting point.

You can also find this blog post on Medium platform under the following link.

This article will cover the topics ranging from selection screen options to the procedural steps involved into generation of XML-based tax reports directly out of SAP. From this point of view, it would be a good starting point for somebody, who just started exploring taxation topics in SAP. But along the way, I’ll try to add some specific technical details and explanations that will give you a better understanding of the transaction even if you already have some experience with it.

1.1. Selection screen of the report

Selection screen of the report consists of several parts, purpose of some fields is more or less straight forward, whereas usage of some fields is not exactly clear. Let’s explore selection screen options section by section. First part of selection screen features general select options, which can be used to indicate your reporting entity (i.e. company code) and the reporting period (fiscal year / posting dates etc.). Note, in most cases company code is a required entry field, but if you use reporting that is based on tax groups you can leave this field empty.

Section “Further selections” contains a lot of options that enable flexible selection of documents for reporting purposes. Mostly used selection options are: tax reporting date, tax codes, transaction (e.g. MWS, VST, ESA, ESE etc.), special GL indicator (e.g. A for down-payments), GL accounts etc. Apart from these mostly transaction-related options, there is one additional field “Taxes on sales/purchases group”. Here you can indicate tax group – special organizational entity which can be used for tax reporting purposes.

Next section (i.e. “Tax payable posting“) is used to indicate parameters controlling the posting of tax payable. In short, program RFUMSV00 (i.e. program behind this transaction) can be used not only for reporting purposes, but also to post the amount of tax payable to special “netting account”. Posting amount for this purpose will be automatically calculated as a difference between total output tax (i.e. tax liability) and total input tax (i.e. tax credit). If you want to use this option, please do the following:

  • Select check-box “Batch input session required” – program run will generate a batch input with name indicated in field “Session name”, which can be processed either immediately (if respective check-box is activated) or in post-processing mode in transaction SM35;
  • Document type / posting date for tax payable as well as due date, indicating when the amount of tax should be paid. Indication of due date is especially useful, when you have maintained vendor account as account to which tax payable will be posted (this option is analyzed in a separate post “Tax payable posting to vendor account“).

Please note, to run the report in this mode, you should have authorization for t-code FB41 which is used to re-post tax amounts.

Output control” section of selection screen can be used to control how data is displayed in report mode. Probably the most useful feature in this section is related to display of address data of customers / vendors. By selecting check-box “Read address data” you make sure that report will also display address information of company’s business partners. You can also control which version of address data will be displayed. To do that, you should indicate reference to international address version in respective field (e.g. 8 – stands for Ukrainian address version, R – for Russian, I – international). If this field is empty, the system will display address data from standard address version.

Section “Output lists” also contains control parameters, which define which parts of the report will be displayed. In short – you can choose between line items option (display of all tax-relevant line items) and between totals option (aggregated data on output / input tax).

You can also configure the layout of each report by clicking “Configure” button. The system will navigate you to a separate screen with default report layout for each output list. You can configure the layout of report to suite your purposes and save it into a variant (e.g. ZTEST_OUT, ZTEST_IN). Report variants can then be indicated on selection screen of report.

Useful feature from this section is reporting on tax differences (check box “Tax difference: line items”). If you run the program with this option, it will generate a report on all line items, where the system expects postings to tax-related GL accounts (based upon tax codes’ settings), but these postings are missing in the document (see example below). This might be the case, when you use some external applications which post automatically to SAP.

The last section “Posting parameters” is probably the most important for generation of reporting. You have a couple of radio buttons, which control how the program will execute. First option (Do not update documents) is straight forward. If you run the report in update mode (Update documents: Update run), the program will update each document with date and time, when report was executed (technically speaking changes will be updated into fields BSET-STMDT and BSET-STMTI for date / time respectively). Usage of this option is supposed to prevent including of the same document twice into different reports, which are supposed to be submitted during one period. Update mode with update “Test run” will also update documents, but only those which were not updated previously. Usage of update option implies additional performance issues.

“Form printout” options from this section are also widely used for reporting purposes. Essentially, when you run the report, the program calculates in background different subtotals, which are transactions- and tax-codes-based (i.e. linked to transaction keys MWS, VST, ESA, ESE etc.). If you select check-box “Prepare printing of forms”, the program will save these subtotals into table UMSV with references to program run date and run ID (see example below, note in my test system I use custom transaction keys UAM, UAV instead of standard keys). This aggregated data can be used by other programs to print tax returns and / or generate XML-reports. These “other programs” are mostly localization specific programs. Intersections between standard and localization based tools is SAP is interesting of itself and also deserves to be explored in a separate post.

Finally, if you want to generate DME (i.e. data medium exchange) file based on report run, you should select appropriate check-box. You should also indicate format tree which was defined in transaction DMEE and file name. Depending on format tree settings, you can generate either flat text files or hierarchical XML-files for your tax reports.

Please note! When you indicate file name – you should only indicate file name + extension, without any path to a folder on your PC. There is a separate procedure on how to download the file to PC, which will be covered a bit later.

Upon click on “Add. Parameters” button, a new selection screen will be opened enabling you to enter some data, which then can be used as a source of data for DME engine.

Please note! Button “Add. Parameters” is an optional button. It will be displayed only in those case, when you have specified format-specific structure in the settings of DMEE tree. Consequently, the list of fields on selection screen of the program will depend on the structure. In this case, I’ve used standard structure for DMEE tree FIPL_S_FRMTS_DMEE which was delivered by SAP for EC Sales for Poland. But you can use custom structures as well.

1.2. Display of report results

Run, the report. You will get the following typical reports on tax-related lines for output / input tax respectively.

An important advantage of this report over line items reports (FBL3N / FAGLL03) is that this report is more comprehensive. Line items reports on tax-related GL accounts, will display only those documents, which have postings to these accounts i.e. when tax rate is not zero. From legislation perspective certain operations, might be taxable at 0%, but that doesn’t mean that they are not relevant to VAT and should not be considered in reporting. Technically speaking all lines that are stored in table BSEG, can be displayed in line items reports. On the other hand, RFUMSV00 report is based on values from table BSET, which stores all tax-relevant line items. Thus, if some operation involved tax base of 1000 UAH and was taxable at 0%, the table will store this info and you would be able to see it in report (see example in screenshot above based on input tax code P0).

But there is also an important disadvantage. If you try to save the report into spreadsheet (see screenshot below), you will notice this option is disabled. Nowadays it’s a kind of unheard of to be unable to save a report into spreadsheet for deeper analysis.

Fortunately, SAP came out with a solution quite recently (November 2016). Please check out OSS-note 2388449 (RFUMSV00 list: Download as Spreadsheet). This note contains technical explanation on why this option was restricted originally. After installation of this note, you would be able to save report into spreadsheet, but only if you selected one output list (i.e. in section “Output lists”). Note, this feature won’t be available only for output list “Balance of all company codes”.

1.3.  Downloading of report results

After you’ve executed report the system will generate DME file. Appropriated information will be displayed at the bottom of the report. Example of typical message can be found below.

There is a separate standard program RFASLDPC to download DME file to PC, but it has no standard transaction code assigned to it. You can consider creation of custom transaction code or decided to launch it via transactions SA38 / SE38.

Indicate the following details on the selection scree of the program:

  • Source file – name of the file as specified previously during execution of program RFUMSV00;
  • File type should be set as “**”, which indicates it as a generic DME format;
  • Select check-box “Copy source file” (recommended option);
  • In the section “Target file” you should specify the path name to a file on your PC;
  • You can also indicate a specific code page, which might be a prerequisite for correct display of local characters (e.g. ü, ä etc.).

After filling of selection screen is completed, run the report to download the file to PC.

Well… that’s it. If you’ve reached this part of the post, I hope it wasn’t too boring and you have learn something useful. I’m looking forward to your comments and remarks.

Best regards, 

Bohdan Petrushchak

P.S. Disclaimer.

All sensitive information (company names, tax numbers etc.) used in this example is invented by my own. If there is some coincidence with real-life companies, it is a purely accidental one.



To report this post you need to login first.


You must be Logged on to comment or reply to a post.

  1. Julien DALEX


    Thank you for this very clear and appreciate document. One question : as SAP recommends that tax accounts are not managed on an open item basis, how do you make a link between the orignal tax items and the tax return posting ?

    Thank you.

    Julien D.

    1. Bohdan Petrushchak Post author

      Hi Julien,


      Thanks for your feedback and a good question! I agree that it is quite difficult to track the link without OI management, but in fact you can use OI management for tax accounts as well. Recommendation from SAP doesn’t mean that it’s forbidden.

      On the other hand, usually posting periods are managed quite carefully in companies and if you’re doing tax transfer posting at the end of the month and include all tax relevant documents into selection, than you can be quite sure that selection of all line items posted during any month will accurately display original tax items as well as transfer posting for the total amount.




  2. Vishal Thakur

    Hi Bohdan,

    Your post was very informative and helpful. I am a bit new to the VAT scenario. There are several unanswered questions for me:

    1. how VAT id gets captured in field STCEG in various tables
    2. which line items get populated with VAT id
    3. in which scenarios – 0 tax or non-zero tax

    If you have some documentation or link which can clear my doubts, it will greatly help me.

    Thanks in advance.

    Best regards,




Leave a Reply