Age: 46 Joined: 05 Nov 2007 Posts: 725 Location: КраснАдар
Posted: Thu Mar 06, 2008 10:05 am Post subject:
Замените LIKE на CP и % на *. Должно сработать...
Добавил:
Quote:
CP (Contains Pattern):
The complete string c1 matches the pattern c2 (c1 "matches" c2).
The pattern c2 can contain ordinary characters and wildcards.
'*' stands for any character string and '+' denotes any character.
If the result of the comparison is positive, the system field SY-FDPOS contains the offset of the first character of c2 in c1. The wildcard character '*' at the beginning of the pattern c2 is ignored when determining the value of SY-FDPOS.
If the result of the comparison is negative, the system field SY-FDPOS contains the length of c1.
Examples:
'ABCDE' CP '*CD*' is true; SY-FDPOS = 2.
'ABCDE' CP '*CD' is false; SY-FDPOS = 5.
'ABCDE' CP '++CD+' is true; SY-FDPOS = 0.
'ABCDE' CP '+CD*' is false; SY-FDPOS = 5.
'ABCDE' CP '*B*D*' is true; SY-FDPOS = 1.
Age: 170 Joined: 04 Oct 2007 Posts: 1218 Location: Санкт-Петербург
Posted: Fri Mar 07, 2008 2:55 pm Post subject:
Да, да. Если Вы посмотрите в свойства домена matnr, то увидите заполненное поле Convers. routine = MATN1
Это значит, что для отображения на экране вызывается функция преобразования CONVERSION_EXIT_MATN1_OUTPUT, убирающая лидирующие нули в номере материала. А на самом деле, номер материала в базе хранится с лидирующими нулями.
Поэтому в зависимости от количества лидирующих нулей, условие нужно написать так:
IF mbew-matnr CP '000000000060*'.
Для материала, в номере которого содержатся хоть один нецифровой символ, лидирующие нули не добавляются. Поэтому работало условие
IF mbew-matnr CP 'FA*'.
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.