04-01-2011 9:10 AM
Hello Experts
I'm facing a problem when posting FI documents. I'm using BAPI_ACC_DOCUMENT_POST and passing some Z fields using Table Extension2 (bapiparex). The problem is that the Z fields are not getting updated.
BADI_ACC_DOCUMENT is implemented and working. In debug, I can see that the BADI is working as it should. Furthermore, It was already working for older developments in the same machine.
This problem is only happening in Development machine (DEV). In Quality machine (QAS) everything is working fine. Because my program is still in development, I can't transport it to QAS to see if it works there.
The problems are now the following:
- Older developments aren't updating the Z fields in BSEG
- My new development isn't updating Z fields in BSEG
- Manual posting in FB01 updates the fields
What I have done so far:
- Checked my program codding (it's ok)
- Checked BAPI BADI_ACC_DOCUMENT (it's also ok)
- Checked all user exits being used on this machine that could be clearing this fields - In all of the implemented exits, none of them refers to this problem
- Checked all implemented BTE's - In all of the implemented BTE's, none of them refers to this problem
- Searched for differences between SAP releases on DEV and QAS machines - All components have the same release
- Checked for differences (activation, structure, source code, etc) of structure bapicobl_ci, ci_cobl, table bseg, BADI's being used, etc...
What am I missing here? I think I have done everything that could explain this behavior and still have no answers...
Thanks in advance, best regards,
João Argêncio
04-01-2011 10:53 AM
Hi,
in BAPI_ACC_DOCUMENT_POST there is a part
PERFORM call_customer_function
TABLES extension1.
PERFORM call_badi
TABLES extension2.
for the extensions. Seems that there has to be filled a BADI implementation too to get the extension2 data into bseg.
BADI interface is IF_EX_ACC_DOCUMENT, used method should be method CHANGE.
Regards,
Klaus
Edited by: Klaus Babl on Apr 1, 2011 11:54 AM
04-01-2011 9:50 AM
Hi
See these notes:
SAP Note 700795 - Enhancement category of BAPI enhancement structures
SAP Note 143580 - Information on SD BAPIs and customer enhancement concept
and related notes.
I know this problem for other BAPI's, so, perhaps it happens for FI bapi, but perhaps they don't happen. If you have a field non-character in your append, in this moment, I think that BAPI doesn't work for this fields.
I hope this helps you
Regards
Eduardo
04-01-2011 11:15 AM
Eduardo,
SAP Note 700795 is already implemented because i'm running SAP_APPL 604.
Nevertherless, all custom fields are character type...
Anyhow, thanks for your input.
João Argêncio
04-01-2011 9:52 AM
Thank you for providing such an extensive list of research you have done already, this will save potential responders a lot of time.
Unfortunately most people don't do this when posting their problems here.
I don't have a solution at this point, but will make your thread "sticky" for the time being to enhance the visibility.
Thomas
04-01-2011 11:05 AM
04-01-2011 11:13 AM
Hello João,
I too appreciate the way you've given your thorough analysis. I think the checks you've performed seem exhaustive atleast from the documentation perspective!
@Thomas: We should have a "like" button on SDN similar to the one in FB
BR,
Suhas
04-01-2011 10:53 AM
Hi,
in BAPI_ACC_DOCUMENT_POST there is a part
PERFORM call_customer_function
TABLES extension1.
PERFORM call_badi
TABLES extension2.
for the extensions. Seems that there has to be filled a BADI implementation too to get the extension2 data into bseg.
BADI interface is IF_EX_ACC_DOCUMENT, used method should be method CHANGE.
Regards,
Klaus
Edited by: Klaus Babl on Apr 1, 2011 11:54 AM
04-01-2011 11:18 AM
Klaus,
That BADI is already implemented and working on QAS. I've compared the code on both systems and it's working. Even in debug I can see the custom fields being populated. And that's the strange part... BSEG simply isn't updated.
João Argêncio
04-01-2011 12:42 PM
Hi Joao,
The only that I can think is suggest you to do traces with ST05 and compare them, with BAPI and with other tcodes as a first step to decide where set break-points. In the other hand, I think that the structure RETURN doesn't have useful information. I suggest you this because with other BAPIs I remember that BADI and enhancements don't work.
Regards,
Eduardo
04-04-2011 6:06 AM
Hi João,
you wrote, that the BADI works fine on DEV system. How do you fill the BSEG fields in the CHANGE method? Is that table C_ACCIT you are filling the fields from C_EXTENSION2? may there a transport be missing on your QA system with ACCIT include or append fields?
Regards,
Klaus
04-04-2011 7:41 AM
Hi Joao,
Just to confirm whether you have used the x-structures for the z-fields that you have created, Right?
BR,
Vinit
04-04-2011 10:00 AM
Klaus,
I've said that the BADI is working fine on QA, not on DEV. What I've said is that the codding is equal on both systems.
Yes, C_ACCIT is the table that is filled in the BADI with the Extension2 contents.
The transports I already checked and there is none pending with contents that would refer this.
By the way, to everyone that has been helping, thanks a lot to all!. I'm sorry I haven't answered before but I've been away this weekend, with no internet access...
Regards,
João Argêncio
04-04-2011 10:18 AM
Vinit,
The X-Structure you are referring is the structure that is appended in BSEG? If so, yes, I'm using it to fill Extension2. If it's not that, please explain...
This is the way that I've always used to fill this table. My codding looks something like this:
data: lw_extension2 type bapiparex,
lw_bapicobl_ci type bapicobl_ci.
lw_bapicobl_ci-zzfield1 = 'Some Value'.
lw_bapicobl_ci-zzfield2 = 'Another Value'.
...
lw_bapicobl_ci-zzfieldn = 'The N value'.
if not lw_bapicobl_ci is initial.
clear lw_extension2.
lw_bapicobl_ci-itemno_acc = pv_itemno.
lw_extension2-structure = 'BAPICOBL_CI'.
lw_extension2-valuepart1 = lw_bapicobl_ci.
append lw_extension2 to pt_extension2.
endif.
Regards,
João Argêncio
04-26-2011 10:00 AM
Hello
check if some substitution has been wrtitten and activated for these fields which might be over writting or clearing the value.
05-24-2011 10:34 AM
Dear Mahesh,
Thanks for your input. I've seen all active FI substitutions and none of them refers the custom fields. Nevertheless, that's something I haven't remembered.
Best regards,
João Pedro Argêncio
05-24-2011 10:41 AM
Dear Experts,
To everyone that has helped on this subject, thank you. Points have been awarded to the helpful answers.
Unfortunately, the team of this project decided to forget this subject since the Quality and Production systems are working fine.
@ Thomas - You can now remove the "sticky" from this thread
Best regards and codding to everyone,
João Pedro Argêncio
11-07-2013 9:24 AM
Hello Comunity,
I know that more than a year has passed since I've posted this thread but we've found the solution!
After contacting SAP, they told us to run report SAPFACCG to update the structure P_ACC (the report only runs the function FI_DOCUMENT_INIT and will not raise any messages or execution log).
Yes, it is as simple as this
Best regards and thanks again for all the help!
12-14-2013 12:40 AM
Joao,
I really do appreciate you for posting your solution even after a year
It does seem pretty simple but it worked for me as well.
You saved my time, thanks bro!
09-08-2021 4:11 PM
It worked for me as well after all this time, thank you for sharing!