Posted: Sun Jul 14, 2013 10:33 pm Post subject: Поиск значения в строчке
Подскажите, у меня есть значение 547.05.1234 количество цифр может меняться, мне необходимо вытаскивать после первой точки и до второй точки значение. Как лучше сделать?
Age: 46 Joined: 05 Nov 2007 Posts: 725 Location: КраснАдар
Posted: Mon Jul 15, 2013 9:04 am Post subject:
Code:
PARAMETERS input TYPE text132 DEFAULT '547.05.1234'.
PARAMETERS symbol TYPE c DEFAULT '.'.
PARAMETERS indx TYPE i DEFAULT 2.
DATA t_input TYPE TABLE OF text132 WITH HEADER LINE.
START-OF-SELECTION.
SPLIT input AT symbol INTO TABLE t_input.
IF sy-subrc <> 0.
MESSAGE 'At least one of the segments was truncated on the right'
TYPE 'S'.
EXIT.
ENDIF.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
All product names are trademarks of their respective companies. SAPNET.RU websites are in no way affiliated with SAP AG. SAP, SAP R/3, R/3 software, mySAP, ABAP, BAPI, xApps, SAP NetWeaver and any other are registered trademarks of SAP AG. Every effort is made to ensure content integrity. Use information on this site at your own risk.