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

BDC KO01 fail

Former Member
0 Likes
1,228

I write a FM 'Z_CREATE_INTPRJ‘ using BDC to create internal prject order, as tcode KO01.

In DEV all is fine.

In PRD this FM ends with a success message that,

No batch input data for screen SAPLSPO4 0300

But when I use se37 to run this FM in PRD, the process is ok and internal order is created.

when I searched the web, someone said the KO01 would better be implemented by using BAPI,

but I am curious about why the BDC failed when run in a program, but successes when run separately.

I write a FM 'Z_CREATE_INTPRJ‘ using BDC to create internal prject order, as tcode KO01.

In DEV all is fine.

In PRD this FM ends with a success message that,

No batch input data for screen SAPLSPO4 0300

But when I use se37 to run this FM in PRD, the process is ok and internal order is created.

when I searched the web, someone said the KO01 would better be implemented by using BAPI,

but I am curious about why the BDC failed when run in a program, but successes when run separately.

5 REPLIES 5
Read only

nabheetscn
SAP Champion
SAP Champion
0 Likes
959

Hi

I think using a BAPI is always the best. Looking at the message it feels there is ome problem with recording. When you run it via report in A mode please check which screen comes where you have no data and try to do the recording again.

Nabheet

Read only

0 Likes
959

Hi

Screen sequence is incorrect. Extra screen SAPLSPO4 0300 is there with no data, that is why getting that error. Try to fill that screen also or skip that screen.

Thanks,

Chandra.

Read only

0 Likes
959

Hi Xu ,

When  you use Bapi  , it is Standard  process  so it takes care of all required  update   whereas in BDC  which is created by  user  so while creating/Recording    BDC you migth not have passed  value to screen fields which it is asking for    . so either  you Pass value to the screen fields  or  comment that fields   .

regards

Deepak.

Read only

Former Member
0 Likes
959

Sometimes SAP transactions flow a bit differently in background than in foreground.  For this, we have the fields of controls structure for the call transaction (type ctu_params).  See F1 help on the call transaction statement for more information.  However, as already noted, the preference would be to complete this update with a BAPI if possible.

Read only

Former Member
0 Likes
959

Hi

The mentioned screen is for setting the Controlling area, so you could do the setting of controlling area explicitly by using SET PARAMETER ID 'CAC' FIELD <<Controlling area>>.

Also do not use OK-CODE '=KOKR' to navigate from screen 100 use '/00' instead.

PERFORM bdc_dynpro           USING 'SAPMKAUF'      '0100'.

PERFORM bdc_field            USING 'COAS-KOKRS'    <<Controlling Area>>.

PERFORM bdc_field            USING 'COAS-AUART'    <<Order type>>.

PERFORM bdc_field            USING 'BDC_OKCODE'    '/00'.

SET PARAMETER ID 'CAC' FIELD <<Controlling area>>

PERFORM bdc_dynpro      USING 'SAPMKAUF' '0600'.

Best Regards

Hari