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: 

Change park document without using tcode FBV2, is there any BAPI or FM?

Former Member
0 Kudos
2,861

Dear experts,

Now i am facing a problem on change park document in background coding, simulating the function provided by tcode FBV2, i tried many functions which seem to be working, but none succeeded. I also found some posting on SDN which show that some people have the same problem as i do, but till now nobody get resolved. So again i have to ask: is there any BAPI or FM to cover this issue?

6 REPLIES 6

nabheetscn
Active Contributor
0 Kudos
1,148

Try using the following fm

PP_CHANGE_DOCUMENT_ENJ..,PP_CHANGE_DOCUMENT_FBV2_ENJ.

For more FM check the function group F040 where you can find all related FM.

Nabheet

0 Kudos
1,148

thanks for the reply, i debugged after "SAVE" in FBV2, and also found "PP_CHANGE_DOCUMENT_ENJ", i tried this funtion even with exactly the same parameters while debugging, but it still threw out the exeption "Update was terminated " with error info "SAPSQL_ARRAY_INSERT_DUPREC" ...

0 Kudos
1,148

Does it throw the error when you it from the tcode also..? please search for oss notes for the same. Make sure the data passes is the same.

Nabheet

0 Kudos
1,148

it is alright using the standard TCODE(FBV2), just failure during the attempt to simulate changing park document...

tripurari_rai2
Participant
0 Kudos
1,148

Hi Guru's,

We are facing the similar requirement. I have tried so many FM/BAPI to change the Parked FI data but didn't get success yet. We currently using the BDC to update parked document via FBV2 but there are plenty more complication keep on coming because of different screens for different document types and all.

If anyone found any FM/BAPI or Class/method please provide the same for all.

Thanks

krish469
Contributor
1,148

Hi,

Even I have similar requirement. I need to change the posting date of Parked document. Parked document can be created by either FBV1, FB50, FB60 or FB70

I have follwed harry huang and used the FM 'PP_CHANGE_DOCUMENT_ENJ' to change the parked document. Even I have faced similar issue 'Update was terminated " with error info "SAPSQL_ARRAY_INSERT_DUPREC" ...

Issue - Update termination occurs due to parking document already exists and FM 'PRELIMINARY_POSTING_DOC_WRITE' tries to insert same document instead of updating it.

Reason - Table 'XVBSEG' does not have any value for field 'bzalt', this field should have similar value to line item number ' buzei'.

Solution - I came up with a solution to this problem. Call the FM 'PP_CHANGE_DOCUMENT_ENJ' and use a BTE '00002217' to update the value of  bzalt with  buzei in internal table of  XVBSEG. Guess what it worked for me.

Regards,

Siva