Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Read MSEG based on EBELN / EBELP

Former Member
0 Likes
1,658

Hi Experts,

Is there any function module available which reads the purchase order data and returns the relevent informations from MSEG table. I am getting a timeout dump while selecting from MSEG table. Is it a better option to create an index?

Thanks and regards,

Atanu

1 ACCEPTED SOLUTION
Read only

RaymondGiuseppi
Active Contributor
0 Likes
1,042

If there is no index on material movements (MSEG) by purchase order (EBELN/EBELP) active on your system (Is MSEG~B active), you could try to use history table per purchase document (EKBE) selecting material movements via a complementary selection on field Transaction/event type (EKBE-VGABE) - With some luck there will be enough information to fulfill you requirement without actually reading material movements.

(There is not much chance that a FM will perform better than a direct OPEN-SQL statement...)

Regards,

Raymond

4 REPLIES 4
Read only

RaymondGiuseppi
Active Contributor
0 Likes
1,043

If there is no index on material movements (MSEG) by purchase order (EBELN/EBELP) active on your system (Is MSEG~B active), you could try to use history table per purchase document (EKBE) selecting material movements via a complementary selection on field Transaction/event type (EKBE-VGABE) - With some luck there will be enough information to fulfill you requirement without actually reading material movements.

(There is not much chance that a FM will perform better than a direct OPEN-SQL statement...)

Regards,

Raymond

Read only

Former Member
0 Likes
1,042

try table: EKBE, u can pass PO number and PO item, get Number of Material Document and item.

Read only

0 Likes
1,042

Thanks Raymond and Bipin. EKBE will be a good option other that creating index. I have rewarded you points.

Thanks and regards,

Atanu

Read only

sandeep_katoch
Contributor
0 Likes
1,042

Hi Atanu,

Please check these threads

http://scn.sap.com/thread/1435793

http://scn.sap.com/thread/754875

Hope this solves or atleast gives you some insight regarding your problem

Rgds,

Sandeep Katoch