Skip to Content
author's profile photo
Former Member

Reg: customised ALV layout like VA05

Hi,

IF P_OPEN = 'X' AND P_MYOR NE 'X' .

SELECT AKUNNR AVBELN ABSTNK AAUDAT AERNAM AAUART AVKORG AVTWEG

ASPART AVKGRP AVKBUR AKURST AFAKSK AGUEBG A~GUEEN

AVBTYP AAWAHR

BVRKME BLGORT BVSTEL BERZET BPOSNR BMATNR BCHARG BZMENG

BNETWR BNETPR BKWMENG BARKTX BWERKS BWAERK B~MEINS

BERNAM CLFSTK C~FKSAK INTO CORRESPONDING FIELDS OF TABLE ITAB

FROM VBAK AS A INNER JOIN VBAP AS B ON AVBELN = BVBELN

INNER JOIN VBUK AS C ON AVBELN = CVBELN

WHERE A~KUNNR IN CUST

AND A~AUDAT IN S_AUDAT

AND A~BSTNK IN EBEL

AND B~MATNR IN MAT1

AND C~LFSTK NE 'C'

and c~lfstk ne ' '

AND C~FKSAK NE 'C'

and c~fksak ne ' '.

AND C~ABSTK NE 'C' .

Is the above query correct for open sales order and what ever the charge

is there in vbap is not getting displayed in ALV output

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • Posted on Aug 22, 2007 at 08:54 PM

    There is no universal "open order" selection criteria because different statuses will be set depending on the configuration. Also from the business standpoint what do you consider "open"? Not delivered? Not billed?

    Just go to SE16 and check if there is a single record that fits your criteria. How do we know what's in your S_AUDAT, EBEL and MAT1?

    Also as a shortcut you might want to use VBAKUK instead of VBAK and VBUK. And instead of NE use = A or B.

    Add comment
    10|10000 characters needed characters exceeded