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

KKS2 problem whit BDC.

Former Member
0 Likes
1,930

hello.

when i run the transaction KKS2 in BDC, don't update the order.

can you help me?

is there a rule or something for this TCODE to run in BDC?

hello.

when i run the transaction KKS2 in BDC, don't update the order.

can you help me?

is there a rule or something for this TCODE to run in BDC?

11 REPLIES 11
Read only

Former Member
0 Likes
1,783

Hi,

Remove the Test Run flag = 'X' while recording the BDC.

and Also check the Controlling area is set at each & every Run.

PrabhuD@s

Read only

0 Likes
1,783

hello.

thank you for the answer.

i already remove the test run flag.

1 SAPMKKS0 2000

BDC_CURSOR KKS00-LISTF

BDC_OKCODE =AUSF

KKS00-POPER 4

KKS00-GJAHR 2011

KKS00-AWVAL space

KKS00-AWVSE X

KKS00-TESTL space

KKS00-LISTF space

BDC_SUBSCR SAPMKKS0 0210KV2000

KKS00-AUFNR 0000123

what do you mean "check the Controlling area is set at each & every Run"?

Read only

Former Member
0 Likes
1,783

Hi,

go to t-code>KKS2>Menu>Extras>set controlling area (CTRL+F3).

Prabhudas

Read only

0 Likes
1,783

hi.

well, i do this.

perform bdc_dynpro using 'SAPMKKS0' '2000'.

perform bdc_field using 'BDC_CURSOR' 'KKS00-POPER'.

perform bdc_field using 'BDC_OKCODE' '=KKRS'.

perform bdc_dynpro using 'SAPLSPO4' '0300'. perform bdc_field using 'BDC_CURSOR''SVALD-VALUE(01)'. perform bdc_field using 'BDC_OKCODE' '=FURT'. perform bdc_field using 'SVALD-VALUE(01)' '0001'. perform bdc_dynpro using 'SAPMKKS0' '2000'.

perform bdc_field using 'BDC_CURSOR' 'KKS00-POPER'.

perform bdc_field using 'BDC_OKCODE' '=AUSF'.

perform bdc_field using 'KKS00-POPER' '4'.

perform bdc_field using 'KKS00-GJAHR' '2011'.

perform bdc_field using 'KKS00-AWVSE' 'X'.

perform bdc_field using 'KKS00-TESTL' ' '.

perform bdc_field using 'KKS00-LISTF' 'X'.

perform bdc_field using 'KKS00-AUFNR' '0000012'.

perform bdc_transaction using 'KKS2'.

the blue text is the controling area

i get this to run in SM35

1 SAPMKKS0 2000

BDC_CURSOR KKS00-POPER

BDC_OKCODE =KKRS

2 SAPLSPO4 0300

BDC_CURSOR SVALD-VALUE(01)

BDC_OKCODE =FURT

SVALD-VALUE(01) 0001

3 SAPMKKS0 2000

BDC_CURSOR KKS00-POPER

BDC_OKCODE =AUSF

KKS00-POPER 4

KKS00-GJAHR 2011

KKS00-AWVSE X

KKS00-TESTL

KKS00-LISTF X

KKS00-AUFNR 0000012

but, still don't update the order.

something is missing, but what?

Read only

Former Member
0 Likes
1,783

Hi Icuevas,

Which does the message states which is returned?

Also have you tried to run your BDC in the foreground and/or tried this transaction manually using the same values as passed on in your BDC?

Kind regards,

Robert

Read only

0 Likes
1,783

hello RJ.

i get the message "processed"

This is the log

11:05:13 Session J_ICUEVAS is being processed by user ICUEVAS in mode N on server S111

11:05:13 Transaction was processed successfully

11:05:13 Processing statistics

11:05:13 1 transactions read

11:05:13 1 transactions processed

11:05:13 0 transactions with errors

11:05:13 0 transactions deleted

11:05:13 Batch input processing ended

i run it foreground, background, changing almost every option available.

process/foreground

display errors only

backgroud.

extended log

expert mode

dynpro standard size

cancel if log error ocurrs.

simulate background mode.

after this test, i run directly kks2 with the order and update the record fine.

the Tcode KKs2 show a second screen after process the order, this could be a problem?

Edited by: icuevas on Apr 25, 2011 7:18 PM

Read only

0 Likes
1,783

I don't see you pressing the "save" button anywhere.

Rob

Read only

0 Likes
1,783

hello Rob.

do you mean the execute button (F8)?

if yes, when i run the Tcode SHDB and start recording and press the execute button immediately show me the result of record.

T KKS2

SAPMKKS0 2000 X

BDC_CURSOR KKS00-POPER

BDC_OKCODE =AUSF

KKS00-POPER 4

KKS00-GJAHR 2011

KKS00-AWVSE X

KKS00-TESTL X

KKS00-LISTF X

BDC_SUBSCR SAPMKKS0 0210KV2000

KKS00-AUFNR 1618770

i asume the execute button could be bdc_okcode =AUSF, or i'm totally wrong?

or i must run the record wih the option "Cont. after commit" checked?

Read only

0 Likes
1,783

ok, i give up on using KKS2 in BDC, i try call transaction.

but the result is the same, the order remains unchanged.

i understand.. is dificult help people if you can't see the entire program, anything could be the problem.

searching in internet, i don't found any example or any person who say, "i made a DBC or Call transaction with KKS2", in fact i found opposite, with no solution.

in abap the tables and Tcode are the same, so, can you create a program using KKS2 working in DBC or CALL TRANSACTION?

of corse the program must work.

thanks.

Read only

0 Likes
1,783

Hi Icuevas,

Checking the package to which KKS2 belongs, I noticed program RKKKS000. I believe this program is worthwile exploring to see if you can use this in a submit statement.

The only problem is that this report hides the order number input parameter.


PA_KDAUF  LIKE KKS00-KDAUF NO-DISPLAY,

However when you look in the prgram it calls an external sub-routine:


* Ansprung der zentralen Hintergrundverarbeitungsroutine im SAPMKKS0...
  PERFORM EXTERN_BATCHLAUF_STARTEN IN PROGRAM SAPMKKS0
    USING    PA_KOKRS  PA_WERKS PA_GJAHR PA_POPER
             PA_AUFNR  PA_AUFNB PA_AUART PA_AUTYP
             P_PROCNR  P_PROCNB
             PA_SAFNR  PA_SAFNB PA_VERID PA_MATNR PA_MATNB
             PA_KDAUF  PA_KDAUB PA_KDPOS PA_PROJN PA_PROJB
             PA_AWVAL  PA_AWVSE PA_VSSEL PA_TESTL PA_BATCH
             PA_LISTF  PA_PRIMS
             PA_OKCOD  PA_TCODE PA_DYNNR
             P_KKS00C
             PA_VERWS  PA_STAKZ PA_STAMD PA_STANO PA_FORTS
             PA_TSTKZ
             PA_INCLF  PA_INCLP PA_INCLI
             LS_WITEM  PA_JOBID RFCGROUP.           "OSS 451629

Maybe you can or make a copy of RKKKS000 and unhide the order number and submit this in your program or just call the mentioned sub-routine in your program.

Good luck,

Robert

Read only

0 Likes
1,783

Ok, based on what you mentioned i have two conclutions.

one: is not posible run the Tcode KKS2 via BDC of Call transaction only using Tcode SHDB.

two: I feel somewhat comforted, i mean, is not someting in my code after all.

well, i going to try and make some test.

i will put here the soluction found.

thanks all for the contribution.