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: 

not running in background mode 'N'

Former Member
0 Kudos

hi experts,,,,,

i have a small issues in my BDC

where i face problem when running in background

if i update in 'A' mode its get updated

whereas in background 'N' mode it doesnt take the changes

and CHANGES NOT GETTING REFLECTED/...

can you pls help me out

thanks in advance

Rachel

piece of my code as follows...

============================

LOOP AT it_final INTO wa_final.


    PERFORM bdc_dynpro      USING 'X' 'SAPMIEQ0' '1000'.
    PERFORM bdc_field       USING 'BDC_CURSOR'   'RISA0-SERNR'.
    PERFORM bdc_field       USING 'BDC_OKCODE'   '/00'.

    PERFORM bdc_field       USING 'RISA0-MATNR'   wa_final-matnr.
    PERFORM bdc_field       USING 'RISA0-SERNR'   wa_final-sernr_in.

    PERFORM bdc_dynpro      USING 'X' 'SAPMIEQ0' '0101'.
    PERFORM bdc_field       USING 'BDC_OKCODE'   '=EQUI'.
    PERFORM bdc_field       USING 'BDC_CURSOR'   'ITOB-CHARGE'.

    PERFORM bdc_dynpro      USING 'X' 'SAPMIEQ0' '0101'.
    PERFORM bdc_field       USING 'BDC_OKCODE'   '=T\01'.
    PERFORM bdc_field       USING 'BDC_CURSOR'   'EQBS-B_LAGER'.

    PERFORM bdc_dynpro      USING 'X' 'SAPMIEQ0' '0101'.

    PERFORM bdc_field       USING 'BDC_CURSOR'   'ITOB-SERGE'.

if p_unpair is  initial .
    PERFORM bdc_field       USING 'ITOB-HERST'    wa_final-manf.
*    PERFORM bdc_field       USING 'ITOB-TYPBZ'    wa_final-part.
    PERFORM bdc_field       USING 'ITOB-TYPBZ'    wa_final-model.


    PERFORM bdc_field       USING 'ITOB-MAPAR'    wa_final-part.
    PERFORM bdc_field       USING 'ITOB-SERGE'    wa_final-man_ser.
    PERFORM bdc_field       USING 'ITOB-HERLD'    wa_final-country.
    PERFORM bdc_field       USING 'ITOB-BAUJJ'    wa_final-year.
    PERFORM bdc_field       USING 'ITOB-BAUMM'    wa_final-month.

else .
    PERFORM bdc_field       USING 'ITOB-SERGE'    ''.
endif.


    PERFORM bdc_field       USING 'BDC_OKCODE'   '=BU'.

    CALL TRANSACTION 'IQ02' USING bdcdat
                           MODE pr_mode UPDATE 'A'
                           MESSAGES INTO it_messtab.

    CLEAR: bdcdat[], bdcdat.
    CLEAR: wa_final, wa_messtab.

  ENDLOOP .



end-of-selection .

15 REPLIES 15

Former Member
0 Kudos

Hi,

After the CALL TRANSACTION just do the COMMIT WORK.

Hope this helps you

Regards

Shiva

0 Kudos

hi

thanks,...

its not working ....not updating still

Former Member
0 Kudos

Hi,

After looping your internal table i.e it_final

REFRESH IT_BDCDATA.

and then proceed with the performs

and endloop.

Regards,

sirisha tummala

0 Kudos

hi

thnkz

sorry i didnt use nythingi t_bdcdata.....can u tell me wats that

former_member187457
Active Contributor
0 Kudos

use update mode as S....and display mode as N...

0 Kudos

thanks

i alread tried changing the mode too...but no effects

0 Kudos

hi

What is pr_mode?

is it a selection screen input field?

if yes, are u passing default value to it?..if not pass default value ...this will help.....

thnx

Rahul

0 Kudos

thankz

your r rite....

PARAMETERS : pr_file LIKE ibipparms-path,

pr_mode LIKE ctu_params-dismode DEFAULT 'N'.

and iam passing the value for it......but still

Former Member
0 Kudos

Hi,

After looping your internal table i.e it_final

REFRESH BDCDAT. as per your code

and then proceed with the performs

and endloop.

Regards,

sirisha tummala

former_member187457
Active Contributor
0 Kudos

Give default values to all the input fields in the selection screen....

0 Kudos

Hello,

I faced the same problem in one of my BDC program , it was output type maintainance in VA02.

I was getting few error for some sales orders, so it was not updating those SO's, but continuing the loop in N mode.

But in A mode its skips the error.

So my suggesstion is can you check whether there is any message which come in between , it can be success message also, even success message can also stop the updation but in dailog mode it skips that message after ok code is entered or pressed.

This I observed in my program....may be same problem is there

Thanks

manish

0 Kudos

thanks alot manish;.......

i think u are CORRECT.....cos i have a success message as well as error msg to be displayed after my coding....

can u help me out pls ...... what changes am i supposed to do now.....

thanks again

Rachel

0 Kudos

Are you sure, you are not putting any value in display mode

coz there may be a prob with recording....... as there is no one in background mode to put any value which is missed during recording

and also check whether the t-code u are using can be xecuted in backgrnf

as there are few t-codes which can't be executed in background..

Let me know if there's still a prob

Regards

Manu

0 Kudos

hi manu

thanks alot for helping me out....

1. as u said there is no problem in recording am quite sure abt it.....

2. can u tell me how to check via tcode for background check...

i havent come across such....if u can let me know i will check it out as u said

thanks again

0 Kudos

Hi Rachel..

While running the BDC in 'A' Mode check the message that come in the status bar. There could be any screen where just becuase u press enter it is going to the next screen. That is because of your intercation.

But in the case of background this is not hapening and it fails..

So make sure whether when u run in foreground you are pressing any additional enter which is not in your recording. This could be the only problem why it is not updating in background.

Another reson could be that you dont have access to back ground jobs. Check that also..

Regards

Ansari