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

Call transaction using bdcdata options from ctu_params

Former Member
0 Likes
1,821

Dear all,

I'm calling a transaction from my program, using bdc to fill the selection screen. This works beautifully, however...

The transaction lets a user call another transaction. When returning from that transaction the user is sent back to my program.

How can I let a user return to my called transaction in stead of returning to my program?

Any help would be very appreciated, yours,

B E R T

PS. The transaction I'm calling is not linked to a type 1 program. So SUBMIT doesn't work here.

1 ACCEPTED SOLUTION
Read only

Vinod_Chandran
Active Contributor
0 Likes
1,234

Hi,

What command (e.g. LEAVE PROGRAM) are you using to exit from the second transaction?

Thanks

Vinod

7 REPLIES 7
Read only

Vinod_Chandran
Active Contributor
0 Likes
1,235

Hi,

What command (e.g. LEAVE PROGRAM) are you using to exit from the second transaction?

Thanks

Vinod

Read only

0 Likes
1,234

Hi Vinod,

The transaction I'm calling is a standard SAP transaction (mir6). I quick peek in the source gives

SET SCREEN 0. LEAVE SCREEN.

at the exit-command of the second screen. During my investigation a found out that the second transaction might also be another screen that is called.

Am I in more trouble now? Or can this still be fixed with the right setting of ctu_params?

Regards, B E R T

Read only

0 Likes
1,234

Hi Bert,

I think it is due to the command "SET SCREEN 0. LEAVE SCREEN.". The SAP help says "If the next screen has the number 0, processing in CALL mode continues after the CALL SCREEN statement".

I suggest you to check what is happening in the first transaction when you exit from the second transaction.

Also what I think is because you are using a BDC to call a transaction it will come back to the called program when you exit from the second transaction. This is because BDC take both the transactions as a single session.

Thanks

Vinod

Message was edited by: Vinod C

Read only

Former Member
0 Likes
1,234

Hi,

Use


Declare a messtab
DATA: i_bdcdata TYPE STANDARD TABLE OF bdcdata,
* Internal table to hold BDC messages
i_messtab TYPE STANDARD TABLE OF bdcmsgcoll

* Work area to hold bdcdata value
DATA: w_bdcdata TYPE bdcdata,
* Work area to hold BDC messages
w_messtab TYPE bdcmsgcoll.
CONSTANTS : c_e type bdcmsgcoll-msgtyp value 'E', "E
c_a type bdcmsgcoll-msgtyp value 'A', "A
nodata type c value '/'. "/

call transaction c_transaction_call_MM03 using i_bdcdata MODE 'E'MESSAGES INTO i_messtab.

While u press back it will automatically return to the place where u called the transcaton.

Eg. if u r calling form an ALV grid it will return back to the grid.

Read only

Former Member
0 Likes
1,234

Hi,

Just a thought man,

You are saying:

How can I let a user return to my called transaction in stead of returning to my program?

Your called transaction must be having some screen and a screen will have a screen number why don't you call the screen number when you come back. The syntex is:

call screen 'XXXX'.

You may need to use Flags for it.

Hope it helps.

Cheers...

Read only

Former Member
0 Likes
1,234

use

.......... AND RETURN.

regards

Read only

Former Member
0 Likes
1,234

Dear Vinod, Judith, Barjinder, Surpreet,

Seems that the transaction I'm calling doesn't call another transaction yet another screen. Exiting this invokes an exit-command. Leaving the transaction and returning to my program.

To solve it I will probably have to re-write a lot of SAP Standard code, which I will discuss with my client.

Thank you all for thinking along, deserving points which I'll reward.

Hoping to be able to make use of your knowledge again, the next time I am stuck.

Cheers, B E R T