0% found this document useful (0 votes)
144 views5 pages

Start Routine Issue For 2LIS - 03 - BF

The document discusses an issue Eddy is having implementing code in a start routine to delete records from a table where the stockcat or stocktype fields equal 'V'. Deepak and Hendrik provide suggestions to fix Eddy's code, which is resulting in an error message. They recommend using DELETE TABLE WHERE instead of a LOOP statement, and making sure the code is placed within Begin of Routine and End of Routine sections.

Uploaded by

Bac Aston
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
144 views5 pages

Start Routine Issue For 2LIS - 03 - BF

The document discusses an issue Eddy is having implementing code in a start routine to delete records from a table where the stockcat or stocktype fields equal 'V'. Deepak and Hendrik provide suggestions to fix Eddy's code, which is resulting in an error message. They recommend using DELETE TABLE WHERE instead of a LOOP statement, and making sure the code is placed within Begin of Routine and End of Routine sections.

Uploaded by

Bac Aston
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Start Routine Issue for 2LIS_03_BF

1 of 5

https://archive.sap.com/discussions/thread/3257581

10/31/2016 6:56 PM

Start Routine Issue for 2LIS_03_BF

2 of 5

https://archive.sap.com/discussions/thread/3257581

Hi all,
As I am having mismatch with stock amounts in 0IC_C03, I am applying a solution according to OSS note.
My issue is implementing lines in the start routine
The part I am adding is
loop at SOURCE_PACKAGE.
if SOURCE_PACKAGE-stockcat eq 'V' or
SOURCE_PACKAGE-stocktype eq 'V'.
delete SOURCE_PACKAGE.
endif.
endloop.
* if abort is not equal zero, the update process will be canceled
ABORT = 0.
* INSERT END

and the error message I got at the bottom is


E: At "LOOP AT itab", one of the additions "INTO", "ASSIGNING", or "TRANSPORTING NO FIELDS" is
required. in the 00 context.
My aim is to define a code part to delete some records. I am poor with ABAP skills. I appreciate your help
on that.
Regards.
Eddy.
enterprise_data_warehousing/business_warehouse

Eddy Carl
October 26, 2012 at 12:04 PM
1 Likes

10/31/2016 6:56 PM

Start Routine Issue for 2LIS_03_BF

3 of 5

https://archive.sap.com/discussions/thread/3257581
Eddy Carl
October 26, 2012 at 12:04 PM
1 Likes

Deepak Chavan

replied
October 26, 2012 at 12:10 PM

Hi Eddy,
Please use below code:
LOOP AT SOURCE_PACKAGE ASSIGNING
SOURCE_FIELDS.
IF SOURCE_FIELDS-STOCKCAT EQ 'V' OR
SOURCE_FIELDS-STOCKTYPE EQ 'V'.
DELETE SOURCE_PACKAGE.
ENDIF.
ENDLOOP.
Regards,
Deepak Chavan.
0

Eddy Carl

replied
October 26, 2012 at 12:52 PM

Hi Deepak,
Thank you for the response, when I update the
lines per your prompt, I receive this message:
E:Field "SOURCE_PACKAGE" is unknown. It is
neither in one of the specified tables nor defined
by a "DATA" statement.

10/31/2016 6:56 PM

Start Routine Issue for 2LIS_03_BF

4 of 5

https://archive.sap.com/discussions/thread/3257581

neither in one of the specified tables nor defined


by a "DATA" statement.
I am seeing
CHANGING
SOURCE_PACKAGE

type

_ty_t_SC_1
so I expect there would no be a
"SOURCE_PACKAGE is unknown" issue.
By the way my code part is as below:
loop at SOURCE_PACKAGE ASSIGNING
<source_fields>.
if SOURCE_fields-stockcat eq 'V' or
SOURCE_fields-stocktype eq 'V'.
delete SOURCE_PACKAGE.
endif.
endloop.
0

Deepak Chavan

replied
October 26, 2012 at 13:19 PM

oh strange !! Can you try below from


Hendrik?
DELETE SOURCE_PACKAGE WHERE
stockcat = 'V' OR stocktype = 'V'.
this will also do.
Regards,
Deepak Chavan.
0

Eddy Carl

replied

10/31/2016 6:56 PM

Start Routine Issue for 2LIS_03_BF

5 of 5

https://archive.sap.com/discussions/thread/3257581

Eddy Carl

replied
October 26, 2012 at 13:34 PM

I am having the same message


below after change the code
statement.
Could you please see the
attachment.
Eddy
start_routine.jpg

(86788 B)

Deepak Chavan
replied
October 26, 2012 at 14:21 PM

Hello Eddy,
Please put your code in
"Begin of Routine " and "End
of Routine part."
You are using gloabl section
hence error message is
coming.
Regards
Deepak Chavan.
0

Hendrik Brandes

replied
October 26, 2012 at 12:29 PM

Hello,
the correct syntax is LOOP AT itab ASSIGING
<source_fields>.
But: Try this:

10/31/2016 6:56 PM

You might also like