2009 May 12 8:19 AM
hey everybody
i want to compare the values about two char field, it has 40 length.
how can i do that?`
thx anujit marty
2009 May 12 8:24 AM
Hi:
Either you can use like field1 = field2
or use offset method, for details have a look
[Link|http://help.sap.com/saphelp_nw04/helpdata/EN/fc/eb341a358411d1829f0000e829fbfe/content.htm]
Regards
Shashi
hey everybody
i want to compare the values about two char field, it has 40 length.
how can i do that?`
thx anujit marty
2009 May 12 8:24 AM
Hi:
Either you can use like field1 = field2
or use offset method, for details have a look
[Link|http://help.sap.com/saphelp_nw04/helpdata/EN/fc/eb341a358411d1829f0000e829fbfe/content.htm]
Regards
Shashi
2009 May 12 9:53 AM
Try like this :
Data : Field1(40) type c value '1234567abcdefgh78965789'.
Data : Field2(10) type c value 'abcdefgh'.
Field1 = Field+7(8)
IF Field1 = Field2.
< your code >
Endif.
2009 May 12 10:04 AM
Hi,
There are many relational operators to compare Char fields.
Some of them are CA (Contains Any), CO (Contains Only) etc.
If you want some more operators, go to Tcode:abapdocu->ABAP-By Theme->Controlling the Program Flow ->log_exp - Logical Expressions->log_exp - Relational operators->log_exp - Relational operators for character-type operands.
Revert back if any issues.
Lohitha
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |