on 02-05-2011 7:40 PM
Hi Expert,
There is a request in my project to update the specification's report fields such as report status, Relevant check box and report version. I am using FM 'C1F3_REPORTS_UPDATE' for this purpose. However, the updating didn't work for some reason and i keep getting message in export parameter E_FLG_LOCKFAIL = 'X' and E_FLG_ERROR = 'X'. Shold i not use this FM and there could be other FM that i suppose to call ?
Can any one help please?
Hi,
You need to call FM 'C1F3_REPORTS_READ' first with i_scenario = 01. This will lock the report & then you call the FM to update.
Sample code is given below.
ls_scenario = 01.
ls_addinf-valdat = sy-datum.
CALL FUNCTION 'C1F3_REPORTS_READ'
EXPORTING
i_scenario = ls_scenario
i_addinf = ls_addinf
I_FLG_HEADER = 'X'
IMPORTING
E_FLG_LOCKFAIL = lw_lf
E_FLG_ERROR = LW_ERR
E_FLG_WARNING = LW_WAR
tables
x_api_header_tab = li_header
EXCEPTIONS
NO_OBJECT_SPECIFIED = 1
PARAMETER_ERROR = 2
OTHERS = 3 .
IF sy-subrc <> 0.
ENDIF.
ls_header-repstatus = 'WD'.
MODIFY li_header from ls_header TRANSPORTING repstatus
where recn is not INITIAL.
CALL FUNCTION 'C1F3_REPORTS_UPDATE'
EXPORTING
i_addinf = ls_ADDINF
I_FLG_HEADER = 'X'
IMPORTING
E_FLG_LOCKFAIL = lw_lf
E_FLG_ERROR = LW_ERR
E_FLG_WARNING = LW_WAR
TABLES
X_API_HEADER_TAB = li_header
EXCEPTIONS
NO_OBJECT_SPECIFIED = 1
PARAMETER_ERROR = 2
OTHERS = 3 .
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
else.
CALL FUNCTION 'C1F3_REPORTS_SAVE_TO_DB' .
endif.
Regards,
Mandeep
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello
this is the first time in my EHS activity there such a demand is asked for. Therefore we have never used this FM in the past (refer may be to http://www.se80.co.uk/sapfms/c/c1f3/c1f3_reports_update.htm)
Generally: my recommendation would be: you should not change (not to say never) the version of a released WWI report.
The "Relevancy" indicator can be set by "mass" using standard CG50 functionality (prepare report tree of reports; select them all, and then use the button which I believe is called "Set relevanT" (there all selected reports are now "relevant" and then release the "finished" report).
A "finished" report does not have normally a version. The version is generated at "release" time based on relevancy indicator.
Furthermore: in the definition of the "generation varianT" you specify a "starting status". At any time you can enhance the SAP standard net by some customer specific status. In any case: In CG50 you can select easily the reports in a "specific" status, prepare/create the report tree and mark the reports and "go on" to the next status without a problem.
Can you explain a little bit the background of this/your demand?
With best regards
C.B.
Edited by: Christoph Bergemann on Jun 15, 2011 12:55 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
13 | |
6 | |
3 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.