‎2008 Jul 09 5:52 AM
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
‎2008 Jul 09 6:00 AM
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
‎2008 Jul 09 6:01 AM
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...
‎2008 Jul 09 6:02 AM
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
‎2008 Jul 10 6:52 AM
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.