12-08-2009 5:48 AM
Dear Experts,
I am working on BAPI_ACC_DOCUMENT_POST for posting the accounting documents which includes G/Ls and Vendor payments. BAPI is ready and working fine, but we want to pass the Business Place with GL, as it allows iin FB01, i have searched though the ACCOUNTGL but i didn't find any field for this or like BUPLA.
Any suggestion ... How to pass Business Place field in ACCOUNTGL...?
12-08-2009 6:27 AM
Hi Prasad,
Try field BUSINESSPLACE in ACCOUNTSRECEIVABLE. I think this should work
12-08-2009 6:30 AM
I have passed it but it affects vender only ...
I want to pass it for GL.
12-08-2009 6:27 AM
12-08-2009 6:31 AM
If it's a duplicate thread.. can you give me the previous link i ?
12-08-2009 6:33 AM
Hi Prasad,
I didn't mean your thread is duplicate, but my reply got submitted twice.
12-08-2009 6:43 AM
12-08-2009 6:55 AM
Hi Vasuki ,
First of all sorry for my misunderstanding.
I have tested for Business Area but it gives me error i.e Business area **** doesn't exist.
As well i both the terms (Area and place ) are different.
12-08-2009 7:26 AM
02-02-2010 11:12 AM
Hi Prassad,
I've faced the same issue here; we were facing an error while posting to accoountgl, because AR & AP are working fine, so what we've come up with and worked is;
Append the businessplace into BAPIACGL09 structure and i should look like this;
...
wl_accountgl TYPE bapiacgl09,
....
wl_accountgl-businessplace = wl_file_i-local_neg.
....
in bapiacgl09 structure
.APPEND ZZST_BUSINESS ...
BUSINESSPLACE ACPI_BRANCH CHAR 4 0 ...
This was the ABAPer solution here in the company, i hope it helps.
03-04-2010 10:37 AM
12-31-2021 8:15 AM
can you please let us know how this is solved? we are facing same issue.
03-04-2010 10:37 AM
09-06-2011 10:57 PM
Hi PrasadD
Please, could you tell me how did you solve this issue?
Thanks a lot!
Best regards,
Douglas
Edited by: Douglas Cezar on Sep 6, 2011 6:58 PM
10-18-2019 5:56 PM
I don't advise changing Standard Structures, especially BAPIs.
Following my contribution to the solution of the problem, here it worked, I hope it helps.
Use table parameter: EXTENSION2 on FM: BAPI_ACC_DOCUMENT_POST.
The parameter EXTENSION2 is used of the routine:
PERFORM call_badi
TABLES extension2.
The routine call the:
CALL METHOD g_exit->change
Where is allowed the instantiation of the Badi and to use the method:
IF_EX_ACC_DOCUMENT~CHANGE
Sample:
READ TABLE c_extension2 INTO wl_extension WITH KEY structure = 'ZBUSINESSPLACE'
BINARY SEARCH.
IF sy-subrc EQ 0.
LOOP AT c_accit ASSIGNING <fl_accit>.
<fl_accit>-bupla = wl_extension-valuepart1.
ENDLOOP.
ENDIF.
Sample: In the call BAPI
DATA: tl_extension2TYPE TABLE OF bapiparex,
wl_extension2LIKE LINE OF tl_extension2.
CLEAR wl_extension2.
wl_extension2-structure = 'ZBUSINESSPLACE'.
wl_extension2-valuepart1 = xxxx. " Value
APPEND wl_extension2 TO tl_extension2.
CALL FUNCTION 'BAPI_ACC_DOCUMENT_POST'
EXPORTING
documentheader = wl_docheader
IMPORTING
obj_type = vl_obj_type
obj_key = vl_obj_key
obj_sys = vl_obj_sys
TABLES
accountgl = tl_accountgl
currencyamount = tl_curramount
extension2 = tl_extension2
return = tl_return.
I hope it helps.
Best regards