Skip to Content
0
Former Member
May 06, 2009 at 09:41 AM

SOURCE_PACKAGE - Read Operation

629 Views

hello,

i have a question..

how can i read a single data from a SOURCE_PACKAGE.

SELECT SINGLE *
       FROM SOURCE_PACKAGE
       INTO ls_before_image
       WHERE vbeln    EQ  <source_fields>-vbeln
       AND      posnr    EQ <source_fields>-posnr

IF sy-subrc = 0.
  ...

But it dont work... how can i do that??? and how can i delete a single data from SOURCE_PACKAGE with keys.

Actually i do it like

 LOOP AT SOURCE_PACKAGE INTO ls_before_image
    WHERE vbeln    EQ <source_fields>-vbeln
    AND posnr    EQ <source_fields>-posnr
 ENDLOOP.

IF sy-subrc = 0.
  ...

Is this the only way to do that?

regards sunny

Edited by: sunnyfriday on May 6, 2009 11:43 AM