Ansicht
Dokumentation

EXIT_SAPLNHCO_001 - IS-H: Function exit for changing an account assignment line

EXIT_SAPLNHCO_001 - IS-H: Function exit for changing an account assignment line

Addresses (Business Address Services)   ABAP Short Reference  
This documentation is copyright by SAP AG.
SAP E-Book

Functionality

Using this function exit you can modify the structure of an account assignment line of the transfer program.
The following fields can be modified:

  • Receiver order
  • Receiver cost center
  • Sender cost center
  • Activity type
  • Total activity consumption
  • Process unit
  • Document text
  • Flag for nonallocable activity type
  • Transaction

If the function exit is active, the system transfers the content of the above fields into the account assignment line without additional checks. This means that you are responsible for all modifications to the original account assignment line.

The following data is available as input parameters:

  • Service transfer header data
This structure contains general information on the transfer, for example whether the transfer was executed in test or live mode.
  • Service to be transferred
This structure contains the complete service record.
  • Account assignment rules
This structure contains the current entry from the table NLAZ that is used to create the account assignment line.
  • Created account assignment line
This structure contains the complete account assignment line as it would be created if the user exit is not active. The function exit is called exactly once per created account assignment line.
  • HCO basic settings
This structure contains the Customizing settings for the interface between IS-H and CO.

Please note that you cannot make any changes to the input parameters.

Example

You can use the function exit to make simple changes in the account assignment line (e.g. modify the document text). You can, however, make more complicated changes. For instance modify a cost center or an activity type.

Notes

  • You should always first copy the previous account assignment information into the output parameters at the start of your activated function exit to make sure that account assignment information is not inadvertently lost.

    FUNCTION EXIT_SAPLNHCO_001.

    ...

    E_EAUFN = I_RNHC01-EAUFN.
    E_EKOST = I_RNHC01-EKOST.
    E_SKOST = I_RNHC01-SKOST.
    E_LSTAR = I_RNHC01-LSTAR.
    E_LVBSU = I_RNHC01-LVBSU.
    E_SGTXT = I_RNHC01-SGTXT.
    E_KZNVL = I_RNHC01-KZNVL.
    E_VORGN = I_RNHC01-VORGN.
    E_LEINH = I_RNHC01-LEINH.

    * from here, changes to account assignment

    ...

    ENDFUNCTION.
  • Since the change to account assignment is transferred without further checks, you have to implement the required checks within the function exit. These include checking whether a cost center or order exists when posting is made.
  • You should raise the exception ERROR in all error situations, since this prevents the account assignment line in question from being transferred. A corresponding message is written to the log of the transfer program.
  • If you use your function exit to modify the category of the service type (e.g. you want to make an account assignment to a nonallocable activity type instead of to an allocable activity type), you have to modify the fields E_KZNVL and E_VORGN:
  • With allocable activity types, the E_KZNVL field must remain initial, the transaction is 'RKL'.

  • With nonallocable activity types the value of the E_KZNVL field must be 'X', the transaction is 'RKN'.

Further information

For more information on service transfer, please refer to the application documentation.

For information on Customizing, please refer to the Chapter Integration with Controlling in the integrated Implementation Guide.

For information on the transfer program, please read the corresponding program documentation.





Parameters

E_EAUFN
E_EKOST
E_KZNVL
E_LEINH
E_LSTAR
E_LVBSU
E_SGTXT
E_SKOST
E_VORGN
I_NLAZ
I_NLEI
I_RNHC01
I_RNHK1
I_TNHCO

Exceptions

ERROR

Function Group

XNHC

TXBHW - Original Tax Base Amount in Local Currency   ABAP Short Reference  
This documentation is copyright by SAP AG.

Length: 4881 Date: 20240523 Time: 073846     sap01-206 ( 72 ms )