on 04-16-2012 11:07 AM
Hi Group,
I have a requirement to set system status 'ACPT', 'FNBL' programatically. But I didn't get any BAPI or FM to update set/unset these two statuses.
We have a BAPi to set the system and user status i.e. BAPI_BUS2054_SET_STATUS. But his does not support mentioned status.
Please let me know if you have any solution for this.
Thanks,
AJ
Hi,
Try FM STATUS_UPDATE or STATUS_CHANGE_INTERN
Regards
Shrikant
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi abhishek,
Take the F-code from the transaction cj20n for the given Status type.
Since later in this program the fcode is pass to some standard table to get the perform name and program name for futher process in the transaction.
ACPT
*_________________________
*STAK Set
*STAL Undo
*
*FNBL
*_________________________
*STEF Set
*STER Undo
Hello Rohan,
Thanks for the Idea.
It works. But we need to incorporate some more updated to make this work.
Here it goes...
CALL FUNCTION 'CJWI_INIT'. ------------------> Mandatory
* SY-SUBRC always '0' for call function with no Exception.
* 'CJWI_INIT' does not clear all the global tables. So we need to clear
* this table explicitely.
PERFORM cjdi_table_reset IN PROGRAM saplcjwb .------------------> Mandatory
* Select Basic data for Project ID
CALL FUNCTION 'CJDW_SELECT_BASIC_DATA' ------------------> Mandatory
EXPORTING
enqueue = 'X'
project = pspid
EXCEPTIONS
error_message = 1
OTHERS = 2.
IF sy-subrc NE 0.
" Error
EXIT.
ENDIF.
* WBS: Basic data maintenance ( This FM will take the FCODE and perform the operation for status set.)
CALL FUNCTION 'CJWB_STATUS_MAINTAIN'
EXPORTING
i_objnr =objnr " Object number of the WBS element (Important)
vrgng = lfd_fcode " FCODE for system status (SET/RELEASE)
no_check = 'X' " Pass 'X' to avoid unwanted popups if check fails
EXCEPTIONS
error_message = 1
not_found = 2
wrong_input = 3
not_possible = 4
OTHERS = 5.
IF sy-subrc NE 0.
" Error
EXIT.
ENDIF.
After this do CALL FUNCTION 'BAPI_PS_PRECOMMIT' and
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = c_flag_x
IMPORTING
return = lwa_bapireturn.
* sy-subrc not checked as there are no exceptions
This piece of code will ensure the system status set/Release for a WBS.
User | Count |
---|---|
95 | |
11 | |
10 | |
6 | |
5 | |
5 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.