I don't know why the following code always have "P_ACCOUNTGL" is not an internal table." error message. I've already defined P_ACCOUNTGL as type of table. thanks
data: ls_documentheader TYPE bapiache08,
lt_accountgl like table of bapiacgl08 with header line.
PERFORM create_gl_doc USING ls_documentheader
lt_accountgl
form create_gl_doc using p_documentheader
p_accountgl
p_currencyamount.
CALL FUNCTION 'BAPI_ACC_GL_POSTING_POST'
EXPORTING
documentheader = p_documentheader
IMPORTING
obj_type = lv_obj_type
obj_key = lv_obj_key
obj_sys = lv_obj_sys
TABLES
accountgl = p_accountgl
currencyamount = p_currencyamount
return = lt_return
extension1 = lt_extension1
EXCEPTIONS
others = 1.
endform.