Showing results for 
Search instead for 
Did you mean: 

can we use bdc in WDA?

Former Member
0 Kudos


can we use bdc in WDA? if yes please tell me how to do?

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Dear Murthy Ganti ,

yes it is possible by creating the Functional module for your BDC recording . i.e you will get the code generated by the BDC recording . create a FM using the Code .

for example the below code is your recoding code

Assign your import parameters to your code

wa_iq02-MATNR      =  MATNR.
wa_iq02-SERNR      =  SERNR.
wa_iq02-GWLDT_O    =  GWLDT_O.

append wa_iq02 to itab_iq02.
clear wa_iq02.
LOOP AT itab_iq02 INTO wa_iq02.
 PERFORM bdc_dynpro      USING 'SAPMIEQ0' '1000'.
    PERFORM bdc_field       USING 'BDC_CURSOR'
    PERFORM bdc_field       USING 'BDC_OKCODE'
    PERFORM bdc_field       USING 'RISA0-MATNR'  
                                  wa_iq02-matnr.                      " IMPORT parameters
    PERFORM bdc_field       USING 'RISA0-SERNR'
                                  wa_iq02-sernr.                        "IMPORT parameters

IF sy-subrc EQ 0 .
*      CONCATENATE 'Material No ' matnr  sernr INTO text.
      return_message-MESSAGE = 'Address was updated '.
     else .
       return_message-MESSAGE = 'Address Was Not Changed '.
    ENDIF .


and check your FM is working fine . and consume it in WDA through call function or service call

revert back if any doubt


chinnaiya P

Edited by: chinnaiya pandiyan on Jul 20, 2009 7:13 PM

Former Member
0 Kudos

Dear chaitanya,

Thanks for your it the only way by generating FM like bdc method and use in WDA? or is there any way? please let me know

Former Member
0 Kudos

Dear Murthy Ganti ,

if you put your recorded coding in side the FM it is easy for your to pass data's through variable, table etc .. if you don't want to create a FM means you have to write your coding sequentially it will lead to lot of confusion Because some INCLUDES will generate automatically you have to handle them care fully . BDC will interpret the GUI screens so some times it will lead you FATAL errors . My suggestion is better you create FM for your BDC or search for the STANDARD FM for your requirements .


chinnaiya P

Former Member
0 Kudos

Hi Chinnaiya,

i am working on Webdynpro. I am wrtiting a BDC (Tcode: CRMD_ORDER) Code in Function Module and calling from Webdynpro application, it is giving Dump as :Exception condition "CNTL_ERROR" raised.

However when i run the Function module separately , it is Working Fine.

Any Suggestion..

Active Contributor
0 Kudos

Hi Janardhan,

This error typically comes when you are doing call transactions or BDCs for enjoy transactions which involve controls. For a control to be active, system needs access to the desktop(basically the GUI environment), where the controls are created and destroyed). But if you are doing a call transaction in no-display mode or BDC in no-display mode, the system cannot create these controls and as a result this dump occurs. You have to find alternatives to the call transaction that you are doing.

check this oss notes 844207, 833845

it is related to your dump..



Active Contributor
0 Kudos

to put it simple

you can't have BDC in output mode in webdynpro abap

the only BDC from webdynpro which you can have, is background operations

( mode 'N' )

and on a sidenote:

use bapi's instead of BDC

if you want the output:

Webdynpro is NOT sapgui and can not display any sapgui transactions

so either use ITS linkings (blergh)

or use a standard webdynpro component which serves as an alternative to the sapgui transaction

or create your own webdynpro app as an alternative to the sapgui transaction

Former Member
0 Kudos

@ Srinivas- Call Transaction BDC Code on Tcode:CRMD_ORDER is not working in background in SE38, but same code working in Foreground mode= 'A'. working fine.

0 Kudos


i have to create a function module for bdc(xd01).

is it the same above process to do that. and what to add in tables tab,

I have created a fm in which i have append my import parameter in internal table and then passed the values to bdc field as same.but when i execute the screen comes but data does not get fill automatically.

please help me in this issue,

what should i do