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

performing BDC from a dialog programming Table control

Former Member
0 Likes
611

Hi!

Here i am finding one problem that first i created one screen in dialog programming for a table control. the records from the table control then goes to me21 tcode. but the problem is, i written code for selecting all records in the table control. so it is showing all records selected but only 13 records which are displaying in table control only posted to the me21 tcode.

so what i have to do to post the remaining records of the table control to the me21 tcode ?

6 REPLIES 6
Read only

Former Member
0 Likes
579

Why can't you simply make a call to BAPI_PO_CREATE1 and avoid writing a BDC. BAPI is the preferred way of doing this.

Take a look at this for sample BDC program

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

Regards,

Ravi

Note - Please mark all the helpful answers

Read only

Former Member
0 Likes
579

Hi Raj Kumar,

The reason you are getting only 13 records is because as per your user settings the table control in me21 tcode is supporting only 13 records at any given time on a single page. For more records you need to go to the next page. Basically you need to just reset the index of your records once it reaches 13. Then the 14th record again starts from 1.

e.g Suppose my table control has 20 entries for MARA-MATNR field to be input & my screen table control shows only 13 entries, then i need to supply then entries as 'MARA-MATNR(01)' to 'MARA-MATNR(13)'. Here the no within the bracket represents an index for the record to be inserted.

To get more clarity on this, just do a recording for the transaction ME21. Once you have entered all the records on a single page, press the Page Down button in the toolbar & enter new records & generate the program for the recording. In this program, you will be able to see what i am just demonstrated here.

Regards,

Chetan.

PS:Reward points if this is helpful.

Read only

0 Likes
579

hi Chetan!

thank you for ur reply.

but here i am not getting that problem which u specified.

if i select individual records or all records it is running successfully.

my requirement is in PBO i have given default selection for the entries which means when the output shows it displays with lines marked with yellow color.

then if i click pushbutton only the records which are visible in that screen only posted into ME21. the remaining records are not posted even i selected those defaultly when ever i execute the dialog programming with a transaction code.

regards,

RK.

Read only

0 Likes
579

Hi Raj,

Please re record ur transaction recording again.

while selecting the rows in table control, dont physically select them using the mouse.

u need to click on the position button, enter the value of item, clik find and now the row is selected

This should solve ur issue.

Regards

- Gopi

Read only

0 Likes
579

Use index..

While recording time record with 2 line items. and a page down(ok code: P++).then u can see the index changing 1,2 etc...Instead of that index use a varibale and increment it till 13. then initialise this varible and call the page down code...

Read only

0 Likes
579

hi !

thank you for ur reply.

but here i am not getting that problem which u specified.

if i select individual records or all records it is running successfully.

my requirement is in PBO i have given default selection for the entries which means when the output shows it displays with lines marked with yellow color.

then if i click pushbutton only the records which are visible in that screen only posted into ME21. the remaining records are not posted even i selected those defaultly when ever i execute the dialog programming with a transaction code.

regards,

RK.