2011 Sep 02 5:02 PM
Dear experts,
I have a transaction with PARAMETERS and SELECT-OPTIONS objects. This transaction will be called by another program by using CALL TRANSACTION 'mytransaction' USING mybdcdata statement. Below is some of the called transaction's source code:
DATA:
date TYPE sflight-fldate.
PARAMETERS:
p_carid TYPE sflight-carrid,
p_conid TYPE sflight-connid.
SELECT-OPTIONS:
so_date FOR date.
This is what I wrote in the calling program to define the values of the called transaction PARAMETERS fields:
DATA:
wa_bdcdata TYPE bdcdata,
it_bdcdata TYPE TABLE OF bdcdata.
wa_bdcdata-program = 'MYPROGRAM'.
wa_bdcdata-dynpro = '1000'.
wa_bdcdata-dynbegin = 'X'.
APPEND wa_bdcdata TO it_bdcdata.
CLEAR wa_bdcdata.
wa_bdcdata-fnam = 'P_CARID'.
wa_bdcdata-fval = 'AA'.
APPEND wa_bdcdata TO it_bdcdata.
CLEAR wa_bdcdata.
wa_bdcdata-fnam = 'P_CONID'.
wa_bdcdata-fval = '017'.
APPEND wa_bdcdata TO it_bdcdata.
CALL TRANSACTION 'MYTRANSACTION' USING it_bdcdata.
Unfortunately, I don't know how to set the values for the SELECT-OPTIONS screen fields. How to do this?
I've Googled this and tried several guesses but none was found or successful. Thanks in advance.
Regards,
Haris
2011 Sep 02 5:11 PM
you would supply the field name like s_option-low s_option-high, etc.
A better way, if possible, would be to set parameter ids to a value and call the transaction skipping the first screen. This may not be possible, though, in your case.
If you have developed a report, record the session (bdc recorder) to the point when it is past your selection screen...the recording will show you the fields, screen actions, etc.
Dear experts,
I have a transaction with PARAMETERS and SELECT-OPTIONS objects. This transaction will be called by another program by using CALL TRANSACTION 'mytransaction' USING mybdcdata statement. Below is some of the called transaction's source code:
DATA:
date TYPE sflight-fldate.
PARAMETERS:
p_carid TYPE sflight-carrid,
p_conid TYPE sflight-connid.
SELECT-OPTIONS:
so_date FOR date.
This is what I wrote in the calling program to define the values of the called transaction PARAMETERS fields:
DATA:
wa_bdcdata TYPE bdcdata,
it_bdcdata TYPE TABLE OF bdcdata.
wa_bdcdata-program = 'MYPROGRAM'.
wa_bdcdata-dynpro = '1000'.
wa_bdcdata-dynbegin = 'X'.
APPEND wa_bdcdata TO it_bdcdata.
CLEAR wa_bdcdata.
wa_bdcdata-fnam = 'P_CARID'.
wa_bdcdata-fval = 'AA'.
APPEND wa_bdcdata TO it_bdcdata.
CLEAR wa_bdcdata.
wa_bdcdata-fnam = 'P_CONID'.
wa_bdcdata-fval = '017'.
APPEND wa_bdcdata TO it_bdcdata.
CALL TRANSACTION 'MYTRANSACTION' USING it_bdcdata.
Unfortunately, I don't know how to set the values for the SELECT-OPTIONS screen fields. How to do this?
I've Googled this and tried several guesses but none was found or successful. Thanks in advance.
Regards,
Haris
2011 Sep 02 5:11 PM
you would supply the field name like s_option-low s_option-high, etc.
A better way, if possible, would be to set parameter ids to a value and call the transaction skipping the first screen. This may not be possible, though, in your case.
If you have developed a report, record the session (bdc recorder) to the point when it is past your selection screen...the recording will show you the fields, screen actions, etc.
2011 Sep 02 5:17 PM
If you program is a report it would be much easier to use the SUBMIT statement instead of a CALL TRANSACTION.
SUBMIT 'your_report' WITH p_param = value
WITH s_sel IN values
AND RETURN.
2011 Sep 02 7:07 PM
Hi Haris,
If you have fixed values in your selection screen, I suggest you to create a program variant and call/create a transaction with this variant
If these values are determined at runtime, then you could create a Z transaction which calls the program the way suggested by Arseni Gallardo, and you call the Z transaction in batch input.
Other solution, you can use this simple framework which fills the SELECT-OPTIONS for you, I just posted it in this wiki : http://wiki.sdn.sap.com/wiki/display/ABAP/FillSELECT-OPTIONSin+BDCDATA
Sandra
2011 Sep 03 7:10 AM
Hello,
Please use this code for the purpose, I am sure you must have get the relavant help in that relation:
SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME TITLE text-102.
PARAMETERS: p_fmode RADIOBUTTON GROUP r1,
p_bmode RADIOBUTTON GROUP r1.
SELECTION-SCREEN END OF BLOCK b3.
START-OF-SELECTION.
PERFORM data_upload.
END-OF-SELECTION.
Thanks & Regards,
Akg
2011 Sep 03 8:08 PM
Hi Haris,
select-options fields can be referred to as SO_DATE-LOW and SO_DATE-HIGH.
If you want extended selections, it gets a bit more tricky as you use function code and have one more screen with tabs and stuff.
You can still run batch recorder to answer such basic question.
BTW: akg.amit post seems to be completely misrouted as there is no reference to the question at all.
Regards
Clemens
2011 Sep 05 6:36 AM
Hi ,
Better go for SUBMIT report instead of CALL transaction ...
find the name of report being called on that transaction which you will be calling . Use that report name in SUBMIT
Just take help from below code .
Before using do please read by pressing f1 on SUBMIT syntax .data:seltab type table of rsparams,
seltab_wa like line of seltab.
move: 'LANGU' to seltab_wa-selname,
'S' to seltab_wa-kind,
'I' to seltab_wa-sign,
'BT' to seltab_wa-option,
'D' to seltab_wa-low,
'I' to seltab_wa-high.
append seltab_wa to seltab.
clear seltab_wa.
move: 'E' to seltab_wa-sign,
'EQ' to seltab_wa-option,
'F' to seltab_wa-low,
space to seltab_wa-high.
append seltab_wa to seltab.
clear seltab_wa.
move: 'AUFNR' to seltab_wa-selname,
p_aufnr to seltab_wa-low.
append seltab_wa to seltab.
clear seltab_wa.
submit rkaep000 using selection-set 'VARIANT1'
with aufnr = p_aufnr
with selection-table seltab
exporting list to memory
and return .
regards
Deepak.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |