on 09-18-2014 10:31 AM
Hi,
I have created a UDF using SAP B1 Studio with visual studio 2010.Values can enter in form and it is successfully added to table. I am trying to show the DocumentNo. automatically once document got added to the table.
i.e., DocNo. textbox in form is empty once document got added.I have tried in Buttonclick after,Data Add after...Its not working.
In which event can we handle this?
Thanks in Advance,
Parvatha Solai.N
Hi Parvatha,
The DocNumber is finalised by SAP when you save the document.
Hence, you cannot save this number into your UDF at the same time.
This has to be a two step process.
On After Data Add event,
1 get the DocEntry from the pVal.ObjectKey
2 Call up the Doc using this object key and update your UDF
Dim oDoc As SAPBobsCOM.Documents = oCompany.GetBusinessObject(yourDocObjType)
oDoc.GetByKey(DocEntry)
oDoc.UserFields.Fields.Item("UDF").Value = oDoc.DocNum
oDoc.Update
On the other hand, why would you want to save the docnum in the user field ?
Regards
Edy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
The best way is :
1) save a tick in a userfield before your adding Itempressed before action true;
2) in the same time save the tik in a public variable;
3)after saving in itempressed before action false, do a query by public tick and do all, after set nothing de public variable.
regards, Alessandro
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi.
Once added any document u can not see that document this is object behaviors automatically new record will come...
if u want to any thing once document is added successfully see the below link..
u can use pval.actionsuccess = true
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Try in
et_ITEM_PRESSED event after ActionSuccess.
If you want to make action while viewing the posted data, you have to do in
SAPbouiCOM.BoEventTypes.et_FORM_DATA_LOAD event.
Thanks & Regards,
silambu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
108 | |
12 | |
11 | |
6 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.