‎2006 Sep 05 10:46 AM
I created a recording for transaction KE51 (create profit center)
When i run this using call transaction , the execution stops at second step (screen.
Although its okay in session method.
The program is as follows
report ZVAT_PRCTR
no standard page heading line-size 255.
include bdcrecx1.
start-of-selection.
perform open_group.
perform bdc_dynpro using 'SAPLRKPM' '0200'.
perform bdc_field using 'BDC_CURSOR'
'PRCT_V-PRCTR'.
perform bdc_field using 'BDC_OKCODE'
'=MD_SMDM'.
perform bdc_field using 'PRCT_V-PRCTR'
'TEST19'.
perform bdc_field using 'PRCT_V-REF_KOKRS'
'1003'.
perform bdc_dynpro using 'SAPLRKPM' '0298'.
perform bdc_field using 'BDC_OKCODE'
'=MD_ACTIVATE'.
perform bdc_field using 'BDC_CURSOR'
'PRCT_V-KHINR'.
perform bdc_field using 'PRCT_V-DATAB'
'01.05.2006'.
perform bdc_field using 'PRCT_V-DATBI'
'31.12.9999'.
perform bdc_field using 'PRCT_V-KTEXT'
'Test Profit Center'.
perform bdc_field using 'PRCT_V-LTEXT'
'Test Profit Center'.
perform bdc_field using 'PRCT_V-VERAK'
'Roger federrer'.
perform bdc_field using 'PRCT_V-KHINR'
'54T_AM'.
perform bdc_transaction using 'KE51'.
perform close_group.
let me know where i am going wrong ?
Regards
Alok Pathak
‎2006 Sep 05 10:48 AM
Hi Alok,
If you run in 'A' All Screen mode, what is the message you are getting in second step?
Any ok_code or data is missing?
Regards,
Raj
‎2006 Sep 05 11:00 AM
Initially i created a session and it worked fine ,later on i changed the values and tried call transaction option . It didn't work. The OK_CODE and data is perfectly correct, but the execution stopped at the second screen
‎2006 Sep 05 11:03 AM
i think there in mistake in some value...
r u sure that u put proper value for craeting profit center .. plz 1st check it ...
‎2006 Sep 05 10:50 AM
i think when u run 2nd time ur code by any method it fails.
becoz u hard coded the value in bdc(only one recored)
when u first run using session method profut center created.
when u run it 2nd time u have to pass new value to ur code.
‎2006 Sep 05 11:04 AM
Hi,
perform bdc_field using 'PRCT_V-PRCTR'
<b>'TEST19'.</b>
change your procit centre no ezch time you
run BDC. Problem is that TEST19 procit center
is already created and syatem prompts you to
enter other procit center name.
Regards
Amole
‎2006 Sep 05 11:24 AM
I Alok,
One of the resons may be u r no clearing internal tables I_BDCDATA and I_BDCMSG after call transaction statement.
Try this out. Hope it helps.
Regards
Saurabh.