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: 

EXIT_SAPLACC4_001

Former Member
0 Kudos

Hi,

how can I use this exit to update the company code in document header and position? I have already create Include ZXACCU15.

But how I have to use the tables extension? And can I use tables accountgl and accounttax for updatin when I'm in the Include?

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Are you updating the company code based on some logic during the processing ? Otherwise you can pass the value in BAPI structure itself. If you are updating the company code based on some logic, Pass the information in the extension table of the bapi and use the business transaction event to update the same.

Regards

Vinod

12 REPLIES 12

Former Member
0 Kudos

Hi,

You need to update the ACCHD and THE ACCIT structure values for the company code. You can use the extension from the BAPI to get the new value for the company code. or mayb if u are using some kind of table to fetch the company code change u can do the same in this exit

Hope this helps your problem.

Regards,

Hari

0 Kudos

but when I only want to change ACCHD and ACCIT I don't need to use the extension table or? I am not sure but I think I use the extension table when I want to change fields which are not in the mentioned tables or'?

0 Kudos

I have looked at structure ACCHD, but I can't find company code in the mentionde structure.

Former Member
0 Kudos

Are you updating the company code based on some logic during the processing ? Otherwise you can pass the value in BAPI structure itself. If you are updating the company code based on some logic, Pass the information in the extension table of the bapi and use the business transaction event to update the same.

Regards

Vinod

0 Kudos

Hi Vinod,

I your right, I have to place company code based on some logic. I create an IDoc for my processing and have to change the company code in the exit function.

If I understood right I have to fill a segment of the IDith extension as the cusomer function is passed if I have entries in the extension table or?

What do you mean with business transaction event and how can I update table ACCHD?

0 Kudos

Extension can only be used when you create the accounting document using BAPI. Other wise you can update the company code field in structure 'T_ACCIT-BUKRS' of exit "EXIT_SAPLACC4_001". Processing logic for determining the company code can be written in the User Exit.

Regards

Vinod

0 Kudos

but how can I update the table ACCD as this is the table for the header.

0 Kudos

You don't need to change company code in acchd structure. Change the company code for all line items in the structure "T_ACCIT" (T_ACCIT-BUKRS). It will change the company code in the accounting document.

Regards

Vinod

0 Kudos

Hi Vinod,

just one last question. The exit function is in BAPI_ACC_EMPLOYEE_EXP_POST.

PERFORM CALL_CUSTOMER_FUNCTION

TABLES EXTENSION1.

When I look in the function I can see that

CALL CUSTOMER-FUNCTION '001'

will be executed when

CHECK NOT t_extension[] IS INITIAL.

So do I have to fill the extension table in my IDoc?

0 Kudos

Yes, you have to fill extension table. Customer function will be executed only when extension table is not initial.

Regards

Vinod

0 Kudos

And this extension table I habe to fill in my IDoc with an new segment E1BPEXTC or?

0 Kudos

Yes

Regards

Vinod