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

BDC error message

Former Member
0 Likes
797

Hello,

I am uploading data for FB05 using bdc for 10 customers.but if i get error for the 1st customer it stops further processing for other customer.Can i do something like it gives list of errors for customers which are having fault other should be uploaded finely.i am using call transaction for this.

5 REPLIES 5
Read only

Former Member
0 Likes
716

Sorry, but I think that's the whole concept of "TRANSACTION". You either save everything or nothing.

You could call FB05 for each customer and output the error messages of the ones that go wrong, The others would be saved. Of course that can lead to performance problems depending on how many customers you have to update. You can try to find some BAPI/FM that will do the FB05 job and maybe, if you are lucky, this FM will give a list of all errors, but I'm sure if this is a standard function it will keep that transaction rule: save all or save nothing.

Best reagards,

Sergio

Edited by: Sérgio Oliveira on Aug 3, 2009 3:08 PM

Read only

Former Member
0 Likes
716

Hi,

You can call transaction record by record using a loop for each customer in the BDC program .

In this way the customers which do not have any error will be processed correctlly and others will result in error.

Otherwise use session method.Session method is helpful for more data.

Regards,

Subhashini

Read only

RahulKeshav
Active Contributor
0 Likes
716

hi,

You have to run the BDC for each line.....

So loop the table and do bdc inside it....

or you can try....

BAPI....BAPI_ACC_DOCUMENT_POST

Thnx

Rahul

Read only

Former Member
0 Likes
716

Hi ,

You can run your BDC in background mode using call transaction.

syntax:

CALL TRANSACTION c_fb05 USING i_bdcdata

OPTIONS FROM wa_opt

MESSAGES INTO i_msgcoll.

wa_opt-dismode = 'N'.

means no display mode.

Hope this can solve your problems.

Regards,

Tutun

Read only

Former Member
0 Likes
716

hi,

check this piece of code..

*Calling Transaction FB50 .

call transaction 'FB50' using BDCDATA mode 'N' messages into MESSTAB.

*Reading Internal Table MESSTAB.

read table MESSTAB.

if SY-SUBRC = 0.

*Selecting TEXT From Table T100 Into Variable V_TEXT.

select single TEXT into V_TEXT from T100 where SPRSL = MESSTAB-MSGSPRA

and ARBGB = MESSTAB-MSGID

and MSGNR = MESSTAB-MSGNR.

if SY-SUBRC = 0.

V_LMSTRING = V_TEXT.

if V_LMSTRING cs '&1'.

replace '&1' with MESSTAB-MSGV1 into V_LMSTRING.

replace '&2' with MESSTAB-MSGV2 into V_LMSTRING.

replace '&3' with MESSTAB-MSGV3 into V_LMSTRING.

replace '&4' with MESSTAB-MSGV4 into V_LMSTRING.

else.

replace '&' with MESSTAB-MSGV1 into V_LMSTRING.

replace '&' with MESSTAB-MSGV2 into V_LMSTRING.

replace '&' with MESSTAB-MSGV3 into V_LMSTRING.

replace '&' with MESSTAB-MSGV4 into V_LMSTRING.

endif.

condense V_LMSTRING.

*Checking The Message Type and Display The Message Accordingly.

if MESSTAB-MSGTYP = 'E'.

V_ERROR = V_ERROR + C_INCREMENT.

IT_RESULT-MEGTYPE = 'Error'.

IT_RESULT-MESSAGE = V_LMSTRING.

endif.

if MESSTAB-MSGTYP = 'S'.

V_SUCCESS = V_SUCCESS + C_INCREMENT.

IT_RESULT-MEGTYPE = 'Successful'.

IT_RESULT-MESSAGE = V_LMSTRING.

endif.

else.

  • write: / MESSTAB.

endif.

endif.

*Appending Table IT_RESULT.

append IT_RESULT.

*Delete Rows of Internal Table MESSTAB.

refresh MESSTAB.

*Clear Header of MESSTAB.

clear MESSTAB.

endloop.

thanks

Ashu SIngh