cancel
Showing results for 
Search instead for 
Did you mean: 

Handling Docs. for Confirmation (drafts to be approved) via DI API

daniel_martinec2
Participant
0 Kudos

Hi there,

I would like to change an approval status (WddStatus) of draft documents using DI API. Is it possible? I can find neither any object nor a service to do that.

I have found two posts:

- (looks like it is possible)

- (not answered)

SAP B1 2007, SP01, PL09

Thanks for any suggestions.

D.

Edited by: Daniel Martinec on Feb 10, 2010 11:14 PM

Accepted Solutions (0)

Answers (3)

Answers (3)

daniel_martinec2
Participant
0 Kudos

How to do it:

SAPbobsCOM.ApprovalRequestsService oApprovalRequestsService = null;
SAPbobsCOM.ApprovalRequestParams oApprovalRequestParams = null;
SAPbobsCOM.ApprovalRequest oApprovalRequest = null;
SAPbobsCOM.ApprovalRequestDecision oApprovalRequestDecision = null;

oApprovalRequestsService = 
  (SAPbobsCOM.ApprovalRequestsService)MyCompanyService.GetBusinessService(
      SAPbobsCOM.ServiceTypes.ApprovalRequestsService);
oApprovalRequestParams = 
  (SAPbobsCOM.ApprovalRequestParams)oApprovalRequestsService.GetDataInterface(
      SAPbobsCOM.ApprovalRequestsServiceDataInterfaces.arsApprovalRequestParams);

int wddCode = 1;
oApprovalRequestParams.Code = wddCode;
oApprovalRequest = oApprovalRequestsService.GetApprovalRequest(oApprovalRequestParams);
oApprovalRequestDecision = oApprovalRequest.ApprovalRequestDecisions.Add();
oApprovalRequestDecision.Status = SAPbobsCOM.BoApprovalRequestDecisionEnum.ardApproved;
oApprovalRequestDecision.ApproverUserName = SAPB1UserName;
oApprovalRequestDecision.ApproverPassword = SAPB1Password;
oApprovalRequestsService.UpdateRequest(oApprovalRequest);

Hope it helps

D.

Former Member
0 Kudos

Hi Daniel,

Your request is totally reasonable, still it's absolutely impossible to implement it in B1 DI.

Further more, don't grow any expectations that SAP will change that in the future. I had a long discussion with product managers there and it's not even near their desk...

i beleive that by early April I'll have a solution of my own for that issue and many other painful issues regarding Approvals in B1.

You are welcome to contact me then.

Regards,

Gilan

0 Kudos

Hello,

I have read this post written a long time ago.

I want to create draft proposals that will be approved with the help of SDK with the c # program I wrote.

There is no problem in creating proposals and draft proposals.

However, I could not make a draft proposal to be approved. Do you have any suggestions on this subject? Thank you,

Former Member
0 Kudos

Hi,

You may check this thread for a formal answer from a SAP employee:

Thanks,

Gordon