on 04-08-2020 12:41 PM
Hi Experts,
I want to get the Journal Entry ID after saving the Outgoing Check in SAP Applications Studio, I am using the aftermodify script in PaymentOrder XBO. The Journal Entry ID is supposed to be in the AccountingDocument Node but upon debugging the node is always returning "the object is not set", is there a way for me to get the Journal Entry ID in the script that I've created?
Here are some images for your reference:
Above is the image of the Journal Entry ID that I wanted to get in the script and below is the code in my script, as you can see I am trying to check if the AccountingDocument is set. If it is set then I will get the Journal Entry ID and store it in the variable sample. The problem is that the AccountingDocument is always empty but after debugging I checked the Outgoing Check and saw that there is a Journal Entry ID in the Accounting Data in SAP ByD (please see the image above to see the Accounting Data).
Christian,
A couple of things:
1) Try putting it on the BeforeSave; the journal entry ID might not save properly until after the event's run.
2) Have you had a look at the data in the BO for other fields with 'reference' or what have you in the name, in case the value is saved elsewhere?
Lewis
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Lewis,
Thank you for answering but I already tried both AfterModify and BeforeSave but the AccountingDocument is still empty. Also, AccountingDocument is the only field that carries the Journal Entry ID. Is there any other way for me to get the Journal Entry ID? Thank you.
Regards,
Christian
Hi Lewis,
I tried doing it the other way around but still, I cannot get the Journal Entry ID. The available events for the script are the ff: BeforeSave, AfterModify, and OnSave Validation. Now is there an event that works after saving the data? I believe the reason why I cannot get the ID is that the Journal Entry is not yet created because all the script events are happening before saving. Thank you.
Regards,
Christian
User | Count |
---|---|
81 | |
24 | |
11 | |
9 | |
7 | |
5 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.