‎2009 Mar 24 8:45 AM
Hi to all,
I have to run program in debug mode ,while in debugging i have to change MODE 'N' to "A".
is it possible for this transaction,it one is hardcoded...
CALL TRANSACTION 'F-04' USING I_BDCDATA
MODE 'N'
UPDATE 'S'
MESSAGES INTO I_MSGTAB.
one more thing i am selecting some fields into one internal table,after selecting i found that there is no data in the internal table.there is no work area for this internal table.while debugging i can add entries for this internal table after the select statment( in Debugging Mode only )
‎2009 Mar 24 8:52 AM
example
try using update 'S' ( synchronous update ).
CALL TRANSACTION 'VA02' USING bdcdata MODE mod
MESSAGES INTO messtab update 'S'.
Try this way..
opt-dismode = 'N'.
opt-defsize = 'X'.
opt-racommit = 'X'.
opt-updmode ='S'.
CALL TRANSACTION 'VA02' USING bdcdata OPTIONS FROM opt
MESSAGES INTO itab
‎2009 Mar 24 8:54 AM
Hi,
since the value of MODE in call transaction is hard coded, it cannot be changed.
it can be changed when you pass the value into some variable.
data : gs_ctu_params TYPE ctu_param.
Parameter string for runtime of CALL TRANSACTION USING...
CLEAR gs_ctu_params.
gs_ctu_params-dismode = 'A'.
gs_ctu_params-updmode = 'S'.
gs_ctu_params-defsize = 'X'.
CALL TRANSACTION c_ca01 USING gt_bdcdata
OPTIONS FROM gs_ctu_params
MESSAGES INTO gt_messtab.
now if u want to change the value of gs_ctu_params-dismode in debug mode we can change it...
regarding adding entries, we can add in debug mode....
in debug mode, u ill see a select Table (push button on top), enter the table name, then u ill see a push button called 'APPEND', click on it and pass the values to each field of the internal table.
Hope it's clear.
Regards,
Pavan
‎2009 Mar 24 8:59 AM
if this is hardcoaded in your program then you cant chage the mode in debuging. You need to change the program accordingly and take the mode via a variable so that you can chage the value of variable during the debuging.
‎2009 Mar 24 9:06 AM
Hi,
Declare a constant variable which is of type c and value is of 'N' or 'A'. We can change the constant value in debugging.
Here is a sample code:
data: w_constant type c value 'N'.
call transaction ' <Transaction-name> ' using bdcdata mode w_constant messages into it_messages.Hope this helps you
Regards,
Rajani
‎2009 Mar 24 9:10 AM