Application Development 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: 

Passing Business place in BAPI_ACC_DOCUMENT_POST in ACCOUNTGL table.

Former Member
0 Kudos

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...?

14 REPLIES 14

former_member206377
Active Contributor
0 Kudos

Hi Prasad,

Try field BUSINESSPLACE in ACCOUNTSRECEIVABLE. I think this should work

0 Kudos

I have passed it but it affects vender only ...

I want to pass it for GL.

former_member206377
Active Contributor
0 Kudos

duplicate

Edited by: Vasuki S Patki on Dec 8, 2009 11:57 AM

0 Kudos

If it's a duplicate thread.. can you give me the previous link i ?

0 Kudos

Hi Prasad,

I didn't mean your thread is duplicate, but my reply got submitted twice.

0 Kudos

Hi Prasad ,

You can try with BUS_AREA field of ACCOUNTGL then.

0 Kudos

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.

0 Kudos

Prob is not yet solved... expert need you advise

0 Kudos

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.

Former Member
0 Kudos

Solved by self

0 Kudos

can you please let us know how this is solved? we are facing same issue.

Former Member
0 Kudos

self

0 Kudos

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

0 Kudos

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