Well, better use BAPI as already written, or use some FM that build the BDC for you (they manage the screen sequence), look at following FM:
- POSTING_INTERFACE_START
- POSTING_INTERFACE_DOCUMENT
- POSTING_INTERFACE_END
Else if you are not in a hurry, you could play with FM as FI_CHECK_ACCOUNT_ASSIGNMENT to identify required fields and dynpro, or ask your functional for some rules.
Regards,
Raymond