on 01-21-2019 3:22 AM
Hello Experts,
We are trying to consume SCAPPTSEG-TXT_PUB_ID in a calculation view. SAP CRM System
The field stores a duration Values ( Value in DB looks like DUR####MINUTE LX##### )img-1.png.
When I am writing a plane SQL Query I am getting the attached img-2.png
We are unable to convert ( Duration type )those to Output.
The ABAP Code to do the same conversion is as below :
REPORT ZTEST11.
data ls_duration_rule type crmt_date_duration_as_rule.
data: zpub_id type scapptseg.
FIELD-SYMBOLS: <xvalue> type x,
<xcontainer> type x.
BREAK-POINT.
select single * from scapptseg into zpub_id where APPT_TYPE = 'ZSLA_DUR_RGP' and
APPL_GUID = '005056970E361EE987BF12660CA873EB'.
assign ls_duration_rule to <xvalue> casting.
assign zpub_id-txt_pub_id to <xcontainer> casting.
<xvalue> = <xcontainer>.
write: ls_duration_rule-duration.
Thanks and Regards,
Anup D
Hello anup.deshmukh4,
Your answer is in your own question: you should implement in your view a decoding logic for TXT_PUB_ID, like the one in your code snippet. Standard decodes it too when displaying in UI.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
72 | |
9 | |
8 | |
6 | |
6 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.