cancel
Showing results for 
Search instead for 
Did you mean: 

How to manipulate data type STRING in CDS views?

BenoitRegnier
Explorer
0 Kudos

Hello,

S4 HANA ABAP DDIC tables could be defined with a field of type STRING - for instance data element RSSTRING could as data type in this case...

The question is how to enable an ABAP CDS view to fetch a sub-string of this field?

None of CDS functions like CAST, LEFT, CONCATENATE,... accepts an argument of type STRING...

How to overcome this situation?

Thanks,

Benoit

Accepted Solutions (0)

Answers (3)

Answers (3)

BenoitRegnier
Explorer

Hello,

I solved it using CDS view with Table Function. AMDP called form table function allows me to fetch sub-string from table field.

Hope it helps,

Benoit

0 Kudos

Any luck with this problem?

Also faced with it on NW 7.50, CAST also doesn't support string...

former_member284740
Participant
0 Kudos

SUBSTRING(arg, pos, len) doesn't work?

BenoitRegnier
Explorer
0 Kudos

Thank you for your answer!

But it doesn't work....

syntax error message : "Function SUBSTRING: parameter at position 1 has incorrect data type STRG"

former_member284740
Participant
0 Kudos

Unfortunately i'm on Netweaver 7.4 so i cant define a table with field type STRING. So can't be of any further help.

BenoitRegnier
Explorer
0 Kudos

Thanks for your help anyway!