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: 

Problems with exit EXIT_SAPLCY19_001

maria_merino
Active Participant
0 Kudos
198

Hi experts,

I have to modify fields function1 and fucntion2 in exit EXIT_SAPLCY19_001. This is my code, which doesn't work:

LOOP AT cyexit_1.

cyexit_1-function2 = '3'.

cyexit_1-function1 = '2'.

MODIFY cyexit_1.

ENDLOOP.

As the consultant told me, if we only modify field function1 or fucntion2 it works fine, but whenever we try to modify both at the same time, it doesn't work.

Maybe it's impossible to modify both fields ???

Thanks in advance !!

Marí

5 REPLIES 5

Former Member
0 Kudos
74

I trust you've already looked at this in Debug? The way we write in ABAP is:

Loop at <tablename> assigning <field symbol>.  (field symbol is typed same as internal table
  <fieldsymbol>-fieldname1 = value.
  <fieldsymbol>-fieldname2 = value.
.....etc.
endloop.

No need to modify with field symbols (pointers). If you want to do old way, do like this:

LOOP AT cyexit_1. "assumes obsolete usage - has header row?
lv_index = sy-tabix.  " lv_index typed sytabix.
cyexit_1-function2 = '3'.
cyexit_1-function1 = '2'.
MODIFY cyexit_1 index lv_index.
ENDLOOP.

0 Kudos
74

Hi again, I prefer to do it the "old way" (i'm don't usually use field-symbols).

Anyway, the consultant told me that if I change the field EPANF, it works. I mean:

LOOP AT cyexit_1.

cyexit_1-EPANF = '20110201'.

cyexit_1-function1 = '3'.

cyexit_1-function2 = '2'.

MODIFY cyexit_1.

ENDLOOP.

So she thinks maybe the problem is that we need to fill the new date for the order..

0 Kudos
74

Hello,

there's an example how to use this exit in the include LXCY0F01 (Function-Group XCY0).

Regards

Wolfgang

0 Kudos
74

Thanks Wolfgang!! I saw it yesterday but as you can see, field function2 is not being used... I think my problem is that I have to fill field EPANF in order to reaorganise modified orders...

CYEXIT_1-VGW05 = TIME5.

CYEXIT_1-VGE06 = UNIT.

CYEXIT_1-VGW06 = TIME6.

  • CYEXIT_1-DAUNE =

  • CYEXIT_1-DAUNO =

  • CYEXIT_1-ARBEH =

  • CYEXIT_1-ARBEI =

  • CYEXIT_1-ARBID

CYEXIT_1-SEQNR = 11111.

CYEXIT_1-SEQNRV = 22222.

CYEXIT_1-FUNCTION1 = '1'.

  • CYEXIT_1-FUNCTION2 = '2'.

0 Kudos
74

Hello,

if you set the function '2', you'll have to fill EPANF , if you use forward scheduling. you'll have to set EPEND, if you use

backward scheduling.

That's independent from the field you use to set this function, function1 or function2 .

Regards

Wolfgang

Edited by: Wolfgang Valtin on Feb 8, 2011 3:40 PM