2006 Jul 14 12:39 PM
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
2006 Jul 14 1:21 PM
hi ,
better use
submit report zrep
USING SELECTION-SET vari
Message was edited by: Andreas Mann
2006 Jul 14 1:21 PM
hi ,
better use
submit report zrep
USING SELECTION-SET vari
Message was edited by: Andreas Mann
2006 Jul 14 1:43 PM
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.
2006 Jul 14 1:48 PM
I think this post is related to your other post 'Transaction call', did you try my last reply in that post.
Regards
Sridhar
2006 Jul 14 1:49 PM
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