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

Former Member
0 Likes
1,237

Hi,

When we use BAPI_ACC_DOCUMENT_POST function module we dont have an option to pass the posting keys, these are internally generated by the BAPI. Based on which value of the BAPI Interface these are getting calculated. I will be grateful for any answers...

Regards,

Bhanu

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,208

Hi Bhanu,

You 're right posting keys aren't parameters of this BAPI.

The BAPI BAPI_ACC_DOCUMENT_POST check for the GL/Account and the amount, to post the item.

So you can have, for example, '40' '50' for debit(function of the Account / vendor, ...) and '31' for credit .

Hope this helps.

Erwan.

10 REPLIES 10
Read only

Former Member
0 Likes
1,209

Hi Bhanu,

You 're right posting keys aren't parameters of this BAPI.

The BAPI BAPI_ACC_DOCUMENT_POST check for the GL/Account and the amount, to post the item.

So you can have, for example, '40' '50' for debit(function of the Account / vendor, ...) and '31' for credit .

Hope this helps.

Erwan.

Read only

Former Member
0 Likes
1,208

If you still want to pass posting keys, extend the BAPI using EXTENSION1 parameter. OSS note.487722 explains how to use BTE to extend the BAPI.

Please let me know if you have more questions.

Ram Dindi.

Read only

Former Member
0 Likes
1,208

Hi,

I need to generate a document with reverse Posting keys, I mean if i have 40,50 as posting keys then i need to generate a document with 50,40. I dont have the Accounting document number so i cant use the standard BAPI used for reversal. How can i use BAPI_ACC_DOCUMENT_POST to generate a document. Please provide a solution for this scenario.

Regards,

Bhanu.

Read only

0 Likes
1,208

Posting keys are replaced by the sign + / - of the amount.

Perhaps, you can inverse the amount sign for reversal.

Read only

0 Likes
1,208

Hi Bhanu

We are trying to make this BAPI work as well; what parameters are you filling in Document Header? we keep getting error message on that OBJ_TYPE; OBJ_KEY and OBJ_SYS are required

thanks-Adil

Read only

0 Likes
1,208

They are not mandatory for me, but you can try with :

documentheader-obj_type = 'BKPFF'.

documentheader-obj_key = '$'.

CONCATENATE sy-sysid 'CLNT' sy-mandt INTO documentheader-obj_sys.[/code]

'$' : means that the doc number will be an external number.

If you want to decide of the n° of the generated doc you'll have to concatenate the doc N°, the company and the fiscal year :

5040000206BUKR2005[/code]

Regards,

Erwan.

Read only

0 Likes
1,208

Hi Erwan LE BRUN ,

I m also using the same BAPI. documnet nos is being generated but it is not available in system i checked BKPF bseg tables also.

I m getting message

Document posted successfully: BKPFF 640000003148002005 DEVCLNT110

Doc No is always increased by one but it is not saving docs in system.

I am also using fm after BAPI call

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'

EXPORTING

WAIT = '5'

IMPORTING

RETURN = myret.

Regards

Gopal Jaiswal

Read only

0 Likes
1,208

Hi Gopal,

I too have the exact problem.I get the same Message but am not able to see the generated DocNo in BKPF/BSEG.Did u get the solution?If so , would you be kind enough to mail the same as soon as possible to my personnel ID,

samson_moses@yahoo.com

Thanx in advance.

Read only

0 Likes
1,208

Samson,

Any solution to this issue, i am having the same problem.

Thanks in Advance

Frank

Read only

0 Likes
1,208

Try using COMMIT WORK. I believe most BAPIs delivered by SAP do not contain commit.

Regards,

Gabriel