cancel
Showing results for 
Search instead for 
Did you mean: 

start routine code

Former Member
0 Kudos

Hi SAP experts,

kindly post code for start routine for following logic.

I NEED TO CHECK THIS CONDITION TO EACH RECORD OF SOURCE_PACKAGE

___________________________________________________________________________

IF <field1 = 'x'> OR <field2 =0>

" do nothing, means no source_package records deletion"

ELSE

DELETE SOURCE_PACKAGE (means delete source_package record deletion).

ENDIF.

____________________________________________________________________________

KINDLY POST CODE.

Accepted Solutions (0)

Answers (6)

Answers (6)

Former Member
0 Kudos

Thanks to  all of you.. all your suggestions & help worked out well...

rathy_moorthy2
Active Contributor
0 Kudos

try with

If source_package is not initial.

delete source_package where ( field1 = 'x' or field2 = 0 ).

endif.

hope it helps

Regards,

Rathy

Former Member
0 Kudos

Hi

try this below code

loop at source_package assigning <source_fields>.

if ( <source_fields-/bic/z* = 'X'  or <source_fields>-/bic/z* = '  ').

else.

delete source_package.

endif.

endloop.

hope this will work for you.

regards,

sunil.

0 Kudos

Hi,

You can try this:

Loop at datapackage.

if <condition1>.

else.

SKIP.     "SKIP statement skips the record

ENDIF.

endloop.

KodandaPani_KV
Active Contributor
0 Kudos

Hi,

if you write the below statement,

DELETE SOURCE_PACKAGE

then yes, it will delete complete source package but it is not correct.

Generally what we do is, put some condition in delete command just to delete specific records and not the entire source package.

Thanks,

Phani.

Former Member
0 Kudos

Hi,

Take all ur data in a internal table LT_TAB[ ].

write delete statement:

Delete LT_TAB [ ] where <your condition>.

assign LT_TAB back to Source_package [ ].

Please try searching on google first. "Friendly Suggestion

Regards,

Gaurav