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

Capture User command in BDC

Former Member
0 Likes
2,221

Hi,

I am running through a problem where I want to capture the user decision and according to that run the BDC.

Here's the explaination.

While running the bdc 1 pop up will come which will decide whether to proceed or not.

If your selects 'do not proceed' then need to run the flush part of the bdc else data saving part of the bdc.

So I want to capture the ucomm in the bdc and then proceed accoringly

Thanks for your help.

Anmol Bhat.

1 ACCEPTED SOLUTION
Read only

former_member196064
Active Participant
0 Likes
2,000

I believe I did something similar a few years back.

I had to create a partial BDC to get to the point of response from the popup.

Then I restarted the BDC & ran to completion based on input.

might sound goofy... but it worked.

can't remember how I got the response out.

might have been in an sy-field

16 REPLIES 16
Read only

Former Member
0 Likes
2,000
*-------------------
*double post...
*-------------------

Edited by: Sebastian Bustamante on Mar 8, 2011 7:33 PM

Read only

Former Member
0 Likes
2,000

make a recording using transaction SHDB and see what happens....

regards, Sebastian

Read only

0 Likes
2,000

No dear it is not like that,

while running the bdc 1 popup screen will come, user can click cont or cancel if he click cancel i have to go back else save the data.

So i need how to capture user command within running bdc..

I think now it is more clear.

Read only

0 Likes
2,000

maybe debugging the popup and see the sy-ucomm?

theck this to debug a popup [http://wiki.sdn.sap.com/wiki/display/ABAP/ABAPTip-HowtoDebugPop-up+window]

Read only

0 Likes
2,000

I know the ucomm for both the buttons dear, the question is how to capture it..

Yes Keshav I also think this may be the solution, but any other possibility ?

Thanks ,

Anmol

Read only

0 Likes
2,000

Yes Keshav I also think this may be the solution, but any other possibility

Since the SHDB recording gives you the hardcoded User command values along with the screens which is predefined before program execution .... i dont find any other way.

Read only

0 Likes
2,000

ok

Thanks any ways.

Anmol Bhat.

Read only

kesavadas_thekkillath
Active Contributor
0 Likes
2,000

Hi Anmol,

I am not sure of any other way .. One idea came to my mind. just after clicking the button check with implicit enhancements or badis where you can export the ok_code to memory and access it in your program and then toggle your screens.

Read only

0 Likes
2,000

>

> Hi Anmol,

>

> I am not sure of any other way .. One idea came to my mind. just after clicking the button check with implicit enhancements or badis where you can export the ok_code to memory and access it in your program and then toggle your screens.

Keshav, I am curious, even if we capture the UCOMM , how would the OP use it in his custom program? Wouldn't that be a whole new CALL transaction?

@anmol, I am curious as to why you want to provide this ability to users? If they are not sure of their path, they can always use the online transaction right? Granted, they have to manually key in the data.And what happens today, when they want to go back ?

Read only

0 Likes
2,000

Hi,

I was looking something like if the user hits opt1 it should do some data savind part of the bdc or if he hits opt2 then it should do the flush part of the bdc..

I think this is hardly possible... any suggesion on this......

Thanks,

Anmol.

Read only

0 Likes
2,000

Not really possible in my opinion, BDC implies that you have prepared a fixed and correct path through the screen sequence from beginning to end before starting the processing. Just like TV before it became interactive

Thomas

Read only

former_member196064
Active Participant
0 Likes
2,001

I believe I did something similar a few years back.

I had to create a partial BDC to get to the point of response from the popup.

Then I restarted the BDC & ran to completion based on input.

might sound goofy... but it worked.

can't remember how I got the response out.

might have been in an sy-field

Read only

0 Likes
2,000

Hi Doug,

Your ans souds good, it will be greate for me if you get some time to recollect that part.

Thanks a lot,

Anmol.

Read only

0 Likes
2,000

Well, you can prepare a partial transaction to run in mode "E" (maybe even "N", not sure), then it stops on the desired screen and the user can do the rest manually. But how to make it continue from there in background, even branching into a different screen flow based on user input? I'm very interested to learn this as well.

Thomas

Read only

0 Likes
2,000

@Thomas, my assumption is this BDC program is executed in the foreground? If it were to be executed in the background, would there be a user response to popup?

Read only

0 Likes
2,000

Sorry, I meant "dark" processing, as in a call transaction with mode "N" or "E".

Thoma