Posts

Showing posts from August, 2026

Passing custom field values to the accounting document during GR/Invoice posting.

Image
Step 1: Create an FM with parameters and table structures similar to the example below. Step 2: Implement the code as shown below and active. DATA : l_f_ebeln TYPE ebeln .    READ TABLE t_accit INTO DATA ( lr_accit ) INDEX 1 .    IF sy - subrc = 0 .     l_f_ebeln = lr_accit - ebeln .    ENDIF .    IF l_f_ebeln IS NOT INITIAL .      SELECT ebeln , ebelp , zz_prd_code , zz_veh_type        FROM ekpo INTO TABLE       @DATA ( lt_ekpo )        WHERE ebeln EQ @l_f_ebeln .    ENDIF .    IF lt_ekpo IS NOT INITIAL .      LOOP AT t_accit INTO DATA ( lr_accit1 ) WHERE koart = 'S' .        READ TABLE lt_ekpo INTO DATA ( lr_ekpo ) WITH KEY ebelp = lr_accit1 - ebelp .        IF sy - subrc = 0 .       ...