2005 Nov 09 1:58 AM
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
2005 Nov 09 3:40 AM
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
2005 Nov 09 2:12 AM
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
2005 Nov 09 2:19 AM
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
2005 Nov 09 2:51 AM
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
2005 Nov 09 3:08 AM
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.
2005 Nov 09 3:26 AM
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
2005 Nov 09 3:39 AM
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.
2005 Nov 09 3:56 AM
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
2005 Nov 09 3:40 AM
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.
2005 Nov 09 3:44 AM
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
2005 Nov 09 3:52 AM
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
2005 Nov 09 4:06 AM
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.
2005 Nov 14 8:54 AM
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
2009 Apr 03 5:26 AM
- Closing very old and ancient issues, thanks -
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |