Вы находитесь на странице: 1из 3

PC_SPLIT_COMPLETE_FILENAME Pobieranie nazwy pliku z caej cieki moliwe te inne wybory.

POSTING_INTERFACE_CLEARING Ksigowanie i rozliczenie pozycji it_ftpost-stype = 'K'."Header it_ftpost-count = '1'. "number of Dynpro CLEAR lv_date. CONCATENATE sy-datum+6(2) sy-datum+4(2) sy-datum(4) INTO lv_date. it_ftpost-fnam = 'BKPF-BLDAT'. it_ftpost-fval = lv_date. APPEND it_ftpost. CLEAR lv_date. CONCATENATE sy-datum+6(2) sy-datum+4(2) sy-datum(4) INTO lv_date. it_ftpost-fnam = 'BKPF-BUDAT'. it_ftpost-fval = lv_date. APPEND it_ftpost. it_ftpost-fnam = 'BKPF-BLART'. it_ftpost-fval = 'MX'. "Same type as documents cleared via F-32. APPEND it_ftpost. it_ftpost-fnam = 'BKPF-BUKRS'. it_ftpost-fval = ls_bkpf-bukrs. APPEND it_ftpost. it_ftpost-fnam = 'BKPF-BKTXT'. it_ftpost-fval = ls_bkpf-bktxt. APPEND it_ftpost. it_ftpost-fnam = 'BKPF-WAERS'. it_ftpost-fval = ls_bkpf-waers. APPEND it_ftpost.

it_ftpost-fnam = 'BKPF-XBLNR'. it_ftpost-fval = ls_bkpf-xblnr. APPEND it_ftpost. it_ftpost-fnam = 'BSEG-BELNR'. it_ftpost-fval = ls_bseg-belnr. APPEND it_ftpost. it_ftpost-fnam = 'RF05A-XPOS1(04)'. it_ftpost-fval = 'X'. APPEND it_ftpost.

it_ftpost-stype = 'P'. it_ftpost-count = '2' . it_ftpost-fnam = 'RF05A-NEWBS'. it_ftpost-fval = '50'. APPEND it_ftpost. it_ftpost-fnam = 'BSEG-HKNOT'.

it_ftpost-fval = ls_bseg-hkont. APPEND it_ftpost. it_ftpost-fnam = 'BSEG-WRBTR'. it_ftpost-fval = ls_bseg-wrbtr. APPEND it_ftpost.

CLEAR it_ftclear. REFRESH it_ftclear. it_ftclear-agkoa = 'D'. "Account Type it_ftclearxnops = 'X'. "Indicator: Select only open items which are not it_ftclear-agbuk = ls_bsid_wp-bukrs. "Example company code it_ftclear-agkon = ls_bsid_wp-kunnr. "Example Customer it_ftclear-selfd = 'BELNR'."Selection Field it_ftclear-selvon = ls_bsid_wp-belnr. "p_doc1. *lt_ftclear-selbis = '1400002309'. "p_doc1. APPEND it_ftclear.

LOOP AT lt_bsid INTO ls_bsid.

it_ftclear-agkoa = 'D'. "Account Type it_ftclearxnops = 'X'. "Indicator: Select only open items which are not it_ftclear-agbuk = ls_bsid-bukrs. "Example company code it_ftclear-agkon = ls_bsid-kunnr. "Example Customer it_ftclear-selfd = 'BELNR'."Selection Field it_ftclear-selvon = ls_bsid-belnr. "p_doc1. *lt_ftclear-selbis = '1400002309'. "p_doc1. APPEND it_ftclear. ENDLOOP. CALL FUNCTION 'POSTING_INTERFACE_START' EXPORTING i_function = 'C' i_keep = 'X' "i_group = l_group i_mode = 'A' i_update = 'S' "i_user = sy-uname "i_xbdcc = 'x' EXCEPTIONS client_incorrect = 1 function_invalid = 2 group_name_missing = 3 mode_invalid = 4 update_invalid = 5 OTHERS = 6. ** Clear all the line items. CALL FUNCTION 'POSTING_INTERFACE_CLEARING'

* * * *

EXPORTING i_auglv = 'UMBUCHNG' i_tcode = 'F-32' TABLES t_blntab = it_blntab t_ftclear = it_ftclear t_ftpost = it_ftpost t_fttax = it_fttax EXCEPTIONS clearing_procedure_invalid = 1 clearing_procedure_missing = 2 table_t041a_empty = 3 transaction_code_invalid = 4 amount_format_error = 5 too_many_line_items = 6 company_code_invalid = 7 screen_not_found = 8 no_authorization = 9 OTHERS = 10. IF it_blntab[] IS INITIAL. ROLLBACK WORK. " sy-subrc 0. w_flag = 'x'. w_indicator = 'u'. ELSE. CLEAR w_flag. w_indicator = 'a'. ROLLBACK WORK. ENDIF. CALL FUNCTION 'POSTING_INTERFACE_END'.

"value = fb05

Вам также может понравиться