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

FB08 BDC Session Being Created issue

Former Member
0 Likes
2,054

Hellow ABAP Experts,

I have a business requirement and I am having issue with creating BDC Session as NEW for transaction FB08 using custom code. I am storing data in BDC table as follow and using the standard Functions for BDC Open, Insert, and Close.

bdc_dynpro - 'SAPMF05A' '0105'.

bdc_field - 'BDC_CURSOR' 'BSIS-BUDAT'.

bdc_field - 'RF05A-BELNS' ZBELNR.

bdc_field - 'BKPF-BUKRS' ZBUKRS

bdc_field - 'RF05A-GJAHS' ZGJAHR.

bdc_field - 'UF05A-STGRD' '03'.

bdc_field - 'BSIS-BUDAT' ZDATE.

bdc_field - 'BDC_OKCODE' '/11'

In SM35, it stores BDC Session in Being Created status and it does not allow me to process. When I analyze the session it shows in Overview Section.

Overview

Transaction Screen

New 1 1

Incorrect 0 0

To Process 1 1

Processed 0 0

Deleted 0 0

Current Content 1 1

Removed 1- 1-

Created 0 0

My code worked before. I was able to create NEW session before and now It removes the screen. SAP Version is 6.0. I also tried OKCODE '=BU' but it gives the same issue. I truly need your help in resolving issue.

<< Moderator message - Please do not promise points >>

Thanks.

Ysv

Edited by: Rob Burbank on Nov 14, 2011 11:56 AM

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,800

Let's see the code for closing the session.

Rob

13 REPLIES 13
Read only

Former Member
0 Likes
1,800

I would try processing in the foreground with display all screens and see if there is any BACK or Cancel is being done before save.

Read only

Former Member
0 Likes
1,801

Let's see the code for closing the session.

Rob

Read only

0 Likes
1,800

Rob,

I am using the following closing code after BDC Insert return code is 0.

call function 'BDC_CLOSE_GROUP'

exceptions

not_open = 1

queue_error = 2

others = 3.

if sy-subrc <> 0.

message id sy-msgid type sy-msgty number sy-msgno

with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

endif.

Is there anyway I can process the BDC session from Being Created status by restoring the removed screen? Or SAP is previnting BDC Session creation for FB08? I do not understand why it is in Being created status because same custom code is able to create BDC session giving NEW status for other FI transaction.

Any suggestion how to fix this issue?

Thanks

Ysv

Read only

0 Likes
1,800

I have a similar program that reverses documents, but it does it through CALL TRANSACTION rather than creating a BDC session.

Your code appears correct. I suspect that the problem is with the opening, inserting and closing the BDC session. In debug mode, make sure that each is being called ant returning SY-SUBRC = 0.

Rob

Read only

0 Likes
1,800

My custom code is doing Call transaction successfully for FB08 using the same BDC table. Only if previous FI transaction in custom code fails then it should create BDC sessions for the following transactions.

I have debugged my code several time for BDC Open, Insert & Close and found all three Return code is 0 for FB08 everytime. I tried also different OK code but I still have issue of Being Created status.

Thanks.

Ysv

Read only

0 Likes
1,800

I have a different program that also creates a BDC for failed CALL TRANSACTIONs.

Is your program reversing a single document or is it possible to reverse multiple documents?

Rob

Read only

0 Likes
1,800

My program is doing single document reversal and that would be a scenario most of the time. However, there may be multiple documents to be reversed in an exceptional scenario. That may happen once in a while.

Is your program capable to reverse single as well as multiple document? May I have details of your program please? If you need my email please let me know how can I give it without publishing it on Internet.

Thanks.

Ysv

Read only

0 Likes
1,800

Please do not ask for e-mail addresses on the forum. In any event, they are easily available.

My program will insert one or more documents to be processed.

In the case you have now, are you processing one or more than one document?

Rob

Read only

0 Likes
1,800

I was able to recreate your problem by creating, inserting but not closing a batch input session, so I think you should carefully check to make sure you are doing this.

You may be able to process the BDC by pressing the release button (Shift+F4) with this session selected.

Rob

Read only

0 Likes
1,800

Rob,

You are absolutely right. After reading your reply about recreating my scenario, I found what was the issue I had.

After BDC INSERT, if Return code is 0 then I was doing quick SAP table look up to grab BDC Session QID before BDC Close. I removed that code of SAP Table look up and I am now able to create BDC Session for FB08 in NEW status.

Before, I did not suspect that code is the issue because the order of BDC OPEN, BDC INSERT, SAP Table Look up, and BDC CLOSE code was able to create BDC Session in Status NEW for other FI transaction (more than 7 screens). But now I realized that FB08 has only 1 screen so probably SAP does not like delay in closing BDC and put my session in Being created status.

My issue has been resolved. Thanks very much for your help!

Yashasvi

Read only

0 Likes
1,800

Glad to help.

Next time, though, assign points for any helpful answers.

Rob

Read only

0 Likes
1,800

Rob,

I checked the radio button Solved Problem (10) in your prevous reply and awarded 10 points. I am new to SDN so still not familiar with the procedure. So please help me out here if you do not see 10 points awarded.

Thanks

Ysv

Read only

0 Likes
1,800

It appears now, so I guess there was just a glitch somewhere.

Rob