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

Problem in FB01 's BDC

RatneshSisodiy1
Active Participant
0 Likes
1,416

Hi Experts,

I am posting FB01 using SHDB.

I run FB01...the screen I get is Post document header Data ...I enter required data and press enter.

Enter G/L account document : Add asset item screen is displayed....again I make entries...and press enter...a pop-up appears...name CODING BLCOK...and asks for entering WBS element.

my problem is that when I directly use FB01 then no Pop-up appears and transaction posts document successfully...but if record FB01 using SHDB then pop-up appears...

could please tell me why it is happening...why such dual behaviour...please reply.

Thanks in Advance.

Ratnesh

5 REPLIES 5
Read only

Former Member
0 Likes
885

Hi Ratnesh,

Can you try BAPI_ACC_DOCUMENT_POST instead of BDC,if possible?

Cheers

Amit

Read only

RatneshSisodiy1
Active Participant
0 Likes
885

Thanks for reply but I have to use BDC in existing Z report.

Read only

0 Likes
885

Hi Ratnesh,

Please check while recording where that pop up called. Try to skip that screen and see.

Regards,

Madhu.

Read only

Sandra_Rossi
Active Contributor
0 Likes
885

Hi Ratnesh,

there can be many reasons why it doesn't behave identically. The most probable is that the FB01 standard program tests the SY-BINPT system flag which is 'X' when execution is via batch input. That is not the only one (I have written a wiki about what can be the reason ). Using SHDB, you can record/play by forcing SY-BINPT = space, using option "not a batch input session". In that case, the screens may be different, so I recommend you to record again from scratch, then play.

If it doesn't work, then you should have a look at the wiki, that may not solve but you can understand where is the difference (I know it is difficult to read it, so tell me what is not clear).

Using a BAPI is of course always the best option other BDC, if it exists/or is possible.

BR

Sandra

Read only

0 Likes
885

Hi Ratnesh,

This Happens because, FB01 is standard program, and when you arerecording coding block which is screen number cobl-002 will trigger automatically as there can be some mandatory fileds to be filled in for some scneario. so it will get triggered for GL postings only. if you need to pass some field value just pass it on else ignore and proceed with the next screen.

If you check further, the screens called for GL posting during recording would be 300(first screen)-002(coding block)-330(for more data).

Where as for customer and vendor posting this will be not come into picture.

hope this helps you.

Best Regards

Manoj

Edited by: Manoj Kumar T on Aug 11, 2011 11:33 AM