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

Table Control in a BDC

Former Member
0 Likes
1,242

Hi,

I have a BDC program ( Trasaction C202 - To assign operations to compoents in the material Tab) which has a table control.

Affter i do a P+ the record which becomes the first record in the table control is not constant. It keeps changing with different sets of data.

How can i handle this P+..?

Regards,

Sriram.

Hi,

I have a BDC program ( Trasaction C202 - To assign operations to compoents in the material Tab) which has a table control.

Affter i do a P+ the record which becomes the first record in the table control is not constant. It keeps changing with different sets of data.

How can i handle this P+..?

Regards,

Sriram.

8 REPLIES 8
Read only

Former Member
0 Likes
1,182

Hello,

P+ is the BDC_OKCODE for scrolling down. Depending on the number of rows visible on the screen you will have to use a counter and when the limit reaches the maximum number of records that can be entered on the screen, you will have to use P+ and reset the record counter back to 1.

Vikranth

Read only

0 Likes
1,182

Hi,

thanks for your quick response.

i am doing the same as you mentioned, but the problem is

In the first go the maximum rows visible is 12, after 12th records I am using P+, then the 9th record becoms the first record for one set of data, and for antoher set of data 11th record becomes the firest recrod after P+, this is not constant, keep on changing. I need to handle this dynamically.

is there any way to handle this.

Regards,

Sriram.

Edited by: Srirama Murthy Maddirala on Nov 9, 2009 8:44 AM

Edited by: Srirama Murthy Maddirala on Nov 9, 2009 8:51 AM

Read only

0 Likes
1,182

Hello,

I presume the number of rows visible on the screen at a time is constant. After displaying the 12 records and using P, the 13th record should become the first record. Not sure how you got 9th record as the first record. If possible post the relevant portion of the code where you are calling P

Vikranth

Read only

0 Likes
1,182

Hi,

Try to look for Go To Position(menu) command in the tcode if you want to edit a certain entry..or New Entry if you want to add...

Otherwise you really need to create a logic in which you need to use the number of records that will be displayed in the table control.

Regards,

Leonard Chomi

Read only

0 Likes
1,182

Hi Chomi,

yes, i need to have a logic, in such a ways that, i should read the table control values after doing P+.

is there any FM to read the Table control values at runtime..?

Regards,

Sriram.

Read only

former_member217544
Active Contributor
Read only

Former Member
0 Likes
1,182

Hi Srirama,

You follow your coding in that way:

LOOP AT i_itemdata INTO wa_itemdata. [IN I_ITEMDAT TABLE YOU WILL GET ITEM DETAILS]

l_index = l_index + 1.

IF l_index > 16 . [YOU CHECK DEFAULT NO OF TABLE CONTROL DURING RECORDING]

CLEAR l_index.

PERFORM bdc_dynpro USING 'SAPMM06E' '0320'.[YOU CHANGE PROGRAM NAME & SCREEN NO ]

PERFORM bdc_field USING 'BDC_OKCODE' '=P+'.

l_index = 1.

l_index = l_index + 1.

ENDIF.

..........................

WRITE DOWN BDC RECORDING

CONCATENATE 'EKPO-EMATN(' l_index ')' INTO l_field. [CHANGE FIELD NAME ACC YOUR REQUIREMENT]

PERFORM bdc_field USING 'BDC_CURSOR' l_field.

..................................................................

ENDLOOP.

Hope this can solve your problems.

Regards,

Tutun

Read only

Former Member
0 Likes
1,182

This message was moderated.