Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Problem in calling dynamic actions in BDC

Former Member
0 Likes
2,042

Dear All,

I have created a subroutine which is called when an entry is made in IT0015 for a particular wagetype. So I have used dynamic actions to serve the purpose.

But the entries in IT0015 are made through a BDC, and I am facing in calling dynamic actions through BDC. I have tried the following code:

DATA: opt TYPE ctu_params .

DATA: zmode TYPE c VALUE 'N',
zupd TYPE c VALUE 'A'.

opt-dismode = zmode.
opt-updmode = zupd.
opt-defsize = 'X'.
opt-nobinpt = 'X'.

******While calling transaction in BDC

CALL TRANSACTION 'PA40' USING g_t_bdc
OPTIONS FROM opt
MESSAGES INTO g_t_messtab.

But this does not work, it only calls the first screen of tcode PA30 and only populates the PERNR in that.

Please suggest how do I rectify this problem.

Regards,

Kanupriya

1 ACCEPTED SOLUTION
Read only

MarcinPciak
Active Contributor
0 Likes
1,743

Did you try recording single IT0015 entry via SHDB ? Then just copy generated code and map it to g_t_bdc including change action and save (which will trigger dynamic action). Also when I face problems with BDC I usually temporarly set mode dismode = 'A' so I can see all screens being processed. Then I can catch what was the real problem with the BDC (i.e. why EE was not edited).

Regards

Marcin

Dear All,

I have created a subroutine which is called when an entry is made in IT0015 for a particular wagetype. So I have used dynamic actions to serve the purpose.

But the entries in IT0015 are made through a BDC, and I am facing in calling dynamic actions through BDC. I have tried the following code:

DATA: opt TYPE ctu_params .

DATA: zmode TYPE c VALUE 'N',
zupd TYPE c VALUE 'A'.

opt-dismode = zmode.
opt-updmode = zupd.
opt-defsize = 'X'.
opt-nobinpt = 'X'.

******While calling transaction in BDC

CALL TRANSACTION 'PA40' USING g_t_bdc
OPTIONS FROM opt
MESSAGES INTO g_t_messtab.

But this does not work, it only calls the first screen of tcode PA30 and only populates the PERNR in that.

Please suggest how do I rectify this problem.

Regards,

Kanupriya

7 REPLIES 7
Read only

MarcinPciak
Active Contributor
0 Likes
1,744

Did you try recording single IT0015 entry via SHDB ? Then just copy generated code and map it to g_t_bdc including change action and save (which will trigger dynamic action). Also when I face problems with BDC I usually temporarly set mode dismode = 'A' so I can see all screens being processed. Then I can catch what was the real problem with the BDC (i.e. why EE was not edited).

Regards

Marcin

Read only

0 Likes
1,743

Hi Marcin,

Actually the dynamic action which I am calling is not calling any further infotypes. It just has to update some tables based on certain validations when the user presses save button on IT0015 subtype 0077. So even when I record a single PA30 entry with SHDB, even then I am not able to track the triggering of dynamic action.

Please guide me how I should proceed in this scenario.

Regards,

Kanupriya

Read only

0 Likes
1,743

Yes but you told

But this does not work, it only calls the first screen of tcode PA30 and only populates the PERNR in that.

So this seems to be a BDC problem. But if you want to track dynamic action call why don't simply place a static break point ( BREAK-POINT statement) within callback subroutine for dynamic action. You will be able to stop at this place once SAVE button is pressed.

Hope this helps

Marcin

Read only

0 Likes
1,743

Hi Marcin,

When I call PA30 without using options i.e.:

CALL TRANSACTION 'PA30' USING BDCDATA MODE 'A' UPDATE 'S'.

then, the BDC works perfectly and calls all the required screens correctly.

But when I use:

CALL TRANSACTION 'PA30' USING bdcdata
OPTIONS FROM opt
MESSAGES INTO messtab.

then, it shows me only the first screen of PA30 and stops there.

Also, if I hard code a break-point in my subroutine and save an entry in PA30, then the subroutine stops at the breakpoint. But if I call PA30 with SHDB transaction, then the code does not stop at subroutine which means the subroutine is not being called with SHDB.

Please suggest why this is occuring.

Regards,

Kanupriya

Read only

0 Likes
1,743

If that works fine with MODE 'A' UPDATE 'S' then use this instead of OPTIONS FROM opt addition.

For the second I think that this might be due to fact that SHDB is only for recording purpose, so dynamic action might not be triggered - but this is just my assumption. Try running the program in MODE 'N' and see it that works. Maybe during CALL TRANSACTION dynamic action gets triggered.

Regards

Marcin

Read only

0 Likes
1,743

Hi Marcin,

Problem resolved.

Thanks for your valuable inputs.

Regards,

Kanupriya

Read only

0 Likes
1,397

how did you resolve the BDC problem , even i am facing the same problem .