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

Update BKPF table

Former Member
0 Likes
7,674

Hi All,

I have a requirement to update a field(xblnr) in a BKPF table. Please let me know if there is any FM or BAPI available to do this.

Thanks,

Meenu.

1 ACCEPTED SOLUTION
Read only

amit_khare
Active Contributor
0 Likes
4,773

Check FM G_BKPF_BSEG_UPDATE

7 REPLIES 7
Read only

Former Member
0 Likes
4,773

Hi Meenu,

Chk this Function Module fi_document_change .

Regards,

Lakshman.

Read only

amit_khare
Active Contributor
0 Likes
4,774

Check FM G_BKPF_BSEG_UPDATE

Read only

0 Likes
4,773

I tried with FM : FI_DOCUMENT_CHANGE. I gave all the required fields and BELNR,BUKRS and GJAHR as input. I am getting the error : No clear document selection possible for changing. No documentation is available for this FM. If anyone has used it can you pls provide with same code....and I am not sure How to use the FM : G_BKPF_BSEG_UPDATE.

Thanks,

Meenu.

Read only

0 Likes
4,773

Hi Meenu ,

Chk whether you have given the correct document number , fiscal year .

I have tried this with the same FM FI_DOCUMENT_CHANGE .It is working fine.

Regards,

Anuj

Read only

0 Likes
4,773

Hi Anuj,

I_AWREF is a mandatory field in the FM : FI_DOCUMENT_CHANGE. What are we suppose to here.

Thanks,

Meenu.

Read only

0 Likes
4,773

Hi Meenu ,

In AWTYP you need to give BKPF.

In AWREF field you need to give the Document number.

This is the portion of code where i have tried this.

i_accchg = 'XBLNR'.

i_accchg-oldval = w_sgtxt.

i_accchg-newval = new_txt.

append i_accchg.

  • UPDATING HEADER

call function 'FI_DOCUMENT_CHANGE'

exporting

i_awtyp = 'BKPF'

i_awref = m_belnr

i_aworg = i_aworg

i_lifnr = m_vendor

tables

t_accchg = i_accchg

exceptions

no_reference = 1

no_document = 2

many_documents = 3

others = 4.

Hope this helps you.

Regards,

Anuj

Read only

0 Likes
4,773

Hi Anuj,

I too have a similar requirement where in i need to update the Dunning area of already posted FI Document.

Will it work for this also.

Thanks

Tulasi.