Skip to Content
0

How to Pass Debug value as 'X' into CL_UJXD_PACKAGES_RES=>DO_POST from BPC Data Manager package

Aug 31, 2017 at 08:51 AM

116

avatar image
Former Member

Hello Everyone,

I want to pass DEBUG value as 'X' into CL_UJXD_PACKAGES_RES=>POST line no 179 from BPC Data manager package. Because we don't have debug change access in production server. So I will directly put the breakpoint in ZBADI and execute the DM Package from Frontend for debugging. This mediator class has to bypass.

Let me know how can we pass the value as 'X'. I tried by putting DEBUG(ON) in DM script file but still it is not triggering the ZBADI directly.

Regards

Aditya

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

4 Answers

avatar image
Former Member Aug 31, 2017 at 09:37 AM
0

Dear Vadim,

Suppose if I put infinite loop in custom badi it will goto debugging but from there to debug from next step required goto statement access that cannot provide in production server.

Goto Statement in debugging mode requires DEBUG change access role.

Regards

Aditya

Show 8 Share
10 |10000 characters needed characters left characters exceeded

Please correct tag! Moderator alerted.

0
Former Member

Unable to find SAP Business Planning and Consolidation, version for SAP NetWeaver in Primary tag....

0

You have it as a secondary tag (the reason you can't select it for primary). Remove from secondary and select as primary...

0
Former Member

Thanks... Updated

0

OK, now please explain what do you want to achieve - step by step.

Are you able to debug process in SM50?

0
Former Member

I don't have change debug access in production server, through SM50 I went into the program now I have to shift the position from infinite loop to next step. To do the activity GOTO statement is required but in production server DEBUG change access will not provide.

To overcome that I will put external breakpoint in ZBADI and I want to directly pass DEBUG value as 'X' from DM package. Attached screenshot to get 'X' value from DM package into code

mdptu.png (23.2 kB)
0

"I don't have change debug access in production server" - then ask for this access. You are doing some strange things...

"I want to directly pass DEBUG value as 'X' from DM package" - sorry, but what for? I do not understand your logic...

0
Former Member

Will explain my flow first,

To debug a ZBADI on execution of DM package will put two external breakpoints one in CL_UJXD_PACKAGES_RES=>DO_POST method line no 179 and other external breakpoint in ZBADI. When I execute DM package it will first stop at first external breakpoint now I will change the value of ls_package_run-if_debug EQ 'X' and press F8 now it will stop in ZBADI from there onwards I will debug in ZBADI. This procedure I will follow in development server where comes in Production server we don't have any change access. As per company policy no one will get the debug change access.

My question is why the ls_package_run-if_debug is initial how can I populate value 'X' directly from DM package script.

0
Vadim Kalinin Aug 31, 2017 at 09:12 AM
0

First - incorrect primary tag:

SAP Business Planning and Consolidation for Public Sector, option for SAP NetWeaver

to be replaced by correct secondary!

Second - what do you want to achieve? Debug custom logic badi execution??

Insert infinite loop at the beginning of badi code!

Share
10 |10000 characters needed characters left characters exceeded
Vadim Kalinin Aug 31, 2017 at 01:39 PM
0

"My question is why the ls_package_run-if_debug is initial how can I populate value 'X' directly from DM package script." - Not possible to my mind.

You need change rights on your production server.

Share
10 |10000 characters needed characters left characters exceeded
Lucas Costa Aug 31, 2017 at 09:09 PM
0

I'm assuming you want to debug a custom logic BADI, am I right?

This can be called from a data manager package, so if you need to debug this process instead of debugging the process triggered from the Excel, you need to use UJD_TEST_PACKAGE or if you have parameters in your package, you can create a link package and call it using UJD_TEST_PACKAGE_LINK.

Simply, set the break points in your custom class and execute one of these programs.

Cheers

Lucas

Show 10 Share
10 |10000 characters needed characters left characters exceeded

Hi Lucas,

Can you explain how UJD_TEST_PACKAGE will help in this particular case?

B.R. Vadim

0

Those programs were designed for debugging.

Been using them since version 7.5.

There is a third one: UJD_TEST_PACKAGE_LONGPROMPT for packages with many parameters.

And now a forth one: BPC_TASK_SEQ_TEST to debug Task Sequences in Embedded Consolidation.

My guess is that SAP has created them for supporting as usually SAP support agents are given users without advanced debugging.

Check note: 1844820

0
Former Member

Hi Lucas,

Thanks for responding, yes we can do as you suggested but end users will never login to the backend system and also they don't have rights. For that reason I want to achieve this from front DM package.

Regards

Aditya

0

End users debugging in ABAP???? Looks absolutely strange!

I have checked Lucas idea and looks like it will work.

For UJD_TEST_PACKAGE the input parameter "IF Synchronous" (IF_SYNC) results in:

  IF IF_SYNC = UJ00_CS_BOOL-YES.
    LF_DEBUG = ABAP_TRUE.
  ELSE.
    LF_DEBUG = ABAP_FALSE.
  ENDIF.
...
      CALL METHOD LO_PACKAGE->RUN_PACKAGE
        EXPORTING
          I_APPSET_ID       = APPSET
          I_APPL_ID         = APPL
          I_TEAM_ID         = TEAM
          I_GROUP_ID        = GROUP
          I_PACKAGE_ID      = PACKAGE
          ITH_ANSWER_PROMPT = LTH_ANSWER_PROMPT
          IS_SCHEDULE_INFO  = LS_SCHEDULE_INFO2
          IF_SCHEDULE       = LF_SCHEDULE
          IF_DEBUG          = LF_DEBUG.
0
Former Member
Suppose there are 2 users 1 - End User(User1) and other one IT team(User2). We will login will IT team ID(User2) and put the external breakpoints in those two classes with End User id(USER1). When User1 executes the package it will stop in class CL_UJXD_PACKAGES_RES=>DO_POST will change the value of DEBUG to 'X' and on pressing F8 it triggers ZBADI.

Enduser1 will never login in backend system and will not provide any access to him, but we want to debug on executing of DM package in some scenarios. For this I need the solution of passing the DEBUG value 'X' from DM Package.

0

"For this I need the solution of passing the DEBUG value 'X' from DM Package." - I have already told you that there is no way to pass!

With UJD_TEST_PACKAGE IT User2 can specify User1 in the program input parameters! Then the DM will run under User1.

0

Like I said above, if you need input parameters in the pkge, simply create a link package, use the option set prompts and execute the program UJD_TEST_PACKAGE_LINK.

You will achieve the same result.

Lucas

0

Or he can pass answer prompt text for UJD_TEST_PACKAGE

But with UJD_TEST_PACKAGE_LINK it's less complicated!

0

Yep, less complicated with the link packages.

But in case you want to use the UJD_TEST_PACKAGE (Or UJD_TEST_PACKAGE_LONGPROMPT for long prompts) check snote:

1599387 - How to create an AnswerPrompt file for programs UJD_TEST_PACKAGE and UJD_TEST_PACKAGE_LONGPROMPT

0
Former Member

Hi Lucas,

Let me try this solution what you had provided... Thanks...

Regards

Aditya

0