cancel
Showing results for 
Search instead for 
Did you mean: 

User status

Former Member
0 Kudos

Hi,

How can a user status be controlled when a sales order is created??

Rgds

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

depending what is really required here.

I hope you define dstatus profile and assigned it properly in IMG.

If you want to set status in any of userexits - you can do it using the following code :

read status :

call function 'STATUS_BUFFER_EXPORT_TO_MEMORY'

exporting

i_memory_id = 'BSVA_VBK_STATUS'

exceptions

others = 1.

  • No need to check the return code

  • Retrieve the user status internal table from memory

import jest_buf to jest_mem

from memory id 'BSVA_VBK_STATUS'.

free memory id 'BSVA_VBK_STATUS'.

  • Check that the internal table jest_mem is filled

if not jest_mem[] is initial.

....

change stauts here,

then call FM

call function 'STATUS_CHANGE_EXTERN'

exporting

client = sy-mandt

objnr = vbak-objnr

user_status = tj30t-estat. <<< the status you want to change.

table tj30t contains a link between status number - tj30t-estat & status description tj30t-txt04, like 'FINR' shown in VA01,...

Former Member
0 Kudos

Hi Siarhei,

Thanks a lot for this message. This gave me sleepless nights, I tried a lot of things but nothing worked.

You made my day!

Mit freundlichen Grüßen,

Swapnil

Francis417
Participant
0 Kudos
Hi,

I want to do similar thing and would like to change the user status when using VA01 to create a Sales Order.

I followed the suggested code and can only get an empty table for jest_mem[], what would probably be missing in may case?

Thanks,

Francis