Process documentationAdapting of Invoice Previews (SD-BIL)

 

You can use this process to customize the standard invoice attributes provided to suit your own requirements. For example, as delivered the invoice form TM_INVOICE_FORM01 contains standard invoice attributes from SAP ERP with some specific attributes from SAP Transportation Management (SAP TM). You may wish to add other attributes from SAP TM to the standard invoice attributes.

You can determine the output type to be used with the method GET_INVOICE_PRNT_OUTPUT_TYPES. The following information applies:

  • Importing parameter is the billing type (KSCHL)

  • Corresponding message schema is determined from table TVFK

  • All assigned output types are read from table T683S

  • All valid output types are determined from table TNAPR (message transmission medium = Print Output)

  • First output type is returned using exporting parameter EV_OUTPUT_TYPE

In addition, you can use the Business Add-In (BAdI) BADI_TM_INVOICE with method CHANGE_OUTPUT_TYPE, to create rules for output type determination, such as the following:

  • Country US: message type TM00

  • Country GE: message type TM01

For more information about this BAdI, see Customizing for Integration with other SAP Components under Start of the navigation path Transportation Management Next navigation step Invoice Integration Next navigation step Billing Next navigation step Business Add-Ins (BAdIs) Next navigation step BAdI: Invoice Print Preview Integration with TM End of the navigation path.

Process

  1. Copy the standard form (SAP ERP).

    In the transaction SFP, enter form TM_INVOICE_FORM01 and copy it, for example to Z01_TM_INVOICE_FORM01. Select Local Object, save, and activate the form.

  2. Modify the copied form.

    In the transaction SFP, enter the name of the copied form, for example Z01_TM_INVOICE_FORM01. You can change the layout and add any attributes shown to suit your requirements then activate the form.

  3. Copy the standard BAdI implementation.

    In the transaction SE19, enter the enhancement implementation TM_BIL_IMPL01 and copy it. Name this copy so that it corresponds to the copied form, for example Z01_TM_BIL_IMPL01. Select Local Object and save.

  4. Change the filter value.

    In the transaction SE19, enter the name of the copied enhancement implementation, for example Z01_TM_BIL_IMPL01. Click the Change button, click the left expansion button and then click Change Filter Val.. Mark the filter value item and continue. Change Value 1 to the name of the copied enhancement implementation, for example Z01_TM_INVOICE_FORM01, then activate.

  5. Assign the copied form an output type.

    In Customizing for Sales and Distribution under Start of the navigation path Basic Functions Next navigation step Output Control Next navigation step Output Determination Next navigation step Output Determination Using the Condition Technique Next navigation step Maintain Output Determination for Billing Documents Next navigation step Maintain Output Types End of the navigation path select Output Type TM00. Select dialog Processing routines and change PDF form to Z01_TM_INVOICE_FORM01 under PDF/SmartForm Form for medium Print Output.