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: 

Re : Error in look up code

sri_harsha2
Participant
0 Kudos

Hello Gurus,

I have an issue with the code, I wanted to do a look up for the code my requirement is that in order to fill the field called end user I need to do a look up on condition below

if <COPA table>- customer is   initial

then fill up the value end user from the field ZZ_LISD  from ZGLT( custom table )

if not  then fill the value of end user from the field ZZ_KUNE from ZGLT

end user = ZEND

for this requirement I have written the look up code as

IF <COPA>- ZCUST =  'initial'  ( throwing error in this line )

select ZZ_LISD

into <COPA>-ZEND

from ZGLT

else

select ZZ_KUNE

into <CO-PA>-ZEND

from ZGLT

this was the code I tried to write for the look up but it was throwing syntax  errors. I have declared the fields above the code. I request you know if I am making any mistakes in the code. Thanks in advance.

Thanks,


1 ACCEPTED SOLUTION

former_member491621
Contributor
0 Kudos

Hi sri,

Please check if the Field symbol  <COPA> is of same type of the table COPA or any fully typed structure.

And the syntax is wrong

Try writing it as

IF <COPA>- ZCUST IS  INITIAL.

The answers above are based on assumption. Please copy and paste the syntax error you are getting(if possible) and also the declaration part of the field symbol

Hope this helps. Do revert back you require anything

3 REPLIES 3

Former Member
0 Kudos

Checking Whether a Field Symbol is Assigned.

<COPA>

or Check dis Sample Programs given by SAP .

DEMO_FIELD_SYMBOLS_ASSIGN_COMP

DEMO_FIELD_SYMBOLS_ASSIGN_DECI

DEMO_FIELD_SYMBOLS_ASSIGN_ERR

DEMO_FIELD_SYMBOLS_ASSIGN_TYPE

DEMO_FIELD_SYMBOLS_CASTING

DEMO_FIELD_SYMBOLS_CASTING_TYP

DEMO_FIELD_SYMBOLS_DYNAMI_AS_1

DEMO_FIELD_SYMBOLS_DYNAMI_AS_2

DEMO_FIELD_SYMBOLS_DYNAMI_AS_3

DEMO_FIELD_SYMBOLS_STAT_AS_OF2

DEMO_FIELD_SYMBOLS_STAT_AS_OFF

DEMO_FIELD_SYMBOLS_STAT_ASSIGN

DEMO_FIELD_SYMBOLS_STRUCTURE

DEMO_FIELD_SYMBOLS_TYPE

Regard's

Smruti

former_member491621
Contributor
0 Kudos

Hi sri,

Please check if the Field symbol  <COPA> is of same type of the table COPA or any fully typed structure.

And the syntax is wrong

Try writing it as

IF <COPA>- ZCUST IS  INITIAL.

The answers above are based on assumption. Please copy and paste the syntax error you are getting(if possible) and also the declaration part of the field symbol

Hope this helps. Do revert back you require anything

sri_harsha2
Participant
0 Kudos

thank you smruthi and Aniket