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

Fetch USER STATUS for multiple sales orders

Former Member
2,855

Hello,

To get the user status for a sales order there is a standard fm STATUS_TEXT_EDIT.

But this works for 1 sales order per run.

Now, I have an internal table with list of sales orders and I need to get the user status for each sales order. I think using the above mentioned function wont be a good idea as it will hit database for each order number thus increasing the database hit to great extent.

So I wanted to know if there is any alternate way to fetch user statuses in mass.

Thank You,

Ashish Rawat

Hello,

To get the user status for a sales order there is a standard fm STATUS_TEXT_EDIT.

But this works for 1 sales order per run.

Now, I have an internal table with list of sales orders and I need to get the user status for each sales order. I think using the above mentioned function wont be a good idea as it will hit database for each order number thus increasing the database hit to great extent.

So I wanted to know if there is any alternate way to fetch user statuses in mass.

Thank You,

Ashish Rawat

7 REPLIES 7
Read only

gouravkumar64
Active Contributor
0 Likes
2,194

Hi,

You can try like this with the help of SELECT query.

Get object number of sales order from VBAK.

Then pass OBJNR to JEST table.

You will get mass user status.

Hope it will help you.

Thanks

Gourav.

Read only

0 Likes
2,194

Means I have to achieve the result manually, that is the last resort. I wanted to know if there is any standard FM for the purpose.

Read only

RaymondGiuseppi
Active Contributor
2,194

There is a FM : STATUS_READ_MULTI, easily found in same function group that shares same buffer, so you will then execute STATUS_TEXT_EDIT in a loop.

But don't worry too much, if you don't set BYPASS_BUFFER by inadvertency most tables will be buffered, and for most orders only JSTO  and JEST tables will usually be read if you don't use the STATUS_READ_MULTI FM.

Regards,

Raymond

Read only

0 Likes
2,194

Hello Raymond,

STATUS_READ_MULTI has output copy of data in table JEST.

What I need is TJ30T-TXT04 against JEST-STAT and JSTO-STSMA i.e the current active user status for the OBJNR in VBAK.

Thank You.

Read only

2,194

My suggestion was : "STATUS_READ_MULTI will "bufferize" most data, then call the STATUS_TEXT_EDIT in a loop " (AFAIK there is no FM that merche the functions of those two modules)

Regards,

Raymond

Read only

0 Likes
2,194

Thank you Raymond. That is what I wanted to know if there is any FM available for the purpose.

So, I have to fetch the data from TJ30T manually.

Thank You,

Ashish Rawat

Read only

0 Likes
2,194

Yes, but only once per Status Profile.

Regards,

Raymond