2009 Oct 26 8:41 AM
Hi Experts,
I have one query regarding running transaction.
Whenever I execute my program which is for G/L posting, I wanted to identify if FB01 is used in that time by some other user i.e. while I execute the program & at the same time some other user is creating G/L account using FB01.
In this case I wanted to stop my program's processing.
Please suggest.
Regards,
Neha
2009 Oct 26 8:44 AM
you can use :
THDISPLAY_WORKPROCESS_LIST
or TH_DISPLAY_WORKPROCESS_LIST
to get the workprocess values .. export it to memory.. read the values..
2009 Oct 26 9:07 AM
neha, i have one more solution for you..
REPORT zsomu_sdn_test.
SUBMIT RSM04000_ALV EXPORTING LIST TO MEMORY AND RETURN. " this is same as SM04
DATA : gt TYPE STANDARD TABLE OF abaplist WITH HEADER LINE.
* retrieve the list
CALL FUNCTION 'LIST_FROM_MEMORY'
TABLES
listobject = gt
EXCEPTIONS
not_found = 1
OTHERS = 2.
IF sy-subrc = 0.
DATA: BEGIN OF tab2 OCCURS 0,
w_text(255) TYPE c,
END OF tab2.
* retrieve the text
CALL FUNCTION 'LIST_TO_ASCI'
TABLES
listasci = tab2
listobject = gt
EXCEPTIONS
empty_list = 1
list_index_invalid = 2.
IF sy-subrc = 0.
DATA : s1 type string.
*searching for FB01 users.
LOOP AT tab2 where w_text cp '*FB01*'.
split tab2-w_text at '|' INTO s1 s1 tab2-w_text.
CONDENSE s1.
if s1 = sy-mandt.
WRITE tab2. " here you can put some flag or do some operation to exit your code.
endif.
ENDLOOP.
ENDIF.
ENDIF.
2010 Jan 14 11:57 AM
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |