Application Development 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: 

Call Transaction and fill a select-options field with more than one value?

ue55151
Explorer
0 Kudos
6,210

Hello everybody,

how can I fill a select-options field with more than one value.

Here is the code example:

CLEAR: GT_BDCDATA, GS_BDCDATA.

GS_BDCDATA-program = 'RHALEINI'.

GS_BDCDATA-DYNPRO = '1000'.

GS_BDCDATA-DYNBEGIN = 'X'.

APPEND GS_BDCDATA TO GT_BDCDATA.

CLEAR: GS_BDCDATA.

GS_BDCDATA-FNAM = 'PCHOTYPE'.

GS_BDCDATA-FVAL = 'P'.

APPEND GS_BDCDATA TO GT_BDCDATA.

CLEAR: GS_BDCDATA.

LOOP AT gt_hrobjinfty INTO gs_hrobjinfty.

GS_BDCDATA-FNAM = 'PCHOBJID-LOW'.

GS_BDCDATA-FVAL = gs_hrobjinfty-objid.

APPEND GS_BDCDATA TO GT_BDCDATA.

CLEAR: GS_BDCDATA.

ENDLOOP.

CALL TRANSACTION 'PFAL' USING GT_BDCDATA MODE 'A'

MESSAGES INTO GT_MESSAGES.

THX.

6 REPLIES 6

ThomasZloch
Active Contributor
0 Kudos
861

Instead of calling transaction PFAL, use statement SUBMIT for program RHALEINI. Then you can fill all select-options as you wish.

Cheers

Thomas

0 Kudos
861

Hi, thanks for the answer.

I know that I can use submit.

But is it also possible to use the call transaction with more than one value for the select-options field.

thx.

0 Kudos
861

not sure, never done it, because I am using SUBMIT in this case.

Maybe it is possible to record the entire "multiple selections" dialog, but that must be a pain in the a...

good luck

0 Kudos
861

Hi,

Please refer the code below:


*Code used to populate 'select-options' & execute report
DATA: seltab type table of rsparams,
      seltab_wa like line of seltab.

  seltab_wa-selname = 'PNPPERNR'.
  seltab_wa-sign    = 'I'.
  seltab_wa-option  = 'EQ'.

* load each personnel number accessed from the structure into
* parameters to be used in the report
  loop at pnppernr.
    seltab_wa-low = pnppernr-low.
    append seltab_wa to seltab.
  endloop.
  SUBMIT zreport with selection-table seltab
                                via selection-screen.

Thanks,

Sriram Ponna.

Former Member
0 Kudos
861

SUBMIT < Report Name> VIA SELECTION SCREEN.

0 Kudos
861

You canuse more tahn one value.

LOOP AT s_selectoption.

PERFORM bdc_data USING 's_field-low' 's_selectoption-low'.

PERFORM bdc_data USING 's_field-high' 's_selectoption-high'.

ENDLOOP.