a month ago - last edited a month ago
Hello,
I'm working on creating a custom workflow for Maintenance Orders in SAP S4/Hana public cloud on 2SL with CBC. Due to the environment, I have limited to no ability to debug code.
I aim to use the controllingsettlementprofile from the CDS View I_maintenanceorderdex to guide who gets to approve the Maintenance Order. For instance, when the WBS is set, I would like the project manager to be the approver.
However, I'm facing the following issues:
DATA:
ls_badi_approver TYPE if_eam_workflow_agents_badi=>bd_eam_s_previous_approver,
lt_badi_approver TYPE if_eam_workflow_agents_badi=>bd_eam_t_previous_approver,
lv_projectmanager TYPE YY1_Projectmanager-personfullname,
lv_cb_id TYPE i_businessuserbasic-userid,
lv_coprofile TYPE i_maintenanceorderdex.
IF businessobject CS 'MaintenanceOrder'.
"DATA(lv_level) = lines( previousapproverlist ).
" Holen der Maintenance Order-Daten
SELECT SINGLE *
FROM I_MaintenanceOrderDEX WITH PRIVILEGED ACCESS
INTO _coprofile.
IF SY-SUBRC = 0.
"IF lv_coprofile-controllingsettlementprofile EQ 'YEAM06'.
"When PSP is set use the psp
IF lv_coprofile-projectinternalid IS NOT INITIAL.
I'm encountering an issue where every project-related ID (such as wbselementid, projectinternalid, etc.) from the CDS View appears empty, even though they are filled. Additionally, the SettlementProfile is also empty during code execution. I verified this by setting a dummy approver at each step.
I receive Maintenance Orders where the equipment details are provided, but I'm unable to obtain the rest of the necessary information.
Could anyone offer guidance on this issue?
Your assistance would be greatly appreciated.
Best regards,
Benjamin
Request clarification before answering.
User | Count |
---|---|
95 | |
11 | |
9 | |
8 | |
7 | |
5 | |
4 | |
4 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.