Application Development and Automation 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: 
Read only

CALL TRANSACTION USING BDCDATA (TCode "SMARTFORMS")

Former Member
0 Likes
1,416

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.

1 ACCEPTED SOLUTION
Read only

0 Likes
719

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

3 REPLIES 3
Read only

0 Likes
720

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

Read only

0 Likes
719

Thank you Alexander! that was the perfect answer that i needed.

Read only

RaymondGiuseppi
Active Contributor
0 Likes
719

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