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: 

BDC Development

Former Member
0 Kudos
159

Hi everybody,

I created a report where I call a transaction. In this transaction I choose a selection variant via BDCData. Everything works fine except for one point. The BDC choose the selection variant through cursor position. But if a user create a new selection variant then my report choose the wrong variant because of the cursor position.

How can I realize that it does not choose the selection variant by cursor position therefore by name of the variant. I tried this but it didnt work:

perform bdc_field using 'RSVAR-VARIANT'

'=NameofScreenVariant'.

At the moment the code with cursor position look like this:

perform bdc_dynpro using 'RM06EL00' '1000'.

perform bdc_field using 'BDC_OKCODE'

'/EGET'.

perform bdc_dynpro using 'SAPMSSY0' '0120'.

perform bdc_field using 'BDC_CURSOR'

'RSVAR-VARIANT(2)'.

perform bdc_field using 'BDC_CURSOR'

'08/10'.

perform bdc_field using 'BDC_OKCODE'

'=PICK'.

Message was edited by: Matthias

1 ACCEPTED SOLUTION

andreas_mann3
Active Contributor
0 Kudos
103

hi ,

better use

submit report zrep
       USING SELECTION-SET vari

Message was edited by: Andreas Mann

4 REPLIES 4

andreas_mann3
Active Contributor
0 Kudos
104

hi ,

better use

submit report zrep
       USING SELECTION-SET vari

Message was edited by: Andreas Mann

0 Kudos
103

Hi Andreas,

the problem is that I have to call a transaction variant (of ME2L) in my report. Therefore I can not call the standard programm (RM06EL00) with submit.

And a screen variant is also not possible for ME2L Dynpro 1000.

0 Kudos
103

I think this post is related to your other post 'Transaction call', did you try my last reply in that post.

Regards

Sridhar

0 Kudos
103

hi,

or try that:

PARAMETERS rep TYPE sy-repid DEFAULT 'Z1234567'.
PARAMETERS var TYPE vari-variant DEFAULT 'TEST'.
DATA pos(5).
*
SELECT variant  FROM  varid INTO TABLE vtab
       WHERE  report  = rep.

SORT vtab.
READ TABLE vtab WITH KEY variant = var.
pos = '01/'.
UNPACK sy-tabix TO pos+3(2).

perform bdc_field using 'BDC_CURSOR' pos.

nice weekend to ALL

&grace

Andreas