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: 

SUBMIT using FREE SELECTIONS

Former Member
0 Kudos
1,253

Hello

I have gone through a few threads on this topic, but have not got the answer yet.

I'm trying to trigger transaction WESOUT for some specific values in Dynamic selection from a background program.

This means I would have to use SUBMIT with FREE SELECTIONS.



DATA: trange TYPE rsds_trange,
trange_line
  LIKE LINE OF trange,
trange_frange_t_line
  LIKE LINE OF trange_line-frange_t,
trange_frange_t_selopt_t_line
  LIKE LINE OF trange_frange_t_line-selopt_t,
texpr TYPE rsds_texpr.

trange_line-tablename = 'WES_S_FILTER_WERKS_T001W'.
trange_frange_t_line-fieldname = 'WERKS'.
trange_frange_t_selopt_t_line-sign   = 'I'.
trange_frange_t_selopt_t_line-option = 'EQ'.
trange_frange_t_selopt_t_line-low    = '1054'.
APPEND trange_frange_t_selopt_t_line
  TO trange_frange_t_line-selopt_t.
APPEND trange_frange_t_line TO trange_line-frange_t.
APPEND trange_line TO trange.


CLEAR: trange_frange_t_selopt_t_line, trange_frange_t_line,
trange_line-frange_t,trange_line  .

trange_line-tablename = 'WES_S_FILTER_MATNR_MARA'.
trange_frange_t_line-fieldname = 'MATNR'.
trange_frange_t_selopt_t_line-sign   = 'I'.
trange_frange_t_selopt_t_line-option = 'EQ'.
trange_frange_t_selopt_t_line-low    = '000000000000011050'.
APPEND trange_frange_t_selopt_t_line
  TO trange_frange_t_line-selopt_t.
APPEND trange_frange_t_line TO trange_line-frange_t.
APPEND trange_line TO trange.

CALL FUNCTION 'FREE_SELECTIONS_RANGE_2_EX'
  EXPORTING
    field_ranges = trange
  IMPORTING
    expressions  = texpr.



SUBMIT rwes_message_out USING SELECTION-SCREEN '1000'
      WITH PA_APPL EQ 'POS'
      WITH SO_SRV EQ '0100'
      WITH PA_MAN EQ 'X'
      WITH PA_FILT EQ 'X'
      WITH PA_DISP EQ 'X'
      WITH FREE SELECTIONS texpr
      AND RETURN.


The problem is, it doesn't seem to consider the free selection at all.

Is this because the called program is not attached to an LDB?

Does SUBMIT with FREE SELECTIONS work only with LDB?

Is there any other method to execute programs with dynamic selections in the background?

CALL TRANSACTION? the BDC recording doesn't seem to work.

Can you pls advise.

Thanks!

Arthi

<Can this be moved to the ABAP General forum. I posted this here by mistake.>

Edited by: Arthi N on Feb 3, 2012 12:51 AM

3 REPLIES 3

tamas_hoznek
Product and Topic Expert
Product and Topic Expert
0 Kudos
255

As far as I'm aware, dynamic selections require the use of a LDB.

The help also specifically states: "The program accessed must be linked to a logical database that supports dynamic selections."

I couldn't take a look at the program you mentioned because it's not in my system, but do you have the dynamic selections pushbutton in the toolbar even though the program isn't using a LDB? That'd be strange... I don't remember seeing this yet.

0 Kudos
255

Moved to ABAP General forum.

0 Kudos
255

Hi Tamas,

Yes, this report transaction has a 'Free Selection' button on the toolbar that dynamically generates the related dynamic selection fields based on the service implementation (a parameter on the sel scrn) selected on the main selection-screen.

I believe this is already set up in the config for Trade Outbound Framework.

The program uses function module WES_GET_FILTER_OF_APPL to derive the structures that correspond to the selected service and also the usual function modules from Fgroup SSEL to build a tree for the user to input the values for the dynamic fields.

You may not be able to see this transaction as it is IS-Retail specific I guess.

If SUBMIT with FREE SELECTIONS can be used only for Pgms with LDB, then I guess this wont work.

Is there any other way?

Thanks

Arthi