Enterprise Resource Planning Blogs by Members
Gain new perspectives and knowledge about enterprise resource planning in blog posts from community members. Share your own comments and ERP insights today!
cancel
Showing results for 
Search instead for 
Did you mean: 
vijaymanikandan
Contributor

There are standard BADI and configurations that enable us to add the fields in AR tables in the Partner level of the Collections work list but. There is no standard way to add the fields that are not there in the AR and hence this blog.

In our example we will be adding the Customer PO number that is there in the Sales order of the invoice.

Create Append structure for the Structure ‘FDM_COLL_INVOICE’. This structure has the list of fields for the invoice level work list.

    1. Create a append structure with the list of fields that you need to be added in the work list of the invoice level.

Here we have created a append structure ZZINVOICE and added 3 fields.


Enhancement created in the FM ‘FDM_COLL_INVOICES_READ’.

We don’t have any other option here to populate the value to the new field but only to create a enhancement in the FM.

In this FM the table’ t_invoices[]’ already has the newly added fields. Create the enhancement point and the end of the FM as in below screen shot and write logic to populate the new fields with the values.

DATA: BEGIN OF vbfa_tab OCCURS 0,
vbelv
TYPE vbfa-vbelv,
posnv
TYPE vbfa-posnv,
vbeln
TYPE vbfa-vbeln,
posnn
TYPE vbfa-posnn,
vbtyp_n
TYPE vbfa-vbtyp_n,
vbtyp_v
TYPE vbfa-vbtyp_v,
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""$"$\SE:(4) Function Module FDM_COLL_INVOICES_READ, End, Enhancement ZFSCM_FILL_PONUMB, Struct. VBFA_TAB, End                                                 S
END OF vbfa_tab.

DATA: BEGIN OF vbkd_tab OCCURS 0,
vbeln
TYPE vbkd-vbeln,
posnr
TYPE vbkd-posnr,
bstkd
TYPE vbkd-bstkd,
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""$"$\SE:(5) Function Module FDM_COLL_INVOICES_READ, End, Enhancement ZFSCM_FILL_PONUMB, Struct. VBKD_TAB, End                                                 S
END OF vbkd_tab.
data: ld_tabix type sy-tabix.

if not t_invoices[] is initial.
SELECT vbelv posnv vbeln posnn vbtyp_n vbtyp_v FROM vbfa
INTO TABLE vbfa_tab FOR ALL ENTRIES IN t_invoices
WHERE vbeln = t_invoices-BILLING_DOC
AND vbtyp_n = 'M'.
IF NOT vbfa_tab[] IS INITIAL.

SELECT vbeln posnr bstkd FROM vbkd INTO TABLE vbkd_tab
FOR ALL ENTRIES IN vbfa_tab WHERE
vbeln
= vbfa_tab-vbelv.

endif.
endif.
loop at t_invoices into ls_invoice.
ld_tabix
= sy-tabix.
read table vbfa_tab with key vbeln = ls_invoice-billing_doc.
if sy-subrc = 0.
read table vbkd_tab with key vbeln = vbfa_tab-vbelv.
if sy-subrc = 0.
ls_invoice
-PONUMB = vbkd_tab-bstkd.
modify t_invoices from ls_invoice index ld_tabix transporting PONUMB.
endif.
endif.
endloop.

Assuming that you have done all your configurations and then send the data from AR to collections management, you can test as below.

Tcode – UDM_SUPERVISOR

Enter the Details and execute.

Adding the fields here in the Business partner level work list is simple as per the available documentations.

Now double click on the partner to see the invoice level details. Here you can see the customer PO number that we have had in the Sales order.

Similarly you can build your logic for any field that you need.

7 Comments
Labels in this area