Quantcast
Channel: SCN : All Content - All Communities
Viewing all articles
Browse latest Browse all 2169

Select statement is not fetching sequential records from VBAP

$
0
0

Hi Experts,

 

I am facing an issue in production system, which is not reflecting in development and quality systems.

 

There is a program which creates PR based on SO in sap.

 

The program takes input as SO number and fetches all line items of that SO into one internal table.

 

At this point select statement is working fine in development and quality systems but not in production systems.

 

below is the select statement

 

SELECT vbeln posnr matnr kwmeng vrkme cuobj FROM vbap

        INTO CORRESPONDING FIELDS OF TABLE mt_vbap

        WHERE vbeln EQ iv_sales_order AND

              posnr IN it_item_no.

 

mt_vbap table has several fields.

 

The above statement is not fetching line items in the same sequence of SO line items, as a result PR also created in shuffled order of line items.

 

Kindly help me in resolving this issue.

 

Quick response is appreciated


Viewing all articles
Browse latest Browse all 2169

Trending Articles



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