cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

How to Pass Dynamic Selection Field in SAP ABAP Submit Statement?

SANDEEP_077
Explorer
0 Kudos
1,122

I am working on a custom program where I use the SUBMIT statement to call the F.01 transaction. I need to pass a dynamic selection (Profit Center) as a parameter, but I'm facing issues when trying to pass the values.

I’ve tried the following code, which works for standard parameters but not for dynamic selections:

LOOP 
AT s_values INTO DATA(lv_prctr_value).
  CLEAR ls_dynsel.
  ls_dynsel-selname 'PRCTR'.            
  ls_dynsel-kind    'S'.             
  ls_dynsel-sign    'I'.             
  ls_dynsel-option  'EQ'.        
  ls_dynsel-low     lv_prctr_value.  
  APPEND ls_dynsel TO lt_dynsel.
ENDLOOP. 


SUBMIT rfbila00
  WITH sd_ktopl-low lv_ktopl
  WITH sd_bukrs-low lv_bukrs
  WITH bilavers '1000'
  WITH bilaspra lv_spras
  WITH bilbjahr lv_report_year
  WITH b-monate =  s_bilabmon
  WITH bilvjahr lv_compare_year
  WITH v-monate s_bilavmon

  WITH SELECTION-TABLE lt_dynsel
  EXPORTING LIST TO MEMORY
  AND RETURN.

I got this profit center field name using technical properties of the field. But i pass 'PRCTR' the values are not loading in it 

How can I pass multiple Profit Center values in dynamic selections when using the SUBMIT statement?


Any insights or examples on handling dynamic selections with SUBMIT would be greatly appreciated. Thank you!"

View Entire Topic
guido_s
Participant

Hi Sandeep,

is the profit center a parameter of the standard selection of F.01 or is it a free selection parameter?

For a free selection parameter you have to use WITH FREE SELECTIONS:

 

SUBMIT rfbila00 ... 
   VIA SELECTION-SCREEN
   WITH FREE SELECTIONS texpr.

 

See example here.