Application Development 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: 

BDC Error:- Runs OK in foreground but NOT in background.

Former Member
0 Kudos
2,190

Hi All,

I am trying to do a BDC for stock putaway using LT01.

When I run this BDC in foreground

it runs successfully and transfers the stock OK with the following message:-

Field RL03T-ANFME. input value is longer than screen field (this is not an error message)

but when

I try to run it in background it gives me the following errors :-

Field RL03T-ANFME. input value is longer than screen field (this is not an error message in foreground)

Transaction error.

I know that a potential solution would be to write the LT01 using a BAPI or direct input etc but I would rather not go down this route.

Amny ideas?

I am using ECC5.0

Thanks,

N.

1 ACCEPTED SOLUTION

Former Member
0 Kudos
472

You are entering a quantity into this field and the quantity has formatting characters or the thousands seperators in it. The field online will contain more characters to accommodate these seperators compared to background processing. The easiest thing to do is to find out this limit by entering 1234567890123 in it and see if it can accommodate this value. If not start deleting a digit from the end. At the point where it accepts your input value online, is the maximum number of characters that you can use.

Hope this helps,

Srinivas

9 REPLIES 9

Former Member
0 Kudos
472

Hi Niall,

Why dont you check the length of the field through which you are populating RL03T-ANFME?If the field lenght is more ,just make it as the lenght of RL03T-ANFME & run it in background.

Note: Some Success messages in the background will stop the BDC's.

former_member188685
Active Contributor
0 Kudos
472

Run the BDC in MODE 'E' so that you can see, if any errors which you can't find.

regards

vijay

Former Member
0 Kudos
472

Hi Niall,

I have seen BDC behaving the way you have mentioned. This is because in Foreground the error is taken as soft error/warning(Green light flashes) and it allows you to continue. Even though the data upload is sucessful, you will have problems when you go into the actual transaction. An error pops up saying 'Please enter all the required fields' etc.

But at the same time when it runs in background, the same error is taken as hard error(red status light) and it will not allow further process.

Try to debug this BDC program in foreground and when it comes to this stage make the system field SY-BATCH = 'X'. Then you will understand what exactly happens.

The background process should be taken as the way to go and you need to correct the data.

I think this is helpful.

Kannan

0 Kudos
472

Try this. When building your BDC data before call the transaction, move the value of the field to a tmp field which has a smaller length.



Data: tmp_ANFME(10) type c.


tmp_anfme = <the_value>.

    perform bdc_field       using 'RL03T-ANFME'
                                  TMP_ANFME.


Regards,

Rich Heilman

Former Member
0 Kudos
473

You are entering a quantity into this field and the quantity has formatting characters or the thousands seperators in it. The field online will contain more characters to accommodate these seperators compared to background processing. The easiest thing to do is to find out this limit by entering 1234567890123 in it and see if it can accommodate this value. If not start deleting a digit from the end. At the point where it accepts your input value online, is the maximum number of characters that you can use.

Hope this helps,

Srinivas

0 Kudos
472

Much thanks to all who replied.

I have solved it now. It was indeed relating to the length of the numeric field.

I have tried to spread out the points

Thanks!

N.

govind_seenivasan
Participant
0 Kudos
472

Hi,

Try this.

Data: ANFME like RL03T-ANFME.

ANFME = VALUE ( Value - currently you are assigning to RL03T-ANFME in BDC).

perform bdc_field using 'RL03T-ANFME' ANFME.

Thanks

Former Member
0 Kudos
472

Hi,

This ANFME is a quantity field so its better you define a

data : V_qty(18) type C,

Write : RL03T-ANFME to v_qty.

condense v_qty.

Then pass the v_qty BDC table.

Thanks

Rajeev

Former Member
0 Kudos
472

The first rule of BDC is that everything has to be passed in 'Character' format. If you pass any quantity or amount field as numeric, you will always get the same message.

Even though the BDC does not show this as error message in foreground, but BDC stops right there where it encounters this situation.

Therefore convert your numeric input to character input in BDC and things will start working.