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: 

Call transaction VL06G

Former Member
0 Kudos

How can I perform some action in a call transaction session depending on the screen, for example, in the same session, for one set of data, an error can occur and stop my transaction. How can I pass this point ?

I am calling the transaction VL06G, make the selection, select all deliverys in the next screen, and push the button 'Post goods issue'. If an error occur, the session is over and the remaining deliverys are not processed. Please, give me a solution.

11 REPLIES 11

jayanthi_jayaraman
Active Contributor
0 Kudos

Hi,

Just check this.May be it's useful for you.

Regards,

J.Jayanthi

Former Member
0 Kudos

No help, I know what means mode 'E'.

My question is how do I pass them...

0 Kudos

Hi,

If you want to do step by step , use 'A'.

Otherwise you can collect the error messages in an internal table.

Check this also.

http://www.sapgenie.com/abap/bdc.htm

Former Member
0 Kudos

Hi,

Do the call transaction this way:

CALL TRANSACTION C_TCODE USING BDC_TAB MODE 'N' update 'S'.

You have a Sample Code in this thread:

Here you can catch the error and proceed as you wish.

Regards,

Anjali.

Former Member
0 Kudos

I think you don't understand what I'm trying to explain here.

Yes, i looked at your code, and I undestand what you have done there. Processing in mode 'N'... ok, if one error appears, the processing continues, and is registered in a batch session . But....

If the processing is stoped when an error occurs, how can I continue with the rest of the operations ?

0 Kudos

Hi,

Let me know if it is correct.

You want to process the transaction irrespective of error and then display all the error messages at a strecth.

If it is so, this code sample is useful.

  • Call transaction to update customer instalment text

CALL TRANSACTION 'ME22' USING bdc_tab MODE 'N' UPDATE 'S'

MESSAGES INTO messtab.

  • Check if update was succesful

IF sy-subrc EQ 0.

ADD 1 TO gd_update.

APPEND wa_ekko TO it_success.

ELSE.

  • Retrieve error messages displayed during BDC update

LOOP AT messtab WHERE msgtyp = 'E'.

  • Builds actual message based on info returned from Call transaction

CALL FUNCTION 'MESSAGE_TEXT_BUILD'

EXPORTING

msgid = messtab-msgid

msgnr = messtab-msgnr

msgv1 = messtab-msgv1

msgv2 = messtab-msgv2

msgv3 = messtab-msgv3

msgv4 = messtab-msgv4

IMPORTING

message_text_output = w_textout.

ENDLOOP.

  • Build error table ready for output

wa_error = wa_ekko.

wa_error-err_msg = w_textout.

APPEND wa_error TO it_error.

CLEAR: wa_error.

ENDIF.

For more information, check

http://www.sapdevelopment.co.uk/bdc/bdc_ctcode.htm

Regards,

J.Jayanthi

0 Kudos

Hi Ivanov,

Short answer is - you can't.

If the BDC session encounters an error, you can't do conditional processing to say, ok I'll skip this error and go on doing the other stuff I wanted to do. It doesn't work that way. A BDC is a pre-programmed macro and once its set up you can't alter the way it will behave mid transaction.

The only way to do this, is to detect the error from your CALL TRANSACTION statement and then modify the BDC table to address the error and then issue another CALL TRANSACTION.

If you submit multiple transactions on one BDC session in SM35 it will continue with the other transactions if one fails, but it wont skip over errors within a transaction and keep going (unless you intervene manually). It doesn't work like that.

Hope that helps.

Brad

Former Member
0 Kudos

yes, this is what I thought too, but I needed a confirmation some how.

Thanks Brad, precisely like usual.....

thaks again...

0 Kudos

Hi Ivanov,

No problems. How did you go with the availability checking issue?

Brad

Former Member
0 Kudos

What you are trying to do is not possible but check if this workaround is possible( Unless performance is not a major issue ) -

I've not gone through your Xn so not sure.

On the next screen instead of selecting all deliveries,

select one by one. In BDC recording select only the top delivery --> process it --> transaction Over.

Start again. Now since the earlier delivery is processed it should not appear in the list.

Repeat the procedure.

Here CALL TRANSACTION will be called for each delivery.

Till it gives you the message "No Deiliveries Selected".

Thanks,

Ram

0 Kudos

Sorry I don't know how to edit the message and I've a few more points for my last suggestion.

In case of error you need to change your next BDCDATA so that next delivery selected will not be the top but will be at the 2nd position. and so on...

As Top delivery will be the delivery in error and should not be re-processed.

Thanks,

Ram