05-06-2010 11:21 PM
05-07-2010 11:20 AM
The code presented beneath makes the link between the file number at the extarnal party and the document numbers in SAP. It's not much but it is an example. It is used to link payments received from external parties like bailiffs for customers that have an excessive debt existing of several open items. The payments are linked via the file number at the bailiff which is stored in a customer field to the seperate open documents.
Hope it helps.
Regards,
Arnoud Bom
FUNCTION zfcd_dwi_0210.
*"----
""Lokale interface:
*" IMPORTING
*" VALUE(I_SELTAB) LIKE ISELTAB STRUCTURE ISELTAB
*" TABLES
*" T_SELTAB STRUCTURE ISELTAB
*" EXCEPTIONS
*" UNKNOWN_SELECTION
*"----
CHECK i_seltab-selfn = 'DOSSIER' AND i_seltab-xsfex = 'X'.
CLEAR: wa_doc.
SELECT DISTINCT opbel FROM dfkkcoll
INTO CORRESPONDING FIELDS OF TABLE i_doc
WHERE zfcd_dossier = i_seltab-selcu.
LOOP AT i_doc INTO wa_doc.
t_seltab-selnr = sy-tabix.
t_seltab-selfn = 'OPBEL'.
t_seltab-selcu = wa_doc-opbel.
t_seltab-selco = wa_doc-opbel.
append t_seltab.
ENDLOOP.
ENDFUNCTION.