Skip to Content
0
Oct 25, 2011 at 05:29 AM

BSEG-BELNR based on VBRK-VBELN

1093 Views

Dear All,

Happpy Diwali.

I want BSEG-BELNR based on Invoice no(VBRK-VBELN).

Please tale me another way to get same data as per below code.

DATA : V_BELNR TYPE BKPF-BELNR.

LOOP AT IT_DATA .

SELECT SINGLE BELNR

INTO V_BELNR

FROM BSEG

WHERE VBELN = IT_DATA-INVNO

AND SHKZG = 'S'.

if sy-subrc = 0.

iT_DATA-BELNR = V_BELNR .

MODIFY IT_DATA TRANSPORTING BELNR.

endif.

CLEAR V_BELNR.

ENDLOOP.

Kindly advice another select query for above query.

Regards,

Parshuram.