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

Former Member
0 Likes
519

Hi Experts,

Before I call transaction to a t-code, i will need to get the values for some fields.For fields that have parameter id defined, i can use set parameter id. But some of them is a selection option, how can i set the value in the selection options?

Thanks.

weishan

4 REPLIES 4
Read only

Sougata
Active Contributor
0 Likes
488

Hello Weishan,

You can set the select-options through BDC and then use Call Transaction with the Using bdc_tab option. See example below:


DATA class_name(30) TYPE c VALUE 'CL_SPFLI_PERSISTENT'. 

DATA: bdcdata_wa  TYPE bdcdata, 
      bdcdata_tab TYPE TABLE OF bdcdata. 

DATA opt TYPE ctu_params. 

CLEAR bdcdata_wa. 
bdcdata_wa-program  = 'SAPLSEOD'. 
bdcdata_wa-dynpro   = '1000'. 
bdcdata_wa-dynbegin = 'X'. 
APPEND bdcdata_wa TO bdcdata_tab. 

CLEAR bdcdata_wa. 
bdcdata_wa-fnam = 'BDC_CURSOR'. 
bdcdata_wa-fval = 'SEOCLASS-CLSNAME'. 
APPEND bdcdata_wa TO bdcdata_tab. 

CLEAR bdcdata_wa. 
bdcdata_wa-fnam = 'SEOCLASS-CLSNAME'. 
bdcdata_wa-fval = class_name. 
APPEND bdcdata_wa TO bdcdata_tab. 

CLEAR bdcdata_wa. 
bdcdata_wa-fnam = 'BDC_OKCODE'. 
bdcdata_wa-fval = '=CIDI'. 
APPEND bdcdata_wa TO bdcdata_tab. 

opt-dismode = 'E'. 
opt-defsize = 'X'. 

CALL TRANSACTION 'SE24' USING bdcdata_tab OPTIONS FROM opt. 

You need to fill the bdc_tab similarly but in your case fill up the select-option.

Hope this solves your issue.

Cheers,

Sougata.

Hey Weishan,

How about rewarding us with some points mate??

Edited by: Sougata Chatterjee on Jul 10, 2008 3:17 PM

Read only

Former Member
0 Likes
488

I assume that you are trying to call a transaction and want to skip the first screen by filling up the values for the fields on this screen. In case of fields to which no parameters are associated, you might have to write a BDC program

alternatively...you can try using transaction variants...you might find transactions SHD0 and SE93 useful for this.

hope that helps...

Read only

Former Member
0 Likes
488

Hi,

You need to use the events ..

1. at selection screen.

to pass the values to screen parameters..

2. start-of-selection.

here you cann call the transaciton (call transaction).

Reward Points if useful

Raghunath.S

9986076729

Read only

Former Member
0 Likes
488

Hi Weishan,

For Select-options also you can use parameter ID. To know the parameter ID for that field just place your cursor on the field and Press F1. Goto Technical information and you find the parameter ID. Copy it. For Low field it is <screenfiled-name>-Low and for High field it is <screenfield-name>-High. Check it out.

Regards,

Swapna.