cancel
Showing results for 
Search instead for 
Did you mean: 

Delete source_package

Former Member
0 Kudos

Dear Experts

I am trying to delete from source_package where zdatefrom <> datefrom.

The transformation syntax checker says E: Field "datefrom" is unknown. It is neither in one of the specified tables nor defined by a "DATA" statement.

I checked tys_SC_1 the field names are shown there as datefrom for infoobject 0datefrom.

Please help.

regards

Pascal

Accepted Solutions (1)

Accepted Solutions (1)

sven_mader2
Active Contributor
0 Kudos

Hi,

you mean "delete from source_package where zdatefrom = datefrom"?

-> The left fieldname is a part of the table

-> the right is a variable in your abap code.

=> you can't do it in one command.

data: l_t_data type _ty_t_SC_1.
loop at source_package assining <source_fields>.
  if <source_fields>-/bic/zdatefrom <> <source_fields>-datefrom.
    append <source_fields> to l_t_data.
  endif.
endloop.
source_package = l_t_data.

Sven

Edited by: Sven Mader on Sep 5, 2011 7:01 AM

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi Pascal,

Read the data by using loop and filed name as /BIC/ZDATEFROM, if it is custom generated.

assign the entire data to source package and delete based on data condition

Regards,

Venkatesh

Former Member
0 Kudos

Hi,

If that is a custom field that you have to use /BIC/ZDATEFROM , otherwise it will give error.

Hope this will help you.

Thanks ,

Jitendra

Former Member
0 Kudos

Hi,

Check the proper field name. And it is better if you directly copy it from tys_SC_1and then paste it in the other part of code.

Regards,

Durgesh.

former_member182470
Active Contributor
0 Kudos

Hi Pascal,

Please use 0datefrom instead of datefrom in your syntax. Then this error should not come..

Regards,

Suman