Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9071

Re: Best table which gives only sales order which are not having deliveries

$
0
0

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.


in above code you are comparing only document number of vbap and vbfa. its not enough you have to compare ITEM NO also in your query . cause there is a certain chance that sometimes few items gets deleted in delivery . from business point of view if delivery of few items is not possible then user deletes few items (these items may be available in sales order but in del. they might not be available).


also what makes you to think that using VBFA is not best practice??? its not true . also what you mean to say open sales orders exactly in your case


sales orders that are partially delivered or completed undelivered or both???


Viewing all articles
Browse latest Browse all 9071


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>