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: 

SD_SALES_DOCUMENT_SAVE not updating the transaction log

former_member220489
Active Contributor
0 Kudos
1,282

Hi Folks,

I am trying to update the contract billing plan through FM BILLING_SCHEDULE_SAVE and later saving the contract through FM SD_SALES_DOCUMENT_SAVE. The functioanlity working very fine, but i am unable to get the transaction log in VA42/VA43.

When you do the same manually in VA42 the log is updating very fine, but when we execute this through interface its not updating the transaction log.


* Save Billing Schedule
          call function 'BILLING_SCHEDULE_SAVE'
            tables
              fpla_new = gt_fpla
              fpla_old = gt_fpla
              fplt_new = gt_fplt2       "NEW
              fplt_old = gt_fplt.

* Save contract document
          call function 'SD_SALES_DOCUMENT_SAVE'
            exporting
              i_no_messages = ' '.

* Commit work
          call function 'BAPI_TRANSACTION_COMMIT'
            exporting
              wait = 'X'.

<< Moderator message - Everyone's problem is important. But the answeres in the forum are provided by volunteers. Please do not ask for help quickly. >>

Regards,

Cnu.

Edited by: Rob Burbank on Jan 6, 2011 4:26 PM

4 REPLIES 4

Former Member
0 Kudos
196

Hi,

Have you tried using SD_SALES_DOCUMENT_SAVE by giving values for the tables?

Regards

Jovito

Former Member
0 Kudos
196

Hi Srinivas,

Are you able to get any solution to update the transaction log. I am also having same problem. Please help me in case you got some solution.

-Rajesh

Former Member
0 Kudos
196

Since the function BILLING_SCHEDULE_SAVE is an update FM, you will need to code the update of the transaction log yourself. Assuming that by transaction log, you mean the change log, the following FM can be used to accomplish this:

- CHANGEDOCUMENT_OPEN -> object class 'VERKBELEG', objectid contract #

- CHANGEDOCUMENT_MULTIPLE_CASE -> pass on the old and new values for FPLT (assuming only billing plan items were affected;

- CHANGEDOCUMENT_CLOSE.

Since you are essentialy doing a direct update on table FPLA and/or FPLT by invoking function BILLING_SCHEDULE_SAVE be sure to test the follow-up processing of the contract as well.

For example, in case you use the function to set/remove the billing block of the billing plan items, be sure to update table VKDFS as well in order to reflect this in transaction VF04.

Kind regards,

Robert

Former Member
0 Kudos
196

hi,

Do u find any Solution, Even i am facing the same problem.

Thanks,

NSK