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 won't work in Table Control...

Wil_Wilstroth
Active Participant
0 Likes
2,000

Hi Guys,

Again, i am stuck in the bdc problem. I am trying to bdc into a table control. I have two items to put into the table control via BDC. The TCODE that i need to bdc is PAKG.

<b>Previously</b>,<i> some of you have given me many advise on this but i just couldn't solve it. Here i am attaching my code for everyone to help me.</i>

Below is the code that i wrote:

DATA: I(2) TYPE N.

I = 1.

LOOP AT TUPLOAD.

IF SY-TABIX > 1.

CLEAR PARA.

PARA = 'Q0221-BETRG'.

CONCATENATE PARA '(' I ')' INTO PARA.

PERFORM BDC_FIELD USING PARA TUPLOAD-AMOUNT.

PERFORM BDC_FIELD USING 'BDC_SUBSCR'

'SUBSCREEN_TC2000'.

PERFORM BDC_FIELD USING 'BDC_CURSOR' PARA.

CLEAR PARA.

PARA = 'Q0221-LGART'.

CONCATENATE PARA '(' I ')' INTO PARA.

PERFORM BDC_FIELD USING PARA TUPLOAD-WAGT.

CLEAR PARA.

PARA = 'Q0221-TAXAU'.

CONCATENATE PARA '(' I ')' INTO PARA.

PERFORM BDC_FIELD USING PARA TUPLOAD-TAXA.

PERFORM BDC_FIELD USING 'BDC_OKCODE' '=INSL'.

I = I + 1.

ENDIF.

ENDDLOOP.

thanks.

William

William Wilstroth
1 ACCEPTED SOLUTION
Read only

jayanthi_jayaraman
Active Contributor
0 Likes
1,970

Hi William,

Just try changing the following.

CONCATENATE <b>'PARA(' I</b> ')' INTO PARA.

Check this link.It contains code sample to handle table control in BDC.

http://www.sap-img.com/abap/bdc-example-using-table-control-in-bdc.htm

Kindly reward points if it is useful.

Hi Guys,

Again, i am stuck in the bdc problem. I am trying to bdc into a table control. I have two items to put into the table control via BDC. The TCODE that i need to bdc is PAKG.

<b>Previously</b>,<i> some of you have given me many advise on this but i just couldn't solve it. Here i am attaching my code for everyone to help me.</i>

Below is the code that i wrote:

DATA: I(2) TYPE N.

I = 1.

LOOP AT TUPLOAD.

IF SY-TABIX > 1.

CLEAR PARA.

PARA = 'Q0221-BETRG'.

CONCATENATE PARA '(' I ')' INTO PARA.

PERFORM BDC_FIELD USING PARA TUPLOAD-AMOUNT.

PERFORM BDC_FIELD USING 'BDC_SUBSCR'

'SUBSCREEN_TC2000'.

PERFORM BDC_FIELD USING 'BDC_CURSOR' PARA.

CLEAR PARA.

PARA = 'Q0221-LGART'.

CONCATENATE PARA '(' I ')' INTO PARA.

PERFORM BDC_FIELD USING PARA TUPLOAD-WAGT.

CLEAR PARA.

PARA = 'Q0221-TAXAU'.

CONCATENATE PARA '(' I ')' INTO PARA.

PERFORM BDC_FIELD USING PARA TUPLOAD-TAXA.

PERFORM BDC_FIELD USING 'BDC_OKCODE' '=INSL'.

I = I + 1.

ENDIF.

ENDDLOOP.

thanks.

William

13 REPLIES 13
Read only

Former Member
0 Likes
1,970

William

Please let me know which SAP transaction are you trying to us BDC for. Also mention the error you are getting. Normally when you want to add a new line, you just give that tcode & then keep populating data in the 2nd line.

Bipin

Read only

Former Member
0 Likes
1,970

While recording the BDC( Thru SHDB) you need either to press '+' button(if available, mostly available which goes to the next line in the table control). If it is not available then try with next page button on the application of the screen it goes to the next line.

While populating BDC data you need to populate either of these after every line.

Cheers,

Satya

Read only

0 Likes
1,970

The PAKG has a sample BDC file.

This mentions how to code for multiple lines.

I am copying it here:

PerNr ChkDt I OCRe TaxA Business No. RsAr QcTx WagT Hours Amount

07070707 31.12.1999 0 BC MC00 2000

/320 40

/322 50

07070707 31.12.1999 1 BC MC00 2200

/320 44

/322 55

Hope this helps,

Bhanu

Read only

0 Likes
1,970

Thanks for the fast reply Bipin and Satya. I really appreciate that. Dun worry i will award both of you.

I am doing BDC for tcode : PAKG - General Adjustment Workbench.

There is no error. But, the bdc when it reach the table control it won't bdc into it. I got a few lines of data to go into the table control via bdc.

I have done what both of you advise. Still it is not helpful. It still won't go into it. i have used '=INSL' and '=P+'. Yet it won't go into the table control.

thank you so much.

William.

William Wilstroth
Read only

0 Likes
1,970

Hi William,

Is the table , a table control object or an ALV grid

object. If it is an ALV grid, then you will not be able

to use BDC to update the fields.

Regards

YM

Read only

0 Likes
1,970

Thanks for the reply. I am grateful for it.

P/S i would like to give bhanu and yuva more points. But it was disable. Only the 2 points was enable. I give you 2 for it. If the system allow me to give you 6... i will give you one.

first of all thank you so much.

Bhanu -

i have took out the sample and bdc it accordingly still it is not working.

Yuva -

it is an ALV it is dialog.

Thanks

William.

William Wilstroth
Read only

0 Likes
1,970

William,

May be you may have to enter 10 entries in BDC by using field(01)...field(10)..After every 10 entries use P+ tcode & so on. Also use default size in Options parameters in BDC that will always keep a default size while populating number of items. I think that should solve the isseu. If not let me know.

Cheers,

Bipin

Read only

jayanthi_jayaraman
Active Contributor
0 Likes
1,971

Hi William,

Just try changing the following.

CONCATENATE <b>'PARA(' I</b> ')' INTO PARA.

Check this link.It contains code sample to handle table control in BDC.

http://www.sap-img.com/abap/bdc-example-using-table-control-in-bdc.htm

Kindly reward points if it is useful.

Read only

0 Likes
1,970

Hi Jayanthi,

i have gone through this link and had make the necessary requirements and changes.

It is still not BDC into the table control.

Thanks william

William Wilstroth
Read only

0 Likes
1,970

Hi William,

I am not sure what functionality you are trying to do, But I have faced a similar situation in SAP CRM when I needed to enter values in an ALV grid. I was able to find a BADI, where I could fill the values in the background after updating all the other screen fields using the BDC. maybe you could see if one is available for your functionality. Just an idea.

Regards

YM

Read only

0 Likes
1,970

Hi William,

I observed a button called settings in PAKG transaction->Batch Input.

Suppose if you give the session name there,then it will take you to that record.That will be your first record while recording.

So you can handle the table control by giving the session name in settings during recording and use the same in your coding.

Read only

0 Likes
1,970

This issue has been put on hold.. i will come back with the results for everyone...

thanks to everyone who has helped me.

William Wilstroth

William Wilstroth
Read only

Wil_Wilstroth
Active Participant
0 Likes
1,970

- Closing very old and ancient issues, thanks -

William Wilstroth