‎2012 Jan 12 3:49 PM
Hi,
Using SHDB i made a record for KKS1, when i process from SHDB its work correctly but when process from abap it dont work, the call transaction executed very quickly and the messtab is empty, i wrote another program for KKRA transaction and works fine.
Any clues please
This is the code
clear bdcdata_tab.
refresh bdcdata_tab.
clear bdcdata_wa.
bdcdata_wa-program = 'SAPMKKS0'.
bdcdata_wa-dynpro = '2000'.
bdcdata_wa-dynbegin = 'X'.
append bdcdata_wa to bdcdata_tab.
clear bdcdata_wa.
bdcdata_wa-fnam = 'BDC_CURSOR'.
bdcdata_wa-fval = 'KKS00-TESTL'.
append bdcdata_wa to bdcdata_tab.
clear bdcdata_wa.
bdcdata_wa-fnam = 'BDC_OKCODE'.
bdcdata_wa-fval = '=AUSF'.
append bdcdata_wa to bdcdata_tab.
clear bdcdata_wa.
bdcdata_wa-fnam = 'KKS00-POPER'.
bdcdata_wa-fval = w_buper.
append bdcdata_wa to bdcdata_tab.
clear bdcdata_wa.
bdcdata_wa-fnam = 'KKS00-GJAHR'.
bdcdata_wa-fval = w_gjahr.
append bdcdata_wa to bdcdata_tab.
clear bdcdata_wa.
bdcdata_wa-fnam = 'KKS00-AWVAL'.
bdcdata_wa-fval = 'X'.
append bdcdata_wa to bdcdata_tab.
clear bdcdata_wa.
bdcdata_wa-fnam = 'KKS00-AWVSE'.
bdcdata_wa-fval = ''.
append bdcdata_wa to bdcdata_tab.
clear bdcdata_wa.
bdcdata_wa-fnam = 'KKS00-TESTL'.
bdcdata_wa-fval = ''.
append bdcdata_wa to bdcdata_tab.
clear bdcdata_wa.
bdcdata_wa-fnam = 'KKS00-WERKS'.
bdcdata_wa-fval = w_werks.
append bdcdata_wa to bdcdata_tab.
clear bdcdata_wa.
bdcdata_wa-fnam = 'KKS00-INCLF'.
bdcdata_wa-fval = ''.
append bdcdata_wa to bdcdata_tab.
clear bdcdata_wa.
bdcdata_wa-fnam = 'KKS00-INCLI'.
bdcdata_wa-fval = 'X'.
append bdcdata_wa to bdcdata_tab.
opt-dismode = 'N'.
opt-updmode = 'S'.
clear messtab.
refresh messtab.
call transaction 'KKS1'
using bdcdata_tab
options from opt
messages into messtab.
Thanks In Advance
Juan
‎2012 Jan 12 7:08 PM
Try to set opt-dismode to A and see how the called transaction appears. Perhaps you'll notice something that's amiss.
‎2012 Jan 12 7:08 PM
Try to set opt-dismode to A and see how the called transaction appears. Perhaps you'll notice something that's amiss.
‎2012 Jan 12 7:13 PM
Thanks Tamas,
No errors... the call transactions is like doing nothing, if run from shdb it runs in 1 minute, from program 1 second... this is why i believe no process occur
Regards
Juand
‎2012 Jan 12 7:31 PM
Hm... interesting.
So I take when you run in dismode A, you do see the screen properly filled with all your data but when you hit ENTER, there is no processing but the transaction ends immediately? Did you verify that it indeed doesn't run the calculation?
Try to set a break-point in the code of the called transaction and debug to see what happens.
If all the data is correct, I don't see why would the transaction behave differently when called from program vs. recording.
‎2012 Jan 12 7:51 PM
Hm... interesting.
So I take when you run in dismode A, you do see the screen properly filled with all your data but when you hit ENTER, there is no processing but the transaction ends immediately? Did you verify that it indeed doesn't run the calculation?
Yes
Very weird
Regards
Juan
‎2012 Jan 20 7:24 PM
‎2012 Jan 20 7:47 PM
i was curious to know what is your requirement that made you to go in the direction of the BDC and not looking for other options like BAPI, function modules
‎2012 Jan 20 7:44 PM
Note 184712 doesn't mention KKS1 specifically, but it might apply in your case. If you think it does, you could raise an OSS message to confirm or implement its suggestions.
Rob
‎2012 Jan 27 1:28 PM