2006 Jul 13 9:35 AM
Dear All,
I call a transaction out of a report and pass some values to the called Transaction (with BDCDATA). That works fine, but now I need to know if it is possible to set some of the fields in the transaction to read only that the user can not change the given values. How can I realize this in my report?
Or can I call the transaction and then a variant.
Thanks for your help
2006 Jul 13 9:36 AM
Hi matthias,
1. Well, thats not possible.
2. Ie. reading the screen values,
which the transaction has populated.
3. However,
u can read the database tables,
and if u know the logic,
u can detect/know
which values will be there on screen.
regards,
amit m.
Hi matthias,
1. Well, thats not possible.
2. Ie. reading the screen values,
which the transaction has populated.
3. However,
u can read the database tables,
and if u know the logic,
u can detect/know
which values will be there on screen.
regards,
amit m.
2006 Jul 13 9:36 AM
Hi matthias,
1. Well, thats not possible.
2. Ie. reading the screen values,
which the transaction has populated.
3. However,
u can read the database tables,
and if u know the logic,
u can detect/know
which values will be there on screen.
regards,
amit m.
2006 Jul 13 2:02 PM
If it is not possible to set a field of the called transaction to read-only through Batch Input I need another solution.
Therefore I tried to call a selection variant in this transaction. That works almost fine, it automatically opens the screen where I can choose a variant but then a Pop-Up appears "OK-Code =PICK". Now I have to click ok and after that the variant is loaded. How can I avoid this Pop-Up?
The code look like this:
DATA: BDCDATA LIKE BDCDATA OCCURS 0 WITH HEADER LINE.
start-of-selection.
perform bdc_dynpro using 'RM06EL00' '1000'.
perform bdc_field using 'BDC_OKCODE'
'/EGET'.
perform bdc_field using 'BDC_CURSOR'
'EL_LIFNR-LOW'.
*Get the right selection-variant
perform bdc_dynpro using 'SAPMSSY0' '0120'.
perform bdc_field using 'BDC_CURSOR'
'08/10'.
perform bdc_field using 'BDC_OKCODE'
'=PICK'.
Call transaction 'test'
using bdcdata
MODE 'n'
Update 'L'.
FORM BDC_DYNPRO USING PROGRAM DYNPRO.
CLEAR BDCDATA.
BDCDATA-PROGRAM = PROGRAM.
BDCDATA-DYNPRO = DYNPRO.
BDCDATA-DYNBEGIN = 'X'.
APPEND BDCDATA.
ENDFORM.
FORM BDC_FIELD USING FNAM FVAL.
CLEAR BDCDATA.
BDCDATA-FNAM = FNAM.
BDCDATA-FVAL = FVAL.
APPEND BDCDATA.
ENDFORM.
2006 Jul 13 2:10 PM
Hi again,
1. very minor mistake
2. use CAPITAL case.
3. N (not n) for mode.
Call transaction 'test'
using bdcdata
MODE '<b>N</b>'
Update 'L'.
regards,
amit m.
2006 Jul 13 2:20 PM
Now the transaction does not start with MODE 'N'. It starts with MODE 'A', but then I get the described problem.
2006 Jul 13 2:31 PM
To suppress the Dialog box for ok code, uncheck it in expert tab of options in GUI setting.
Alt+F12 opens the gui settings menu, select Options and then Expert tab.
Regards
Sridhar
2006 Jul 13 2:57 PM
Thanks for your answer Sridhar.
But If I uncheck the Dialog Box in the GUI Settings then the code "/EGET" and "=PICK" does not appear in a Dialog Box but in the commando field (where I usually type in the transaction numbers)
Regards
Matthias
2006 Jul 13 3:22 PM
OK codes used in the BDC table appear in the command field, that's how the transaction know where to go when u hit enter in CALL transaction A mode, u should not enter any commands in that field unitil your last OK code (=PICK)is executed, or if you must enter a command to open a new transaction in the middle, remember the ok code in the field and enter the command and re enter the ok code in the field.
BTW i don't think u need to enter any command before finishing all ok codes u've populated in the BDCDATA table.
Regards
Sridhar
2006 Jul 13 3:41 PM
2006 Jul 13 9:37 AM
Hi,
You need to create a transaction variant I guess.
Regards,
Shashank
2006 Jul 13 9:37 AM
Are you running the BDC in foreground? Only then can the user change the values in the fields. Most BDC sessions run in background.
Are you calling a SAP transaction?
2006 Jul 13 9:40 AM
Hello,
Try to create a Screen Variant for this.
If useful reward points.
Regards,
Vasanth
2006 Jul 14 1:12 PM
To set fields read only, create a selection variant, check protected check box for the field u want to set read only and save it.
GO to transaction SE93, create a transaction code for program and selection screen, in the start with variant field enter the above created varaint name, save it. Use this transaction code in the CALL TRANSACTION.
Regards
Sridhar
Message was edited by: Sridhar K
2006 Jul 14 1:47 PM
Unfortunately it is not possible to create a screen variant for transaction ME2l (Dynpro 1000). Now I have this problem:
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'.
2006 Jul 14 1:53 PM
I'm not refering to screen variant, create regular variant by clicking save button in ME2L. and try steps in my prev reply.
Regards
Sridhar
2006 Jul 14 2:22 PM
Hi Sridhar,
thank you for your patience.
Your proposal is not possible because I have to call a transaction variant in my report. So I can not use the standard programm (RM06EL00). (If I choose a purchase order in me2l it jumps to me23n where I had to deactivate some buttons - thats why I need the transaction variant.)
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |