cancel
Showing results for 
Search instead for 
Did you mean: 

BPC 10 odd ENDROUTINE behaviour

former_member182766
Contributor
0 Kudos

Hi guys! Struggling with the rather strange problem for the past 4 hours. I've created the routine BADI, pretty simple, pretty standard, all filters and classes are in place. The ENDROUTINE call bit in Transformation's Options area is set. The break point in CL_UJXD_PACKAGES_RES is also set and triggers every time I start the package.

But after that nothing, silence. It looks like the system doesn't even go to the Routine.

I've set breakpoints in the routine. They were ignored.

I've explicitly set the debugger break point to trigger in the Runroutine. Ignored. 

I've changed the code of the routine for it to produce a shortdump. Nothing.

I'm really frustrated, because no matter what I do it's like the routine doesn't exist from BPC's point of view (even though in DM package log it claims that the routine was triggered) .

Any ideas are much appreciated!

Cheers.

Accepted Solutions (0)

Answers (4)

Answers (4)

former_member182766
Contributor
0 Kudos

Still experiencing the same problem on the same system. STARTROUTINE breaks like a charm, ENDROUTINE breakpoints just always ignored.

Former Member
0 Kudos

Hi Vadim,

I am experiencing the same issue. Did you resolve your issue? Please let me know if you have a solution to this.

Regards,

Surya Tamada.

former_member182766
Contributor
0 Kudos

Hi Surya, the problem seemed to be connected to the selection criteria. So if no data selected to pass to the routine, the routine just skips.

former_member200327
Active Contributor
0 Kudos

Isn't this what "I told you" on March 8th?

former_member182766
Contributor
0 Kudos

Actually remembering it in more detail - it wasn't that much selection issue.

Turns out if the data is already in a cube and the system decides not to write it again, the endroutine is not getting triggered, even though the log tells that the routine has been triggered.

Something like that.

former_member200327
Active Contributor
0 Kudos

This can't be true, because system doesn't know if after the ENROUTINE it will be same data as in the Model or different. Therefore delta is calculated after ENDROUTINE and not before.

former_member182766
Contributor
0 Kudos

Then I don't have an explanation or I just don't remember it any more (more than a year has passed)

Because it definitely wasn't a situation of 0 records read, I would've spotted it.

former_member200327
Active Contributor
0 Kudos

You don't need 0 records read for this. Your transformations/conversions could filter out all records.

Former Member
0 Kudos

Gentlemen,

Kindly enlighten me with the reason behind this naughty EndRoutine not being triggered.

Cheers,

Surya Tamada.

former_member182766
Contributor
0 Kudos

I'm a bit confused because I don't remember the exact details by now.

I think it's better if you describe your issue in detail.

Former Member
0 Kudos

Hi Vadim,

Thanks for your quick response.

I have written a piece of code in UJD_ROUTINE. As you very well know, we can trigger this code as Start Routine or End Routine. It triggers when I use it as a start routine but not end routine. My situation works well for End routine than a Start routine. I tried various combinations when executing the data manager package, but no use. EndRoutine never triggers, where as Start routine triggers.

Regards,

Surya Tamada.

former_member182766
Contributor
0 Kudos

Surya, is it Transaction load or MD?

former_member200327
Active Contributor
0 Kudos

Hi Surya,

Can you please publish your DM Package log?

-Gersh

0 Kudos

Go to tn SE80 and find the CLASS/Interface CL_UJXD_PACKAGES_RES. In Method / Redefinitions, find the method DO_POST.

Create an external break-point (Ctrl_Shift+F9) on the line 179: lo_package->run_package (EXPORTING ...

Set a break-point on any line of your BADI implementation.

When running any king of package the debug screen will pop up. Replace the content of the variable LS_PACKAGE_RUN-if_debug to "X".

Hit F8 do go directly to the break-point on your implementation.

Hope it helps.

former_member182766
Contributor
0 Kudos

Well, guys, on other implementations I can debug DM routine through the breakpoint in CL_UJXD_PACKAGES_RES (then setting if_debug to X) and the following break point in the routine itself.

Firstly, I'm not sure that it's possible to test DM transformation routine in UJKT.

Secondly, as I wrote, in my routine I didn't assign any values to field symbol, but used it in the code.

That explicitly should trigger the GETWA_NOT_ASSIGNED short dump (it just should), but it doesn't, meaning that the system doesn't call the routine in the first place!

former_member200327
Active Contributor
0 Kudos

Hi Vadim,

Most probably all the records are rejected in previous steps. Can you check if START BADI is called?

Gersh

former_member182766
Contributor
0 Kudos

Hi Gersh,

The odd thing is that when I start DM package without endroutine in transformation, it successfully completes. Then I add endroutine to the transformation, start DM package and it still successfully completes (and the line "end routine was called in convert" is being added). But if I try to get to the routine's breakpoints - nothing happens and, as I wrote before, even if I create the shortdump situation, nothing happens...

Thanks!

Former Member
0 Kudos

Hi Vadim,

Like Nilanjan said DM package will not trigger the breakpoints.

But if you must want to trigger it, Simply create an infinite loop in top of the code so that you can catch your BAdi in SM50 transaction.

There you have option to debug the code.

Infinite loop :

DATA : LV_DEBUG TYPE C VALUE 0.

WHILE LV_DEBUG EQ 0.

ENDWHILE.

Don't forget to change the variable value before execute in debugging mode.

Hope it helps!!

Thanks,

Suresh

Former Member
0 Kudos

Hi Vadim,

If you want to debug the code, then you must execute it through UJKT.

DM package will ignore the breakpoints.

Hope this helps.