2015 Nov 20 8:35 AM
Hi,
im searching for a code to call the Transaction SMARTFORMS and the radiobutton for textmodule is activated.
My Code at the moment is:
SET PARAMETER ID 'SSFTXTNAME' FIELD lv_txtname.
ls_bdcdata-dynbegin = 'X'. "''
ls_bdcdata-dynpro = '0100'.
ls_bdcdata-fnam = 'RB_TX'.
ls_bdcdata-fval = 'X'.
ls_bdcdata-program = 'SAPMSSFO'.
APPEND ls_bdcdata TO it_bdcdata.
CLEAR ls_bdcdata.
CALL TRANSACTION 'SMARTFORMS' USING it_bdcdata.
Problem is the Transaction get opend and the correct radiobutton is activated but the field from the textmodule is still "grey". If im clicking into the field the right text comes into the field. I have tested it with "SET PARAMETER ID" the same problem comes without active radiobutton. As you can see below that happens if im using the code.
2015 Nov 20 9:03 AM
Hello Julian, your example does not use an OKCODE to set the radiobutton, it just fills the field, which is possibly not enough. Don't know if this helps but can you try: bdctab = VALUE #( ( program = 'SAPMSSFO' dynpro = '0100' dynbegin = 'X' ) ( fnam = 'RB_TX' fval = 'X' ) ( fnam = 'BDC_OKCODE' fval = 'RB' ) ). call transaction 'SMARTFORMS' using bdctab mode 'E'. Regards, Alex
2015 Nov 20 9:03 AM
Hello Julian, your example does not use an OKCODE to set the radiobutton, it just fills the field, which is possibly not enough. Don't know if this helps but can you try: bdctab = VALUE #( ( program = 'SAPMSSFO' dynpro = '0100' dynbegin = 'X' ) ( fnam = 'RB_TX' fval = 'X' ) ( fnam = 'BDC_OKCODE' fval = 'RB' ) ). call transaction 'SMARTFORMS' using bdctab mode 'E'. Regards, Alex
2015 Nov 20 9:22 AM
Thank you Alexander! that was the perfect answer that i needed.
2015 Nov 20 9:10 AM
When the radiobutton is clicked a function code is triggered (and a PAI/PBO cycle) so your recording/BDC should contain this event.
* First cycle - set
perform bdc_dynpro using 'SAPMSSFO' '0100'.
perform bdc_field using 'BDC_CURSOR'
'RB_TX'.
perform bdc_field using 'BDC_OKCODE'
'=RB'.
perform bdc_field using 'RB_SF'
''.
perform bdc_field using 'RB_TX'
'X'.
* Second cycle - input object name
perform bdc_dynpro using 'SAPMSSFO' '0100'.
perform bdc_field using 'BDC_CURSOR'
'SSFSCREEN-TNAME'.
perform bdc_field using 'BDC_OKCODE'
'=CREATE'.
perform bdc_field using 'RB_TX'
'X'.
perform bdc_field using 'SSFSCREEN-TNAME'
lv_txtname.
Regards,
Raymond