Hi all, I want to use BAPI_ACC_GL_POSTING_POST to do posting in F-02. And if I want to using posting key '31', how can I give the parameters? This is my code:
it_item-itemno_acc = '10'.
UNPACK '21210100' TO it_item-gl_account.
UNPACK p_lifnr TO it_item-vendor_no.
it_item-vendor_no = p_lifnr.
UNPACK p_lifnr TO it_item-alloc_nmbr.
it_item-comp_code = 'ZB09'.
it_item-costcenter = costcenter.
it_item-ref_key_3 = 'XXX'.
it_item-pstng_date = sy-datum.
it_item-doc_type = 'SA'.
it_item-fisc_year = sy-datum+0(4).
it_item-fis_period = sy-datum+4(2).
APPEND it_item.
There is an error message: Accout 21210100 in company code ZB09 cannot be directly posted to. What should I do?