Skip to Content
0
Former Member
May 13, 2009 at 05:45 AM

Sales Order Header wise status.

61 Views

Hy expert,

i going to make Sales order Status Reports. It run successfully fetch data form header wise, but it display all so, that is already closed or completed.

i wnt to which Sales order it is pending or partially deliverd.

Please help me regarding this.

Report in ALV.

Please read this code for fetch Data. if u like change pl do.

Thnks

Bhavesh Panchal

baroda

FORM data_retrieval.
SELECT VBELN  NETWR KUNNR FROM VBAK INTO (ITAB-VBELN,ITAB-NETWR,ITAB-KUNNR) WHERE VBELN IN VBELN .
SELECT NAME1 FROM KNA1 INTO (ITAB-NAME1) WHERE KUNNR = ITAB-KUNNR .
SELECT BSTKD BSTDK FROM VBKD INTO (ITAB-BSTKD,ITAB-BSTDK) WHERE VBELN = ITAB-VBELN.
SELECT VSNMR_V FROM VBAK INTO (ITAB-VSNMR_V) WHERE VBELN = ITAB-VBELN.
*SELECT EDATU FROM VBEP INTO (ITAB-EDATU) WHERE VBELN = ITAB-VBELN.
SELECT LFSTK FROM VBUK INTO (ITAB-LFSTK) WHERE VBELN = ITAB-VBELN and lfstk not like 'C'.
APPEND ITAB.
ENDSELECT.