2015 Jun 12 2:41 PM
Hello
This is my first post here so please be patient.
I have developed Excel macro which calls function BAPI_ACC_DOCUMENT_POST populates required structures and tables with excel data, commits transaction and gets booking number from SAP. Everything is working fine except for accrual Journals where Reversal date needs to populated. I know it is not in the header structure and EXTENSION1 needs to be used. I spent hours reading through internet how to do it and I am still with no idea.
Do I need to implement some ABAP code first in SAP?
I do no not have ABAP key. I cannot make any changes in SAP as developer, I only have user access. I can call BAPIs from Excel.
Is there a way to enter reversal date through EXTENSION1 table? What should I pass to entension1 from excel?
I tried: (example of code from excel macro)
Set BAPIfnct = SAPfns.Add("BAPI_ACC_DOCUMENT_POST") ....................... .........'populate header and lines ...................... |
| BAPIfnct.tables.Item("EXTENSION1").Rows.Add | |
| BAPIfnct.tables.Item("EXTENSION1").Value(BAPIfnct.tables.Item(1, "FIELD1") = "BKPF-STODT='20150505'" |
but obviously this is not enough
do I need to pass some ABAP code there? I never did any ABAP programming.
Any push in the right direction will be greatly appreciated.
Regards
Marcin
Hello
This is my first post here so please be patient.
I have developed Excel macro which calls function BAPI_ACC_DOCUMENT_POST populates required structures and tables with excel data, commits transaction and gets booking number from SAP. Everything is working fine except for accrual Journals where Reversal date needs to populated. I know it is not in the header structure and EXTENSION1 needs to be used. I spent hours reading through internet how to do it and I am still with no idea.
Do I need to implement some ABAP code first in SAP?
I do no not have ABAP key. I cannot make any changes in SAP as developer, I only have user access. I can call BAPIs from Excel.
Is there a way to enter reversal date through EXTENSION1 table? What should I pass to entension1 from excel?
I tried: (example of code from excel macro)
Set BAPIfnct = SAPfns.Add("BAPI_ACC_DOCUMENT_POST") ....................... .........'populate header and lines ...................... |
| BAPIfnct.tables.Item("EXTENSION1").Rows.Add | |
| BAPIfnct.tables.Item("EXTENSION1").Value(BAPIfnct.tables.Item(1, "FIELD1") = "BKPF-STODT='20150505'" |
but obviously this is not enough
do I need to pass some ABAP code there? I never did any ABAP programming.
Any push in the right direction will be greatly appreciated.
Regards
Marcin
2015 Jun 14 8:32 AM
Hello Marcin,
Not only fill Extension table but you should also write some code on ABAP side. This process has two difference side. First you should fill data to Extension and secondly in abap side, you should catch the extension values and MODIFY some internal tables while the posting document is creating.
Shortly, it is not only enough to set some values in Extensions.
Here is the document about BAPI_ACC_DOCUMENT_POST Extension usage;
It is quietly clear to understand. However, if you do not develop something on SAP ABAP. It will also be hard to work for you.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |