11-27-2012 12:11 PM
Dear Expert,
I have writeen a BDC program to delete some record from Infotype 2001 ,the BDC program is working fine in foregeound but not in background.Please suggest some idea.
Thanks & Regards
Sujata.
11-27-2012 12:17 PM
What is the error you are getting, What analysis you have done. ?
11-27-2012 12:18 PM
check the spool of the message tab crom the call transaction, may be in backgroung the BDC is expecting some screen.
11-27-2012 12:21 PM
Could you give more information, how did you record the sample SHDB with or without the simulate backgroud box checked, did you define dynamic actions, what is the exact behavior difference etc.
(Read : Asking Good Questions in the Forums to get Good Answers)
Regards,
Raymond
11-27-2012 12:31 PM
Hi,
If your bdc is failing in N mode it means u having some problem in recording please check in E
mode u can get the error screen .
Regard's
Smruti Ranjan
11-28-2012 5:41 AM
My BDC is not giving any error message ,it is simply not deleting the data from System table.What more I have to write.
Thanks & Regards
Sujata.
11-28-2012 5:59 AM
do you get any status message when running in foreground....
you can try to put a BDC_OKCODE as ENTR once again after the screen you get the status message...
11-28-2012 6:07 AM
Please check these links .
http://scn.sap.com/thread/589047
http://scn.sap.com/thread/134238
Regard's
Smruti Ranjan
11-28-2012 7:01 AM
Please check this BDC sample code .
DATA: L2001 LIKE P2001,
DYNNR LIKE T554S-DYNNR,
ACTIO TYPE C ,
LNNNN LIKE PSHDR.
INFOTYPES: 2001 MODE N.
REFRESH BDCDATA.
CASE LNNNN-INFTY.
WHEN '2001'. "absences
L2001 = PNNNN.
PERFORM D200X USING L2001-BEGUZ
L2001-ENDUZ
DYNNR
ACTIO.
WHEN OTHERS.
ENDCASE.
================================================
FORM D200X USING BEGUZ LIKE P2001-BEGUZ
ENDUZ LIKE P2001-ENDUZ
DYNNR LIKE T554S-DYNNR
ACTIO TYPE C.
IF BEGUZ CO ' 0' AND ENDUZ CO ' 0'.
BEGUZ = SPACE06.
ENDUZ = SPACE06.
ENDIF.
PERFORM BDC_ADD_DYNPRO USING 'MP200000' DYNNR.
CASE ACTIO.
WHEN 'I'.
PERFORM BDC_WRITE_FIELD USING 'P2001-BEGUZ' BEGUZ 4.
PERFORM BDC_WRITE_FIELD USING 'P2001-ENDUZ' ENDUZ 4.
PERFORM BDC_ADD_FIELD USING 'BDC_OKCODE' '=UPD'.
WHEN 'D'.
PERFORM BDC_ADD_FIELD USING 'BDC_OKCODE' '=UPDL'.
ENDCASE.
ENDFORM.
=======================================================================
FORM BDC_WRITE_FIELD USING FNAM FVAL FLEN.
CLEAR BDCDATA.
BDCDATA-FNAM = FNAM.
WRITE FVAL TO BDCDATA-FVAL(FLEN).
APPEND BDCDATA.
ENDFORM.
=======================================
FORM BDC_ADD_FIELD USING FNAM
FVAL.
CLEAR BDCDATA.
BDCDATA-FNAM = FNAM.
BDCDATA-FVAL = FVAL.
APPEND BDCDATA.
ENDFORM.
Regard's
Smruti Ranjan
11-28-2012 5:54 AM
Dear Sujata,
Attach the code so we people can point the bug...
Thanks,
Amol