cancel
Showing results for 
Search instead for 
Did you mean: 

The best tables to get sales open order which are not having deliveries

former_member188831
Contributor
0 Kudos

Right now i am using vbap and vbfa is there any other best ways to get them ?

DATA: lt_vbfa TYPE TABLE OF vbfa,

         ls_vbfa TYPE vbfa,

         lt_vbap TYPE TABLE OF vbap,

         ls_vbap TYPE vbap.

   SELECT DISTINCT * FROM vbap INTO TABLE lt_vbap WHERE

     vbeln IN s_vbeln

     AND matnr IN s_matnr

     AND werks = p_werks.

   SELECT DISTINCT *

                         FROM vbfa INTO TABLE lt_vbfa WHERE

                         vbtyp_n = 'J'

                     AND rfmng NE 0

                     AND bwart EQ '601'.

   LOOP AT lt_vbap INTO ls_vbap.

     READ TABLE lt_vbfa INTO ls_vbfa WITH KEY vbelv = ls_vbap-vbeln.

     IF sy-subrc NE 0.

       is_final-vbeln = ls_vbap-vbeln.

       is_final-posnr = ls_vbap-posnr.

       is_final-matnr = ls_vbap-matnr.

       is_final-klmeng = ls_vbap-kwmeng.

       is_final-meins = ls_vbap-vrkme.

       APPEND is_final TO it_final.

     ENDIF.

   ENDLOOP.



Please advise...



Thanks

Mahesh

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Mahesh,

You can use VA05 standard report. It is Customer based.

Another good option is to create a query using SQVI for VBAK and VBUK table (Set LFSTK = A)

You will get open Sale orders without deliveries.

Thanks

Kartik

former_member188831
Contributor
0 Kudos

Thanks Karthik ! i was knowing about this table .. but did not thought about using this way..

here the problem is i am not getting if the sales order got purchase order created.

- ideally i am looking for the order which are not having deliveries in this case it fail.

if i say LFSTK NE C then it pull the sales order record which is having po but not delivery.

but it gives big list includes the sales order with deliveries.

appreciate any best idea to fix it.

-- Finally looks working when i use LFSTK EQ 'A' OR LFSTK EQ ''.

Thanks,

Mahesh

Answers (4)

Answers (4)

former_member182805
Active Participant
0 Kudos

Table VBFA shows the document flow....you check which sales orders have no deliveries

former_member182805
Active Participant
0 Kudos

You have a standard SAP report VA05 to check open sales orders.

former_member212148
Participant
0 Kudos

Hi Mahesh,

You may check this view also WB2_V_LIKP_LIPS2.

It will helpful for your requirement.

Regards,

Ranjit Kumar

former_member212148
Participant
0 Kudos

Hi Mahesh,

Check the table LIPS and pass sales order in field VGBEL

But it will not helpful in partial delivery.

Thanks,

Ranjit Kumar.

gurtej_sandhu1
Participant
0 Kudos

Hi Mahesh,

Check table VBUP(Sales Document: Item Status) Field GBSTA(Overall processing status of the SD document item) here:-

A    Not yet processed

B    Partially processed

C    Completely processed

Thanks,

Gurtej