2014 Jul 11 7:21 PM
I have been reading through and digesting the new ABAP features in Horst Keller's post Great stuff. However I see at different places, particularly in the constructor expressions the use of the pipe "|" . I am not clear of the use of these. Are they for separating elements?
An example from Horst's Blog on Constructor Operator VALUE
Other expressions in VALUE operator
Of course, the arguments of VALUE can be expressions or function calls:
TYPES t_date_tab TYPE TABLE OF string WITH EMPTY KEY.
DATA(date_tab) = VALUE t_date_tab(
( |{ CONV d( sy-datlo - 1 ) DATE = ENVIRONMENT }| )
( |{ sy-datlo DATE = ENVIRONMENT }| )
( |{ CONV d( sy-datlo + 1 ) DATE = ENVIRONMENT }| ) ).
Any clarification on that would be helpful. Thank you in advance.
2014 Jul 11 7:31 PM
Hi Justin,
Recently we had some sessions on ABAP 7.4 release.
The I operator is used for creating new character strings out of literals and embedded expressions.
Like in our ABAP releases we use Write to statement same can be replaced by Pipe which is called as string template.It works for all the cases except for text elements.
Regards,
Kannan
Hi Justin,
Recently we had some sessions on ABAP 7.4 release.
The I operator is used for creating new character strings out of literals and embedded expressions.
Like in our ABAP releases we use Write to statement same can be replaced by Pipe which is called as string template.It works for all the cases except for text elements.
Regards,
Kannan
2014 Jul 11 7:31 PM
Hi Justin,
Recently we had some sessions on ABAP 7.4 release.
The I operator is used for creating new character strings out of literals and embedded expressions.
Like in our ABAP releases we use Write to statement same can be replaced by Pipe which is called as string template.It works for all the cases except for text elements.
Regards,
Kannan
2014 Jul 12 9:37 AM
Pipes are delimiters of non-translatable text.
I.e. if you've got some text that you don't want to be translated, and never should be translated, instead of surrounding it with ' surround it with |
This is not a 7.4 feature. I'm in 7.3 and using it.
2014 Jul 12 2:14 PM
Hi,
Those are used for designating string templates (unfortunately help.sap.com ABAP docu is still down for me so linking to a blog and). The result of template has type string.
I don't know if there are other uses for pipes, but I loooove string templates - no more CONCATENATE, no more temp variable when you need to pass something of type C to a method parameter of type string Works on 702 as well.
cheers
Jānis
2014 Jul 12 2:45 PM
Janis, thank you for the link. Yet another post with lots of good stuff.
Justin
2014 Jul 12 2:26 PM
Thank you all. Every day, it seems, I learn something new that can be put into practice.
KInd Regards,
Justin
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |