08-21-2009 7:48 AM
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 .
08-21-2009 7:52 AM
Hi,
After the CALL TRANSACTION just do the COMMIT WORK.
Hope this helps you
Regards
Shiva
08-21-2009 7:58 AM
08-21-2009 8:00 AM
Hi,
After looping your internal table i.e it_final
REFRESH IT_BDCDATA.
and then proceed with the performs
and endloop.
Regards,
sirisha tummala
08-21-2009 8:18 AM
hi
thnkz
sorry i didnt use nythingi t_bdcdata.....can u tell me wats that
08-21-2009 8:03 AM
08-21-2009 8:06 AM
08-21-2009 8:19 AM
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
08-21-2009 8:23 AM
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
08-21-2009 10:01 AM
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
08-21-2009 10:54 AM
Give default values to all the input fields in the selection screen....
08-24-2009 6:40 AM
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
08-24-2009 7:04 AM
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
08-24-2009 11:15 AM
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
08-24-2009 11:40 AM
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
08-24-2009 12:13 PM
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