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

Field Posting Key in BAPI_ACC_DOCUMENT_POST ?

former_member425121
Participant
0 Likes
5,348

Hi

I need to post documents like FB01 , i'm already using BAPI_ACC_DOCUMENT_POST and it works so i can now create documents with the header and itmes positions , filling the tables header, accountreceivable items and currency items.

I already found the most of fields for execute the BAPI and create the documents, but i can not find three fields, some of one (BSCHL) the most important:

Posting Key (BSCHL)

Special G/L Indicator (NEWUM)

Calculate Tax Automatically (XMWST) .

I think but i'm not sure the Posting Key (BSCHL) is placed in the EXTENSION2 table, but this table ask for some STRUCTURE name and i don't know what should i place in this field or how fill this parameter table.

Does somebody can help me about where can i place these 3 fields in the BAPI or where can i find help documentation for do this ?

Regards

Frank

1 ACCEPTED SOLUTION
Read only

mvoros
Active Contributor
0 Likes
2,183

Hi,

BSCHL - you can not enter posting key. It's derived from account type and credit/debit indicator.

NEWUM - field SP_GL_IND in tables ACCOUNTRECEIVABLE and ACCOUNTPAYABLE. It looks like it's not possible to enter it in the table ACCOUNTGL so I assume that it will be derived from other values such as GL account.

XMWST - I am not sure here but I assume that this BAPI calculates tax automatically. There are some notes related to this BAPI and tax.

Cheers

7 REPLIES 7
Read only

mvoros
Active Contributor
0 Likes
2,184

Hi,

BSCHL - you can not enter posting key. It's derived from account type and credit/debit indicator.

NEWUM - field SP_GL_IND in tables ACCOUNTRECEIVABLE and ACCOUNTPAYABLE. It looks like it's not possible to enter it in the table ACCOUNTGL so I assume that it will be derived from other values such as GL account.

XMWST - I am not sure here but I assume that this BAPI calculates tax automatically. There are some notes related to this BAPI and tax.

Cheers

Read only

0 Likes
2,183

Thanks a lot Martin

In the BAPI there is the parameter table EXTENSION2 , i found some program wich put EXTENSION2 with some values like:

extension2-structure = 'POL_ALMA'.

extension2-valuepart1 = 'NEWBS'.

extension2-valuepart2 = wa_poliza-newbs.

extension2-valuepart3 = '010'.

I really do not know what 'POL_ALMA' means , do you know the use of this parameter table ?

Regards

Frank

Read only

mvoros
Active Contributor
0 Likes
2,183

Hi,

why don't you read a documentation for this BAPI? It's described there. Generally BAPI structures with name like EXTENSIONIN are used to process additional data. For example you added some new fields into the table BSEG and now you need to populate these fields during posting. So you post required values into this table and then there is always one user exit where you can process these additional values. It's well described in BAPI documentation.

Cheers

Read only

0 Likes
2,183

Thanks Martin

I was looking in the BAPI Documentation but in my system does not appears a good help documentation, it shows only the parameters name without any explanation ; at least in SE37->Menú Goto -> Documentation -> FM ; i really don't know where other place look for this.

So as you say , i'm going to try testing with some values in EXTENSION2 parameter table.

Thanks a lot for your atenttion.

Best Regards

Frank

Read only

0 Likes
2,183

Frank,

you should use the Extension2 structure for passing the Posting Keys and you should implement the BADI for posting the documents with the Keys what you have supplied.

The Enhancement Spots are BADI_ACC_DOCUMENT and IF_EX_ACC_DOCUMENT.

I've used the BADI_ACC_DOCUMENT and now i'm able to post the documents using the keys which i've supplied to the BAPI.

Otherwise the BAPI is going to decide the posting keys based on tha amount .

Hope this will help you.

Thanks,

Adi.

Read only

0 Likes
2,183

Thanks a lot Bathineni.

I'm going to check your tips for try to implement them.

Best Regards

Frank

Read only

Former Member
0 Likes
2,183

Hi , can you please help me on following issue..

I need to find the BAPI for transaction F-02 (G/L Account Post) .. but i am not bale to find the BAPI which contains Posting key as its parameter .. Please suggest the BAPI which will fulfill this requirement

Regards ,

Uma