12-27-2006 3:03 PM
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!!!!
12-27-2006 3:09 PM
12-27-2006 3:08 PM
12-27-2006 3:09 PM
12-27-2006 3:20 PM
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
12-27-2006 3:30 PM
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..
06-29-2015 1:09 PM
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.
12-27-2006 3:41 PM
I THINK U HAVE TO USE TWO LOOPS FOR TWO TABLE CONTROLRS IN PBO
TRY IT.
12-27-2006 3:53 PM
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
12-27-2006 4:00 PM
12-27-2006 4:21 PM
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.
12-27-2006 5:00 PM
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.