BAPI Extension for BAPI_ACC_GL_POSTING_POST

...Previous

Building structure BAPIEXTC, BAPIEXT, BAPIEXTA which will act as the container for the 5 custom fields

Can use the following code for filling the values in the EXTENSION1 :

DATA : it_extension TYPE TABLE OF bapiextc,
       wa_extension TYPE bapiextc.
 

Filling extension table

  wa_extension-field1(03)        = lw_item-itemno_acc+7(3).
  wa_extension-field1+03(04) = w_post-zzproj.
  wa_extension-field1+07(04) = w_post-zzstate.
  wa_extension-field1+11(06) = w_post-zzrecode.
  wa_extension-field1+17(04) = w_post-zzprod.
  wa_extension-field1+21(04) = w_post-zzchennel.
  wa_extension-field1+25(04) = w_post-ldgrp.
  APPEND wa_extension TO it_extension.
  CLEAR: lw_item,wa_extension.  

Calling the BAPI 'BAPI_ACC_GL_POSTING_POST' and passing it_extension to extension1.

   CALL FUNCTION 'BAPI_ACC_GL_POSTING_POST'
          EXPORTING
            documentheader = wa_head 
          IMPORTING
            obj_type                 = obj_type
            obj_key                   = obj_key
            obj_sys                    =  obj_sys
          TABLES
            accountgl                 = i_item
            currencyamount     = i_amnt
            return                       = i_return
            extension1              = it_extension.

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.

Please send us your feedback/suggestions at webmaster@SAPTechnical.COM 

HomeContribute About Us Privacy Terms Of Use • Disclaimer • SafeCompanies: Advertise on SAPTechnical.COM | Post JobContact Us  

Graphic Design by Round the Bend Wizards

footer image footer image