Application Development 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: 

Two Tables Contol in One Dynpro.

Former Member
0 Kudos

Hi to all!!! This time i'm needing to put two tables Controls in one Dynpro. When i created the second table with the wizard i go trough all the steps but finally, no table control is created. A warning appeared on the first step. It says something about the loop of the TControls at the PBO.

what I am making bad? any suggestion?

If i can´t use two table controls i would need an alv in my dynpro...then it would be : a Table Control and an ALV in the same Dynpro.

is this posible with the custom control? how can i do this?

well, as usual, rewards pòints for Help.if there are example codes, please send me!!

Thanks in advanced to all!!!!

1 ACCEPTED SOLUTION

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

And yes, you can have a table control and a custom control in the same screen, but again, there is no problem with 2 table controls in one dynpro, so you should probably proceed with that.

Regards,

Rich Heilman

10 REPLIES 10

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

Andrew, there should be no problem with using two table controls in one dynpro. Check your screen flow code

Regards,

Rich Heilman

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

And yes, you can have a table control and a custom control in the same screen, but again, there is no problem with 2 table controls in one dynpro, so you should probably proceed with that.

Regards,

Rich Heilman

Former Member
0 Kudos

Hi Andrew,

You can put 2 table controls in one dynpro I did this once,

You error is not related to displaying table control in the screen....

It is specifying that when you use the table control you have to loop it in PBO and PAI side with both the table controls,

the above error is related to this, that means u missed to put the loop statement on PBO site can u check it out once

Regards,

GUDURI

Former Member
0 Kudos

Note:If you insert several table controls on a screen, the sequence of the LOOP statements in the PBO event of the flow logic is important. It must proceed according the position of each table control on the screen (that is, from top left to bottom right).

Tip:When you use the wizard, generate the table controls in reverse order - that is, generate the table control at the bottom right of the screen first.

The above tip is given in table control it self.

If you want to create two table controls - Name the first table you want to show in the screen top as TAB1

and the second table as TAB2 next to table TAB1.

Goto the screen painter there create the 'TAB2' table control first using Wizard. so that it creates PBO Modules and loop itself.

Then now create the 'TAB1' so that PBO module for this table will be in top of the previous one. then it wont

create any problems.

i am sure it worked out for me..

The reason may be in screen table created first should have the loop first.That may cause the problem if you created the TAB1 first and TAB2 second. in that case TAB2s LOOP will come first and TAB1s loop will come second..

0 Kudos

Yuvaram thank you this solved my problem, with "wrong" loop order I used to get no data, changing loop order in dynpro flow logic my data was displayed fine.

Former Member
0 Kudos

I THINK U HAVE TO USE TWO LOOPS FOR TWO TABLE CONTROLRS IN PBO

TRY IT.

Former Member
0 Kudos

well people.....i still having the same problem. I put two table controls in another zprogram and it worked OK. I don't realise what is happening in my other program.

I will continue proving....

when i close the screen painter after trying to put the second Table Control, a message appear: Field DYNPFIELD_ATTR it has the value nonallowed LENGTH in 134.

Any finally suggestion?

Message was edited by:

Andrew83

0 Kudos

Can you please post the code which is inside the screen flow of your dynpro.

Both the PBO and the PAI.

Regards,

Rich Heilman

Former Member
0 Kudos

here it is...

<b>Note: the commentaries and the names of the variables are in Spanish because I must do them of that form.</b>

<b>PROCESS BEFORE OUTPUT.</b>

MODULE status_1001.

MODULE grisado_campos.

*&SPWIZARD: PBO FLOW LOGIC FOR TABLECONTROL 'TC_ITEM'

MODULE tc_item_change_tc_attr.

*&SPWIZARD: MODULE TC_ITEM_CHANGE_COL_ATTR.

LOOP AT t_item

WITH CONTROL tc_item

CURSOR tc_item-current_line.

MODULE tc_item_get_lines.

*&SPWIZARD: MODULE TC_ITEM_CHANGE_FIELD_ATTR

ENDLOOP.

<b>PROCESS AFTER INPUT.</b>

*&SPWIZARD: PAI FLOW LOGIC FOR TABLECONTROL 'TC_ITEM'

LOOP AT t_item.

CHAIN.

FIELD t_item-pos.

FIELD T_ITEM-TIPO_ANIMAL.

FIELD T_ITEM-CANT_CAB.

FIELD T_ITEM-PRECIO_VIVO.

FIELD T_ITEM-DESCRIPCION.

FIELD t_item-kilos_lmp.

FIELD t_item-kilos_cmp.

FIELD t_item-kilos_fab.

FIELD t_item-pr_rinde.

FIELD t_item-imp_rinde.

ENDCHAIN.

ENDLOOP.

MODULE tc_item_user_command.

*&SPWIZARD: MODULE TC_ITEM_CHANGE_TC_ATTR.

*&SPWIZARD: MODULE TC_ITEM_CHANGE_COL_ATTR.

FIELD e_1001-zterm MODULE buscar_descr_cpago.

FIELD e_1001-mwskz MODULE buscar_descr_indic_imp ON INPUT.

FIELD e_1001-tarnr MODULE buscar_descr_tarifa_flete ON REQUEST.

FIELD e_1001-lifint MODULE buscar_descr_comprador ON REQUEST.

FIELD e_1001-liftra MODULE buscar_descr_transport ON REQUEST.

FIELD e_1001-PSERVICE .

FIELD e_1001-PRECUP .

MODULE user_command.

0 Kudos

Andrew,

I am talking in side the program, If you go with flowlogic from screen painter u will get first screen with events in thats screen u have to loop pbo with one table control like

Loop at t_item with control TC_ITEM

process before out put..

endloop

then again create a userdefined event here and loop as above this event with second table control ....

It will workout definetly

Regards,

GUDURI.