Application Development and Automation 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: 
Read only

Updating BKPF table using User-Exit

Former Member
0 Likes
3,767

Hi,

In User-exit, i am trying to modify Document date and Posting date of Accounting Document (Table : BKPF ) by using the following stmt:

modify bkpf from table it_bkpf1.

if sy-subrc = 0.

commit work and wait.

endif.

But the modification is not done for some Accounting Document's.

While debugging it is updating but not for Normal execution.

Please suggest on this.

Regards,

Aruna.

1 ACCEPTED SOLUTION
Read only

former_member378318
Contributor
0 Likes
2,711

STOP! you should not be directly modifying standard table BKPF. You must find either a suitable user-exit or BAPI to indirectly modify the table. Direct updates to standard tables could get you into a lot of trouble.

It's updating during debugging because you are probably getting an implicit commit work as you step through the debug session.

Hi,

In User-exit, i am trying to modify Document date and Posting date of Accounting Document (Table : BKPF ) by using the following stmt:

modify bkpf from table it_bkpf1.

if sy-subrc = 0.

commit work and wait.

endif.

But the modification is not done for some Accounting Document's.

While debugging it is updating but not for Normal execution.

Please suggest on this.

Regards,

Aruna.

8 REPLIES 8
Read only

former_member378318
Contributor
0 Likes
2,712

STOP! you should not be directly modifying standard table BKPF. You must find either a suitable user-exit or BAPI to indirectly modify the table. Direct updates to standard tables could get you into a lot of trouble.

It's updating during debugging because you are probably getting an implicit commit work as you step through the debug session.

Read only

0 Likes
2,711

Use a FM or a BAPI to match the corresponding functionality..

cheers

Read only

0 Likes
2,711

Hi,

Can you please give us the BAPI name through which i can update doc. date and posting date in BKPF table.

Thanks.

Aruna.

Read only

0 Likes
2,711

Hi,

Can you please give us the BAPI name through which i can update doc. date and posting date in BKPF table.

Thanks.

Aruna.

Read only

0 Likes
2,711

Hi,

Why not do a simple BDC for transaction MB02? may be the best option

Hope it helps

Read only

0 Likes
2,711

HI,

When i check the document in MB02 txn.. the posting and document date will be in disable mode.. can i update these field values through BDC.

Regards,

Aruna

Read only

0 Likes
2,711

Why would you want to change the document date, I don't think you should be changing that.

Read only

Former Member
0 Likes
2,711

Hi,

The Document Date is the date in which the business transaction for the Documente(e.g., a transfer of posting) took place. The document date is the date on which the original document was issued.

The document date can, for example, refer to the creation date of the delivery note issued by the vendor or the internal goods receipt slip.

Note: It is possible that an invoice was issued with a Document Date of 6/15/98, entered into R/3 on 7/15/98 (Entry Date) with a Posting Date of 6/30/98 (to post the Document in the previous fiscal year). Many times, all three of these dates are the same

Are you sure that the <b>exit SAPLF051</b> was active. You may need to activate it through transaction CMOD.

<b>Reward points</b>

Regards