Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

BAPI_ACC_DOCUMENT_POST Not Using Document Type

Former Member
0 Likes
1,918

Hi,

I'm currently using BAPI_ACC_DOCUMENT_POST and intended to post document type RJ, but instead the BAPI posted the document under a different document type C1. I tried other document types and the result is the same.

Hope I can have your inputs about this.

Thanks,

Nikolai

7 REPLIES 7
Read only

Former Member
0 Likes
1,431

Hello,

Pass Document type at Header level ie DOCUMENTHEADER-doc_type = 'RJ'.

Read only

0 Likes
1,431

I'm already passing that field. Still it posts the documents under a document type C1.

Read only

0 Likes
1,431

Hi,

If you pass the right header parameter and it still posts the document with a different doc.type, make sure you don't have any exits/badis/FI substitutions active, what changes doc.type..

Regards,

MaryM

Read only

0 Likes
1,431

Hi MaryM, how can I check for the user exits/BADIs/FI substitutions?

Read only

0 Likes
1,431

Hi nikolai,

Check the implementation (if is exists) for BADI_ACC_DOCUMENT.

Or BTE function OPEN_FI_PERFORM_RWBAPI01_P..

Gor sustitutions check tcode OBBH.

Hope it helps!

MaryM

Read only

Former Member
0 Likes
1,431

Dear Nikolai,

If you want to change the document type means you have to use the BADI to change the Document type the BADI Name is BADI_ACC_DOCUMENT.

In that BADI CHANGE method is there here C_ACCHD parameter is ther you can pass the Documnet type directly will c.

Regards,

Dhina..

Read only

Former Member
0 Likes
1,431

I found the cause of the problem. The doc type passed on parameter DOCUMENTHEADER was being overridden by the doc type being passed in table ACCOUNTGL.

Thanks for all the help!