on 02-28-2011 3:13 PM
Hello friends,
Please spend few mins of your valuable time.
I am facing an issue in workflow for FB01, System is upgraded from 4.7 to ECC6.0.
Using FB01 the document is posted throgh workflow, the issue is.. the record 'created by' field is updated with wf-Batch but for the same workflow in 4.7 it is updated with userid of creater.
I analyzed in both 4.7 and ECC6.0 the posting step is background/syncronus in both and i also gone though forum but i did not get solution.
I also tried to change background to dilog step as sugested in some of forums did not work.
Why it's behaving differently for same workflow in 4.7 and ECC6.0? do i need to do any configaration for workflow settings? or any sap note?
Please help me.
Thanks in advance.
Hi,
I did the same in invoice approval process (BO FIPP.post) and it works fine.
1. The method for posting is not set for dialog.
2. Task is not set for background.
3. In the step of workflow i fill the agent (like dialog step).
In task properties the icon background processing has a grey color.
Regards,
Ronit.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ronit,
As you said I have tried, but it's looking for agent and failed because agents are not assigned.
in this workflow after approval step there are two more steps which are background and third step is posting which is also back ground step no agents required.
After creation of document in the FMBB log 'Created by' field is updated with creater used id and workflow is sent for approval. once approver is approved
the creater user id is replaced with wf-batch but 4.7 after approval the creater name remains unchanged.
Regards,
Hello,
Look in the workflow log. If the step is being run in background in 4.7 then it's being run as WF-BATCH. If it's managing to post it under a different name then it must be getting that username as a parameter and using it somewhere, probably in a function.
How does it do the posting?
regards
Rick Bakker
hanabi technology
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Rick Bakker,
Thanks for reply.
It's using Function to post the document in backaground step. In ECC6.0 I have checked the parameters of function in debug it shows creator id not wf-batch. after just excuting the function and commit work by pressing F6 in debug it's updated with wf-batch in DB.
And also i have called the same function in test report program it's updated correctly with creator id not with wf-batch.
More over i have compared both function that is triggerd from workflow and from test report program in debug mode, in both cases parameters are same.
Is there any settings needs to be done?
Regards,
Hi Rick Bakker,
Please find below code that is used for posting in workflow.
DATA: l_ref_entrydoc TYPE REF TO cl_fmku_entrydoc_handler,
l_s_docid TYPE fmed_s_docid,
l_s_header TYPE fmed_s_header,
l_t_lines TYPE fmed_t_lines,
l_ref_msg TYPE REF TO cl_bubas_appl_log_ctx,
l_log_handle TYPE balloghndl,
l_s_log TYPE bal_s_log.
DATA: l_exceed TYPE char1.
l_s_docid-client = sy-mandt.
l_s_docid-fm_area = '1000'.
l_s_docid-docyear = '2010'.
l_s_docid-docnr = '0000001364'.
CREATE OBJECT l_ref_msg.
CREATE OBJECT l_ref_entrydoc
EXPORTING
i_fm_area = l_s_docid-fm_area.
CALL METHOD l_ref_entrydoc->doc_get_contents
EXPORTING
i_f_docid = l_s_docid
IMPORTING
e_f_header = l_s_header
e_t_lines = l_t_lines
EXCEPTIONS
not_found = 1
OTHERS = 2.
IF sy-subrc EQ 0.
ENDIF.
l_s_log-alprog = sy-repid.
CALL FUNCTION 'BAL_LOG_CREATE'
EXPORTING
i_s_log = l_s_log
IMPORTING
e_log_handle = l_log_handle.
CALL METHOD l_ref_msg->set_log_handle
EXPORTING
i_log_handle = l_log_handle.
change state of header
l_s_header-docstate = 3.
post the preposted document
l_exceed = 'X'.
CALL METHOD l_ref_entrydoc->preposted_post
EXPORTING
i_f_docid = l_s_docid
i_f_header = l_s_header
i_ref_msg = l_ref_msg
CHANGING
c_t_lines = l_t_lines
EXCEPTIONS
not_preposted = 1
original_not_found = 2
ref_msg_initial = 3
docnr_error = 4
OTHERS = 5.
COMMIT WORK AND WAIT.
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.