2020 Nov 02 10:08 AM
Hi all,
How do I post to posting key 25?
I am checking for posting key = 25 then set the relevant gl account number.
However I got the wrong result in FB03. It is automatically set to posting key 40 instead.
Anyone have any idea??
gw_accountgl-bus_area = 'RFBU'.
gw_accountgl-doc_type = 'ZP'.
gw_accountgl-itemno_acc = g_doc_count. "g_doc_line.
* gw_accountgl-gl_account = gw_post_rec-saknr.
* gw_accountgl-vendor_no = '1001941'.
IF gw_post_rec-bschl = '25'.
* gw_accountgl-gl_account = space.
IF gw_post_rec-gsber = 'RDF'.
gw_accountgl-gl_account = '561004'.
ELSE.
gw_accountgl-gl_account = '561002'.
ENDIF.
* gw_accountgl-vendor_no = '1001941'.
ELSEIF gw_post_rec-bschl = '50'.
IF gw_post_rec-gsber = 'RDF'.
gw_accountgl-gl_account = '561004'.
ELSE.
gw_accountgl-gl_account = '561002'.