cancel
Showing results for 
Search instead for 
Did you mean: 

Invoice and journal Entry creation through code Problem

former_member689126
Active Contributor
0 Kudos

Hi all,

Through a UDO form we are creating AR Invoices.The items in invoice are of type sales BOM .The AR Invoice is setup to display components of the BOM item. We are passing project code, distribution rule and indicator while creating invoice.

These things are reflecting only to the BOM item in invoice , not to components. It is not reflecting to journal entry except indicator Is there any way to fill these items in component items of invoice and to corresponding journal entries. We are using SAP B1 8.8 PL 10.

Thanks in advance

Regards

Arun

Accepted Solutions (1)

Accepted Solutions (1)

former_member201110
Active Contributor
0 Kudos

Hi Arun,

Have you tried saving your AR Invoice initially as a draft through the DI API? You should then be able to retrieve it again and fill out the missing fields on the components before adding it as a full AR Invoice.

Kind Regards,

Owen

former_member689126
Active Contributor
0 Kudos

Hi Owen,

Thanks for your replay

I am not using the ar invoice screen , we have to create the ar invoice when the UDO add button is pressed.

Is any other way to solve this ?

Regards

Arun

Former Member
0 Kudos

You can do with Owen said with the DI.

Create the Invoice as a draft, then get the draft by key, update the fields you need to update and then add the draft as a final document. It can all be done in the background of adding the UDO record

former_member201110
Active Contributor
0 Kudos

Hi,

Yes, what I mean is that you can create a draft through the DI API, edit the component lines on the draft and then convert this to the final AR Invoice (also via the DI API) and then remove the draft again. Your issue is that SBO doesn't allow you to amend the AR Invoice after it has been added so you have to have an interim document. By saving your invoice as a draft you can reload it in to a DI API object and the component lines will still be editable.

The other approach would be to create a sales order via the DI API rather than a draft. This would also allow you to amend the component lines before basing an AR Invoice on the sales order. Again, this is all possible via the DI API.

Kind Regards,

Owen

Answers (0)