Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Field Symbol and relational operator

TMSingh_SAP
Participant
0 Kudos

Hi,

I looked on SDN but did not find any concrete output. In ECC when I write lv_string = <fs_field> . this works fine but in APO system the same statement gives me short dump.

I want to check some value in <fs_field> which comes dynamically from internal table.

So Relational operator like 'CS' does not work.

so lv_string = <fs_field>

if lv_string CS cl_abap_char_utilities=>horizontal_tab

// This is fine in ECC

Endif.

how to check the same in APO system? and why is such difference.


thnx,

M



1 ACCEPTED SOLUTION

horst_keller
Product and Topic Expert
Product and Topic Expert
0 Kudos

Read the short dump ...

12 REPLIES 12

horst_keller
Product and Topic Expert
Product and Topic Expert
0 Kudos

Read the short dump ...

0 Kudos

dump at - lv_string = <fs_string>

horst_keller
Product and Topic Expert
Product and Topic Expert
0 Kudos

As the short dump says, this is a "ABAP programming error". If it is a custom program, you must correct it in a way that the conversion error cannot occurr. If it is a SAP program search for notes or create a ticket. If the terms "convertible" or "conversion rules" don't tell you anything, please contact an ABAP programmer in your company.

0 Kudos

Understood your point, I know this is a custom program. what I am saying is the same code works in ECC but this does not work in APO system. why so ?

Lv_string =<fs_fields>

And does the field symbol work with Relational operator like CA,CS etc?

horst_keller
Product and Topic Expert
Product and Topic Expert
0 Kudos

A field symbol can be used like an data object but it can point to data objects of different types. This can depend on the program flow or the data involved.

Please either learn these basics of ABAP or contact an ABAP programmer in your company.

0 Kudos

Thanks Horst.

Bad on my part.

The abaper had copied the same code in APO and at this line it was not working. The issue was in ECC, the data flow in field symbol has types of all character type but in APO the type had some numeric fields . sonwhole reading the table in field symbol , it was showing non-charlike structure and so mismatch..

This is answered.

DoanManhQuynh
Active Contributor
0 Kudos

I think field symbol is a part of ABAP so its not relate to which module you using. If its not allowned in APO, you would not able to active the program. To understand what dump you facing, check in ST22 and tell us more about message in there.

TMSingh_SAP
Participant
0 Kudos

Hi,

Field symbols are allowed. but the assignment like lv_string = <fs_field> is not allowed, which is there in ECC. so it is a difference in APO.

Also is it possible to do Relational operator like CA,CS on field symbols like <fs_field> CS 'ABC'. This is not possible.

matt
Active Contributor
0 Kudos

I think you need to follow Horst Keller's advice below. Either learn the basics of ABAP programming, or find a programmer in your company to fix the issue.

arpan_shukla
Explorer
0 Kudos

Hi Mohan,

As Horst explained above, field symbols can point to data objects of different types. I think the issue here is that your field symbol is pointing to different type in ECC and APO. I will suggest you to please check and try to make sure the data type of your variable lv_string and your field symbol is either same or convertible.

Please let me know if you need any further clarification on this.

TMSingh_SAP
Participant
0 Kudos

Thanks Matthew. will learn basics ...

TMSingh_SAP
Participant
0 Kudos

Data flow logic - Char and non-char mismatch in types declaration. thanks all