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

MODULE POOL PROGRAMMING

Former Member
0 Likes
577

HI,

I WANT TO DISPLAY THE ITEM VALUES IN A TABLE CONTROL.

BUT I AM UNABLE TO POPULATE THE DATA IN TABLE CONTROL

SYNTACTICALLY IT IS SHOWING CORRECT.

BUT STILL I AM UNABLE TO GET THE DATA.

process before output.

loop at it_zrms with control vcontrol.

module status_0100.

endloop.

process after input.

loop at it_zrms .

module user_command_0100.

endloop.

_____________________________________

PROGRAM ZRMSTOTTSLREQ .

TABLES: ZRMSTTSLREQ.

TYPES: BEGIN OF TYP_ZRMS.

INCLUDE STRUCTURE ZRMSTTSLREQ.

TYPES: END OF TYP_ZRMS.

DATA: IT_ZRMS TYPE STANDARD TABLE OF TYP_ZRMS INITIAL SIZE 0,

WA_ZRMS TYPE TYP_ZRMS.

CONTROLS: VCONTROL TYPE tableview USING SCREEN '100'.

&----


*& Module USER_COMMAND_0100 INPUT

&----


  • text

----


module USER_COMMAND_0100 input.

CASE SY-UCOMM.

WHEN 'DISP'.

SELECT * FROM ZRMSTTSLREQ INTO TABLE IT_ZRMS

WHERE ORDER_REQ_NO EQ ZRMSTTSLREQ-ORDER_REQ_NO.

ENDCASE.

endmodule. " USER_COMMAND_0100 INPUT

&----


*& Module STATUS_0100 OUTPUT

&----


  • text

----


module STATUS_0100 output.

  • SET PF-STATUS 'xxxxxxxx'.

  • SET TITLEBAR 'xxx'.

READ TABLE IT_ZRMS INTO WA_ZRMS WITH KEY ORDER_REQ_NO = WA_ZRMS-ORDER_REQ_NO.

MOVE-CORRESPONDING wa_ZRMS TO ZRMSTTSLREQ.

APPEND WA_ZRMS TO IT_ZRMS.

endmodule. " STATUS_0100 OUTPUT

IF I CHANGE THIS ALSO I AM UNABLE TO POPULATE THE DATA.

Message was edited by: amit teja

5 REPLIES 5
Read only

gopi_narendra
Active Contributor
0 Likes
542

Hi amit,

<b>THE PAI MODULE between loop endloop of table control is missing.</b>

in the PAI, u shoudl write a module, just go thru these examples in SE38

demo_dynpro_tabcont_loop

demo_dynpro_tabcont_loop_at

<b>Please change the order as suggested by prashanth,

USER_COMMAND should be the last</b>

Regards

Gopi

Message was edited by: Gopi Narendra

Message was edited by: Gopi Narendra

Read only

Former Member
0 Likes
542

HI,

process before output.

loop at it_zrms into wa_zrms with control vcontrol.

module status_0100.

endloop.

process after input.

<b>loop at it_zrms .

endloop.

module user_command_0100.</b>

The order was different.

Best regards,

Prashant

Read only

Former Member
0 Likes
542

I have used this..its working fine...

In the table control,,

If u are getting the values form Table givethe table name in F7 and retrive the fields...

START-OF-SELECTION.

SELECT

couponno

kunnr

name1

bpcan

rmdamt

status

p_date

und_date

dup_ind

dup_date

INTO CORRESPONDING FIELDS OF TABLE t_zvaluemax

FROM zvaluemax WHERE

couponno IN s_coupon AND

kunnr IN s_kunnr AND

bpcan IN s_bpcan AND

inscan IN s_inscan.

***t_ZValuemax is the internal table name...

****tc_ZValuemax is table control

in PBO...

LOOP AT t_zvaluemax WITH CONTROL tc_zvaluemax CURSOR

tc_zvaluemax-current_line.

ENDLOOP.

in PAI..

LOOP AT t_zvaluemax.

CHAIN.

FIELD: t_zvaluemax-kunnr,

t_zvaluemax-rmdamt,

t_zvaluemax-p_date,

t_zvaluemax-status,

t_zvaluemax-und_date,

t_zvaluemax-dup_ind,

t_zvaluemax-dup_date.

MODULE chain_request ON CHAIN-REQUEST.

ENDCHAIN.

Here I am displaying the data in table control...then changing the data and save it in the tabl;e..

Read only

Former Member
0 Likes
542

I have used this..its working fine...

In the table control,,

If u are getting the values form Table givethe table name in F7 and retrive the fields...

START-OF-SELECTION.

SELECT

couponno

kunnr

name1

bpcan

rmdamt

status

p_date

und_date

dup_ind

dup_date

INTO CORRESPONDING FIELDS OF TABLE t_zvaluemax

FROM zvaluemax WHERE

couponno IN s_coupon AND

kunnr IN s_kunnr AND

bpcan IN s_bpcan AND

inscan IN s_inscan.

***t_ZValuemax is the internal table name...

****tc_ZValuemax is table control

in PBO...

LOOP AT t_zvaluemax WITH CONTROL tc_zvaluemax CURSOR

tc_zvaluemax-current_line.

ENDLOOP.

in PAI..

LOOP AT t_zvaluemax.

CHAIN.

FIELD: t_zvaluemax-kunnr,

t_zvaluemax-rmdamt,

t_zvaluemax-p_date,

t_zvaluemax-status,

t_zvaluemax-und_date,

t_zvaluemax-dup_ind,

t_zvaluemax-dup_date.

MODULE chain_request ON CHAIN-REQUEST.

ENDCHAIN.

Here I am displaying the data in table control...then changing the data and save it in the tabl;e..

Read only

Former Member
0 Likes
542

> process before output.

>

> loop at it_zrms with control vcontrol.

> module status_0100.

>

> endloop.

>

> process after input.

>

> loop at it_zrms .

<b>> module user_command_0100.</b>

>

> endloop.

The line in bold will never be executed since your user_command_100 will not be accessed since the table has no value.

Write this module out of the loop and preferrably after the loop...endloop.

this will work.

Regards

Nishant