Application Development 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: 

Fetch USER STATUS for multiple sales orders

former_member289261
Active Contributor

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

gouravkumar64
Active Contributor
0 Kudos

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.

0 Kudos

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.

raymond_giuseppi
Active Contributor

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

0 Kudos

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.

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

0 Kudos

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

0 Kudos

Yes, but only once per Status Profile.

Regards,

Raymond