yogesh kapil
25th August 2012, 07:21
Hi exprts,

i want to get recode from item master table having product type not SUB and END LIKE 112SUB AND 112 END. i am writing following code to do this but not working. can sombody help me.



if tcibd001.citg not like ".*SUB$" OR tcibd001.citg not like ".*END$" then




endif

bdittmar
25th August 2012, 14:41
Hi exprts,

i want to get recode from item master table having product type not SUB and END LIKE 112SUB AND 112 END. i am writing following code to do this but not working. can sombody help me.

if tcibd001.citg not like ".*SUB$" OR tcibd001.citg not like ".*END$" then

endif

Hello, try (if SUB and END is allways at beginning).



if (tcibd001.citg(1;3) = "SUB" or tcibd001.citg(1;3) = "END") then
do nothing
else
do what you want
endif

At End of CITG :

if (tcibd001.citg(3;3) = "SUB" or tcibd001.citg(3;3) = "END") then
do nothing
else
do what you want
endif




A little bit more complicated, but more flexible, is the use of POS functionality.

Use code tags, please !!


Regards

wonderkid
30th August 2012, 11:20
pos would b easier to use ... instead of (1;3) ... pos will find SUB anywhere in the string :cool:

Amit_Jain
31st August 2012, 08:36
Hi yogesh

Like is a complicated keyword, it has different sytax with different porting sets, I had a very bad experience with it, there are cases where you can only use 'like'(query.extension) so if you have some time at your disposal do some R & D try to get through

try either
tcibd001.citg not like ".*SUB" OR tcibd001.citg not like ".*END"

or
tcibd001.citg not like "SUB.*" OR tcibd001.citg not like "END.*"

hope that helps :)

yogesh kapil
5th September 2012, 11:12
Hi Amit,

thanks for your update.

i try if this and it working fine in lnfp7.

if (tcibd001.citg(1;3) = "SUB" or tcibd001.citg(1;3) = "END") then
do nothing
else
do what you want
endif

yogesh kapil
5th September 2012, 11:13
Hi Brend,


You are right. thanks for your reply. its working fine.



Hello, try (if SUB and END is allways at beginning).



if (tcibd001.citg(1;3) = "SUB" or tcibd001.citg(1;3) = "END") then
do nothing
else
do what you want
endif

At End of CITG :

if (tcibd001.citg(3;3) = "SUB" or tcibd001.citg(3;3) = "END") then
do nothing
else
do what you want
endif




A little bit more complicated, but more flexible, is the use of POS functionality.

Use code tags, please !!


Regards