VishalMistry
13th January 2016, 17:57
Hi,

I want to fill the required field in session tdsls0510m000 like cuno, item, qana (customer / item / quantity) and get the value of discount percentage but when trying to do so, I am getting zero value. My command is as below:

domain tcmcs.str10 hold.disc
stpapi.put.field("tdsls0510m000","cuno",cuno)
stpapi.put.field("tdsls0510m000","item",item)
stpapi.put.field("tdsls0510m000","qana",qana)
stpapi.get.field("tdsls0510m000","disc",hold.disc)

but when I print the value of hold.disc, it is coming as zero. Can anybody guide me how to get the value of discount percentage ?

Vishal

mark_h
14th January 2016, 05:52
If hold.disc is a calculated field then you might need to do a save or update first before the field gets filled.

VishalMistry
15th January 2016, 10:16
Hi Mark,

Actually it is not a table field. It is only a calculated field. So how to get the value of this field.

Vishal

mark_h
17th January 2016, 20:29
If it is a calculated field then you have to execute it some way. Usually a save or update will update the field(you can try using false in the command). Since I am not familiar with this session I really can't say what might work.