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

Batch Input for KKS1

Former Member
0 Likes
1,186

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

1 ACCEPTED SOLUTION
Read only

Tamas_Hoznek
Product and Topic Expert
Product and Topic Expert
0 Likes
1,088

Try to set opt-dismode to A and see how the called transaction appears. Perhaps you'll notice something that's amiss.

8 REPLIES 8
Read only

Tamas_Hoznek
Product and Topic Expert
Product and Topic Expert
0 Likes
1,089

Try to set opt-dismode to A and see how the called transaction appears. Perhaps you'll notice something that's amiss.

Read only

0 Likes
1,088

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

Read only

Tamas_Hoznek
Product and Topic Expert
Product and Topic Expert
0 Likes
1,088

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.

Read only

0 Likes
1,088

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

Read only

0 Likes
1,088

bump any ideas please...

Regards

Juan

Read only

0 Likes
1,088

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

Read only

Former Member
0 Likes
1,088

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

Read only

0 Likes
1,088

Thank you very Much Rob

Regards

Juan