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

Error exec. Background Mode a Batch-Input using KP26 Transaction Code

Former Member
0 Likes
2,186

I have a program that build a Batch-Input based on transaction code KP26.

I encounter the following error :

Field Z-BDC02(1) is not an input field (Program : SAPLKPP2 Screen : 0112)

When executing in background I got the error and when executing in Foreground, it is OK.

I use SHDB to look at the field needed and it gave me the same field to use.

Here is an extract of my program for the field I have the issue on :

PERFORM F100_BDC_FIELD USING 'Z-BDC02(01)' I_T01-LST.

PERFORM F100_BDC_FIELD USING 'Z-BDC05(01)' I_T01-SPRED.

PERFORM F100_BDC_FIELD USING 'Z-BDC07(01)' I_T01-TOV.

PERFORM F100_BDC_FIELD USING 'Z-BDC08(01)' I_T01-TOF.

Any one have an hint to solve this ?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,786

Hi

This error will occur in BDC. If your are passing the Value to disabled field of the screen, then u will get this message as warraning and BDC will fail

Even this may occurred when you run in foregroud..but in Foreground you may pressed entered button for that message,once it message occured.So in foreground it will go next screen once u press enter for warraing message.But in background this BDC will fail.

So frist check manually in KP26 transaction,if that field is not input enabled then change your bdc code.

Regards,

Raghu.

8 REPLIES 8
Read only

Former Member
0 Likes
1,787

Hi

This error will occur in BDC. If your are passing the Value to disabled field of the screen, then u will get this message as warraning and BDC will fail

Even this may occurred when you run in foregroud..but in Foreground you may pressed entered button for that message,once it message occured.So in foreground it will go next screen once u press enter for warraing message.But in background this BDC will fail.

So frist check manually in KP26 transaction,if that field is not input enabled then change your bdc code.

Regards,

Raghu.

Read only

0 Likes
1,786

Hi Raghu,

Yes I execute directly KP26 and my field seems to be open for input.

As I wrote, I also use SHDB transaction to simulate what has to be done, and the field name I got are the same.

Read only

0 Likes
1,786

Just call the BDC in Synchronous mode (S). I think it will solve your problem.

Thanks

Subhankar

Read only

0 Likes
1,786

Hello Subhankar,

It seems it works, I execute my BDC from SM35 when I choose "Display Errors Only" it's ok and when I choose Background I have the error.

Is it a way in my program that build the BDC to avoid the error, as the synchronous mode seems not to be an option when using BDC_INSERT function ?

Thanks and Regards.

Read only

0 Likes
1,786

Hi,

In the BDC_INSERT FM there is a input paramater called CTUPARAMS. This is nothing but a structure. If you check the structure there are two fields DISMODE (A Display all screens,E Display errors, N Background processing and P Background processing; debugging possible) and another field UPDMODE. Here pass S for synchronous.

Please check it once. Hope this will help you.

Thanks

Subhankar

Read only

0 Likes
1,786

Hi,

Just one remark: batch input is always executed in synchronous mode (hopefully, otherwise we would get many lock issues during mass updates!) Or is there something I missed?

Same thing when you use BDC_INSERT, CTU_PARAMS is ignored ([SAP note 1437811 (Batch input: BDC_INSERT parameter CTUPARAMS)|https://service.sap.com/sap/support/notes/1437811 ])

About the issue, I don't know, so maybe explain more about the context: for instance, do you run the session under a different user? (for instance, the user could be assigned a transaction/screen variant with table control variant, that protects some fields) Do you have one transaction in the batch input session or are there several ones. Try with one only to see if it works. If yes, then maybe it's something in memory that changes the "input-capability" of the field after the first transaction.

Sandra

Read only

0 Likes
1,786

Thanks all the problem is resolved.

In fact Sandra was right as, there is some "Planner profile" that fix a Layout profile different for each user. As this profile is not fix under user parameter, default seems to be different in BAtch and Foreground.

Read only

Former Member
0 Likes
1,786

Hi, I struggled with this too, after much debugging I found that you may need to clear some parameter IDs to prevent defaulting of previously used values. For example in CJ02 it would default to a WBS element that is not for the project selected, hence it would disable input. Use SET PARAMETER ID 'XXX' FIELD ''.