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 session

Former Member
0 Likes
727

Hi Experts,

I am facing a problem with BDC Session.

I have a BDC for VA01 T-Code. Where i am going to enter the line item details and selects that perticular line item and going to conditions tab. This is the requrement.

I am done, was going fine. But unfortunately i have come accross an issues where the index of the table control is selecting the worng line and going to conditions tab. Hence the price is coming incorrect in PROD environment.

I thought that this might be some thing to do with the control index. But when i execuyte the same program on other machine it is going fine.

When i saw the sessions creted in the firts run(Failed) even there the sessions are going fine if I deselect the radio button "Dynpro standard size" in SM35.

I think this is some thing to do with the standard window size. Coz when i run with " Dynpro standard size" selected. The index is changing on the tablecontrol.

Here i can see only 2 lines in the table control and if I deselect the " DYNPRO STANDARD SIZE" , then i am getting more than two line in the table control.

Let me know if i need to some thing here or if there is any SAP note for this.

Thanks,

Mohammed.

7 REPLIES 7
Read only

amit_khare
Active Contributor
0 Likes
700

Hi,

Actually passing table control in a BDC is always a tricky thing so is tab strip and subscreens.

Check this link it might help you.

<a href="http://www.sap-img.com/abap/bdc-example-using-table-control-in-bdc.htm">table control in bdc</a>

Regards,

Amit

Reward all helpful replies.

Read only

Former Member
0 Likes
700

Hi Mohammed,

Why not use function module BAPI_SALESORDER_CREATEFROMDAT2 instead of BDC session? This is a much better way of creating sales documents.

Gareth.

Read only

Former Member
0 Likes
700

In your BDC_INSERT function module pass the structure CTUPARAMS.

data x_ctuparams type ctu_params.

x_ctuparams-DISMODE = 'N'.

x_ctuparams-UPDMODE = 'S'.

<b>x_ctuparams-DEFSIZE= 'X'.</b>

Regards,

Ravi

Read only

0 Likes
700

Hi Ravi,

Thanks all for the replys.

First i am using Call transaction. If fails it should create a BDC Session.

Can I handle the dynpro syze in Call transaction?

Coz this error should not create a session. Any BDC error related to Customer/Material configuration will create a BDC Session.

Thanks,

Mohammed.

Read only

0 Likes
700

In Call transaction you have to use the OPTIONS from X_CTUPARAMS addition.

  • Fill x_ctuparams as already discussed

call transaction 'VA01' using it_BDCDATA options from x_ctuparams

messages into it_messages.

Regards,

Ravi

Read only

0 Likes
700

Try as below.

data g_ctuparams type ctu_params.

g_ctuparams-DISMODE = 'N'.

g_ctuparams-UPDMODE = 'S'.

g_ctuparams-DEFSIZE= 'X'. "for screen resolution

CALL TRANSACTION <Tx> USING <bdcdata> OPTIONS FROM g_ctuparams MESSAGES INTO <messtab>.

Read only

0 Likes
700

Friends,

tried this in the past. I am using 45B system where there is no "options" variant with Call transaction statement.

Thanks,

Mohammed.