Alle Ergebnisse anzeigen …


Generic selectors

Exact matches only

Search in title

Search in content

Post Type Selectors

The content of many fields in the document, the logic of many fields and texts in forms, and also follow-on actions depend on whether the transaction is internal or has been exported abroad in SAP sales documents (order-delivery – billing document).

The following case distinction must often be made:

– No export

– Export from EU to EU country

– Export from EU to a third country

– Export from third countries in the EU

– Export of third countries to a third country

So that these cases do not have to be recalculated every time in terms and formulas or in every form and program, it is advisable to create a “Tax Indicator Export” in a userexit in the customer order and to append this as a ZZ field to the table VBAK . This “control indicator export” can then be transferred as a ZZ field into the delivery (table LIKP) and the billing document (table VBRK) via a data transfer routine in the copy control.

By means of such a “tax indicator export”, conditions, messages and processes for Intercompany can then be conveniently controlled by Customizing.

The coding of a function module for the determination of a “Tax indicator export” is presented below.

Create a domain ZZTAXEL_DOM

  • Length CHAR 1

[av_image src=’http://solidforms.de/solid_wp_2014/wp-content/uploads/2016/03/Domäne-ZZTAXEL_DOM.png’ attachment=’16050′ attachment_size=’full’ align=’center’ styling=” hover=” link=” target=” caption=” font_size=” appearance=” overlay_opacity=’0.4′ overlay_color=’#000000′ overlay_text_color=’#ffffff’ animation=’no-animation’ av_uid=’av-161zj34′][/av_image]

Creating a Data Element ZZTAXEL_E

[av_image src=’http://solidforms.de/solid_wp_2014/wp-content/uploads/2016/03/Datenelement-ZZTAXEL_D.png’ attachment=’16049′ attachment_size=’full’ align=’center’ styling=” hover=” link=” target=” caption=” font_size=” appearance=” overlay_opacity=’0.4′ overlay_color=’#000000′ overlay_text_color=’#ffffff’ animation=’no-animation’ av_uid=’av-upi0xs’][/av_image]

Extend the VBAK table by the ZZTAXEL field

– Append on table VBAK

Creating a Function Module Z_SD_DETERMINE_TAXEL

FUNCTION Z_SD_DETERMINE_TAXEL.
*“———————————————————————-
„„Lokale Schnittstelle:
*“ IMPORTING
*“ VALUE(IV_ALAND) TYPE ALAND OPTIONAL
*“ VALUE(IV_LLAND) TYPE LLAND OPTIONAL
*“ EXPORTING
*“ VALUE(EV_TAXEL) TYPE ZZTAXEL_D
*“———————————————————————-

Deklarationen —————————————————— *
DATA: lv_xegld_aland TYPE xegld,
lv_xegld_lland TYPE xegld.
Fall 1) Kein Export ———————————————— *
IF iv_aland = iv_lland.
ev_taxel = ‚0‘.
EXIT.
ENDIF.
Ermittlung der EU-Kennzeichen für die Länder ———————– *
SELECT SINGLE xegld INTO lv_xegld_aland
FROM t005
WHERE land1 = iv_aland.
SELECT SINGLE xegld INTO lv_xegld_lland
FROM t005
WHERE land1 = iv_lland.
Fall 2) Export in EU ———————————————– *
IF iv_aland NE iv_lland.
IF lv_xegld_aland NE space AND lv_xegld_lland NE space.
ev_taxel = ‚2‘.
EXIT.
ENDIF.
ENDIF.
Fall 3) Export EU – Drittland ————————————– *
IF iv_aland NE iv_lland.
IF lv_xegld_aland NE space AND lv_xegld_lland = space.
ev_taxel = ‚1‘.
EXIT.
ENDIF.
ENDIF.
Fall 4) Export aus einem Drittland in EU ————————— *
IF iv_aland NE iv_lland.
IF lv_xegld_aland = space AND lv_xegld_lland NE space.
ev_taxel = ‚4‘.
EXIT.
ENDIF.
ENDIF.
Fall 5) Export aus einem Drittland in Drittland ——————– *
IF iv_aland NE iv_lland.
ev_taxel = ‚5‘.
ENDIF.
ENDFUNCTION.

Installing the function module in the userexit SAVE_DOCUMENT_PREPARE in the program MV45AFZZ

IF t180-trtyp = ‚H‘. „Anlegen
IF z_ca_cl_ue_control=>aktiv( ‚SD_FILL_LIKP_ZZTAXEL‘ ) = ‚X‘.
CALL FUNCTION ‚Z_SD_DETERMINE_TAXEL‘
EXPORTING
iv_aland = t001-land1
iv_lland = kuwev-land1
IMPORTING
ev_taxel = vbak-zztaxel.
ENDIF.
ENDIF.

Display the field VBAK-ZZTAXEL in the customer order in the additional data B

– Dynpro

Completion of data transfer routines for delivery and billing

  • Extend the tables LIKP and VBRK by the ZZTAXEL field
  • Completing the data transfer routines header delivery and header billing to fill the field LIKP-ZZTAXEL or VBRK-ZZTAXEL

Further information

Spezial topics to SAP forms
Fixed price SAP forms
SAP form development