Neler Yeni
Hoş Geldiniz,

SAPOfis Türkiye üzerinde yer alan içeriklere erişim sağlayabilmek, projelerinizde karşılaştığınız sorunlara birlikte çözüm üretebilmek adına üye olunuz. Unutmayalım ki, bilgi paylaşıldıkça değer kazanır.

SAP BLOG Add fields to ALV in FINT

SAP Blog

Kayıtlı Üye
Katılım
22 Ara 2017
Mesajlar
382
Beğeniler
4
Puanları
6
#1
Introduction​



In first blog about FINT I have shown how email sending with Smartforms can be archived. This feature is not the only enhancement that can be applied to FINT.

In this blog I will show how ALV of FINT can be enhanced by new fields that will ease the work with interest processing.

FINT Enhancement Possibilities​


The selection screen as well as ALV output and ALV Functions can be enhanced by customer fields via program RFINTITUSEREXT.

The usage of functions added by above mentioned program can be archived with BADI FI_INT_CUS01.

FINT Sending: Enhance Screen​


The ALV output will be enhanced by 3 fields: business partner name (custom data element not used in any other table), email address and country (both already used in different tables).

Function of adding/ deleting fields in calculation and display structure of enhancement program RFINTITUSEREXT will be used

There are two ways to archive the ALV fields enhancement in FINT:

  • Append in structure INTIT_EX

proxy.php?image=https%3A%2F%2Fblogs.sap.com%2Fwp-content%2Fuploads%2F2019%2F01%2FFINT_Append-1.png&hash=4ab5de230984d79d987e8bd635d4496a


proxy.php?image=https%3A%2F%2Fblogs.sap.com%2Fwp-content%2Fuploads%2F2019%2F01%2FFINT_Append_full.png&hash=a5a0c7e2a1d3e21530a0358d773593fe


Afterwards the display structure INTIT_EXTF is regenerated automatically and the new field is added:

proxy.php?image=https%3A%2F%2Fblogs.sap.com%2Fwp-content%2Fuploads%2F2019%2F01%2FINT_EXTF_View.png&hash=1866bc64b4fe6c7f251bac1d0bac43e8


  • The field is already used in a different table:

Run the extension report only and specify the field name that suld be visible in the interest structure and also the name of the field in the source table:

proxy.php?image=https%3A%2F%2Fblogs.sap.com%2Fwp-content%2Fuploads%2F2019%2F01%2FFINT_Structure_Extend_Email.png&hash=909c460bedda3fc45d62a4e5d1267812


proxy.php?image=https%3A%2F%2Fblogs.sap.com%2Fwp-content%2Fuploads%2F2019%2F01%2FRUn_ok.png&hash=3acefb954aa99b5699c1883fdb665a9c




Display structure is extended:

proxy.php?image=https%3A%2F%2Fblogs.sap.com%2Fwp-content%2Fuploads%2F2019%2F01%2FINT_EXTF_View-1.png&hash=df1442cf34bce48f19f173f19d646ded


In the same way country is added:

proxy.php?image=https%3A%2F%2Fblogs.sap.com%2Fwp-content%2Fuploads%2F2019%2F01%2FLAND1_ext.png&hash=abebb1867c290abaf75428753af56ab7


After adding all fields structure is enhanced and ready to be filled in by BADI.

proxy.php?image=https%3A%2F%2Fblogs.sap.com%2Fwp-content%2Fuploads%2F2019%2F01%2FFINT_Append_full-1.png&hash=81cd905ad0531e5af4a68c0613823e50


FINT Field Addition: Method used​


In your implementation of BADI FI_INT_CUS01 ALV fields are available in method INT_CHANGE_ITEMS which is triggered before the actual calculation is done. It is advisable to use this method because during calculation the interest can be split into more line item when there are many percentages used for calculation. Fields filled in before this is done are taken over to newly created lines.

FINT Field Addition: INT_CHANGE_ITEMS​


Method INT_CHANGE_ITEMS contains all data about the interest calculated, business partners and selection option.

This method is called for every business partner separately. Meaning if we have 3 business partners selected – it will be called 3 times.

We are going to select the fields from KNA1 and ADR6 tables to fill it in the output:

"select data from tables for a single customer
"and add it to display structure

IF ct_items IS NOT INITIAL.

SELECT kna1~kunnr, kna1~name1, kna1~name2 , kna1~land1, adr6~smtp_addr, adr6~flgdefault
FROM kna1
LEFT OUTER JOIN adr6
ON adr6~addrnumber = kna1~adrnr
INTO TABLE @DATA(lt_master_data)
FOR ALL ENTRIES IN @ct_items
WHERE kna1~kunnr = @ct_items-account.
IF sy-subrc EQ 0.

SORT lt_master_data BY kunnr flgdefault DESCENDING.
LOOP AT ct_items ASSIGNING FIELD-SYMBOL(<fs_single_item>).

READ TABLE lt_master_data WITH KEY kunnr = <fs_single_item>-account
ASSIGNING FIELD-SYMBOL(<fs_found_md>).
IF sy-subrc EQ 0.

<fs_single_item>-zzbpname = |{ <fs_found_md>-name1 }{ <fs_found_md>-name2 }|.
<fs_single_item>-zzland1 = <fs_found_md>-land1.
IF <fs_found_md>-flgdefault EQ abap_true. "Address is marked as an standard email address
<fs_single_item>-zzsmtp_addr = <fs_found_md>-smtp_addr.
ENDIF.

ENDIF. "on master data read

ENDLOOP. "on selected items

ENDIF. "on master data selection

ENDIF. "on check if any item is provided


Dependent on your needs the coding can be adjusted ( for example FAE can be deleted by single read of the customer number and CONCAT option can be used to already concatenate the names during the selection) in any possible way.


To show how the solution works 3 customers were defined of which 2 only has email addresses updated (same as in previous FINT blog post).

FINT calculation is executed:

proxy.php?image=https%3A%2F%2Fblogs.sap.com%2Fwp-content%2Fuploads%2F2019%2F01%2FFINT_selection.png&hash=8746b14c9a71ab938acb8a92b1459732



In the layout the fields were added and are available in the display:

proxy.php?image=https%3A%2F%2Fblogs.sap.com%2Fwp-content%2Fuploads%2F2019%2F01%2Ffint_result.png&hash=1aabd90cd970450d27f71bbe6d74ae9e


Further usage of the fields added​


Adding a field in a display structure can also trigger filling it in the posted interest document. Some fields are not visible here but quite important for dunning/ credit control area. The transfer from original invoice to interest document can either happen via an user-exit or by means of the display structure extension.

Once a field that is available in original document (based on BSID table) it can be added to display structure, like Credit Control area:

proxy.php?image=https%3A%2F%2Fblogs.sap.com%2Fwp-content%2Fuploads%2F2019%2F01%2FKKBER.png&hash=be2255af41d4dbfbf04df4ec9d6b4ac3


or Dunning Area:

proxy.php?image=https%3A%2F%2Fblogs.sap.com%2Fwp-content%2Fuploads%2F2019%2F01%2FMABER.png&hash=a65f10ef4469a4c46e948756b73202d6


Using customizing options you can indicate which of the fields available in original document should be transferred to interest document.

IMG Financial Accounting (New) –> Accounts Receivable and Accounts Payable –> Business Transactions –> Interest Calculation –> Interest Calculation Global Settings
Transaction Prepare Item Interest Calculation

Once the option ‘Transfer of Account Assignment Info’ is marked the fields to be transferred from original posting (additionally to all fields transport by standard) are moved to interest document.

proxy.php?image=https%3A%2F%2Fblogs.sap.com%2Fwp-content%2Fuploads%2F2019%2F01%2Fscreen_blog.png&hash=bde45150be5371c03ea2afc02b737fd1


Thank you for reading and stay tuned for new blog posts.

Marek

Okumaya devam et...
 
Üst